Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Apr 2007 20:30:11 GMT
From:      Scott Long <scottl@samsco.org>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: kern/112119: system hangs when starts k3b on RELENG_6
Message-ID:  <200704272030.l3RKUBnJ067861@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/112119; it has been noted by GNATS.

From: Scott Long <scottl@samsco.org>
To: Thomas Quinot <thomas@FreeBSD.ORG>
Cc: Nikolay Pavlov <quetzal@zone3000.net>,
        "Ganbold.TS" <ganbold@micom.mng.net>, freebsd-stable@FreeBSD.ORG,
        mjacob@FreeBSD.ORG, linimon@FreeBSD.ORG, bug-followup@FreeBSD.ORG
Subject: Re: kern/112119: system hangs when starts k3b on RELENG_6
Date: Fri, 27 Apr 2007 14:28:14 -0600

 Thomas Quinot wrote:
 > * Scott Long, 2007-04-27 :
 > 
 >> Oh hell, I know exactly what the problem is!  The opcode for a
 >> TEST_UNIT_READY is 0x00.  This is probably the command that is
 >> generating the CHECK_CONDITION.  The test for saved_cmd is entirely
 >> bogus.
 > 
 > Hmmmm. Looks like a very plausible culprit. Good catch Scott!
 > (I felt there had to be something wrong when I wrote that test,
 > incidentally, precisely because of TEST_UNIT_READY).
 > 
 > Nikolay, Ganbold, (and others), here's another patch against 1.42.2.3,
 > please let me know if it works for you.
 > 
 > Thomas.
 > 
 > Index: atapi-cam.c
 > ===================================================================
 > RCS file: /space/mirror/ncvs/src/sys/dev/ata/atapi-cam.c,v
 > retrieving revision 1.50
 > diff -u -r1.50 atapi-cam.c
 > --- atapi-cam.c	14 Mar 2007 01:59:00 -0000	1.50
 > +++ atapi-cam.c	27 Apr 2007 19:26:09 -0000
 > @@ -729,7 +743,7 @@
 >  		 * issued a REQUEST SENSE automatically and that operation
 >  		 * returned without error.
 >  		 */
 > -		if (request->u.atapi.saved_cmd != 0 && request->error == 0) {
 > +		if (request->u.atapi.sense.key != 0 && request->error == 0) {
 >  		    bcopy (&request->u.atapi.sense, &csio->sense_data, sizeof(struct atapi_sense));
 >  		    csio->ccb_h.status |= CAM_AUTOSNS_VALID;
 >  		}
 
 Right, just make sure that this isn't filled with garbage before you
 send the command.  If you're using ata_alloc_request(), and you're not
 recycling requests internally, then you should be fine.
 
 Scott
 



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