[8283] in linux-scsi channel archive

home help back first fref pref prev next nref lref last post

SCSI Generic problem: FOUND!

daemon@ATHENA.MIT.EDU (Eric Lee Green)
Wed Mar 1 16:20:26 2000

Message-ID: <38BD7C02.8B933C56@estinc.com>
Date:   Wed, 01 Mar 2000 13:22:26 -0700
From: Eric Lee Green <eric@estinc.com>
MIME-Version: 1.0
To: linux-scsi@vger.rutgers.edu
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Silly me. I thought that if the result returned by the write() was okay, if
the # of bytes read as reported by the read() was okay, if the 'status'
variable in sg_header was okay, then everything was okay, no SCSI error
detected. How stupid of me. I have to check all of that, PLUS check the
sense_data buffer. And now, three lines of condition for the 'if' later, I'm
now accurately reporting an error when I send a REPORT_ELEMENT_STATUS command
to a hard drive (!). 

Hopefully this message is getting archived so that next time someone goes into
'google' and does the query 'scsi generic linux sense', he'll get a response
that makes sense :-).

(Oh, I discovered this bit of trivia by digging around in the sg_utils package
and noticing it in one of the test programs... it doesn't appear to be
documented anywhere, though I may have overlooked said documentation, sigh). 

-- 
Eric Lee Green                         eric@estinc.com
Software Engineer                      Visit our Web page:
Enhanced Software Technologies, Inc.   http://www.estinc.com/
(602) 470-1115 voice                   (602) 470-1116 fax

-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.rutgers.edu

home help back first fref pref prev next nref lref last post