[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: cdrecord and scsi-3 compliance



>From: Andy Polyakov <appro@fy.chalmers.se>

>SCSI-3 specification has effectively removed LUN address from command
>data block (it was moved to lower transport layer so to say). Therefore

As this has been discussed recently on the SCSI standard mailing list,
I thought this was going to become a feture of the next standard....
It has been definitely a part of the first SCSI-3 standard which goes 
many years back to the past.

>assigning of cdb.g5_cdb.lun [as commonly performed by cdrecord] is
>*formally* inappropriate, inappropriate in SCSI-3 context that is.
>Indeed, the field specified as LUN by SCSI-2 is declared "reserved" in
>*all* SCSI-3 drafts. Where "reserved" per definition is

So far, there have not been any reported problems.....

The real problem is that many OS do not provide a method other than setting
the lun bits in the CDB to specify the lun value.

>"A keyword referring to bits, bytes, words, fields and code values that
>are set aside for future standardization. A reserved bit, byte, word or
>field *shall* be set to zero, or in accordance with a future extension
>to this standard."

>Where "shall" is defined as

Shall is usually used in contrary to "must" and as the three bits did have a
different meaing before, it would only happen that they were resused
in case that the SCSI standard commitee does not know what they are doing...


>So that *formally* application program such as cdrecord should basically
>figure out SCSI level implemented by the targer and abstain from
>assigning the cdb.g5_cdb.lun, if level was found to be larger than 2. As
>fast-acting "relief" I would suggest to reimplement 'scg_lun(scgp)'
>macro as '(scsi_level>2?0:(scgp)->addr.lun)'. But *formally* it is
>assignment operator as a whole, which should be made conditional, i.e.
>'if (scsi_level>2) cdb.g5_cdb.lun=scg_lun(scgp);' in SCSI level
>"neutral" code pathes, and it should be simply removed in SCSI-3
>specific code such as MMC driver(s) (MMC was initially formed as part of
>SCSI-3 specifications family).

Doing it correctly would cause a major rewrite of the libscg code.
In any case, the low level transport code needs to set the lun bits
if the SCSI level is <= 3.

Jörg

-- 
 EMail:joerg@schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
       js@cs.tu-berlin.de		(uni)  If you don't have iso-8859-1
       schilling@fokus.fraunhofer.de	(work) chars I am J"org Schilling
 URL:  http://www.fokus.fraunhofer.de/usr/schilling ftp://ftp.berlios.de/pub/schily



Reply to: