[RFC] SCSI opcode and ASC update
Kenneth D. Merry
ken at kdm.org
Thu Aug 7 16:00:07 UTC 2008
On Wed, Aug 06, 2008 at 19:26:53 -0400, Jung-uk Kim wrote:
> I found that we have very very old opcodes and ASC numbers in
> sys/cam/scsi/scsi_all.c. ken@ touched few ASCs five years ago but
> they are pretty much the same since the beginning of the file (almost
> ten years now). The latest op-num.txt and asc-num.txt are available
> from here:
>
> http://www.t10.org/lists/op-num.txt
> http://www.t10.org/lists/asc-num.txt
>
> I made a patch to merge the changes from these files:
>
> http://people.freebsd.org/~jkim/scsi_all.diff
Good work! Thanks for doing that!
> Now the problem is there are almost 300 new ASCs and I am not sure
> what to do with them. For now, they do SS_RDEF and all are marked
> with 'XXX TBD' for now. Is there anyone interested in setting them
> correctly? Don't we want to separate them into header files, e.g.,
> scsi_opcode.h and scsi_asc.h? Do we really care or did I just waste
> my time?
In general, SS_RDEF (i.e. retry) should work fine for most things. I think
most of the ASC/ASCQ combinations that need special error recovery actions
already have them. We can change some of the new ones to specific error
recovery actions (e.g. SS_TUR) when we run into specific cases that show a
need for it. (There is also SS_FATAL, which would mainly prevent
additional retries for commands that won't work if retried.)
I think it makes more sense to keep the opcodes and ASC/ASCQs in a .c file,
since they are structures with values in them, and not just structure
definitions.
I think it's fine to keep them in scsi_all.c, but if you would like to
separate them out into separate .c files, feel free to send a patch along
for review.
This patch looks good, though.
Ken
--
Kenneth Merry
ken at kdm.org
More information about the freebsd-scsi
mailing list