From owner-freebsd-scsi@FreeBSD.ORG Wed Apr 4 04:07:07 2007 Return-Path: X-Original-To: freebsd-scsi@freebsd.org Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B116216A406 for ; Wed, 4 Apr 2007 04:07:07 +0000 (UTC) (envelope-from josh.carroll@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.240]) by mx1.freebsd.org (Postfix) with ESMTP id 6823513C45D for ; Wed, 4 Apr 2007 04:07:06 +0000 (UTC) (envelope-from josh.carroll@gmail.com) Received: by an-out-0708.google.com with SMTP id c24so86651ana for ; Tue, 03 Apr 2007 21:07:06 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=qUJ7PZplx10wbLEvvY0kvCTIGPp+oa3QLZQmfLHPtuGzAtWBDu62u6ErtQLDxGwA4nEg3RM0GIRv/B0ukWa9g1KazWJHv8uOZ0VHYjqrACiJEq0Bk+PxrRRuRx160ef8R8lyaWtmaHSKn/gZPBnH/ltccmKYkciXMEMOsKf8rbk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=MxutRurlhk7QuZKYB+OmPa408qI8VZPp2IffKqT2Qdw9xVNBnnNErXA9suG9j5uCYulSuVaM3h8dcrzaRP2ydx39EfOwQbft8AQCIvFNRmtQtRZyGPaJ9kBwJmDbaDWuhdJDUwmvw6r8B6Af7F4Iz7n25DxuD/6biRMsaypn1ew= Received: by 10.100.32.1 with SMTP id f1mr140000anf.1175659626031; Tue, 03 Apr 2007 21:07:06 -0700 (PDT) Received: by 10.100.231.18 with HTTP; Tue, 3 Apr 2007 21:07:05 -0700 (PDT) Message-ID: <8cb6106e0704032107w457026b1t1e04ed11008af48a@mail.gmail.com> Date: Tue, 3 Apr 2007 21:07:05 -0700 From: "Josh Carroll" To: "Scott Long" In-Reply-To: <8cb6106e0704030039if46397fvfc993d9c9e19e1fc@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20070313205731.GB3866@melamine.cuivre.fr.eu.org> <20070326180018.GA23771@melamine.cuivre.fr.eu.org> <460829E9.3080102@samsco.org> <8cb6106e0703261318o120c620ar6b2461802632fc01@mail.gmail.com> <8cb6106e0703262119g5a9afd4m2c3d5665c85c4969@mail.gmail.com> <4608A35E.3010404@samsco.org> <8cb6106e0703262157m7fd0ae96p3bb5368af797dc6b@mail.gmail.com> <460AA9E3.4030106@samsco.org> <8cb6106e0703281531k4c5bebecp5566c64c8f458a74@mail.gmail.com> <8cb6106e0704030039if46397fvfc993d9c9e19e1fc@mail.gmail.com> Cc: freebsd-scsi@freebsd.org, bug-followup@freebsd.org, Thomas Quinot Subject: Re: kern/103602: drive gets wedged on READ CD CAPACITY if no disc is in X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: josh.carroll@gmail.com List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Apr 2007 04:07:07 -0000 Thinking out of the box, I decided to use sg3_utils on both the semi-working 7.0-CURRENT kernel I had, and on a Linux Knoppix 5.1 live CD. Pretty much every sg utility resulted in a acd0 FAILURE message (I ran the commands against /dev/cd0 though of course). Here are the various dmesg messages: acd0: FAILURE - INQUIRY timed out acd0: FAILURE - MODE_SENSE_BIG timed out acd0: FAILURE - READ_CAPACITY timed out acd0: FAILURE - SEND_KEY timed out acd0: FAILURE - unknown CMD (0x46) timed out It seems like every atapi command is timing out when I boot without a disc in the drive. The only command that semi-worked was sg_turs. Without a CD in the drive, I get the following output: test unit ready cdb: 00 00 00 00 00 00 test unit ready: Probably uninitialized data. Try to view as SCSI-1 non-extended sense: AdValid=0 Error class=0 Error code=0 Raw sense data (in hex): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 If I insert a CD and run it, I get normal output (e.g. matching that of what I saw on Knoppix): test unit ready cdb: 00 00 00 00 00 00 Perhaps there is a subtle difference with TUR with and without a disc, which the kernel can sense and take appropriate action? When running any of these sg* commands in Knoppix with no disc in the drive, I get a message similar to this: sg_readcap.no_disc.out:READ CAPACITY (10) failed, device not ready Interestingly, the sg_vpd command fails to read the serial # as well, so that is definitely a known bug with this drive I think. Here is the sg_vpd output on Knoppix: Supported VPD pages VPD page: fetching VPD page failed I don't know if the output of any of these sg commands on Knoppix is useful (e.g. sg_get_config, sg_modes, sginfo) in terms of finding out details of the device, but if interested I've posted a tarball of the outputs here: http://pflog.net/floyd/sg_output.tgz Anyway, I thought some of this might be useful. At least I hope :) Josh