All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arend Van Spriel <aspriel@gmail.com>
To: Ian Lin <ian.lin@infineon.com>, linux-wireless@vger.kernel.org
Cc: brcm80211-dev-list@broadcom.com, brcm80211-dev-list@cypress.com,
	franky.lin@broadcom.com, hante.meuleman@broadcom.com,
	kvalo@kernel.org, Double.Lo@infineon.com
Subject: Re: [PATCH 2/3] brcmfmac: return error when getting invalid max_flowrings from dongle
Date: Mon, 10 Oct 2022 11:58:33 +0200	[thread overview]
Message-ID: <627eaf57-09f7-feff-92e2-be88ebd4fe13@gmail.com> (raw)
In-Reply-To: <20220929031001.9962-3-ian.lin@infineon.com>

On 9/29/2022 5:10 AM, Ian Lin wrote:
> From: Wright Feng <wright.feng@cypress.com>
> 
> When firmware hit trap at initialization, host will read abnormal
> max_flowrings number from dongle, and it will cause kernel panic when
> doing iowrite to initialize dongle ring.
> To detect this error at early stage, we directly return error when getting
> invalid max_flowrings(>256).
> 
> Signed-off-by: Wright Feng <wright.feng@cypress.com>
> Signed-off-by: Chi-hsien Lin <chi-hsien.lin@cypress.com>
> Signed-off-by: Ian Lin <ian.lin@infineon.com>
> ---
>   drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
> index 2b7ebbd7b5b4..1becd50038ab 100644
> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
> @@ -1228,6 +1228,10 @@ static int brcmf_pcie_init_ringbuffers(struct brcmf_pciedev_info *devinfo)
>   				BRCMF_NROF_H2D_COMMON_MSGRINGS;
>   		max_completionrings = BRCMF_NROF_D2H_COMMON_MSGRINGS;
>   	}
> +	if (max_flowrings > 256) {
This limit is a bit of a magic value. I do know there are chipsets that 
support more that 256 flowrings so this is a hard limitation. I should 
really get the multi-vendor support in place so we can have the 
limitation only for Infineon/Cypress chips. I will try to revive that 
thread.

Regards,
Arend

  reply	other threads:[~2022-10-10  9:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-29  3:09 [PATCH 0/3] brcmfmac: PCIE debug mechanism series Ian Lin
2022-09-29  3:09 ` [PATCH 1/3] brcmfmac: add a timer to read console periodically in PCIE bus Ian Lin
2022-10-04  7:07   ` Kalle Valo
2022-10-04  8:28   ` Kalle Valo
2022-10-10  9:53   ` Arend Van Spriel
2022-09-29  3:10 ` [PATCH 2/3] brcmfmac: return error when getting invalid max_flowrings from dongle Ian Lin
2022-10-10  9:58   ` Arend Van Spriel [this message]
2023-01-08 20:53   ` chainofflowers
2023-01-09  8:52     ` Arend van Spriel
2023-01-09 17:23       ` chainofflowers
2022-09-29  3:10 ` [PATCH 3/3] brcmfmac: dump dongle memory when attaching failed Ian 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=627eaf57-09f7-feff-92e2-be88ebd4fe13@gmail.com \
    --to=aspriel@gmail.com \
    --cc=Double.Lo@infineon.com \
    --cc=brcm80211-dev-list@broadcom.com \
    --cc=brcm80211-dev-list@cypress.com \
    --cc=franky.lin@broadcom.com \
    --cc=hante.meuleman@broadcom.com \
    --cc=ian.lin@infineon.com \
    --cc=kvalo@kernel.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 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.