From owner-freebsd-scsi@FreeBSD.ORG Tue Mar 13 21:45:43 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 8B15216A401; Tue, 13 Mar 2007 21:45:43 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id 1E48913C44C; Tue, 13 Mar 2007 21:45:42 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from phobos.samsco.home (phobos.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.8/8.13.8) with ESMTP id l2DLjatw094081; Tue, 13 Mar 2007 14:45:41 -0700 (MST) (envelope-from scottl@samsco.org) Message-ID: <45F71B7D.3090305@samsco.org> Date: Tue, 13 Mar 2007 15:45:33 -0600 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.2pre) Gecko/20070111 SeaMonkey/1.1 MIME-Version: 1.0 To: Thomas Quinot References: <20070313205731.GB3866@melamine.cuivre.fr.eu.org> <45F71A0F.4080601@samsco.org> In-Reply-To: <45F71A0F.4080601@samsco.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (pooker.samsco.org [168.103.85.57]); Tue, 13 Mar 2007 14:45:42 -0700 (MST) X-Spam-Status: No, score=-1.4 required=3.8 tests=ALL_TRUSTED autolearn=failed version=3.1.1 X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on pooker.samsco.org Cc: josh.carroll@gmail.com, freebsd-scsi@freebsd.org, bug-followup@freebsd.org 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 List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2007 21:45:43 -0000 Scott Long wrote: > Thomas Quinot wrote: >> SCSI guys, >> >> kern/103602 is a long-standing issue with a Sony DVD drive that has a >> strange behaviour (failing to attach and causing an interrupt storm). >> >> One aspect of this PR was that an ATAPI command timing out was not >> correctly reported by the ATAPI/CAM SIM to the XPT layer. This has been >> fixed in atapi-cam.c rev. 1.49. >> >> Now we have a second issue: if there is no disc in the drive, it >> times out a READ CD CAPACITY (and any subsequent retry, even if a disc >> is then inserted in the drive), instead of returning an appropriate >> error (the expected behaviour would be a NOT READY sense key and a >> MEDIUM NOT PRESENT ASC). A TEST UNIT READY command seems to behave >> properly (reporting the appropriate error if no disc is present, >> reporting no error and resetting the drive to a proper state if >> one is). >> >> The timeout causes the unit to fail to attach at boot time if no disc is >> present. How should we deal with this situation? One possible option is >> to make sure that we first issue a TEST UNIT READY at attach time prior >> to issuing READ CD CAPACITY, and not issue the second command if the TUR >> returned a NOT READY status. >> >> The traces below show how the drive behaves in response to TEST UNIT >> READY and READ CD CAPACITY in various cases. Complete boot messages are >> available in the PR history. >> >> Thomas. >> > > I'm confused. CAM actually sends a READ_CAPACITY command to the drive, > not a READ_CD_CAPACITY command. Are you saying that issuing both a > READ_CAPACITY and a READ_CD_CAPACITY to an empty Sony drive results in > the same bad behavior? > > Re-arranging the probe process to issue a TUR first is tricky. I'd > rather not do it if possible. > Actually, I take that back, adding a TUR phase isn't as hard as I thought. I'd like to know if doing a READ_CD_CAPACITY makes a difference, though. Scott