From: "Arend van Spriel" <arend@broadcom.com>
To: linville@tuxdriver.com
Cc: linux-wireless@vger.kernel.org, "Arend van Spriel" <arend@broadcom.com>
Subject: [PATCH 10/15] brcm80211: fmac: only return success in brcmf_sdbrcm_bus_init() when true
Date: Thu, 9 Feb 2012 21:09:04 +0100 [thread overview]
Message-ID: <1328818149-4826-11-git-send-email-arend@broadcom.com> (raw)
In-Reply-To: <1328818149-4826-1-git-send-email-arend@broadcom.com>
The function brcmf_sdbrcm_bus_init() always returned success except for
firmware download failure. However, also when enabling SDIO function 2
is failing the function should return failure. This patch fixes that.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
---
drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
index b20029e..47a192d 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
@@ -3467,13 +3467,12 @@ static int brcmf_sdbrcm_bus_init(struct device *dev)
/* Set bus state according to enable result */
bus_if->state = BRCMF_BUS_DATA;
- }
-
- else {
+ } else {
/* Disable F2 again */
enable = SDIO_FUNC_ENABLE_1;
brcmf_sdcard_cfg_write(bus->sdiodev, SDIO_FUNC_0,
SDIO_CCCR_IOEx, enable, NULL);
+ ret = -ENODEV;
}
/* Restore previous clock setting */
@@ -3481,7 +3480,7 @@ static int brcmf_sdbrcm_bus_init(struct device *dev)
SBSDIO_FUNC1_CHIPCLKCSR, saveclk, &err);
/* If we didn't come up, turn off backplane clock */
- if (bus_if->state != BRCMF_BUS_DATA)
+ if (!ret)
brcmf_sdbrcm_clkctl(bus, CLK_NONE, false);
exit:
--
1.7.5.4
next prev parent reply other threads:[~2012-02-09 20:09 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-09 20:08 [PATCH 00/15] brcm80211: resolve brcmsmac issues and brcmfmac usb support Arend van Spriel
2012-02-09 20:08 ` [PATCH 01/15] brcm80211: update the maintainers listed for brcm80211 drivers Arend van Spriel
2012-02-10 7:26 ` Rafał Miłecki
2012-02-09 20:08 ` [PATCH 02/15] brcm80211: smac: fix unintended fallthru in wlc_phy_radio_init_2057() Arend van Spriel
2012-02-09 20:08 ` [PATCH 03/15] brcm80211: smac: remove redundant assignments from txpwrctrl_pwr_setup_nphy Arend van Spriel
2012-02-09 20:08 ` [PATCH 04/15] brcm80211: smac: fix endless retry of A-MPDU transmissions Arend van Spriel
2012-02-09 20:08 ` [PATCH 05/15] brcm80211: smac: remove smatch warnings from brcmsmac code Arend van Spriel
2012-02-09 20:09 ` [PATCH 06/15] brcm80211: fmac: resolve smatch issues in brcmfmac code Arend van Spriel
2012-02-09 20:09 ` [PATCH 07/15] brcm80211: fmac: make sure cancel_work_sync only called after INIT_WORK Arend van Spriel
2012-02-09 20:09 ` [PATCH 08/15] brcm80211: fmac: use specific types in struct brcmf_bus Arend van Spriel
2012-02-09 20:09 ` [PATCH 09/15] brcm80211: fmac: move module entry points to dhd_linux.c Arend van Spriel
2012-02-09 23:50 ` Julian Calaby
2012-02-10 9:11 ` Arend van Spriel
2012-02-09 20:09 ` Arend van Spriel [this message]
2012-02-09 20:09 ` [PATCH 11/15] brcm80211: fmac: update bus state in common driver part Arend van Spriel
2012-02-09 20:09 ` [PATCH 12/15] brcm80211: fmac: change allocation flag in brcmf_enq_event() function Arend van Spriel
2012-02-09 20:09 ` [PATCH 13/15] brcm80211: fmac: use spinlock calls saving irq flags in brcmf_enq_event() Arend van Spriel
2012-02-09 20:09 ` [PATCH 14/15] brcm80211: fmac: add USB support for bcm43235/6/8 chipsets Arend van Spriel
2012-02-23 18:10 ` Rafał Miłecki
2012-02-23 18:46 ` Rafał Miłecki
2012-02-23 21:20 ` Arend van Spriel
2012-02-24 6:16 ` Rafał Miłecki
2012-02-24 9:47 ` Arend van Spriel
2012-02-09 20:09 ` [PATCH 15/15] brcm80211: fmac: make sdio firmware filename specific Arend van Spriel
2012-02-22 17:12 ` [PATCH 00/15] brcm80211: resolve brcmsmac issues and brcmfmac usb support Arend van Spriel
2012-02-22 19:14 ` John W. Linville
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=1328818149-4826-11-git-send-email-arend@broadcom.com \
--to=arend@broadcom.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.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).