From owner-freebsd-stable@FreeBSD.ORG Fri Apr 27 19:31:20 2007 Return-Path: X-Original-To: freebsd-stable@FreeBSD.ORG Delivered-To: freebsd-stable@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B4FAB16A401; Fri, 27 Apr 2007 19:31:20 +0000 (UTC) (envelope-from thomas@FreeBSD.ORG) Received: from melamine.cuivre.fr.eu.org (melusine.cuivre.fr.eu.org [82.225.155.84]) by mx1.freebsd.org (Postfix) with ESMTP id 70B1313C465; Fri, 27 Apr 2007 19:31:20 +0000 (UTC) (envelope-from thomas@FreeBSD.ORG) Received: by melamine.cuivre.fr.eu.org (Postfix, from userid 1000) id A3DB95C20E; Fri, 27 Apr 2007 21:31:19 +0200 (CEST) Date: Fri, 27 Apr 2007 21:31:19 +0200 From: Thomas Quinot To: Scott Long Message-ID: <20070427193119.GA95165@melamine.cuivre.fr.eu.org> References: <20070427150134.64D3713C448@mx1.freebsd.org> <20070427153218.GA9091@melamine.cuivre.fr.eu.org> <20070427174922.GA5655@zone3000.net> <46324CCF.7040109@samsco.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46324CCF.7040109@samsco.org> X-message-flag: WARNING! Using Outlook can damage your computer. User-Agent: Mutt/1.5.11 Cc: freebsd-stable@FreeBSD.ORG, bug-followup@FreeBSD.ORG, linimon@FreeBSD.ORG, Nikolay Pavlov , "Ganbold.TS" , mjacob@FreeBSD.ORG Subject: Re: kern/112119: system hangs when starts k3b on RELENG_6 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Apr 2007 19:31:20 -0000 * 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; }