All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arend van Spriel <arend.vanspriel@broadcom.com>
To: Chi-Hsien Lin <Chi-Hsien.Lin@cypress.com>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Cc: "brcm80211-dev-list@broadcom.com"
	<brcm80211-dev-list@broadcom.com>,
	brcm80211-dev-list <brcm80211-dev-list@cypress.com>,
	Franky Lin <franky.lin@broadcom.com>,
	Hante Meuleman <hante.meuleman@broadcom.com>,
	Wright Feng <Wright.Feng@cypress.com>,
	Kalle Valo <kvalo@codeaurora.org>,
	Madhan Mohan R <MadhanMohan.R@cypress.com>
Subject: Re: [PATCH 03/11] brcmfmac: set SDIO F1 MesBusyCtrl for CYW4373
Date: Fri, 9 Nov 2018 13:20:33 +0100	[thread overview]
Message-ID: <f16703ee-e6d1-e2ca-1105-692e5ac81633@broadcom.com> (raw)
In-Reply-To: <ad6f6a88-86c6-58eb-ed54-782cdfd53641@cypress.com>

On 11/9/2018 8:34 AM, Chi-Hsien Lin wrote:
>
>
> On 11/08/2018 7:53, Arend van Spriel wrote:
>> On 11/6/2018 4:50 AM, Chi-Hsien Lin wrote:
>>> From: Madhan Mohan R <MadhanMohan.R@cypress.com>
>>>
>>> Along with F2 watermark (existing) configuration, F1 MesBusyCtrl
>>> should be enabled & configured to avoid overflow errors.
>>
>> Reviewed-by: Arend van Spriel <arend.vanspriel@broadcom.com>
>>> Signed-off-by: Madhan Mohan R <madhanmohan.r@cypress.com>
>>> Signed-off-by: Chi-Hsien Lin <chi-hsien.lin@cypress.com>
>>> ---
>>>  drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 3 +++
>>>  drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.h | 3 +++
>>>  2 files changed, 6 insertions(+)
>>>
>>> diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
>>> b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
>>> index 541d54661c9e..34a838fcc319 100644
>>> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
>>> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
>>> @@ -51,6 +51,7 @@
>>>
>>>  #define DEFAULT_F2_WATERMARK    0x8
>>>  #define CY_4373_F2_WATERMARK    0x40
>>> +#define CY_4373_F1_MESBUSYCTRL  (CY_4373_F2_WATERMARK |
>>> SBSDIO_MESBUSYCTRL_ENAB)
>>
>> I don't see much value for this define. It is use once below so just or
>> it there. That way you can "directly" see what is written to the register.
>>
>>>  #ifdef DEBUG
>>>
>>> @@ -4118,6 +4119,8 @@ static void brcmf_sdio_firmware_callback(struct
>>> device *dev, int err,
>>>              devctl |= SBSDIO_DEVCTL_F2WM_ENAB;
>>>              brcmf_sdiod_writeb(sdiod, SBSDIO_DEVICE_CTL, devctl,
>>>                         &err);
>>> +            brcmf_sdiod_writeb(sdiod, SBSDIO_FUNC1_MESBUSYCTRL,
>>> +                       CY_4373_F1_MESBUSYCTRL, &err);
>>
>> just use 'CY_4373_F2_WATERMARK | SBSDIO_MESBUSYCTRL_ENAB' here. No
>> braces needed.
>
> Thanks for the input. The biggest difference is to prevent a 4-line
> function call like below so it's more readable. I'll make this change in
> V2. Please let me know if below looks too messy then I'll move back to V1:
>
>                          brcmf_sdiod_writeb(sdiod, CY_4373_F2_WATERMARK |
>                                             SBSDIO_MESBUSYCTRL_ENAB,
>                                             CY_4373_F2_WATERMARK |
>                                             SBSDIO_MESBUSYCTRL_ENAB, &err);
>

The second argument should just be SBSDIO_FUNC1_MESBUSYCTRL so that will 
make it a bit less messy. Look okay to me.

Regards,
Arend


  reply	other threads:[~2018-11-09 12:20 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-06  3:50 [PATCH 00/11] chip related changes Chi-Hsien Lin
2018-11-06  3:50 ` [PATCH 01/11] brcmfmac: add 4354 raw pcie device id Chi-Hsien Lin
2018-11-08 11:52   ` Arend van Spriel
2018-11-06  3:50 ` [PATCH 02/11] brcmfmac: set F2 watermark to 256 for 4373 Chi-Hsien Lin
2018-11-08 11:53   ` Arend van Spriel
2018-11-06  3:50 ` [PATCH 03/11] brcmfmac: set SDIO F1 MesBusyCtrl for CYW4373 Chi-Hsien Lin
2018-11-08 11:53   ` Arend van Spriel
2018-11-09  7:34     ` Chi-Hsien Lin
2018-11-09 12:20       ` Arend van Spriel [this message]
2018-11-06  3:50 ` [PATCH 04/11] brcmfmac: add support for CYW43012 SDIO chipset Chi-Hsien Lin
2018-11-08 11:53   ` Arend van Spriel
2018-11-06  3:50 ` [PATCH 05/11] brcmfmac: allow GCI core enumuration Chi-Hsien Lin
2018-11-08 11:53   ` Arend van Spriel
2018-11-06  3:50 ` [PATCH 06/11] brcmfmac: saverestore support changes for 43012 Chi-Hsien Lin
2018-11-08 11:53   ` Arend van Spriel
2018-11-06  3:50 ` [PATCH 07/11] brcmfmac: update 43012 F2 watermark setting to fix DMA Error during UDP RX Traffic Chi-Hsien Lin
2018-11-08 11:53   ` Arend van Spriel
2018-11-06  3:50 ` [PATCH 08/11] brcmfmac: 4373 save-restore support Chi-Hsien Lin
2018-11-08 11:54   ` Arend van Spriel
2018-11-06  3:50 ` [PATCH 09/11] brcmfmac: disable command decode in sdio_aos for 43012/4339/4345 Chi-Hsien Lin
2018-11-08 11:54   ` Arend van Spriel
2018-11-06  3:50 ` [PATCH 10/11] brcmfmac: disable command decode in sdio_aos for 4354 Chi-Hsien Lin
2018-11-08 11:55   ` Arend van Spriel
2018-11-06  3:50 ` [PATCH 11/11] brcmfmac: disable command decode in sdio_aos for 4373 Chi-Hsien Lin
2018-11-08 11:55   ` Arend van Spriel

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=f16703ee-e6d1-e2ca-1105-692e5ac81633@broadcom.com \
    --to=arend.vanspriel@broadcom.com \
    --cc=Chi-Hsien.Lin@cypress.com \
    --cc=MadhanMohan.R@cypress.com \
    --cc=Wright.Feng@cypress.com \
    --cc=brcm80211-dev-list@broadcom.com \
    --cc=brcm80211-dev-list@cypress.com \
    --cc=franky.lin@broadcom.com \
    --cc=hante.meuleman@broadcom.com \
    --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 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.