Skip to content

Commit 6979d5d

Browse files
brooniedavem330
authored andcommitted
net: dm9000: Get the chip in a known good state before enabling interrupts
Currently the DM9000 driver requests the primary interrupt before it resets the chip and puts it into a known good state. This means that if the chip is asserting interrupt for some reason we can end up with a screaming IRQ that the interrupt handler is unable to deal with. Avoid this by only requesting the interrupt after we've reset the chip so we know what state it's in. This started manifesting itself on one of my boards in the past month or so, I suspect as a result of some core infrastructure changes removing some form of mitigation against bad behaviour here, even when things boot it seems that the new code brings the interface up more quickly. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent b722dbf commit 6979d5d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/net/dm9000.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1157,9 +1157,6 @@ dm9000_open(struct net_device *dev)
11571157

11581158
irqflags |= IRQF_SHARED;
11591159

1160-
if (request_irq(dev->irq, dm9000_interrupt, irqflags, dev->name, dev))
1161-
return -EAGAIN;
1162-
11631160
/* GPIO0 on pre-activate PHY, Reg 1F is not set by reset */
11641161
iow(db, DM9000_GPR, 0); /* REG_1F bit0 activate phyxcer */
11651162
mdelay(1); /* delay needs by DM9000B */
@@ -1168,6 +1165,9 @@ dm9000_open(struct net_device *dev)
11681165
dm9000_reset(db);
11691166
dm9000_init_dm9000(dev);
11701167

1168+
if (request_irq(dev->irq, dm9000_interrupt, irqflags, dev->name, dev))
1169+
return -EAGAIN;
1170+
11711171
/* Init driver variable */
11721172
db->dbug_cnt = 0;
11731173

0 commit comments

Comments
 (0)