b43-dev.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: "Michael Büsch" <m@bues.ch>
To: Taketo Kabe <kabe@sra-tohoku.co.jp>, kvalo@codeaurora.org
Cc: b43-dev@lists.infradead.org, linux-wireless@vger.kernel.org
Subject: [PATCH v2] drivers/net/wireless/broadcom/b43: fix transmit failure when VT is switched
Date: Thu, 10 May 2018 13:15:22 +0200	[thread overview]
Message-ID: <20180510131522.0ac08f84@wiggum> (raw)
In-Reply-To: <5AF41F55.4060606@sra-tohoku.co.jp>

On Thu, 10 May 2018 19:30:45 +0900
Taketo Kabe <kabe@sra-tohoku.co.jp> wrote:

> Signed-off-by: Taketo Kabe <kabe@sra-tohoku.co.jp>
> ---
> 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 <m@bues.ch>

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>

  reply	other threads:[~2018-05-10 11:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-09 11:41 [PATCH] drivers/net/wireless/broadcom/b43: fix transmit failure when VT is switched Taketo Kabe
2018-05-09 16:51 ` Michael Büsch
2018-05-10 10:30   ` [PATCH v2] " Taketo Kabe
2018-05-10 11:15     ` Michael Büsch [this message]
2018-05-11 10:15     ` Kalle Valo
2018-05-12  8:50     ` [v2] b43: " Kalle Valo
     [not found]     ` <20180512085053.8637A60618@smtp.codeaurora.org>
2018-05-13  9:16       ` [PATCH v3] " Taketo Kabe
2018-05-15  5:40         ` [v3] " Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180510131522.0ac08f84@wiggum \
    --to=m@bues.ch \
    --cc=b43-dev@lists.infradead.org \
    --cc=kabe@sra-tohoku.co.jp \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).