From owner-freebsd-current Wed Mar 5 17: 9:40 2003 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 5224F37B401 for ; Wed, 5 Mar 2003 17:09:38 -0800 (PST) Received: from exchhz01.viatech.com.cn (ip-167-164-97-218.anlai.com [218.97.164.167]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1633D43FBD for ; Wed, 5 Mar 2003 17:09:33 -0800 (PST) (envelope-from davidxu@freebsd.org) Received: from davidw2k (ip-240-1-168-192.rev.dyxnet.com [192.168.1.240]) by exchhz01.viatech.com.cn with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2650.21) id 1G6NW26G; Thu, 6 Mar 2003 08:56:08 +0800 Message-ID: <000701c2e37d$285ce930$f001a8c0@davidw2k> From: "David Xu" To: "Luoqi Chen" , References: Subject: Re: ATA MODE_SENSE_BIG timeout Date: Thu, 6 Mar 2003 09:10:20 +0800 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG ----- Original Message -----=20 From: "Luoqi Chen" To: "David Xu" ; Sent: Wednesday, March 05, 2003 8:44 AM Subject: RE: ATA MODE_SENSE_BIG timeout > > For those want to fix ATA code, I have another problem > > with CURRENT. I have a Tyan Tiger 230T which is based > > on VIA Apollo 133T, south bridge is VIA 686B. > > On second IDE, I have a Mitsubishi 52X cdrom as master, > > and a Sony 16X CD R/W as slave, when startup, kernel > > is always stuck at "MODE_SENSE_BIG timeout". > > I fortunately catched the dmesg text since ATA code past the=20 > > probing stage. In most case, it will be stuck there forever. > > BTW, both Linux (2.2.14, Redhat) and MS Windows can probe > > these devices in few seconds without any problem. > >=20 > I had more than a few machines behaved this way. I believe > the problem is with the probe and attach sequence of our > ata driver. After an ATA reset, according to spec, an ATAPI > device is supposed to present the ATAPI signature and deassert > the ready bit, until it receives its first packet command. > However when the ata driver issues the first mode sense command, > it polls first for the ready bit which never becomes set and > the operation times out. The most obviously solution is > sending the first command without checking for the ready bit. >=20 > My solution is a little different, but works equally well, > instead I issue an ATAPI reset (what now called a device reset?), > because I don't want to write another or alter the current > ata_command function and we need an atapi_reset function anyway. > According spec, atapi devices SHOULD ONLY be reset via the > atapi reset command (our ata driver doesn't follow this rule). >=20 > The patch is for -stable. I hope it's not too difficult to port > to -current. >=20 I have applied the patch manually to CURRENT, it helps nothing. :( Then I booted kernel without the patch, waited for a very long time to=20 let ata code retry, finally it found the Sony 16X CD RW, but I can=20 not mount it. It is always timeout. David Xu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message