Linux-Wireless Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] rsi: fix for sdio reset card issue
@ 2019-07-25 10:51 Ganapathi Kondraju
  2019-08-06 12:36 ` Kalle Valo
  0 siblings, 1 reply; 2+ messages in thread
From: Ganapathi Kondraju @ 2019-07-25 10:51 UTC (permalink / raw)
  To: Kalle Valo
  Cc: linux-wireless, rishikesh.basu, krishna.pedda, narasimha.a,
	srinivas.chappidi, Ganapathi Kondraju

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] rsi: fix for sdio reset card issue
  2019-07-25 10:51 [PATCH] rsi: fix for sdio reset card issue Ganapathi Kondraju
@ 2019-08-06 12:36 ` Kalle Valo
  0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2019-08-06 12:36 UTC (permalink / raw)
  To: Ganapathi Kondraju
  Cc: linux-wireless, rishikesh.basu, krishna.pedda, narasimha.a,
	srinivas.chappidi, Ganapathi Kondraju

Ganapathi Kondraju <ganapathirajukondraju@gmail.com> wrote:

> 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>

Patch applied to wireless-drivers-next.git, thanks.

dfc7a8f7c857 rsi: fix for sdio reset card issue

-- 
https://patchwork.kernel.org/patch/11058603/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-25 10:51 [PATCH] rsi: fix for sdio reset card issue Ganapathi Kondraju
2019-08-06 12:36 ` Kalle Valo

Linux-Wireless Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-wireless/0 linux-wireless/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-wireless linux-wireless/ https://lore.kernel.org/linux-wireless \
		linux-wireless@vger.kernel.org linux-wireless@archiver.kernel.org
	public-inbox-index linux-wireless


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-wireless


AGPL code for this site: git clone https://public-inbox.org/ public-inbox