Bug 192247 - [cam][cd] READ_CD_CAPACITY could be reaped from scsi_cd.h
Summary: [cam][cd] READ_CD_CAPACITY could be reaped from scsi_cd.h
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-scsi mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-29 18:32 UTC by Enji Cooper
Modified: 2015-03-15 04:40 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Enji Cooper freebsd_committer 2014-07-29 18:32:04 UTC
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 */
$
Comment 1 Alexander Motin freebsd_committer 2014-07-30 08:10:08 UTC
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.
Comment 2 Enji Cooper freebsd_committer 2014-07-30 10:21:15 UTC
(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).