patch-2.1.60 linux/drivers/net/ewrk3.c

Next file: linux/drivers/net/fmv18x.c
Previous file: linux/drivers/net/eth16i.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.59/linux/drivers/net/ewrk3.c linux/drivers/net/ewrk3.c
@@ -628,9 +628,7 @@
   STOP_EWRK3;
 
   if (!lp->hard_strapped) {
-    irq2dev_map[dev->irq] = dev;                   /* For latched interrupts */
-
-    if (request_irq(dev->irq, (void *)ewrk3_interrupt, 0, "ewrk3", NULL)) {
+    if (request_irq(dev->irq, (void *)ewrk3_interrupt, 0, "ewrk3", dev)) {
       printk("ewrk3_open(): Requested IRQ%d is busy\n",dev->irq);
       status = -EAGAIN;
     } else {
@@ -877,7 +875,7 @@
 static void
 ewrk3_interrupt(int irq, void *dev_id, struct pt_regs * regs)
 {
-    struct device *dev = (struct device *)(irq2dev_map[irq]);
+    struct device *dev = dev_id;
     struct ewrk3_private *lp;
     u_long iobase;
     u_char icr, cr, csr;
@@ -1151,8 +1149,6 @@
 
   if (!lp->hard_strapped) {
     free_irq(dev->irq, NULL);
-
-    irq2dev_map[dev->irq] = 0;
   }
 
   MOD_DEC_USE_COUNT;
@@ -1177,24 +1173,22 @@
   u_long iobase = dev->base_addr;
   u_char csr;
 
-  if (irq2dev_map[dev->irq] != NULL) {
-    csr = inb(EWRK3_CSR);
+  csr = inb(EWRK3_CSR);
 
-    if (lp->shmem_length == IO_ONLY) {
-      lp->mctbl = (char *) PAGE0_HTE;
-    } else {
-      lp->mctbl = (char *)(lp->shmem_base + PAGE0_HTE);
-    }
+  if (lp->shmem_length == IO_ONLY) {
+    lp->mctbl = (char *) PAGE0_HTE;
+  } else {
+    lp->mctbl = (char *)(lp->shmem_base + PAGE0_HTE);
+  }
 
-    csr &= ~(CSR_PME | CSR_MCE);
-    if (dev->flags & IFF_PROMISC) {         /* set promiscuous mode */
-      csr |= CSR_PME;
-      outb(csr, EWRK3_CSR);
-    } else {
-      SetMulticastFilter(dev);
-      csr |= CSR_MCE;
-      outb(csr, EWRK3_CSR);
-    }
+  csr &= ~(CSR_PME | CSR_MCE);
+  if (dev->flags & IFF_PROMISC) {         /* set promiscuous mode */
+    csr |= CSR_PME;
+    outb(csr, EWRK3_CSR);
+  } else {
+    SetMulticastFilter(dev);
+    csr |= CSR_MCE;
+    outb(csr, EWRK3_CSR);
   }
 }
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov