diff mbox

[v2,1/7] rsi: disable fw watchdog timer during reset

Message ID 1523372657-6067-2-git-send-email-siva8118@gmail.com (mailing list archive)
State Accepted
Commit 16d3bb7b2f37b917b3c55e83d230a199f5c51864
Delegated to: Kalle Valo
Headers show

Commit Message

Siva Rebbagondla April 10, 2018, 3:04 p.m. UTC
From: Amitkumar Karwar <amit.karwar@redpinesignals.com>

Firmware's watchdog timer should be disabled as a part of reset
sequence. This change fixes a firmware hang issue observed during
stress tests.

Signed-off-by: Amitkumar Karwar <amit.karwar@redpinesignals.com>
Signed-off-by: Siva Rebbagondla <siva.rebbagondla@redpinesignals.com>
---
 drivers/net/wireless/rsi/rsi_91x_usb.c | 7 +++++++
 drivers/net/wireless/rsi/rsi_hal.h     | 1 +
 drivers/net/wireless/rsi/rsi_usb.h     | 1 +
 3 files changed, 9 insertions(+)

Comments

Kalle Valo April 24, 2018, 5:25 p.m. UTC | #1
Siva Rebbagondla <siva8118@gmail.com> wrote:

> From: Amitkumar Karwar <amit.karwar@redpinesignals.com>
> 
> Firmware's watchdog timer should be disabled as a part of reset
> sequence. This change fixes a firmware hang issue observed during
> stress tests.
> 
> Signed-off-by: Amitkumar Karwar <amit.karwar@redpinesignals.com>
> Signed-off-by: Siva Rebbagondla <siva.rebbagondla@redpinesignals.com>

7 patches applied to wireless-drivers-next.git, thanks.

16d3bb7b2f37 rsi: disable fw watchdog timer during reset
8c1475bdfc3a rsi: device bootup parameter configuration
cbbfdd6c700f rsi: use appropriate interface for power save configuration
a55e50f0672e rsi: increase max supported aggregation subframes
3334306a086e rsi: parse TID from data frame correctly
1e9c410f26a2 rsi: enable power save by default for coex
f0b147b8f1d2 rsi: advertise 5GHz support based on device capability
diff mbox

Patch

diff --git a/drivers/net/wireless/rsi/rsi_91x_usb.c b/drivers/net/wireless/rsi/rsi_91x_usb.c
index 7b8bae3..b065438 100644
--- a/drivers/net/wireless/rsi/rsi_91x_usb.c
+++ b/drivers/net/wireless/rsi/rsi_91x_usb.c
@@ -687,6 +687,13 @@  static int rsi_reset_card(struct rsi_hw *adapter)
 	 */
 	msleep(100);
 
+	if (rsi_usb_master_reg_write(adapter, SWBL_REGOUT,
+				     RSI_FW_WDT_DISABLE_REQ,
+				     RSI_COMMON_REG_SIZE) < 0) {
+		rsi_dbg(ERR_ZONE, "Disabling firmware watchdog timer failed\n");
+		goto fail;
+	}
+
 	ret = usb_ulp_read_write(adapter, RSI_WATCH_DOG_TIMER_1,
 				 RSI_ULP_WRITE_2, 32);
 	if (ret < 0)
diff --git a/drivers/net/wireless/rsi/rsi_hal.h b/drivers/net/wireless/rsi/rsi_hal.h
index d6c2baa..327638c 100644
--- a/drivers/net/wireless/rsi/rsi_hal.h
+++ b/drivers/net/wireless/rsi/rsi_hal.h
@@ -115,6 +115,7 @@ 
 #define FW_FLASH_OFFSET			0x820
 #define LMAC_VER_OFFSET			(FW_FLASH_OFFSET + 0x200)
 #define MAX_DWORD_ALIGN_BYTES		64
+#define RSI_COMMON_REG_SIZE		2
 
 struct bl_header {
 	__le32 flags;
diff --git a/drivers/net/wireless/rsi/rsi_usb.h b/drivers/net/wireless/rsi/rsi_usb.h
index a88d592..b6fe79f 100644
--- a/drivers/net/wireless/rsi/rsi_usb.h
+++ b/drivers/net/wireless/rsi/rsi_usb.h
@@ -26,6 +26,7 @@ 
 #define RSI_USB_READY_MAGIC_NUM      0xab
 #define FW_STATUS_REG                0x41050012
 #define RSI_TA_HOLD_REG              0x22000844
+#define RSI_FW_WDT_DISABLE_REQ	     0x69
 
 #define USB_VENDOR_REGISTER_READ     0x15
 #define USB_VENDOR_REGISTER_WRITE    0x16