linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arend van Spriel <arend@broadcom.com>
To: Nicholas Krause <xerofoify@gmail.com>, <brudley@broadcom.com>
Cc: <frankyl@broadcom.com>, <meuleman@broadcom.com>,
	<kvalo@codeaurora.org>, <pieterpg@broadcom.com>,
	<linux-wireless@vger.kernel.org>,
	<brcm80211-dev-list@broadcom.com>, <netdev@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] brcm80211:Fix error handling in the function brcmf_sdio_htclk
Date: Wed, 7 Oct 2015 11:49:48 +0200	[thread overview]
Message-ID: <5614EABC.9040404@broadcom.com> (raw)
In-Reply-To: <1444099010-27210-1-git-send-email-xerofoify@gmail.com>

Hi Nick,

On 10/06/2015 04:36 AM, Nicholas Krause wrote:
> This fixes error handling in the function brcmf_sdio_htclk to
> properly check if the call to the function brcmf_sdio_regrb
> fails in the else if condition where the clkstate is in the
> CLK_PENDING state in order to avoid incorrect execution of
> the function brcmf_sdio_htclk when the call to brcmf_sdio_htclk
> fails by returning a error code here.

This commit message seems a bit overstating the change or I am missing 
what you mean by incorrect execution here. These functions are pretty 
low-level and failures are likely SDIO bus errors that are likely 
persistent. For that reason not every individual call is checked for 
errors as net result is that device will become inoperable.

Regards,
Arend

> Signed-off-by: Nicholas Krause <xerofoify@gmail.com>
> ---
>   drivers/net/wireless/brcm80211/brcmfmac/sdio.c | 5 +++++
>   1 file changed, 5 insertions(+)
>
> diff --git a/drivers/net/wireless/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/brcm80211/brcmfmac/sdio.c
> index f990e3d..030b50a 100644
> --- a/drivers/net/wireless/brcm80211/brcmfmac/sdio.c
> +++ b/drivers/net/wireless/brcm80211/brcmfmac/sdio.c
> @@ -886,6 +886,11 @@ static int brcmf_sdio_htclk(struct brcmf_sdio *bus, bool on, bool pendok)
>   			/* Cancel CA-only interrupt filter */
>   			devctl = brcmf_sdiod_regrb(bus->sdiodev,
>   						   SBSDIO_DEVICE_CTL, &err);
> +			if (err) {
> +				brcmf_err("Devctl error canceling CA: %d\n",
> +					  err);
> +				return -EBADE;
> +			}
>   			devctl &= ~SBSDIO_DEVCTL_CA_INT_ONLY;
>   			brcmf_sdiod_regwb(bus->sdiodev, SBSDIO_DEVICE_CTL,
>   					  devctl, &err);
>


           reply	other threads:[~2015-10-07  9:49 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <1444099010-27210-1-git-send-email-xerofoify@gmail.com>]

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=5614EABC.9040404@broadcom.com \
    --to=arend@broadcom.com \
    --cc=brcm80211-dev-list@broadcom.com \
    --cc=brudley@broadcom.com \
    --cc=frankyl@broadcom.com \
    --cc=kvalo@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=meuleman@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=pieterpg@broadcom.com \
    --cc=xerofoify@gmail.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).