summaryrefslogtreecommitdiffstats
path: root/drivers/net/b44.c
diff options
context:
space:
mode:
authorMichael Buesch <mb@bu3sch.de>2009-02-26 22:33:00 -0800
committerDavid S. Miller <davem@davemloft.net>2009-02-26 22:33:00 -0800
commitf8af11af85fecbfa7b95fd79c043b16ae0ee0d55 (patch)
tree56bf9f83393478e7a4f7708b1ce1e055fcde5b8f /drivers/net/b44.c
parent9b58027bc23a73a036877f28422dad7a0a199f95 (diff)
downloadlinux-f8af11af85fecbfa7b95fd79c043b16ae0ee0d55.tar.gz
linux-f8af11af85fecbfa7b95fd79c043b16ae0ee0d55.tar.bz2
linux-f8af11af85fecbfa7b95fd79c043b16ae0ee0d55.zip
b44: Unconditionally enable interrupt routing on reset
Unconditionally setup the IRQ routing on chip reset. It's safe to call ssb_pcicore_dev_irqvecs_enable() unconditionally, because it has internal checks for redundant calls. This fixes problems where hardware will not come up properly due to quirks in the enable-bit hardware. Reported-by: Pantelis Koukousoulas <pktoss@gmail.com> Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/b44.c')
-rw-r--r--drivers/net/b44.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/net/b44.c b/drivers/net/b44.c
index c38512ebcea6..6b8c39f2cf10 100644
--- a/drivers/net/b44.c
+++ b/drivers/net/b44.c
@@ -1264,8 +1264,14 @@ static void b44_clear_stats(struct b44 *bp)
static void b44_chip_reset(struct b44 *bp, int reset_kind)
{
struct ssb_device *sdev = bp->sdev;
+ bool was_enabled;
- if (ssb_device_is_enabled(bp->sdev)) {
+ was_enabled = ssb_device_is_enabled(bp->sdev);
+
+ ssb_device_enable(bp->sdev, 0);
+ ssb_pcicore_dev_irqvecs_enable(&sdev->bus->pcicore, sdev);
+
+ if (was_enabled) {
bw32(bp, B44_RCV_LAZY, 0);
bw32(bp, B44_ENET_CTRL, ENET_CTRL_DISABLE);
b44_wait_bit(bp, B44_ENET_CTRL, ENET_CTRL_DISABLE, 200, 1);
@@ -1277,10 +1283,8 @@ static void b44_chip_reset(struct b44 *bp, int reset_kind)
}
bw32(bp, B44_DMARX_CTRL, 0);
bp->rx_prod = bp->rx_cons = 0;
- } else
- ssb_pcicore_dev_irqvecs_enable(&sdev->bus->pcicore, sdev);
+ }
- ssb_device_enable(bp->sdev, 0);
b44_clear_stats(bp);
/*