[PATCH v2] drivers/net/wireless/broadcom/b43: fix transmit failure when VT is switched

Michael Büsch <[email protected]>
Newsgroups org.infradead.lists.b43-dev,org.kernel.vger.linux-wireless
Message-ID <20180510131522.0ac08f84@wiggum>
On Thu, 10 May 2018 19:30:45 +0900
Taketo Kabe <[email protected]> wrote:

> Signed-off-by: Taketo Kabe <[email protected]>
> ---
> diff -up ./drivers/net/wireless/broadcom/b43/dma.c.b43 ./drivers/net/wireless/broadcom/b43/dma.c
> --- ./drivers/net/wireless/broadcom/b43/dma.c.b43	2018-05-04 15:18:12.000000000 +0900
> +++ ./drivers/net/wireless/broadcom/b43/dma.c	2018-05-10 18:46:36.000000000 +0900
> @@ -1484,7 +1484,7 @@ void b43_dma_handle_txstatus(struct b43_
>   	int slot, firstused;
>   	bool frame_succeed;
>   	int skip;
> -	static u8 err_out1, err_out2;
> +	static u8 err_out1;
> 
>   	ring = parse_cookie(dev, status->cookie, &slot);
>   	if (unlikely(!ring))
> @@ -1518,13 +1518,13 @@ void b43_dma_handle_txstatus(struct b43_
>   			}
>   		} else {
>   			/* More than a single header/data pair were missed.
> -			 * Report this error once.
> +			 * Report this error, and reset the controller to
> +			 * revive operation.
>   			 */
> -			if (!err_out2)
> -				b43dbg(dev->wl,
> -				       "Out of order TX status report on DMA ring %d. Expected %d, but got %d\n",
> -				       ring->index, firstused, slot);
> -			err_out2 = 1;
> +			b43dbg(dev->wl,
> +			       "Out of order TX status report on DMA ring %d. Expected %d, but got %d\n",
> +			       ring->index, firstused, slot);
> +			b43_controller_restart(dev, "Out of order TX");
>   			return;
>   		}
>   	}


Reviewed-by: Michael B?sch <[email protected]>

I think this is a good thing to have.
It improves robustness against firmware/DMA misbehavior.

-- 
Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/b43-dev/attachments/20180510/4c3fee2e/attachment.sig>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.