* [PATCH] b44: Unconditionally enable interrupt routing on reset
@ 2008-11-16 14:37 Michael Buesch
2009-02-15 14:17 ` Fwd: " Pantelis Koukousoulas
0 siblings, 1 reply; 3+ messages in thread
From: Michael Buesch @ 2008-11-16 14:37 UTC (permalink / raw)
To: Jeff Garzik; +Cc: netdev, Pantelis Koukousoulas, Gary Zambrano
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>
---
I'm not sure if we should push this for 2.6.28.
This fixes quirks when booting from PXE. So only a minority of
the b44 users are affected.
Index: wireless-testing/drivers/net/b44.c
===================================================================
--- wireless-testing.orig/drivers/net/b44.c 2008-11-16 14:47:06.000000000 +0100
+++ wireless-testing/drivers/net/b44.c 2008-11-16 15:03:35.000000000 +0100
@@ -1266,8 +1266,14 @@ static void b44_clear_stats(struct b44 *
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);
@@ -1279,10 +1285,8 @@ static void b44_chip_reset(struct b44 *b
}
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);
/*
--
Greetings Michael.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Fwd: [PATCH] b44: Unconditionally enable interrupt routing on reset
2008-11-16 14:37 [PATCH] b44: Unconditionally enable interrupt routing on reset Michael Buesch
@ 2009-02-15 14:17 ` Pantelis Koukousoulas
2009-02-27 6:33 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Pantelis Koukousoulas @ 2009-02-15 14:17 UTC (permalink / raw)
To: netdev
Hi!
There's been 3 months since the last time this was posted so I assume
it was somehow lost.
This patch helps with pxe booting b44 laptops where the BIOS leaves
the card in a slightly
broken state causing nfsroot mount to hang indefinitely (due to no
interrupts coming).
Note that without the patch, one could say that it is the fragility of
the linux driver code
that turns a slight BIOS PXE bug into a broken card with no
interrupts, so the change
is imho worthy from a correctness point of view (more robust code).
I understand that it is a bit late for this patch to get to 2.6.29
(although it's been posted
over 3 months ago at first) but it would be *really* nice if it was at
least picked up into a
maintainer tree for the next merge window if possible.
Again, this patch is very straightforward and it has been tested daily
for the last 3 months
with no problems whatsoever.
Thanks in advance,
Pantelis
---------- Forwarded message ----------
From: Michael Buesch <mb@bu3sch.de>
Date: Sun, Nov 16, 2008 at 4:37 PM
Subject: [PATCH] b44: Unconditionally enable interrupt routing on reset
To: Jeff Garzik <jeff@garzik.org>
Cc: netdev@vger.kernel.org, Pantelis Koukousoulas <pktoss@gmail.com>,
Gary Zambrano <zambrano@broadcom.com>
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>
---
I'm not sure if we should push this for 2.6.28.
This fixes quirks when booting from PXE. So only a minority of
the b44 users are affected.
Index: wireless-testing/drivers/net/b44.c
===================================================================
--- wireless-testing.orig/drivers/net/b44.c 2008-11-16
14:47:06.000000000 +0100
+++ wireless-testing/drivers/net/b44.c 2008-11-16 15:03:35.000000000 +0100
@@ -1266,8 +1266,14 @@ static void b44_clear_stats(struct b44 *
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);
@@ -1279,10 +1285,8 @@ static void b44_chip_reset(struct b44 *b
}
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);
/*
--
Greetings Michael.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] b44: Unconditionally enable interrupt routing on reset
2009-02-15 14:17 ` Fwd: " Pantelis Koukousoulas
@ 2009-02-27 6:33 ` David Miller
0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2009-02-27 6:33 UTC (permalink / raw)
To: pktoss; +Cc: netdev
I've applied this patch, even though it was insanely mangled
by your email client (tabs turned into spaces, lines chopped
up, etc.)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-02-27 6:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-16 14:37 [PATCH] b44: Unconditionally enable interrupt routing on reset Michael Buesch
2009-02-15 14:17 ` Fwd: " Pantelis Koukousoulas
2009-02-27 6:33 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).