Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3562829pxb; Mon, 24 Jan 2022 12:17:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJw9uDh0euzNrfKAJq7XPy84DCXSz5Dxrjy7+fjZZdsZJire94y7XWkpMzpFVvB3OL4BJLuc X-Received: by 2002:a63:8c:: with SMTP id 134mr12999471pga.599.1643055434424; Mon, 24 Jan 2022 12:17:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643055434; cv=none; d=google.com; s=arc-20160816; b=ipjJsRP/8zqsQbQWymeiTcBZTAPB+KrMp1Cnwxev30PVZVjO+aW/DsubjJuqJPsC58 j8UksgnTjtM52P3KBcfoP88fK9HqT8Co3Vm/t8DKFXDqV7jSUXn2j6OEXjWVXg+KIRQy yrJr+rBuk+6KYpfnlx+tkldGlrCjMKTiUKnrJDMp6c5rjPfvhpSBym8lown3g6A7qbeE GXj+L0egeqbIdN8GowUhIw7XQr6HxBHjAdHSc3DOac6YDIiHWv96JF9hn8kB1e3KUcYh g+JbNrvpylz6WrIFA/vzhZGCtcg73Zw1t36z1f9ewrTp2px5U9XHLfjO7nmPZlE6a1Vr ZNDA== 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=yRm3JmT9DZXS+K3itCqsJ9InKYjLEzSmfQLrgkk9sEU=; b=jkGRQKCbHVWbDZSmfrmbssKhlNaDYlVH5zAHJZg2LCsalxN8k8VwBJQ39r0hjwMe+4 GUFIyozFYoTGgfhrk3wAgn1yq3UR+Ly91vKX0laKBtMAKPvGm8hbWZsF4sEwz/ekqyJg k31JthxCAdsNZm7MOWWIEzS0a3TWlMGkC59mwSXNtCz9IjiyjfviFi5Kr/HqHuyXhHx6 elgbPY31XG02cDryIXHZT41Z+qL7BiktV8mCS6PhSO9mLm8qHVhw0FH45N/Q3eieh8jc /qCClGK9j2WbrThNj5nyMVp91R2w+oAQdskhaKOBf+L8LtqdOKKCV57GK8FoauC2YtH1 aZqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=sT01S87w; 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 203si3690260pgc.449.2022.01.24.12.17.02; Mon, 24 Jan 2022 12:17:14 -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=sT01S87w; 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 S242983AbiAXTSo (ORCPT + 99 others); Mon, 24 Jan 2022 14:18:44 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:36688 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347111AbiAXTJn (ORCPT ); Mon, 24 Jan 2022 14:09:43 -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 2BF65B8121B; Mon, 24 Jan 2022 19:09:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4DE0BC340E5; Mon, 24 Jan 2022 19:09:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643051380; bh=///eduZoePXlekkzVUpHa5zCsgdmQWKsry4wD4F/bcQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sT01S87wPquJEfr8vsvQ2vqgtBZfqClL17/tM4S4ASZQ8RRpJOS/6gZLgs7w9JY4r kRSJV4qI2lxgDmtbgA6D8RDR3sRgxZI6Bdhom01Avf8N2JoI5v21rdMp43NtbPZCyS UU2PNTJ2VOQWdC1ADfAWzCEnBRTzrJC+sKBm11Gw= 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.14 110/186] mmc: core: Fixup storing of OCR for MMC_QUIRK_NONSTD_SDIO Date: Mon, 24 Jan 2022 19:43:05 +0100 Message-Id: <20220124183940.648466485@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124183937.101330125@linuxfoundation.org> References: <20220124183937.101330125@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 7568cea559220..bf0a0ef60d6b4 100644 --- a/drivers/mmc/core/sdio.c +++ b/drivers/mmc/core/sdio.c @@ -631,6 +631,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 @@ -737,7 +739,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