Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3619127pxb; Mon, 24 Jan 2022 13:39:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJxeLL6rm0CjKVd9UsH5c8pvf1aJIlNiJA2MciyoN10woo1En6qnH/Qe0jO2EjB8wZsWCuwD X-Received: by 2002:a17:90a:940e:: with SMTP id r14mr279477pjo.17.1643060242209; Mon, 24 Jan 2022 13:37:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643060242; cv=none; d=google.com; s=arc-20160816; b=b84JOy4gEDPWlxv9oClsS36sSZij5bBav/fx0whCoE6+pQx0aqWTY27fzoMAsg2Fld pQf+nKv/5t3iTN6waeXgvb5Z2vfMjlJ9gQvAKOvT/k90eeyEcBRrRZYnTh6o/5zQGwoO OzpWIJIojtWP8gR7vl8OQX4fvBLG38vjNJBsWv5FAP6Bvkh5ZGP4IJYOPOr4/mlNf9pR fA3fzjeF+3AFdiPN/0Qyg9Y/57TQw0Npe3S/K39Khxdk++Zd2oe5gg5PStpNmiMpHk8a m0p1bCrZyE+BMJLOX958ruBBrAVvVOBthJbeun8Qnkg7Q8mypRfEEYCsfGMO15SMJFWH AfMQ== 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=78BzBhYALswb9u7J4XOzSL7PZ7fPIrbyC1k/6qNgzU4=; b=1CVQbh2Hvy3iXvzm+JOvDIP3z4ywVfArnYxngjU68ki06oE+sY8/a56O6rgYxhd2KF PbX7FDPvazqFe4AcGDZzbaoo/wuOMg6MnDIFaRK53NFsJsoWgYH0G495yHzCvD5LP5Pa 6v5P2EUxyu66SP2R4AQSVL1VZ1kNX2cUJFBSFxrYwn8FadV/tzGoN7JvDRE1FK9eEEOn z2Fo5XT1LdYpp2YvEjh8PA9f7VGmudI1W+jZaqeVFKZQMpE7lgXlnYQ57eEl1C1RF8kO Xi+I72kwJD2Gz2kVp4tAAZGRWc9bEikldu5pK8gZNQVZzrtaokRa7JJFeGT7gFribTCA Z2NA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=M23UC0dh; 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 z17si12339240plo.605.2022.01.24.13.37.10; Mon, 24 Jan 2022 13:37:22 -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=M23UC0dh; 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 S1448622AbiAXVNL (ORCPT + 99 others); Mon, 24 Jan 2022 16:13:11 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:40476 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1387920AbiAXUhe (ORCPT ); Mon, 24 Jan 2022 15:37:34 -0500 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 8744CB8105C; Mon, 24 Jan 2022 20:37:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E1A33C340E5; Mon, 24 Jan 2022 20:37:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643056652; bh=rYM9exfV6ZPmhtkluUdEqD0mCu5N6+8LDBYWPagDUt8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=M23UC0dh7+yDWSz2hpgkAuClHtj83X+3YxwEd3LtMS5FneeOZcACmM3pCxhsLFs+B HA35pZffIva9qDzZ9eun6pnwBvwZBI0W1kynT8hVKH+M7YAFHOefKdUyrlSX4IWrEB DcyEa8OFRCXqBJZ64sgTLLjJngOhapdssn1OfDUg= 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.15 556/846] mmc: core: Fixup storing of OCR for MMC_QUIRK_NONSTD_SDIO Date: Mon, 24 Jan 2022 19:41:13 +0100 Message-Id: <20220124184120.199049720@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184100.867127425@linuxfoundation.org> References: <20220124184100.867127425@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 68edf7a615be5..5447c47157aa5 100644 --- a/drivers/mmc/core/sdio.c +++ b/drivers/mmc/core/sdio.c @@ -708,6 +708,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 @@ -820,7 +822,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