Description
libcido's mmc_get_drive_mmc_cap(), is documented to return the MMC level supported by the device.
It attempts to do so by:
- Perform a
MODE SENSE.
- Select page
CD/DVD Capabilities (Page Code 2Ah).
- Use the
Page length field to determine MMC level.
This has multiple issues:
- The mode page used has been deprecated since MMC-4.
- The
Page length field's value is variable, depending on the write speeds supported by the device.
It's not clear as to how this routine was originally conceived, because the MMC-2 spec (or its draft that I could find) does not even have the said mode page.
Expected behavior
The use of a SCSI SPC INQUIRY command, which returns version descriptors to indicate the self-reported compliance of a device with a given version of the MMC spec. See SPC-3, page 151, Table 87 (part 4 of 8).
Description
libcido's
mmc_get_drive_mmc_cap(), is documented to return the MMC level supported by the device.It attempts to do so by:
MODE SENSE.CD/DVD Capabilities (Page Code 2Ah).Page lengthfield to determine MMC level.This has multiple issues:
Page lengthfield's value is variable, depending on the write speeds supported by the device.It's not clear as to how this routine was originally conceived, because the MMC-2 spec (or its draft that I could find) does not even have the said mode page.
Expected behavior
The use of a SCSI SPC
INQUIRYcommand, which returns version descriptors to indicate the self-reported compliance of a device with a given version of the MMC spec. See SPC-3, page 151, Table 87 (part 4 of 8).