aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-06-01 06:18:09 -0400
committerDavid S. Miller <davem@davemloft.net>2011-06-02 00:22:15 -0400
commit6979d5dd96a4a4975ce240982436e92a3da23315 (patch)
treeb8a5c017e168d87f91668b5cab89c7df56dcda58 /drivers/net
parentb722dbf176b67c75fe0f5a6b1b31f5ea8aa6117d (diff)
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>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/dm9000.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/dm9000.c b/drivers/net/dm9000.c
index fbaff3584bd4..ee597e676ee5 100644
--- a/drivers/net/dm9000.c
+++ b/drivers/net/dm9000.c
@@ -1157,9 +1157,6 @@ dm9000_open(struct net_device *dev)
1157 1157
1158 irqflags |= IRQF_SHARED; 1158 irqflags |= IRQF_SHARED;
1159 1159
1160 if (request_irq(dev->irq, dm9000_interrupt, irqflags, dev->name, dev))
1161 return -EAGAIN;
1162
1163 /* GPIO0 on pre-activate PHY, Reg 1F is not set by reset */ 1160 /* GPIO0 on pre-activate PHY, Reg 1F is not set by reset */
1164 iow(db, DM9000_GPR, 0); /* REG_1F bit0 activate phyxcer */ 1161 iow(db, DM9000_GPR, 0); /* REG_1F bit0 activate phyxcer */
1165 mdelay(1); /* delay needs by DM9000B */ 1162 mdelay(1); /* delay needs by DM9000B */
@@ -1168,6 +1165,9 @@ dm9000_open(struct net_device *dev)
1168 dm9000_reset(db); 1165 dm9000_reset(db);
1169 dm9000_init_dm9000(dev); 1166 dm9000_init_dm9000(dev);
1170 1167
1168 if (request_irq(dev->irq, dm9000_interrupt, irqflags, dev->name, dev))
1169 return -EAGAIN;
1170
1171 /* Init driver variable */ 1171 /* Init driver variable */
1172 db->dbug_cnt = 0; 1172 db->dbug_cnt = 0;
1173 1173