brcmfmac: handle SDIO card removal
When removing the card the driver still tries to access registers in the device. This patch adds another state for the bus that indicates the device is no longer reachable. This avoids errors accessing it while cleaning up the driver. Reviewed-by: Franky Lin <frankyl@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:

committed by
John W. Linville

parent
2668b0b16c
commit
bb350711ec
@@ -522,10 +522,10 @@ brcmf_usb_state_change(struct brcmf_usbdev_info *devinfo, int state)
|
||||
/* update state of upper layer */
|
||||
if (state == BRCMFMAC_USB_STATE_DOWN) {
|
||||
brcmf_dbg(USB, "DBUS is down\n");
|
||||
bcmf_bus->state = BRCMF_BUS_DOWN;
|
||||
brcmf_bus_change_state(bcmf_bus, BRCMF_BUS_DOWN);
|
||||
} else if (state == BRCMFMAC_USB_STATE_UP) {
|
||||
brcmf_dbg(USB, "DBUS is up\n");
|
||||
bcmf_bus->state = BRCMF_BUS_DATA;
|
||||
brcmf_bus_change_state(bcmf_bus, BRCMF_BUS_DATA);
|
||||
} else {
|
||||
brcmf_dbg(USB, "DBUS current state=%d\n", state);
|
||||
}
|
||||
|
Reference in New Issue
Block a user