From: Kalle Valo <kvalo@codeaurora.org>
To: Chi-Hsien Lin <chi-hsien.lin@cypress.com>
Cc: linux-wireless@vger.kernel.org, brcm80211-dev-list@broadcom.com,
brcm80211-dev-list@cypress.com,
Arend van Spriel <arend.vanspriel@broadcom.com>,
Franky Lin <franky.lin@broadcom.com>,
Hante Meuleman <hante.meuleman@broadcom.com>,
Wright Feng <wright.feng@cypress.com>,
Amar Shankar <amsr@cypress.com>,
Jia-Shyr Chuang <saint.chuang@cypress.com>
Subject: Re: [PATCH 3/6] brcmfmac: reserve 2 credits for host tx control path
Date: Tue, 09 Jun 2020 14:51:20 +0300 [thread overview]
Message-ID: <873674o3t3.fsf@codeaurora.org> (raw)
In-Reply-To: <20200609105913.163239-4-chi-hsien.lin@cypress.com> (Chi-Hsien Lin's message of "Tue, 9 Jun 2020 05:59:10 -0500")
Chi-Hsien Lin <chi-hsien.lin@cypress.com> writes:
> From: Amar Shankar <amsr@cypress.com>
>
> It is observed that sometimes when sdiod is low in tx credits in low
> rssi scenarios, the data path consumes all sdiod rx all credits and
> there is no sdiod rx credit available for control path causing host
> and card to go out of sync resulting in link loss between host and
> card. So in order to prevent it some credits are reserved for control
> path.
>
> Note that TXCTL_CREDITS can't be larger than the firmware default
> credit update threshold 2; otherwise there will be a deadlock for both
> side waiting for each other.
>
> Signed-off-by: Amar Shankar <amsr@cypress.com>
> Signed-off-by: Jia-Shyr Chuang <saint.chuang@cypress.com>
> Signed-off-by: Chi-Hsien Lin <chi-hsien.lin@cypress.com>
> ---
> .../wireless/broadcom/brcm80211/brcmfmac/sdio.c | 15 ++++++++++++++-
> 1 file changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
> index ce6f15284277..163bb7f41e44 100644
> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
> @@ -635,6 +635,8 @@ static const struct brcmf_firmware_mapping brcmf_sdio_fwnames[] = {
> BRCMF_FW_ENTRY(CY_CC_43012_CHIP_ID, 0xFFFFFFFF, 43012)
> };
>
> +#define TXCTL_CREDITS 2
> +
> static void pkt_align(struct sk_buff *p, int len, int align)
> {
> uint datalign;
> @@ -647,6 +649,14 @@ static void pkt_align(struct sk_buff *p, int len, int align)
>
> /* To check if there's window offered */
> static bool data_ok(struct brcmf_sdio *bus)
> +{
> + /* Reserve TXCTL_CREDITS credits for txctl */
> + return (u8)(bus->tx_max - bus->tx_seq) > TXCTL_CREDITS &&
> + ((u8)(bus->tx_max - bus->tx_seq) & 0x80) == 0;
> +}
Why casting to u8? Is it really necessary?
--
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
next prev parent reply other threads:[~2020-06-09 11:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-09 10:59 [PATCH 0/6] brcmfmac: flow control and p2p fix series Chi-Hsien Lin
2020-06-09 10:59 ` [PATCH 1/6] brcmfmac: allow credit borrowing for all access categories Chi-Hsien Lin
2020-06-09 10:59 ` [PATCH 2/6] brcmfmac: increase message buffer size for control packets Chi-Hsien Lin
2020-06-09 10:59 ` [PATCH 3/6] brcmfmac: reserve 2 credits for host tx control path Chi-Hsien Lin
2020-06-09 11:51 ` Kalle Valo [this message]
2020-06-10 5:19 ` Chi-Hsien Lin
2020-06-09 10:59 ` [PATCH 4/6] brcmfmac: update tx status flags to sync with firmware Chi-Hsien Lin
2020-06-09 10:59 ` [PATCH 5/6] brcmfmac: fix throughput zero stalls on PM 1 mode due to credit map Chi-Hsien Lin
2020-06-09 10:59 ` [PATCH 6/6] brcmfmac: initialize the requested dwell time Chi-Hsien Lin
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=873674o3t3.fsf@codeaurora.org \
--to=kvalo@codeaurora.org \
--cc=amsr@cypress.com \
--cc=arend.vanspriel@broadcom.com \
--cc=brcm80211-dev-list@broadcom.com \
--cc=brcm80211-dev-list@cypress.com \
--cc=chi-hsien.lin@cypress.com \
--cc=franky.lin@broadcom.com \
--cc=hante.meuleman@broadcom.com \
--cc=linux-wireless@vger.kernel.org \
--cc=saint.chuang@cypress.com \
--cc=wright.feng@cypress.com \
/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).