From: Ganapathi Kondraju <ganapathirajukondraju@gmail.com>
To: Kalle Valo <kvalo@codeaurora.org>
Cc: linux-wireless@vger.kernel.org,
rishikesh.basu@redpinesignals.com,
krishna.pedda@redpinesignals.com, narasimha.a@redpinesignals.com,
srinivas.chappidi@redpinesignals.com,
Ganapathi Kondraju <ganapathirajukondraju@gmail.com>
Subject: [PATCH] rsi: fix for sdio reset card issue
Date: Thu, 25 Jul 2019 16:21:50 +0530 [thread overview]
Message-ID: <1564051910-20136-1-git-send-email-ganapathirajukondraju@gmail.com> (raw)
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>
---
drivers/net/wireless/rsi/rsi_91x_sdio.c | 17 +++++++----------
1 file 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 b42cd50..b3c7724 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",
--
2.5.5
next reply other threads:[~2019-07-25 10:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-25 10:51 Ganapathi Kondraju [this message]
2019-08-06 12:36 ` [PATCH] rsi: fix for sdio reset card issue Kalle Valo
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=1564051910-20136-1-git-send-email-ganapathirajukondraju@gmail.com \
--to=ganapathirajukondraju@gmail.com \
--cc=krishna.pedda@redpinesignals.com \
--cc=kvalo@codeaurora.org \
--cc=linux-wireless@vger.kernel.org \
--cc=narasimha.a@redpinesignals.com \
--cc=rishikesh.basu@redpinesignals.com \
--cc=srinivas.chappidi@redpinesignals.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).