From patchwork Tue Jun 13 14:48:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitkumar Karwar X-Patchwork-Id: 9784161 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 0E74560212 for ; Tue, 13 Jun 2017 14:51:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0479828725 for ; Tue, 13 Jun 2017 14:51:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ED7AE2872C; Tue, 13 Jun 2017 14:51:37 +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=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, 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 DFCF128725 for ; Tue, 13 Jun 2017 14:51:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753580AbdFMOvf (ORCPT ); Tue, 13 Jun 2017 10:51:35 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:35093 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753424AbdFMOvd (ORCPT ); Tue, 13 Jun 2017 10:51:33 -0400 Received: by mail-pf0-f196.google.com with SMTP id s66so7348553pfs.2 for ; Tue, 13 Jun 2017 07:51:33 -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=a/RzbNrU4zCv2ubw4urtwQCt1pmVVBKGidygGvqUVu4=; b=HiBfmz2yQL/vMyeAflh2/N5/N6kBhD+ZcoNwHVHgIPcDrtmflVrlpYh1+8yO71/Mc9 eVT9rspCvgsUJLevQ9lVobYn/SBpmYJM8WcBBlEaSPNk9yKIy0dFPH7mTdgOM+r8s02x EM9Klv3nfXwQNkrN5N6p7L7NDM244IzTkhFtHD+565UDEDUnnTW3tg/V9VI2E+lSZ3Lz V4/iSRUQO1jkQquHnnvvsGLMgFatOIu6axruwihnYsaso9MnOJvfypDFBQelzXZKUlol AYi5/6TwRSTOaoODgzWNV8/84cWvnqPpYGRSdmBzOv7beGildwXPfqMfQNm/7dGJYOZP uXHw== 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=a/RzbNrU4zCv2ubw4urtwQCt1pmVVBKGidygGvqUVu4=; b=nz/fChA1hMhkfgTZRaqPTl0JKia3Z1lGlgN69Lh/mhM6gonuKBE35JRbZLKsl5JWSW 7LZDRLL6NpCIfDfombGaZcutpeUqyWZ4qQSyeOkSYHotDpWjoeqTzH9YrcdgvHm33L9W yKGh7UB/u7u38LUUJQbCAAL1hRcFxded24EP4+6UUu/dA7AjZ2d86reC3YQN/86Nz8l2 UeSl9r92a2HAyjbBH+T2+wJM1jrm0sJ8OdWIHf1VwbZg1n/inyaUq5tCRPe+7OSWeohR EUH8/SRtDHdGHd6QkNiEQC5Tp57tJQd/FqjNs5YE1GQq24mjv2JyM2qrQRPJx9KqR6wq BhTw== X-Gm-Message-State: AKS2vOxCBI09agEae2Ysr+H2+67L8urDsiRPXsxWfjGnvvKGmcs41SR+ mdneXRT0fdCJyQ== X-Received: by 10.98.158.138 with SMTP id f10mr177194pfk.177.1497365493213; Tue, 13 Jun 2017 07:51:33 -0700 (PDT) Received: from cpu185.redpinesignals.com ([203.196.161.90]) by smtp.gmail.com with ESMTPSA id n4sm25212090pgt.3.2017.06.13.07.51.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 13 Jun 2017 07:51:32 -0700 (PDT) From: Amitkumar Karwar X-Google-Original-From: Amitkumar Karwar To: Kalle Valo Cc: linux-wireless@vger.kernel.org, Alexey.Brodkin@synopsys.com, Amitkumar Karwar , Karun Eagalapati , Amitkumar Karwar Subject: [PATCH 02/20] rsi: fix sdio card reset problem Date: Tue, 13 Jun 2017 20:18:50 +0530 Message-Id: <1497365348-2305-3-git-send-email-amit.karwar@redpinesignals.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1497365348-2305-1-git-send-email-amit.karwar@redpinesignals.com> References: <1497365348-2305-1-git-send-email-amit.karwar@redpinesignals.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: Karun Eagalapati card reset is not working with recent kernels. Using host->card->ocr instead of host->ocr_avail solved the problem. Signed-off-by: Karun Eagalapati Signed-off-by: Amitkumar Karwar --- drivers/net/wireless/rsi/rsi_91x_sdio.c | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/drivers/net/wireless/rsi/rsi_91x_sdio.c b/drivers/net/wireless/rsi/rsi_91x_sdio.c index e5ea99b..b5ac503 100644 --- a/drivers/net/wireless/rsi/rsi_91x_sdio.c +++ b/drivers/net/wireless/rsi/rsi_91x_sdio.c @@ -219,26 +219,18 @@ static void rsi_reset_card(struct sdio_func *pfunction) if (err) rsi_dbg(ERR_ZONE, "%s: CMD0 failed : %d\n", __func__, err); - if (!host->ocr_avail) { - /* Issue CMD5, arg = 0 */ - 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; - } + /* Issue CMD5, arg = 0 */ + 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, - (MMC_RSP_R4 | MMC_CMD_BCR), - &resp); + err = rsi_issue_sdiocommand(pfunction, SD_IO_SEND_OP_COND, + card->ocr, + (MMC_RSP_R4 | MMC_CMD_BCR), &resp); if (err) { rsi_dbg(ERR_ZONE, "%s: CMD5 failed : %d\n", __func__, err);