From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796385289; b=Rbet76x28HTAZu7f5osgUJO1Caor0C7Ym5k62edJsNHhntRvaQMmX0WB+x4MJmVai3Yx +czyQyAPXZakXX64qsehJkLJRmJXelVEJeaVZMi3w+VPv19kI+9thTTq9G/eQGr52X+C1 I1ca9lz2V6qKSvl432kIMHijWFjFrUfmgujb82+zgC9/RLlxG+09iWaH8OVGx6KzLszzZ BnCNcdG2HcBvHudhGc3JNPNuUV6I0BRbLvstxN/5GxpBkmxaJdHfT+bR7cqMZx2DWGcBb IoJpA94/7eeCm2ItrvB2VGaD3478j6LuaTL1j41urhEfSvi0tkfqS3GLbFscHw89W/w== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796385289; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=kc3CM6LQ9dBteswZZjC/AUg8EQ9eDAYephfgujObHXk=; b=ut2t0r66MDqtA7We2SS7d/0nUtploVTHtDCHLVeFSHCj0jL0+L+zAD9TLLIexCxbvcia foBs/gnocUdQjr6DXLReVMWk95WMieR+4vphne68a0nMmCm/vMpxbJrCM3S//kBAt/7uV B3ct6ai2J2L3+1SJKIs8gkKIXRRrPzyrXLX3Jtho6OqThjZrzTWTjhO7f9rxyHNB9zqLy 3vjWWvAtCJoQyB7MF/H/3CYOv02tDf7kdMSWR9h5Ik3fm26TlR8kMHUhg9x/bcmkBHMEx 4XxBAFS5niwKjXt3nsuYaNqlfpJmMOl4fUPn01HQO6tn2T8pCL8FMNS2yFyRO4bx1CQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=0MWL3r1r; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BF215606A33B; Fri, 4 Dec 2026 11:54:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=0MWL3r1r Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3ADBF1F000CE; Fri, 4 Dec 2026 11:54:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796385289; bh=kc3CM6LQ9dBteswZZjC/AUg8EQ9eDAYephfgujObHXk=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=0MWL3r1rX8F6Ty15C5L2crEcET54CZnrg6XKizlBCo6K1ewEewxnqy/bDfMdEZh/2 vy2wz0a9DVC4TWg0Dr+74NN2xWpvZCq5oN93jE/iDFxT0xnCApJCm8KA/tou32OZrz kgX9O1Yyil1qNTegG3RGYVuJnwExXN1xniz3g/YY= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Igor Velkov , Neil Armstrong , Ulf Hansson Subject: [PATCH 6.6 0493/1167] mmc: meson-gx: report busy from DAT0 alone Date: Fri, 4 Dec 2026 18:58:40 +0900 Message-ID: <20261204100714.904487043@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100702.047403948@linuxfoundation.org> References: <20261204100702.047403948@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Igor Velkov commit 318fdb75f4dc9d18ae621b9fb25eb11160c95649 upstream. meson_mmc_card_busy() reports busy only while DAT0..3 are all low. A busy card drives DAT0 low and leaves DAT1..3 to the pull-ups, and the callback is defined as "Check if the card is pulling dat[0] low". So a busy card is reported free, and the core, which prefers card_busy over CMD13 in mmc_busy_cb(), stops polling after CMD6 and erase at once. The controller hides this on R1b commands, where it waits for busy itself. Once max_busy_timeout is reported, the core sends the longer waits, the 120 s BKOPS and 240 s sanitize switches among them, as R1 and has only the polling left. Look at DAT0 only, as sdhci_card_busy() does. The checks around the voltage switch in mmc_set_uhs_voltage() still hold: the card drives DAT0..3 low together after CMD11 and keeps them low together on failure. Fixes: 186cd8b7f586 ("mmc: meson-gx: implement card_busy callback") Cc: stable@vger.kernel.org Signed-off-by: Igor Velkov Reviewed-by: Neil Armstrong Signed-off-by: Ulf Hansson Signed-off-by: Greg Kroah-Hartman --- drivers/mmc/host/meson-gx-mmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/mmc/host/meson-gx-mmc.c +++ b/drivers/mmc/host/meson-gx-mmc.c @@ -1079,8 +1079,8 @@ static int meson_mmc_card_busy(struct mm regval = readl(host->regs + SD_EMMC_STATUS); - /* We are only interrested in lines 0 to 3, so mask the other ones */ - return !(FIELD_GET(STATUS_DATI, regval) & 0xf); + /* The card signals busy on DAT0 alone. */ + return !(FIELD_GET(STATUS_DATI, regval) & BIT(0)); } static int meson_mmc_voltage_switch(struct mmc_host *mmc, struct mmc_ios *ios)