From nobody Mon Mar 07 11:19:56 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id BEFC31A06F9F; Mon, 7 Mar 2022 11:19:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KBwwX3rsBz4WPk; Mon, 7 Mar 2022 11:19:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646651996; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pbsmbWNFKGH/tyL+X2D4l0FGmHMbevTlVFFG+sKRIZY=; b=Upqkzvb1Pt9wiNknFW+6FTKY/wp3en+AURXY4i6W2mvq9QvIOCDo+ND4VsDA3sBsVtBO2u G6HFKrFB78ZhCl174aNULR/2YsogSuLpIXBXwe8frsGyJqmXKCgh3yqUt9xk/ITu7vDXPK /B1x7DZB6vnYgpkSWP/TAZKZ+lpq+bhtz9pVV7RfeeukqslS6hS9+UxC1HjfdZHU+fxxBu U1urXlVExzlVvmq3+ekbZTO/03+KarlUwL+7tUFldxYMFe3PwL5SbcXPZWY39NzOFWgQKV dFeIw5+UralHzDCyHY7Fcl8tH+CAsUNuxoS82Hlk9oxE9x5iRS2qrD5eT8s0ZQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4D59F271B3; Mon, 7 Mar 2022 11:19:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 227BJuOG084497; Mon, 7 Mar 2022 11:19:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 227BJuAH084496; Mon, 7 Mar 2022 11:19:56 GMT (envelope-from git) Date: Mon, 7 Mar 2022 11:19:56 GMT Message-Id: <202203071119.227BJuAH084496@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Marcin Wojtas Subject: git: 7aa6014fb16f - stable/13 - mmc: Fix HS200/HS400 capability check List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mw X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7aa6014fb16f68f8966a5155a968c6611d7cce72 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646651996; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pbsmbWNFKGH/tyL+X2D4l0FGmHMbevTlVFFG+sKRIZY=; b=vGhTQ51Nc6J4jV3J9vRjI1mKVBTqzI0X4GxREHBLlSnVkg5glYv6kgXjGksVrTCzlBd7n2 uL+SBs8IzCGP5DZUh/0jFCu3EkTFhG4dglL5z/CQvc9ZPEhYNDTEtEmhzEtQa+w0y7xvO9 fiIdn4S5LcbvNsOIu55GSKW+rlcUUhghuuPqSuKdtkR6nVHZW//ZCsR2wbD58IzWge5ef0 D5eAiaIOOO/r0bEqx+ykrbLdxNESgD3q6vIZOyJZmGpbXcMbb3M2bcaqTO3L3gJEDHMIVq OqQxNGOA9tEpnZHNtaR+gtL/Sdw+6hITGiLK8fwZnIWUcuf5MaltcyzeGEZiNg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1646651996; a=rsa-sha256; cv=none; b=kYVDBnzwro7lvojQcewqr59rIYfOnZK7WBrOBSt3ypvDNoqSIdYAWDGt2/HlOUfKqkeHgW HFwF5vwjVACzi5DG0gjT7GNbPUY+DaP0tr7udPOddSCvRgdPASyucWD4Yc5DkiRPE+wRAV kqZVnhwagqvsIlv+qU3YNpAwztcNyOwisqFiJOz2mGZjTrtxq3ZA5vKCFkwyb610wpT4zB WWDGYIrqtkibgUUiVrBQJmiGgrynPoI91Lg7wr0p8w3S9lml0GsS2zm0r9HDuH5bFGi8jU gwyD2g4m+VEi0KsrXM/wJX142nc/SiF9cHVhqIYx3wH5dKnCUB+cm73n7TFSIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mw: URL: https://cgit.FreeBSD.org/src/commit/?id=7aa6014fb16f68f8966a5155a968c6611d7cce72 commit 7aa6014fb16f68f8966a5155a968c6611d7cce72 Author: Kornel Duleba AuthorDate: 2021-11-28 11:24:07 +0000 Commit: Marcin Wojtas CommitDate: 2022-03-07 11:19:28 +0000 mmc: Fix HS200/HS400 capability check HS200 and HS400 speeds can be enabled either with 1.2, or 1.8V signaling voltage. Because of that we have four cabability flags: MMC_CAP_MMC_HS200_120, MMC_CAP_MMC_HS200_180, MMC_CAP_MMC_HS400_120, MMC_CAP_MMC_HS400_180. MMC logic only enables HS200/HS400 mode if both flags are set for the corresponding speed. Fix that by being more permissive in host timing cap check. Reviewed by: manu, mw MFC after: 2 weeks Obtained from: Semihalf Sponsored by: Alstom Group Differential revision: https://reviews.freebsd.org/D33130 (cherry picked from commit 8661e085fb953855dbc7059f21a64a05ae61b22c) --- sys/dev/mmc/mmc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/dev/mmc/mmc.c b/sys/dev/mmc/mmc.c index 6e1d55639284..24501080a971 100644 --- a/sys/dev/mmc/mmc.c +++ b/sys/dev/mmc/mmc.c @@ -1549,9 +1549,11 @@ mmc_host_timing(device_t dev, enum mmc_bus_timing timing) case bus_timing_mmc_ddr52: return (HOST_TIMING_CAP(host_caps, MMC_CAP_MMC_DDR52)); case bus_timing_mmc_hs200: - return (HOST_TIMING_CAP(host_caps, MMC_CAP_MMC_HS200)); + return (HOST_TIMING_CAP(host_caps, MMC_CAP_MMC_HS200_120) || + HOST_TIMING_CAP(host_caps, MMC_CAP_MMC_HS200_180)); case bus_timing_mmc_hs400: - return (HOST_TIMING_CAP(host_caps, MMC_CAP_MMC_HS400)); + return (HOST_TIMING_CAP(host_caps, MMC_CAP_MMC_HS400_120) || + HOST_TIMING_CAP(host_caps, MMC_CAP_MMC_HS400_180)); case bus_timing_mmc_hs400es: return (HOST_TIMING_CAP(host_caps, MMC_CAP_MMC_HS400 | MMC_CAP_MMC_ENH_STROBE));