From owner-freebsd-current@FreeBSD.ORG Thu Oct 30 23:28:01 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1AFC216A4CE for ; Thu, 30 Oct 2003 23:28:01 -0800 (PST) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9E8E643F93 for ; Thu, 30 Oct 2003 23:27:59 -0800 (PST) (envelope-from bde@zeta.org.au) Received: from gamplex.bde.org (katana.zip.com.au [61.8.7.246]) by mailman.zeta.org.au (8.9.3p2/8.8.7) with ESMTP id SAA03052; Fri, 31 Oct 2003 18:27:42 +1100 Date: Fri, 31 Oct 2003 18:27:40 +1100 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Soren Schmidt In-Reply-To: <200310302048.h9UKmHaB021300@spider.deepcore.dk> Message-ID: <20031031180145.N3463@gamplex.bde.org> References: <200310302048.h9UKmHaB021300@spider.deepcore.dk> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: Lars Eggert cc: freebsd-current@freebsd.org Subject: Re: ATAng regression: cdcontrol close not working X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Oct 2003 07:28:01 -0000 On Thu, 30 Oct 2003, Soren Schmidt wrote: > It seems Lars Eggert wrote: > > > I've already committed a solution that works on all the drives I > > > could test on (some of which failed before), if this still > > > fails for you I'd like a more detailed description of what > > > exactly goes wrong... > > > > I must have missed that commit message, sorry. This is the drive I am > > having the issues with: > > > > acd0: CDRW at ata1-master UDMA33 > > > > Sending CDIOCCLOSE from a short C snippet shows that the ioctl yields EBUSY. > > Hmm, now that a real stupid return code from the drive IMNHO... > > Anyhow if you loose the test for error in atapi-cd.c::acd_tray in the > close case, does it work then ? Problem is that the call to read toc > might fail early, but its worth a shot.. I was mistaken in thinking that my patch fixed this. It only works for 1 drive, as does at acd^H^Htapi-cd.c rev.1.148. Some boot messages: acd0: CDRW at ata1-slave UDMA33 acd1: CDROM at ata2-slave PIO4 (cd1:ata2:0:1:0): Recovered Sense (cd1:ata2:0:1:0): READ CD RECORDED CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0 (cd1:ata2:0:1:0): CAM Status: SCSI Status Error (cd1:ata2:0:1:0): SCSI Status: Check Condition (cd1:ata2:0:1:0): NOT READY asc:3a,0 (cd1:ata2:0:1:0): Medium not present cd1 at ata2 bus 0 target 1 lun 0 cd1: Removable CD-ROM SCSI-0 device cd1: 16.000MB/s transfers cd1: Attempt to query device size failed: NOT READY, Medium not present (cd0:ata1:0:1:0): Recovered Sense (cd0:ata1:0:1:0): READ CD RECORDED CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0 (cd0:ata1:0:1:0): CAM Status: SCSI Status Error (cd0:ata1:0:1:0): SCSI Status: Check Condition (cd0:ata1:0:1:0): NOT READY asc:3a,0 (cd0:ata1:0:1:0): Medium not present cd0 at ata1 bus 0 target 1 lun 0 cd0: Removable CD-ROM SCSI-0 device cd0: 33.000MB/s transfers cd0: Attempt to query device size failed: NOT READY, Medium not present These drives now have the following behaviour for eject/close: cd0, acd1, cd1: eject and close just work acd0: eject works. Close fails with EBUSY. None of acd_start_stop(cdp, [0-3]) (called from ddb, ignoring errors) closes the tray when it is open. The related bugs in the cd driver are only that the messages are too verbose. The above boot messages show only some of them. Eject + close gives the following messages (all unwanted): (cd0:ata1:0:1:0): Recovered Sense (cd0:ata1:0:1:0): READ CD RECORDED CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0 (cd0:ata1:0:1:0): CAM Status: SCSI Status Error (cd0:ata1:0:1:0): SCSI Status: Check Condition (cd0:ata1:0:1:0): NOT READY asc:3a,0 (cd0:ata1:0:1:0): Medium not present (cd0:ata1:0:1:0): Recovered Sense (cd0:ata1:0:1:0): READ CD RECORDED CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0 (cd0:ata1:0:1:0): CAM Status: SCSI Status Error (cd0:ata1:0:1:0): SCSI Status: Check Condition (cd0:ata1:0:1:0): NOT READY asc:3a,0 (cd0:ata1:0:1:0): Medium not present (cd0:ata1:0:1:0): Recovered Sense (cd0:ata1:0:1:0): READ CD RECORDED CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0 (cd0:ata1:0:1:0): CAM Status: SCSI Status Error (cd0:ata1:0:1:0): SCSI Status: Check Condition (cd0:ata1:0:1:0): NOT READY asc:3a,0 (cd0:ata1:0:1:0): Medium not present (cd0:ata1:0:1:0): Recovered Sense (cd0:ata1:0:1:0): READ CD RECORDED CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0 (cd0:ata1:0:1:0): CAM Status: SCSI Status Error (cd0:ata1:0:1:0): SCSI Status: Check Condition (cd0:ata1:0:1:0): NOT READY asc:3a,0 (cd0:ata1:0:1:0): Medium not present This is with my modified version of scsi_cd.c. The current one is similarly verbose, but doesn't do as many read-capacity's. Bruce