All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@codeaurora.org>
To: Wen Gong <wgong@codeaurora.org>
Cc: ath10k@lists.infradead.org, linux-wireless@vger.kernel.org
Subject: Re: [PATCH v4 2/2] ath10k: start recovery process when payload length exceeds max htc length for sdio
Date: Fri, 14 Aug 2020 15:37:36 +0000 (UTC)	[thread overview]
Message-ID: <20200814153736.40ED8C433CA@smtp.codeaurora.org> (raw)
In-Reply-To: <20200108031957.22308-3-wgong@codeaurora.org>

Wen Gong <wgong@codeaurora.org> wrote:

> When simulate random transfer fail for sdio write and read, it happened
> "payload length exceeds max htc length" and recovery later sometimes.
> 
> Test steps:
> 1. Add config and update kernel:
> CONFIG_FAIL_MMC_REQUEST=y
> CONFIG_FAULT_INJECTION=y
> CONFIG_FAULT_INJECTION_DEBUG_FS=y
> 
> 2. Run simulate fail:
> cd /sys/kernel/debug/mmc1/fail_mmc_request
> echo 10 > probability
> echo 10 > times # repeat until hitting issues
> 
> 3. It happened payload length exceeds max htc length.
> [  199.935506] ath10k_sdio mmc1:0001:1: payload length 57005 exceeds max htc length: 4088
> ....
> [  264.990191] ath10k_sdio mmc1:0001:1: payload length 57005 exceeds max htc length: 4088
> 
> 4. after some time, such as 60 seconds, it start recovery which triggered
> by wmi command timeout for periodic scan.
> [  269.229232] ieee80211 phy0: Hardware restart was requested
> [  269.734693] ath10k_sdio mmc1:0001:1: device successfully recovered
> 
> The simulate fail of sdio is not a real sdio transter fail, it only
> set an error status in mmc_should_fail_request after the transfer end,
> actually the transfer is success, then sdio_io_rw_ext_helper will
> return error status and stop transfer the left data. For example,
> the really RX len is 286 bytes, then it will split to 2 blocks in
> sdio_io_rw_ext_helper, one is 256 bytes, left is 30 bytes, if the
> first 256 bytes get an error status by mmc_should_fail_request,then
> the left 30 bytes will not read in this RX operation. Then when the
> next RX arrive, the left 30 bytes will be considered as the header
> of the read, the top 4 bytes of the 30 bytes will be considered as
> lookaheads, but actually the 4 bytes is not the lookaheads, so the len
> from this lookaheads is not correct, it exceeds max htc length 4088
> sometimes. When happened exceeds, the buffer chain is not matched between
> firmware and ath10k, then it need to start recovery ASAP. Recently then
> recovery will be started by wmi command timeout, but it will be long time
> later, for example, it is 60+ seconds later from the periodic scan, if
> it does not have periodic scan, it will be longer.
> 
> Start recovery when it happened "payload length exceeds max htc length"
> will be reasonable.
> 
> This patch only effect sdio chips.
> 
> Tested with QCA6174 SDIO with firmware WLAN.RMH.4.4.1-00029.
> 
> Signed-off-by: Wen Gong <wgong@codeaurora.org>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

Patch applied to ath-next branch of ath.git, thanks.

2fd3c8f34d08 ath10k: start recovery process when payload length exceeds max htc length for sdio

-- 
https://patchwork.kernel.org/patch/11322583/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


  reply	other threads:[~2020-08-14 15:37 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-08  3:19 [PATCH v4 0/2] start recovery process when payload length overflow for sdio Wen Gong
2020-01-08  3:19 ` Wen Gong
2020-01-08  3:19 ` [PATCH v4 1/2] ath10k: add refcount for ath10k_core_restart Wen Gong
2020-01-08  3:19   ` Wen Gong
2020-01-08 12:02   ` Justin Capella
2020-01-08 12:02     ` Justin Capella
2020-01-10 10:29     ` Wen Gong
2020-01-10 10:29       ` Wen Gong
2020-01-17  7:19       ` Wen Gong
2020-01-17  7:19         ` Wen Gong
2020-01-20  9:38         ` Justin Capella
2020-01-20  9:38           ` Justin Capella
2020-01-20 13:34           ` Wen Gong
2020-01-20 13:34             ` Wen Gong
2020-01-20 15:37             ` Justin Capella
2020-01-20 15:37               ` Justin Capella
2020-08-14 17:19   ` Kalle Valo
2020-08-14 17:19     ` Kalle Valo
2020-08-18  8:39     ` Wen Gong
2020-08-18  8:39       ` Wen Gong
2020-09-07 15:52       ` Kalle Valo
2020-09-07 15:52       ` Kalle Valo
2020-08-19 12:01     ` Wen Gong
2020-08-19 12:01       ` Wen Gong
2020-08-20  9:18     ` Wen Gong
2020-08-20  9:18       ` Wen Gong
2020-08-24  4:36       ` Wen Gong
2020-08-24  4:36         ` Wen Gong
2020-09-07 15:55       ` Kalle Valo
2020-09-07 15:55       ` Kalle Valo
     [not found]       ` <871rjd37kz.fsf@codeaurora.org>
2020-09-08  3:47         ` Wen Gong
2020-09-08  3:47         ` Wen Gong
2020-01-08  3:19 ` [PATCH v4 2/2] ath10k: start recovery process when payload length exceeds max htc length for sdio Wen Gong
2020-01-08  3:19   ` Wen Gong
2020-08-14 15:37   ` Kalle Valo [this message]
2020-08-14 15:37   ` 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=20200814153736.40ED8C433CA@smtp.codeaurora.org \
    --to=kvalo@codeaurora.org \
    --cc=ath10k@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=wgong@codeaurora.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.