diff options
author | Ganapathi Kondraju <ganapathirajukondraju@gmail.com> | 2019-07-25 13:51:50 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2019-08-06 15:36:26 +0300 |
commit | dfc7a8f7c857369c3cee4aa4c12d6c8da7aa1597 (patch) | |
tree | 4adbf6b6eca4ed5ba465facd52b65c92e4bfab4e /drivers/net/wireless/rsi | |
parent | 3915a252ce71b836a830bcc537220389a3acf3a5 (diff) | |
download | linux-dfc7a8f7c857369c3cee4aa4c12d6c8da7aa1597.tar.xz |
rsi: fix for sdio reset card issue
Issue: While removing and inserting the driver module, observed driver
loading is not successful.
Root cause: Card is not resetted completely without issuing cmd5.
Fix: Issued cmd5 properly.
Signed-off-by: Ganapathi Kondraju <ganapathirajukondraju@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/rsi')
-rw-r--r-- | drivers/net/wireless/rsi/rsi_91x_sdio.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/drivers/net/wireless/rsi/rsi_91x_sdio.c b/drivers/net/wireless/rsi/rsi_91x_sdio.c index 693be867a84a..1bebba4e8527 100644 --- a/drivers/net/wireless/rsi/rsi_91x_sdio.c +++ b/drivers/net/wireless/rsi/rsi_91x_sdio.c @@ -230,19 +230,16 @@ static void rsi_reset_card(struct sdio_func *pfunction) rsi_dbg(ERR_ZONE, "%s: CMD0 failed : %d\n", __func__, err); /* Issue CMD5, arg = 0 */ - if (!host->ocr_avail) { - err = rsi_issue_sdiocommand(pfunction, SD_IO_SEND_OP_COND, 0, - (MMC_RSP_R4 | MMC_CMD_BCR), &resp); - if (err) - rsi_dbg(ERR_ZONE, "%s: CMD5 failed : %d\n", - __func__, err); - - host->ocr_avail = resp; - } + err = rsi_issue_sdiocommand(pfunction, SD_IO_SEND_OP_COND, 0, + (MMC_RSP_R4 | MMC_CMD_BCR), &resp); + if (err) + rsi_dbg(ERR_ZONE, "%s: CMD5 failed : %d\n", + __func__, err); + card->ocr = resp; /* Issue CMD5, arg = ocr. Wait till card is ready */ for (i = 0; i < 100; i++) { err = rsi_issue_sdiocommand(pfunction, SD_IO_SEND_OP_COND, - host->ocr_avail, + card->ocr, (MMC_RSP_R4 | MMC_CMD_BCR), &resp); if (err) { rsi_dbg(ERR_ZONE, "%s: CMD5 failed : %d\n", |