From patchwork Fri Jan 18 09:18:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siva Rebbagondla X-Patchwork-Id: 10769587 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-2.web.codeaurora.org (Postfix) with ESMTP id A61E16C2 for ; Fri, 18 Jan 2019 09:18:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 93D672A7B7 for ; Fri, 18 Jan 2019 09:18:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 861072AA74; Fri, 18 Jan 2019 09:18:22 +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 3B6832A7B7 for ; Fri, 18 Jan 2019 09:18:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726981AbfARJSU (ORCPT ); Fri, 18 Jan 2019 04:18:20 -0500 Received: from mail-pg1-f196.google.com ([209.85.215.196]:33343 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725924AbfARJST (ORCPT ); Fri, 18 Jan 2019 04:18:19 -0500 Received: by mail-pg1-f196.google.com with SMTP id z11so5782826pgu.0 for ; Fri, 18 Jan 2019 01:18:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=m6hTkkgeB4WIs4dO5qVCgkJHHaM0qAwiWiDgz461vLo=; b=rNevZuHbzxX9XySDrJYAP3VAzYsKmErAiXs/dssTN9Yjz+wkyR3jdhsqVZcWzdIPvd hyoRSc0Oxk9MHObAobTsCbA0tSJgbRjKZ/CMBAMfP5Im+mqur0XQaMk1Auq4l0FcOXP6 hRlbTiGRpUPJmXkfDOwWYA7n7rYv5pikUfPP2oyT11y9B7v++6bNKWldFcbfAnjenm2A H1+OWTlqO+6Rlo1E00ABxHXUa+7z0syUegLITUJemMdSdWA8Jh2xZkJal9C2rMBFtpmc qT/j3l/DpT9oUEMcLo5P57iHD22P9QRDT+xAktBA7gIRg2q/hEOwlWcD9bu6kc2ueoMB Namw== 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; bh=m6hTkkgeB4WIs4dO5qVCgkJHHaM0qAwiWiDgz461vLo=; b=Q/nMkHAyFbMTYX2Wyj0Hotv4czEIxB6ssdAUQ3ygvfVAjWWLTlqzOZkYldbvqb3UaW oVhmug8QqEMB1AUH1SLAOnL+yT2sUW9aFDcDBhGss7iRZjckQPnPYXo0eH2QNP6SWpTu 9vTbvIUK13PrxA9L/PG7Q0jBYhFOiSDj/sc3TmCyCfdDCNkq1tHkq6YRkyvVxuqYjvZj Bzi/vhqYak3WNn2491/mOpLInfkA7f4pAZuGupoQjWNA3CryMpEs8MUd+UMikGJmMzj6 68P/wuDs1cWw2dhgiR5UHXc+YiBNFsJEqHuAzp4kr+PTz6m3cpXANkv1WnRlJOPLUmM1 LGtw== X-Gm-Message-State: AJcUukf0mixDFctMZQ6j7QdYkNabeUq9vfcv1ZgtBLYHifHxk5UgUI3n tKzxlopms0apwiYVDPu2Gv4= X-Google-Smtp-Source: ALg8bN4+4iXcGOIYrGkqGFzLhlNbxVI/JZg0AA360hARfkQvOZ9+mi+thHoL9NsB1bDtyKJBrtGIIw== X-Received: by 2002:a62:3888:: with SMTP id f130mr18295080pfa.132.1547803098378; Fri, 18 Jan 2019 01:18:18 -0800 (PST) Received: from cpu459.localdomain ([203.196.161.90]) by smtp.gmail.com with ESMTPSA id m11sm6225596pgh.51.2019.01.18.01.18.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Jan 2019 01:18:17 -0800 (PST) From: Siva Rebbagondla To: Kalle Valo Cc: linux-wireless@vger.kernel.org, Rishikesh Basu , Siva Rebbagondla , Ganapathi Kondraju Subject: [PATCH] rsi: Suppress sdhci warnings in mmc Date: Fri, 18 Jan 2019 14:48:07 +0530 Message-Id: <1547803087-2767-1-git-send-email-siva8118@gmail.com> X-Mailer: git-send-email 2.5.5 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: Siva Rebbagondla while inserting and removing sdio module multiple times, we are getting sdhci warnings. This is because, improper assignment of ocr_avail value. Fixed this by assigning proper value. This patch is enhancement for commit 78e450719c702 ("rsi: Fix 'invalid vdd' warning in mmc"). Signed-off-by: Siva Rebbagondla --- drivers/net/wireless/rsi/rsi_91x_sdio.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/drivers/net/wireless/rsi/rsi_91x_sdio.c b/drivers/net/wireless/rsi/rsi_91x_sdio.c index 5733e44..b412b65e 100644 --- a/drivers/net/wireless/rsi/rsi_91x_sdio.c +++ b/drivers/net/wireless/rsi/rsi_91x_sdio.c @@ -230,16 +230,19 @@ static void rsi_reset_card(struct sdio_func *pfunction) rsi_dbg(ERR_ZONE, "%s: CMD0 failed : %d\n", __func__, err); /* 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; + 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; + } /* 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, - card->ocr, + host->ocr_avail, (MMC_RSP_R4 | MMC_CMD_BCR), &resp); if (err) { rsi_dbg(ERR_ZONE, "%s: CMD5 failed : %d\n",