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=1796385299; b=YYQ7N2kJ3V2Bq0MTdFani+3DFlZKn8sYYr8ujTuXbiLWw0Htlbd8vSApLS/HRR612nov qM/9UAvLq0/oBWVgh8nJNlmr+hJngh49KIQz8DOtj3nV3rbbg1+xaJBVurlx5mFSY9KLq /bAOLXgMoVXhIMvn1SXYXn06b8eqNhw33QFswZr6rL7K6Xb0Zd9uTtaZyv9H7iMpXYQla XFjnNXN506sUqPwc7+vBwgu8NZKVrNCYsSyCAXUaHd6VOCwPNa49C+/95TsQSaKaaeLcH 7WhFWiOb7SZVTx1c9wJUZ2GA8lVmtq67Xk7w+9UVDqxpvvlQC9eSkMnR7yfpvDs9qtQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796385299; 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=Avn6SU7fBzm3SXJ0gw5uIS+0mbgYlKg1rWIb0L7kNJw=; b=IUnmfSXJT65ncL8FFKtedu58m8QhEgKjAzii2nA/Tr9pMmJZQTiup5Ud+i8bbynCrVio ILnwFQxmg1iGs28N/vEa4qEmyKjDCyPQDs7hsCCNrMEA92THucV9QlHlHWY4ZPKuMzwyl q4AApjWAVSfPi3j5wDP4imeK+pVNbD6xsnaHEOG9k6ycfWFztUsqTuPHxdLCL8GTXe0et 9wep3Fsugo33o3Zy4hb7TsyaJjFUaxFn6ELq5i9gOlfaI+1DDm/rM5fUN358wZDptCgx1 VbuUuGrERr4LhlAGdcW4aMxgoNIj8ncGZ/Q4yGyndqqKNn/lxEIqg795DlM7JWjMPbg== 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=qAFDUB5B; 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 8AB5A606A332; Fri, 4 Dec 2026 11:54:59 +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=qAFDUB5B Received: by smtp.kernel.org (Postfix) with ESMTPSA id 02DBC1F00934; Fri, 4 Dec 2026 11:54:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796385299; bh=Avn6SU7fBzm3SXJ0gw5uIS+0mbgYlKg1rWIb0L7kNJw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=qAFDUB5BvO5Zk0eTL+yUKpqrZzOc1oPCUBN851Ilmr+kw0+tIAfY/VFrwvAcgmIfu HrronYjJsfdWU6VAtTBUK9cTUwpaPxXLH7nWdGzHxi1I3iwVxYKpnugxBk4rBKmD68 N6frLlwrdQJs2EMr7TMxsrTj2Nbs2E528egMLkMs= 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 0496/1167] mmc: meson-gx: name the limit of the CMD_CFG timeout field Date: Fri, 4 Dec 2026 18:58:43 +0900 Message-ID: <20261204100714.983686551@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 e1644210d15f7f8adbe6315199b4b73bead63a2c upstream. The data timeout is capped at a literal 32768 ms with a comment next to it. Give the limit a name beside the other timeout constants. Fixes: 51c5d8447bd7 ("MMC: meson: initial support for GX platforms") 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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/mmc/host/meson-gx-mmc.c +++ b/drivers/mmc/host/meson-gx-mmc.c @@ -125,6 +125,7 @@ #define SD_EMMC_CFG_RESP_TIMEOUT 256 /* in clock cycles */ #define SD_EMMC_CMD_TIMEOUT 1024 /* in ms */ #define SD_EMMC_CMD_TIMEOUT_DATA 4096 /* in ms */ +#define SD_EMMC_CMD_TIMEOUT_MAX 32768 /* in ms, 2^15: limit of CMD_CFG_TIMEOUT_MASK */ #define SD_EMMC_CFG_CMD_GAP 16 /* in clock cycles */ #define SD_EMMC_DESC_BUF_LEN PAGE_SIZE @@ -211,7 +212,7 @@ static unsigned int meson_mmc_get_timeou timeout = roundup_pow_of_two(timeout); - return min(timeout, 32768U); /* max. 2^15 ms */ + return min_t(unsigned int, timeout, SD_EMMC_CMD_TIMEOUT_MAX); } /* For R1b the controller waits for busy to be released within this timeout. */