Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3597572pxb; Mon, 24 Jan 2022 13:09:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJwUp2MwxW/uJNik8gMOXaZGhwn7Uz8Y2qKmVn77v3QS/CVLvlV5IgeikZ5333/dBhN803I+ X-Received: by 2002:a63:8a44:: with SMTP id y65mr12870697pgd.456.1643058571196; Mon, 24 Jan 2022 13:09:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643058571; cv=none; d=google.com; s=arc-20160816; b=RT5HP/r7O7jXtUpkRuZE/p65X0vftjMdgbPAt5Sli6ebV14lsQpPss/SqPSau+JJQD GTnyP/HEv2M8xiouJ2Vfk8gK3ilY1sXGeVqtlVIiIKJ1R/cY9xaZLbkIHvkaun9lKqFY Pk0NZ4Irn4IuTM+HBtUTOqZIi+xr134r46Q9nkdWVtze5RheXr+xyvlzqWKDQyT04K2S 66KCUWmRWZZePMpTjv1uGEQYRFa0uAS0KfvCeV2l3Rmtp2A0Eru9Ak5xubKiLLBL14+O gKwzCPOdjJ1kZcvTu3z/CAx0GUGVD7j7vB37ZWp6fDA3DZ6nVfEKfHbM8HFrYn/F+ZZt uJFQ== 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=UT1lGw0/sXcHEaAToYkP0Icv5/vorQG2CweSmZ04Boo=; b=sJc22ohz64d/2pQrxyqJvgj35dl5PbNj/OoV6ewbb842INyFUGgK6NuaNXHiwbMsem kTSry/y0vJ5QfOFtRcMEqB2h9FxILXeSrX8thv4EYvQziB9QTLKy1ZoHY5DZUDHIKj+T X5NhpeQhASZHcQ7TwHZSn+NQFzGwwkVl+13voOWPKmkwYavc9JEDtK2EutuFZs69ggw+ ptBahUuQUOd+HiEq+MpI6SxRuzR7UZVcC+D2Q7sl18doj92LYN3SBKbHxIRRKxU2YcAQ SftBz7DX0kbhDGyIy/wDVyZimry8JKe2bgoF5Y1X/lWGpyL0qJp4XKHg9FWNB+mCvmZv U3xA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=JHhe+c84; 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 63si13796661pga.664.2022.01.24.13.09.14; Mon, 24 Jan 2022 13:09:31 -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=JHhe+c84; 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 S1386143AbiAXUfN (ORCPT + 99 others); Mon, 24 Jan 2022 15:35:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354861AbiAXUMv (ORCPT ); Mon, 24 Jan 2022 15:12:51 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E95CDC028C2B; Mon, 24 Jan 2022 11:34:05 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 82F396141C; Mon, 24 Jan 2022 19:34:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5CBA8C340E5; Mon, 24 Jan 2022 19:34:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643052844; bh=XtiamZuhFQg/KSWaToglrULMfVhgN5zJmScIv/wuNgs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JHhe+c84IR0fW7CDCPmKgZtgfCslukwlWYO6Kf8DAoQfWiiwrOezC99RPpMvGlhRS SsVkdQ7NKh1iedZQAFet9EmWY+jDAAUo1j1x81m0OnZIDsoPjDCHiKmG3p6fCztPjH FXzZyxZ+gr1ZcuYdtjhEkZXEi5pu0ULe5bJo3jWI= 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 5.4 192/320] mmc: core: Fixup storing of OCR for MMC_QUIRK_NONSTD_SDIO Date: Mon, 24 Jan 2022 19:42:56 +0100 Message-Id: <20220124184000.180649765@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124183953.750177707@linuxfoundation.org> References: <20220124183953.750177707@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 0bf33786fc5c5..9e0791332ef38 100644 --- a/drivers/mmc/core/sdio.c +++ b/drivers/mmc/core/sdio.c @@ -626,6 +626,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 @@ -738,7 +740,7 @@ try_again: goto mismatch; } } - card->ocr = ocr_card; + mmc_fixup_device(card, sdio_fixup_methods); if (card->type == MMC_TYPE_SD_COMBO) { -- 2.34.1