~ubuntu-branches/ubuntu/intrepid/gpib/intrepid

« back to all changes in this revision

Viewing changes to debian/patches/ines-gpib-irq-fix.patch

  • Committer: Bazaar Package Importer
  • Author(s): Carlo Segre
  • Date: 2007-10-22 23:43:54 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20071022234354-5tpzy3if336ub4xm
Tags: 3.2.09-2
* Fix determination of phpapi version number
* Remove tnt4882-tms module from list as it will not compile cleanly 
  (Closes: #445253)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Index: driver/ines/ines_cis_dump.txt
2
 
===================================================================
3
 
RCS file: /cvsroot/linux-gpib/linux-gpib/driver/ines/ines_cis_dump.txt,v
4
 
retrieving revision 1.1
5
 
retrieving revision 1.2
6
 
diff -u -r1.1 -r1.2
7
 
--- driver/ines/ines_cis_dump.txt       4 Dec 2002 19:36:07 -0000       1.1
8
 
+++ driver/ines/ines_cis_dump.txt       20 Feb 2006 14:38:23 -0000      1.2
9
 
@@ -1,4 +1,4 @@
10
 
-
11
 
+First a dump from a revision 1.1 card:
12
 
 
13
 
 Socket 0:
14
 
 dev_info
15
 
@@ -15,3 +15,17 @@
16
 
 irq mask 0xffff [pulse]
17
 
 manfid 0x01b4, 0x4730
18
 
 
19
 
+
20
 
+Now a revision 1.0 card (note, they're using National Instruments manfid!):
21
 
+
22
 
+dev_info
23
 
+NULL 0ns, 512b
24
 
+vers_1 4.1, "ines GmbH", "IEEE488.2 PCMCIA", "Rev 1.0",
25
 
+"Compat: NEC 7210"
26
 
+config base 0x0100 mask 0x0003 last_index 0x01
27
 
+cftable_entry 0x31 [default]
28
 
+Vcc Vnom 5V
29
 
+timing wait 120us
30
 
+io 0x0000-0x001f [lines=5] [8bit] [16bit]
31
 
+irq mask 0xffff [pulse]
32
 
+manfid 0x010b, 0x4882
33
 
Index: driver/ines/ines_cs.c
34
 
===================================================================
35
 
RCS file: /cvsroot/linux-gpib/linux-gpib/driver/ines/ines_cs.c,v
36
 
retrieving revision 1.44
37
 
retrieving revision 1.46
38
 
diff -u -r1.44 -r1.46
39
 
--- driver/ines/ines_cs.c       20 Sep 2005 02:32:56 -0000      1.44
40
 
+++ driver/ines/ines_cs.c       27 Feb 2006 22:59:27 -0000      1.46
41
 
@@ -175,14 +175,14 @@
42
 
        memset(link, 0, sizeof(struct dev_link_t));
43
 
 
44
 
        /* The io structure describes IO port mapping */
45
 
-       link->io.NumPorts1 =32;
46
 
+       link->io.NumPorts1 = 32;
47
 
        link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
48
 
        link->io.NumPorts2 = 0;
49
 
-       link->io.Attributes2 =0;
50
 
+       link->io.Attributes2 = 0;
51
 
        link->io.IOAddrLines = 5;
52
 
 
53
 
        /* Interrupt setup */
54
 
-       link->irq.Attributes = IRQ_TYPE_EXCLUSIVE | IRQ_FORCED_PULSE;
55
 
+       link->irq.Attributes = IRQ_TYPE_EXCLUSIVE;
56
 
        link->irq.IRQInfo1 = IRQ_INFO2_VALID | IRQ_PULSE_ID;
57
 
        if(irq_list[0] == -1)
58
 
                link->irq.IRQInfo2 = irq_mask;
59
 
@@ -197,8 +197,6 @@
60
 
        link->conf.Attributes = CONF_ENABLE_IRQ;
61
 
        link->conf.Vcc = 50;
62
 
        link->conf.IntType = INT_MEMORY_AND_IO;
63
 
-       link->conf.ConfigIndex = 0x30;
64
 
-       link->conf.Present = PRESENT_OPTION;
65
 
 
66
 
        /* Allocate space for private device-specific data */
67
 
        local = kmalloc(sizeof(local_info_t), GFP_KERNEL);
68
 
@@ -315,7 +313,7 @@
69
 
                if (i != CS_SUCCESS) break;
70
 
                link->conf.ConfigBase = parse.config.base;
71
 
                link->conf.Present = parse.config.rmask[0];
72
 
-    } while (0);
73
 
+       } while (0);
74
 
        if (i != CS_SUCCESS) {
75
 
                cs_error(link->handle, ParseTuple, i);
76
 
                link->state &= ~DEV_CONFIG_PENDING;
77
 
@@ -351,6 +349,7 @@
78
 
                                        if (i == CS_SUCCESS) {
79
 
                                        printk( KERN_DEBUG "ines_cs: base=0x%x len=%d registered\n",
80
 
                                                link->io.BasePort1, link->io.NumPorts1 );
81
 
+                                       link->conf.ConfigIndex = parse.cftable_entry.index;
82
 
                                        break;
83
 
                                        }
84
 
                                }
85
 
@@ -647,6 +646,12 @@
86
 
        return_to_local: ines_return_to_local,
87
 
 };
88
 
 
89
 
+irqreturn_t ines_pcmcia_interrupt(int irq, void *arg, struct pt_regs *registerp)
90
 
+{
91
 
+       gpib_board_t *board = arg;
92
 
+       return ines_interrupt(board);
93
 
+}
94
 
+
95
 
 int ines_common_pcmcia_attach( gpib_board_t *board )
96
 
 {
97
 
        ines_private_t *ines_priv;
98
 
@@ -669,7 +674,7 @@
99
 
 
100
 
        nec7210_board_reset( nec_priv, board );
101
 
 
102
 
-       if(request_irq(dev_list->irq.AssignedIRQ, ines_interrupt, 0, "pcmcia-gpib", board))
103
 
+       if(request_irq(dev_list->irq.AssignedIRQ, ines_pcmcia_interrupt, SA_SHIRQ, "pcmcia-gpib", board))
104
 
        {
105
 
                printk("gpib: can't request IRQ %d\n", dev_list->irq.AssignedIRQ);
106
 
                return -1;