From nobody Thu Feb 17 06:58:07 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 0FD8219C65C9; Thu, 17 Feb 2022 06:58:08 +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 4Jzlyl6sk8z3M5b; Thu, 17 Feb 2022 06:58:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645081088; 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=AHl/i+Pz6LxM2sU0avnuyPPBqiUHEgEIVcMyZK7QKZo=; b=EJiYi5KFxYuNyJi1Ci4ViBc28R3EaK9odb92s7oNwNt4/GXzGuCSsK55Ou5Qcp1qt8DZ93 u5wbVusXkeFdJ1o6ZCPZpJ6xDyD0LJsrty/+TTVogHNSfnzNuo3wvkjEzbb4LVk+6sTq39 LckxiYWGTbfKHVZr69XrCE9m/fuBWhhi14CReIaTAuf+ezV5N+QEvZ1QCahwTsWoKt6Vc4 +efMkOwggbY9x7nCOyQEC6KkFEQvoyCckNE4atYH/FoPOSHg53GNHdrcyT5zqk4XqHiayq i23zWq0JjQGVXoO1su3d/JoQtQe8ObxUPW5a6JUzBrWqsHZPy5WI0eSmO/Aq0g== 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 CB7B625257; Thu, 17 Feb 2022 06:58:07 +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 21H6w7cC097520; Thu, 17 Feb 2022 06:58:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 21H6w72Q097519; Thu, 17 Feb 2022 06:58:07 GMT (envelope-from git) Date: Thu, 17 Feb 2022 06:58:07 GMT Message-Id: <202202170658.21H6w72Q097519@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andriy Gapon Subject: git: 4328d67d2542 - stable/12 - mmc_da: create disk(9) for pre-2.0 SD cards 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: avg X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 4328d67d254229e11c1cac1e23c65aa8de62c37c Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645081088; 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=AHl/i+Pz6LxM2sU0avnuyPPBqiUHEgEIVcMyZK7QKZo=; b=shGzQBVD1vFMVKi9EpHlM74JywKtH+SsrWkRqitmAbGZceunfJi36FMsjHsmD9RFcAqllo Jm6h95ZiwF47Flnd6hOxAyT3ow8gyL9/RN7x2x2dgMRVsy7En4CfKwbriKSUEZ52aZV9TZ g+Q796+G69PTqTjCaj5YYLJVTaC9i65uW6p3W15C8plagSOmDWbKku096Pg1bHRc9FC0Jv I59DkVFmM1E3hEewQIdGRAuWfb2Yqy96SP3eh2k4wyNxyF4Rg0376hZOfiw1Y48AUI4mY1 frfUX09uXKUBFWtw4p5dD5hJE5MGywcWCbgcB4mpRb1W9mdsMvpfA6aE/t1tPg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1645081088; a=rsa-sha256; cv=none; b=Z8e5TjYedJp88QPa9e6ASeeng/pau5TFCX/usfMeyFFjVf4u3n8+vzxVS/JHKjmtpQm/AU g4OopGAEqdzRoUoH4tH00s44Zk4ioPR5bHAlFEbpFW1HYrTkbUE/Vy0qLTe/mmejua2nAg 07RnHI5VCEfMKk/SiF8dyf4rCMOXVpToUT/90StfJ5Pev2zijMqay9l3uyy6IzcbUs9jRf H0xz+br0tlzcl/m0NbXyNg/U9CmZP+UmmwJjaKUp0L28DKeKyuqH8QdrOs9S60Rmgyn/7t eWp5uCvXuwLU7fB4wkYH27ESdFkwF2so13EScZEBslvxHn0kycehxmGbIsT/mw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=4328d67d254229e11c1cac1e23c65aa8de62c37c commit 4328d67d254229e11c1cac1e23c65aa8de62c37c Author: Andriy Gapon AuthorDate: 2022-01-27 16:49:27 +0000 Commit: Andriy Gapon CommitDate: 2022-02-17 06:57:42 +0000 mmc_da: create disk(9) for pre-2.0 SD cards It does not look like there is anything in mmc_da code that actually requires protocol 2.0 or later. dev/mmc code also does not have such a restriction. Tested with a very old 2GB mini-SD card. Prior to this change mmc_da would claim the card but would not expose it to GEOM. Without MMCCAM: mmc0: on sdhci_pci0 mmc0: Probing bus mmc0: SD probe: OK (OCR: 0x00ff8000) mmc0: Current OCR: 0x00ff8000 mmc0: CMD8 failed, RESULT: 1 mmc0: Probing cards mmc0: New card detected (CID 1c53565344432020100002982e007600) mmc0: New card detected (CSD 005e00325f5a83d02db7ffbf96800000) mmc0: Card at relative address 0xb368 added: mmc0: card: SD SDC 1.0 SN 0002982E MFG 06/2007 by 28 SV mmc0: quirks: 0 mmc0: bus: 4bit, 50MHz (high speed timing) mmc0: memory: 3998720 blocks, erase sector 256 blocks mmc0: setting transfer rate to 50.000MHz (high speed timing) GEOM: new disk mmcsd0 mmcsd0: 2GB at mmc0 50.0MHz/4bit/65535-block mmc0: setting bus width to 4 bits high speed timing With MMCCAM and this change: sdda0 at sdhci_slot0 bus 0 scbus2 target 0 lun 0 sdda0: Relative addr: 0000b368 Card features: sdda0: Serial Number 0002982E sdda0: SD SDC 1.0 SN 0002982E MFG 06/2007 by 28 SV GEOM: new disk sdda0 (cherry picked from commit 6fd84a627fa066a98777c7ab1e65bdd885407516) --- sys/cam/mmc/mmc_da.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/cam/mmc/mmc_da.c b/sys/cam/mmc/mmc_da.c index 9b5bbbefcf8e..3abb0e820352 100644 --- a/sys/cam/mmc/mmc_da.c +++ b/sys/cam/mmc/mmc_da.c @@ -1388,7 +1388,7 @@ finish_hs_tests: /* MMC partitions support */ if (mmcp->card_features & CARD_FEATURE_MMC && mmc_get_spec_vers(periph) >= 4) { sdda_process_mmc_partitions(periph, start_ccb); - } else if (mmcp->card_features & CARD_FEATURE_SD20) { + } else if (mmcp->card_features & CARD_FEATURE_MEMORY) { /* For SD[HC] cards, just add one partition that is the whole card */ sdda_add_part(periph, 0, "sdda", periph->unit_number,