Subject: SCSI Mode Sense on page 0
To: None <tech-kern@netbsd.org>
From: ITOH Yasufumi <itohy@netbsd.org>
List: tech-kern
Date: 11/19/2006 22:05:34
Hello,

Tracking down kern/26537, I noticed our cd(4) and sd(4)
drivers issue SCSI Mode Sense command on page 0.

The SCSI specification says the page 0 is ``vendor-specific'' and
even the parameter format may be non-standard.

For what reasons our drivers use such a vendor-specific behavior?
May I just remove the relevant code?
The umass device in question doesn't seem to respond to Mode Sense
on page 0.

(from cd.c rev 1.256)
cd.c:2563:	if ((error = cd_mode_sense(cd, 0, &data, sizeof(data.blk_desc), 0, 0,
cd.c:2564:	    &big)) != 0)

(from sd.c rev 1.253)
sd.c:1764:		error = sd_mode_sense(sd, 0, &scsipi_sense,
sd.c:1765:		    sizeof(scsipi_sense.blk_desc), 0, flags | XS_CTL_SILENT, &big);

(Note the 5th parameter of [cs]d_mode_sense() is the page code.)

Regards,
-- 
ITOH Yasufumi