READ_CAPACITY and READ_CD_CAPACITY have the same value in cam(4). Not sure if this was intentional given the comment in scsi_cd.h, but the value in scsi_cd.h could probably be reaped because it wasn't used in the tree (apart from that header). $ egrep 'READ_.*CAPACITY' /usr/src/sys/cam/scsi/scsi_all.h /usr/src/sys/cam/scsi/scsi_cd.h /usr/src/sys/cam/scsi/scsi_all.h:#define READ_CAPACITY 0x25 /usr/src/sys/cam/scsi/scsi_cd.h:#define READ_CD_CAPACITY 0x25 /* slightly different from disk */ $ grep -r READ_CD_CAPACITY /usr/src/ /usr/src/sys/cam/scsi/scsi_cd.h:#define READ_CD_CAPACITY 0x25 /* slightly different from disk */ $
READ_CAPACITY and READ_CD_CAPACITY commands have the same arguments, but MMC specification insists that they are different. I don't see sufficient win from touching that.
(In reply to Alexander Motin from comment #1) > READ_CAPACITY and READ_CD_CAPACITY commands have the same arguments, but MMC > specification insists that they are different. I don't see sufficient win > from touching that. This MMC spec I found (albeit from Microsoft, written in 2001) says 0x25: http://download.microsoft.com/download/1/6/1/161ba512-40e2-4cc9-843a-923143f3456c/mmc_cd-dvd.doc . This one also says 0x25: http://www.rockbox.org/wiki/pub/Main/DataSheets/mmc2r11a.pdf (again, from 1999, but it's an ISO spec).
It's routine to enumerate all specified constants in driver headers, even if they're not always used.