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

Re: cdrecord and scsi-3 compliance



> >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.....

... which doesn't change the fact that it's formally inappropriate.
Drawing a parallel, the fact that nobody complains about my English
doesn't discourage me from trying to improve it.

> 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.

In this particular context one should worry about the exact opposite:
those OSes, which *insist* on setting LUN bits when talking to SCSI>2
devices.

> >"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"

Note that definition of "shall" was a quote from specification, not
something I made up. It's "should," which is used in contrary to "must."
"Shall" is used as substitute for "must":

"A keyword indicating a *mandatory* requirement. Designers are
*required* to implement all such mandatory requirements to ensure
interoperability with other standard conforming products."

> >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);'
                  ^^ Oops! I naturally meant 'if (scsi_level<=2) ...'
> > 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.

Yes. But what does this reply *mean*? Does it mean that such
modification is simply out of the question? For all eternity?

> In any case, the low level transport code needs to set the lun bits
> if the SCSI level is <= 3.

Not '<=', but '<'. A.



Reply to: