Skip to content

Incorrect implementation of routine that returns MMC version #70

Description

@skr4n

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:

  1. Perform a MODE SENSE.
  2. Select page CD/DVD Capabilities (Page Code 2Ah).
  3. Use the Page length field to determine MMC level.
Image

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).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions