git: 4328d67d2542 - stable/12 - mmc_da: create disk(9) for pre-2.0 SD cards
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 17 Feb 2022 06:58:07 UTC
The branch stable/12 has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=4328d67d254229e11c1cac1e23c65aa8de62c37c commit 4328d67d254229e11c1cac1e23c65aa8de62c37c Author: Andriy Gapon <avg@FreeBSD.org> AuthorDate: 2022-01-27 16:49:27 +0000 Commit: Andriy Gapon <avg@FreeBSD.org> 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: <MMC/SD bus> 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 <SD SDC 1.0 SN 0002982E MFG 06/2007 by 28 SV> 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: <Memory> 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,