From patchwork Tue Apr 10 15:04:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siva Rebbagondla X-Patchwork-Id: 10333303 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id AADDE6053B for ; Tue, 10 Apr 2018 15:02:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 96F8E2872C for ; Tue, 10 Apr 2018 15:02:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 953BA2870B; Tue, 10 Apr 2018 15:02:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B4A0E2847D for ; Tue, 10 Apr 2018 15:01:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754294AbeDJPBp (ORCPT ); Tue, 10 Apr 2018 11:01:45 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:40849 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754289AbeDJPBn (ORCPT ); Tue, 10 Apr 2018 11:01:43 -0400 Received: by mail-pf0-f194.google.com with SMTP id y66so8520022pfi.7 for ; Tue, 10 Apr 2018 08:01:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=YplCmeoYiAts/KdjyOZZyagt3hTj24pfs8bTl/D6bJc=; b=hkPh3/QQBVyJeLqmB3BwXYOIXPne+LvGGOYuzVBEpkjtqbP1ggtVpM0iYYJIEKHLAI bVRHQTxUwwcQk3gMoO230RRZ4dm7KwEpzGu3jIECtD7RYhe0FhAWYPevZW0VZEjw3uS+ BxKWxXi4w2lN8yOEqikf0CxC0/7q3WbNT9fdRIcmk3+pFHMM1iI+6ZWZKumH5ZXR9q+r iWQKguveBNi66jlq/cjlwAYAc9f8XyivgyQwltJmjmXkba6z1l/L1LZ9KR7xcVwAjCIq vjhK9uCWd6SVWZHiNktwJzkYRxsRM9RYfubb4FJN3eV2ATeC28zkDW56eGYorETiywMJ jcag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=YplCmeoYiAts/KdjyOZZyagt3hTj24pfs8bTl/D6bJc=; b=DYq+jQkH1SoP2bABZ8UJtLrimiACGlZssYtzGG/tUkzgyXx7SU6e8yCHs68X0jh9vZ p2JLZZLJ/Lf+nlc3stAEVyT7Bm8Mx/1Ln9ozoKqbD0shOkYlHgvEM9IdaJnwT6yezwF1 VgNKmvv07OYQzM9Wk4R3ZyuvyNW0KbMb6JxDeot4suJX7E5OxZFjknCZK+e3Q2XKePp3 pLvtgSyX6WWaz7sdUObBh0hLPPPmjcWIO070lTzkatVNYztmoml40P+XOBhSZgl66zW1 KTOTw3J+MzW8d6cg0s+Sr0B13odAYvrPZaETSbxUss58I42KbURiqYSQv9ynPOszXoM1 l8fQ== X-Gm-Message-State: ALQs6tBeRaGEpmNff214dyM4ImTAqo6K4Fhx8rthZp42TmFWsi1mGF1S k86epL0GdVWLVdow9u3rUQg= X-Google-Smtp-Source: AIpwx4986By0B++/CDZj5OoX1YV9YrKJ9K6bQW2HFg3M3/JrKmRqtAlPy8PYTK2gqNijnOzh18DfgQ== X-Received: by 10.98.99.4 with SMTP id x4mr658270pfb.179.1523372502828; Tue, 10 Apr 2018 08:01:42 -0700 (PDT) Received: from cpu459.localdomain ([203.196.161.90]) by smtp.gmail.com with ESMTPSA id a1sm5913864pff.5.2018.04.10.08.01.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Apr 2018 08:01:41 -0700 (PDT) From: Siva Rebbagondla To: Kalle Valo Cc: linux-wireless@vger.kernel.org, Amitkumar Karwar , Siva Rebbagondla , Sushant Mishra Subject: [v2 1/7] rsi: disable fw watchdog timer during reset Date: Tue, 10 Apr 2018 20:34:11 +0530 Message-Id: <1523372657-6067-2-git-send-email-siva8118@gmail.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1523372657-6067-1-git-send-email-siva8118@gmail.com> References: <1523372657-6067-1-git-send-email-siva8118@gmail.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Amitkumar Karwar 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 Signed-off-by: Siva Rebbagondla --- 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(+) 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