git: 94df98ceb368 - stable/15 - sdiob: copy vendor/device IDs from card common CIS
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 07 Nov 2026 17:46:49 UTC
The branch stable/15 has been updated by vexeduxr:
URL: https://cgit.FreeBSD.org/src/commit/?id=94df98ceb3689d0cbf064edb5cddb000cf35235a
commit 94df98ceb3689d0cbf064edb5cddb000cf35235a
Author: Ahmad Khalifa <vexeduxr@FreeBSD.org>
AuthorDate: 2026-11-04 15:37:54 +0000
Commit: Ahmad Khalifa <vexeduxr@FreeBSD.org>
CommitDate: 2026-11-07 14:04:36 +0000
sdiob: copy vendor/device IDs from card common CIS
Copy both the vendor and device IDs from the card common CIS if they are
absent in a function.
These are optional according to the spec. [1]
[1] Part E1 SDIO Simplified Specification ยง16.6
MFC after: 3 days
Reviewed by: kibab, imp, adrian
Differential Revision: https://reviews.freebsd.org/D60988
(cherry picked from commit c91dfb47e0bcdf682f7f152624e03747787c6ea3)
---
sys/dev/sdio/sdiob.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/sys/dev/sdio/sdiob.c b/sys/dev/sdio/sdiob.c
index cb2cc0da6b77..a73de209146e 100644
--- a/sys/dev/sdio/sdiob.c
+++ b/sys/dev/sdio/sdiob.c
@@ -890,8 +890,15 @@ sdiob_get_card_info(struct sdiob_softc *sc)
sc->cardinfo.f[fn].vendor, sc->cardinfo.f[fn].device,
sc->cardinfo.f[fn].max_blksize);
if (sc->cardinfo.f[fn].vendor == 0) {
- DPRINTF("%s: F%d doesn't exist\n", __func__, fn);
- break;
+ /*
+ * If a function doesn't provide a vendor/device ID,
+ * copy it from the card common CIS.
+ */
+ DPRINTF("%s: F%d: "
+ "Copying vendor and device IDs from F0\n",
+ __func__, fn);
+ sc->cardinfo.f[fn].vendor = sc->cardinfo.f[0].vendor;
+ sc->cardinfo.f[fn].device = sc->cardinfo.f[0].device;
}
sc->cardinfo.num_funcs++;
}