Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Aug 2008 09:21:18 -0600
From:      "Kenneth D. Merry" <ken@kdm.org>
To:        Jung-uk Kim <jkim@freebsd.org>
Cc:        freebsd-scsi@freebsd.org
Subject:   Re: [RFC] SCSI opcode and ASC update
Message-ID:  <20080807152118.GA99233@nargothrond.kdm.org>
In-Reply-To: <200808061926.55111.jkim@FreeBSD.org>
References:  <200808061926.55111.jkim@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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@kdm.org



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