[Bug 297574] mmcsd: diskinfo returns bridge ID and serial instead of card ID and serial

[email protected]
Newsgroups gmane.os.freebsd.bugs
Message-ID <[email protected]/bugzilla/>
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=297574

            Bug ID: 297574
           Summary: mmcsd: diskinfo returns bridge ID and serial instead
                    of card ID and serial
           Product: Base System
           Version: 15.1-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: [email protected]
          Reporter: [email protected]

Scenario:
- FreeBSD stable/15 at bf0ffcaa5649 with minor patches
- Inserting any SD card (SDXC) into card reader; it shows up as da0
- Issuing "diskinfo -v /dev/da0"

Result:
- The command always returns the ID and serial of the bridge:

[0]# diskinfo -v /dev/da0
/dev/da0
        512             # sectorsize
        512711720960    # mediasize in bytes (478G)
        1001390080      # mediasize in sectors
        0               # stripesize
        0               # stripeoffset
        62333           # Cylinders according to firmware.
        255             # Heads according to firmware.
        63              # Sectors according to firmware.
        Mass Storage Device     # Disk descr.
        121220160204    # Disk ident.
        umass-sim0      # Attachment
        No              # TRIM/UNMAP support
        Unknown         # Rotation rate in RPM
        Not_Zoned       # Zone Mode

[0]# 

- The "Disk descr." and "Disk ident." are always the same, regardless of disk
inserted.

Expected result:
- A saved output from 2019 looks like this:

[0]# cat diskinfo.-v 
/dev/mmcsd0
        512             # sectorsize
        62914560000     # mediasize in bytes (59G)
        122880000       # mediasize in sectors
        4194304         # stripesize
        0               # stripeoffset
        SDHC SDU1  1.0 SN 14A11C28 MFG 09/2018 by 27 SM # Disk descr.
        14A11C28        # Disk ident.
        Yes             # TRIM/UNMAP support
        0               # Rotation rate in RPM

[0]# 

- The description and identity are from the card and change depending on which
card is inserted.

Notes:
- It seems that with the CAMification of the SD card driver, the functionality
for reading the correct information was lost.

-- Martin

-- 
You are receiving this mail because:
You are the assignee for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.