Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Dec 1995 16:31:36 +0100 (MET)
From:      J Wunsch <j@uriah.heep.sax.de>
To:        stu@solaris.com (Stu Phillips)
Cc:        freebsd-bugs@freefall.freebsd.org, freebsd-scsi@freebsd.org
Subject:   Re: xcdplayer and SCSI Problem with Sony CDU-76S
Message-ID:  <199512291531.QAA28321@uriah.heep.sax.de>
In-Reply-To: <199512280221.SAA00201@solaris.cisco.com> from "Stu Phillips" at Dec 27, 95 06:21:01 pm

next in thread | previous in thread | raw e-mail | index | archive | help
As Stu Phillips wrote:
> 
>     cd0(bt0:4:0): ILLEGAL REQUEST asc:26,0 Invalid field in parameter list

> The archives on freebsd.org suggested that this was due to SONY not following
> the SCSI-II specs for CDROM audio - must confess, I found this hard to 
> accept especially since a generic SCSI CD player under Windows played CDs
> just fine.

> According to the SCSI-II spec (BTW, there is a great on-line copy of this
> spec available at URL: http://abekas.com:8080/SCSI2/), in section 8.3.3, it
> says that the medium field of the mode parameter header *may* be RESERVED
> by some device types.
> 
> The SONY CDU-076S returns this field as 0x03 on a MODE_SENSE but complains
> if it is set to anything other than 0x00 on a MODE_SELECT.  

I still think Sony is in violation of the standard here.  Below are
the references i found in the SCSI-2 standard for it:


First, the generic documentation says:

"7.3.3. Mode Parameters 

...
  Medium types are unique for each device type.  Refer to the mode parameters 
section of the specific device type for definition of these values.  Some 
device types reserve this field."


Ok, not ``some devices'', but ``some device types''.  That makes it
pretty clear that either a device type reserves this field, or it
doesn't.  Anyway, it's IMHO _not_ up to a particular vendor (i.e., the
sentence ain't ``Some implemenation may reserve this field.'')

So, let's see what the CD-ROM device-type specification says:

...

"13.3.3. Mode Parameters

  The medium-type code field is contained in the mode parameter header (see 
Table 7-61 and 7-62).  Table 13-30 defines the medium type values for CD-ROM 
devices.


                       Table 13-30: CD-ROM Medium Type Codes

            ===================================================
             Code Value   Medium Type
            ------------  -------------------------------------
               00h        Default (only one type supported)
               01h        120 mm CD-ROM data only
               02h        120 mm CD-DA audio only
               03h        120 mm CD-ROM data and audio combined
               04h        Reserved
               05h        80 mm CD-ROM data only
               06h        80 mm CD-DA audio only
               07h        80 mm CD-ROM data and audio combined
            08h - 7Fh     Reserved
            80h - FFh     Vendor unique
            ==================================================="

I.e., it doesn't say that this is an optional parameter or something
else.  It seems logical that any device should accept the value for a
MODE SELECT that it's just been responding by a MODE SENSE.  The
behaviour of the Sony is at least, ähem, strange.


Anyway, i think your proposed change to use a medium type of 0 seems
to be usable as a workaround for me, it doesn't contradict the sense
of the current code (since the current algorithm was to use all
parameters as reported by the drive, and only modify some distinct
parameters at will).

-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199512291531.QAA28321>