Commit ca1a0f07 authored by Scott Feldman's avatar Scott Feldman Committed by Jeff Garzik

[E100] interrupt handler free fix

On Thu, 20 Mar 2003, Scott Feldman wrote:


* Bug fix on e100_close when repeating hot remove/hot add
  from team.  Basically need to disable interurpts and
  unregister handler before shutting h/w down.
* Need to mask only the relevant bits in the interrupt
  status register
parent 3cde6124
...@@ -1036,13 +1036,14 @@ e100_close(struct net_device *dev) ...@@ -1036,13 +1036,14 @@ e100_close(struct net_device *dev)
{ {
struct e100_private *bdp = dev->priv; struct e100_private *bdp = dev->priv;
e100_disable_clear_intr(bdp);
free_irq(dev->irq, dev);
bdp->intr_mask = SCB_INT_MASK; bdp->intr_mask = SCB_INT_MASK;
e100_isolate_driver(bdp); e100_isolate_driver(bdp);
netif_carrier_off(bdp->device); netif_carrier_off(bdp->device);
bdp->cur_line_speed = 0; bdp->cur_line_speed = 0;
bdp->cur_dplx_mode = 0; bdp->cur_dplx_mode = 0;
free_irq(dev->irq, dev);
e100_clear_pools(bdp); e100_clear_pools(bdp);
return 0; return 0;
...@@ -1840,7 +1841,8 @@ e100intr(int irq, void *dev_inst, struct pt_regs *regs) ...@@ -1840,7 +1841,8 @@ e100intr(int irq, void *dev_inst, struct pt_regs *regs)
bdp = dev->priv; bdp = dev->priv;
intr_status = readw(&bdp->scb->scb_status); intr_status = readw(&bdp->scb->scb_status);
if (!intr_status || (intr_status == 0xffff)) { /* If not my interrupt, just return */
if (!(intr_status & SCB_STATUS_ACK_MASK) || (intr_status == 0xffff)) {
return; return;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment