Skip to content

Commit 66cffd6

Browse files
Taketo KabeKalle Valo
authored andcommitted
b43: fix transmit failure when VT is switched
Setup: Using BCM4306 rev.03 chip based CardBus wireless card. IRQ is shared with yenta (cardbus bridge) and i915 (display) driver. For firmware, installed latest but dated openfwwf 5.2 (http://netweb.ing.unibs.it/~openfwwf/) How-to-reproduce: Do "ssh <NetBSD-remotehost>", then "ls -lR /" to generate traffic, then repeatedly switch VTs by Alt-F1<>Alt-F2. Eventually (within a minute) the card stops working. You can receive traffic but no transmission. For unknown reason it doesn't occur when just generating traffic by "ssh <remotehost> ls -lR /". With CONFIG_B43_DEBUG=y kernel config, when it stops, the debug message shows kernel: b43-phy1 debug: Out of order TX status report on DMA ring 1. Expected 148, but got 180 The slot offset I observed so far was always 32. When err_out2 is not set to make error messages successive, the debug output will be like this: kernel: b43-phy1 debug: Out of order TX status report on DMA ring 1. Expected 116, but got 148 kernel: b43-phy1 debug: Out of order TX status report on DMA ring 1. Expected 116, but got 150 kernel: b43-phy1 debug: Out of order TX status report on DMA ring 1. Expected 116, but got 120 kernel: b43-phy1 debug: Out of order TX status report on DMA ring 1. Expected 116, but got 152 kernel: b43-phy1 debug: Out of order TX status report on DMA ring 1. Expected 116, but got 122 kernel: b43-phy1 debug: Out of order TX status report on DMA ring 1. Expected 116, but got 154 kernel: b43-phy1 debug: Out of order TX status report on DMA ring 1. Expected 116, but got 124 kernel: b43-phy1 debug: Out of order TX status report on DMA ring 1. Expected 116, but got 156 kernel: b43-phy1 debug: Out of order TX status report on DMA ring 1. Expected 116, but got 126 The TX ring alternates between 2 sequences; the ring seems to be completely confused. Controller restart is needed. Workaround(1): This problem doesn't occur when using propriatory firmware you will extract by b43-fwcutter, so it may be a bug in openfwwf firmware, as the comment in the b43_dma_handle_txstatus() suggests. I wasn't able to find a bug in the terse openfwwf code though. Workaround(2): Using "pio=1" option to not use DMA makes this problem to not occur. Description of the patch: This patch will forcibly reset the controller to make it work again. Very kludgy and doesn't look right, but the traffic will continue to flow. Signed-off-by: Taketo Kabe <[email protected]> Reviewed-by: Michael Buesch <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
1 parent 1d18c55 commit 66cffd6

File tree

1 file changed

+7
-7
lines changed
  • drivers/net/wireless/broadcom/b43

1 file changed

+7
-7
lines changed

drivers/net/wireless/broadcom/b43/dma.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1484,7 +1484,7 @@ void b43_dma_handle_txstatus(struct b43_wldev *dev,
14841484
int slot, firstused;
14851485
bool frame_succeed;
14861486
int skip;
1487-
static u8 err_out1, err_out2;
1487+
static u8 err_out1;
14881488

14891489
ring = parse_cookie(dev, status->cookie, &slot);
14901490
if (unlikely(!ring))
@@ -1518,13 +1518,13 @@ void b43_dma_handle_txstatus(struct b43_wldev *dev,
15181518
}
15191519
} else {
15201520
/* More than a single header/data pair were missed.
1521-
* Report this error once.
1521+
* Report this error, and reset the controller to
1522+
* revive operation.
15221523
*/
1523-
if (!err_out2)
1524-
b43dbg(dev->wl,
1525-
"Out of order TX status report on DMA ring %d. Expected %d, but got %d\n",
1526-
ring->index, firstused, slot);
1527-
err_out2 = 1;
1524+
b43dbg(dev->wl,
1525+
"Out of order TX status report on DMA ring %d. Expected %d, but got %d\n",
1526+
ring->index, firstused, slot);
1527+
b43_controller_restart(dev, "Out of order TX");
15281528
return;
15291529
}
15301530
}

0 commit comments

Comments
 (0)