Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3577677pxb; Mon, 24 Jan 2022 12:39:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJxLBP0Ygqsyxlm703ivhlBsLHijjxn7ugFMgd/ZWTZ1haXPbj4fgPMkuCQhYHuse6cgV9v6 X-Received: by 2002:a17:903:2403:b0:14a:70dc:1593 with SMTP id e3-20020a170903240300b0014a70dc1593mr16030272plo.145.1643056768124; Mon, 24 Jan 2022 12:39:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643056768; cv=none; d=google.com; s=arc-20160816; b=tvHIayoN3ruhySYe3nDTf47HmG33sfNT4CjCfmaeg+4ftzWn1FTz6PDuwZ63+c4p4y 2a0w0uqMow+hKABD47mxO3oG9Gzf1LyK+iAWgVnSAp4SL1bofImzwr9Sied3G/R4RlXG J9UvpRloRctlanX2Ks5ujTy28eN5dA96D0O92dkJhsnrDr3oqay3ttUqUWDc64rHnJfc 2+iSv0PzJ4a3YWl2489CXBkaQLMiK2F/43w8alZu0E96fYURpFD///BVYFccI0dGARxt xIKWpzRgQz0xc8Vbi47Wl7N6BMhfO9y5E8qZLo/lQ4AiBhD7WMYuZEH1+7f6bznzhPxE CYHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Bb3BgKM//SDCtJ12+VbXLNesTXuqiXuY4kB0lhuThH4=; b=NVTIBMo03x/wwxVfEGxAOFjWNOHEP4o0qNhTfCKibb9nX+kLxe37LgdPKOu4xO++Sz ypJWYGEfu3Zhk4DXvctIVOr1I5213pUz8a14Tno73128JveHVBztZ76ej48X125yOuPc vRLuMz2DnTq9qaCzCkheuI8z6DXcpDhDhOAu4ZOkQ3HBvPpK/0+9zLZRY4oKBF26/qkv M+JpoS/N4UjLglUzpphUW3gt5xA6uJ6D+lgCooqe+HJjJU8BLIZQvJQpu+1HFMkEbdkZ wPY4HPSHEIY2j+kwoMQkyte0qqSjxhfogLquYUgKbUT5AUtExOcSmz+qDsbSZB1xaDJc +ypA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=1pFLRIZk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m132si12773560pfd.160.2022.01.24.12.39.12; Mon, 24 Jan 2022 12:39:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=1pFLRIZk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351532AbiAXTwU (ORCPT + 99 others); Mon, 24 Jan 2022 14:52:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55314 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355412AbiAXTlQ (ORCPT ); Mon, 24 Jan 2022 14:41:16 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA50CC06175E; Mon, 24 Jan 2022 11:21:22 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 90D17B811F9; Mon, 24 Jan 2022 19:21:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B7526C340E5; Mon, 24 Jan 2022 19:21:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643052080; bh=TXblizUNnF0qFAWhKFQNE34d8SwkK57tLFPlgMicx4A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1pFLRIZkgD9q9/Q6c8isODjLyFUcONKjEE6zW8P5HELxq3bx3vtcDK+J+/qE9eRqi KSpsb/fyYhOU4URkPL3LnUTTzpVyq2TOKcKf76797nyzd+HYdZPwmuNn2wEfLbZMMq P2u2SrWagMHFeuwMpa0bmzi/HDsxsg/Va2mCtRsE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "H. Nikolaus Schaller" , Ulf Hansson , Sasha Levin Subject: [PATCH 4.19 150/239] mmc: core: Fixup storing of OCR for MMC_QUIRK_NONSTD_SDIO Date: Mon, 24 Jan 2022 19:43:08 +0100 Message-Id: <20220124183947.864839011@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124183943.102762895@linuxfoundation.org> References: <20220124183943.102762895@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ulf Hansson [ Upstream commit 8c3e5b74b9e2146f564905e50ca716591c76d4f1 ] The mmc core takes a specific path to support initializing of a non-standard SDIO card. This is triggered by looking for the card-quirk, MMC_QUIRK_NONSTD_SDIO. In mmc_sdio_init_card() this gets rather messy, as it causes the code to bail out earlier, compared to the usual path. This leads to that the OCR doesn't get saved properly in card->ocr. Fortunately, only omap_hsmmc has been using the MMC_QUIRK_NONSTD_SDIO and is dealing with the issue, by assigning a hardcoded value (0x80) to card->ocr from an ->init_card() ops. To make the behaviour consistent, let's instead rely on the core to save the OCR in card->ocr during initialization. Reported-by: H. Nikolaus Schaller Signed-off-by: Ulf Hansson Signed-off-by: H. Nikolaus Schaller Link: https://lore.kernel.org/r/e7936cff7fc24d187ef2680d3b4edb0ade58f293.1636564631.git.hns@goldelico.com Signed-off-by: Ulf Hansson Signed-off-by: Sasha Levin --- drivers/mmc/core/sdio.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c index 4e72ad24322f7..5f1ee88aa7615 100644 --- a/drivers/mmc/core/sdio.c +++ b/drivers/mmc/core/sdio.c @@ -634,6 +634,8 @@ try_again: if (host->ops->init_card) host->ops->init_card(host, card); + card->ocr = ocr_card; + /* * If the host and card support UHS-I mode request the card * to switch to 1.8V signaling level. No 1.8v signalling if @@ -740,7 +742,7 @@ try_again: card = oldcard; } - card->ocr = ocr_card; + mmc_fixup_device(card, sdio_fixup_methods); if (card->type == MMC_TYPE_SD_COMBO) { -- 2.34.1