brcm80211:Fix error handling in the function brcmf_sdio_htclk
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi Nick,
Quoted 6 lines · Nicholas Krause
This fixes error handling in the function
brcmf_sdio_htclkto properly check if the call to the functionbrcmf_sdio_regrbfails in the else if condition where the clkstate is in theCLK_PENDINGstate in order to avoid incorrect execution of the functionbrcmf_sdio_htclkwhen the call tobrcmf_sdio_htclkfails 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
Quoted 22 lines
Signed-off-by Nicholas Krause <[email protected]>--- drivers/net/wireless/brcm80211/brcmfmac/sdio.c | 5 +++++ 1 file changed, 5 insertions(+)drivers/net/wireless/brcm80211/brcmfmac/sdio.c +5
-0@@ -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);