From owner-freebsd-current@FreeBSD.ORG Thu Dec 18 09:41: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 5768116A4EA for ; Thu, 18 Dec 2003 09:41:01 -0800 (PST) Received: from mail5.speakeasy.net (mail5.speakeasy.net [216.254.0.205]) by mx1.FreeBSD.org (Postfix) with ESMTP id DEDF443E7B for ; Thu, 18 Dec 2003 09:32:59 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: (qmail 21482 invoked from network); 18 Dec 2003 17:31:42 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 18 Dec 2003 17:31:42 -0000 Received: from laptop.baldwin.cx (laptop.baldwin.cx [192.168.0.4]) by server.baldwin.cx (8.12.10/8.12.10) with ESMTP id hBIHVdM0023614; Thu, 18 Dec 2003 12:31:39 -0500 (EST) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.4 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <200312180817.hBI8HwZY066190@spider.deepcore.dk> Date: Thu, 18 Dec 2003 12:31:51 -0500 (EST) From: John Baldwin To: Soren Schmidt X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) cc: cs@cheasy.de cc: current@FreeBSD.ORG cc: re@FreeBSD.ORG cc: MIHIRA Sanpei Yoshiro cc: sos@FreeBSD.ORG Subject: Re: Latest kernel couldn't probe DVD-Drive in Secondary/Slave 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: Thu, 18 Dec 2003 17:41:01 -0000 On 18-Dec-2003 Soren Schmidt wrote: > It seems MIHIRA Sanpei Yoshiro wrote: >> >> After updating kernel in -current machine, DVD-Drive in ATA >> >>Secondary/Slave was not probed. >> >> >> >> If I back out sys/dev/ata/ata-lowlevel.c rev. 1.24, I could probe >> >>it. >> > >> > With sys/dev/ata/ata-lowlevel.c rev. 1.25, I could probe DVD-Drive >> >in ATA Secondary/Slave channel. >> > >> > Thank you, SOS. >> > >> > And I hope to commit this change into RELENG_5.2(for 5.2-RELEASE). >> >> I think Sxren Schmidt forgot commit above change in RELENG_5.2. >> >> Do you have any plan to solve above problem, Sxren Schmidt. > > I need a little time thats all as I'm flooded with work currently. Is this the correct diff: cvs diff: Diffing . Index: ata-lowlevel.c =================================================================== RCS file: /usr/cvs/src/sys/dev/ata/ata-lowlevel.c,v retrieving revision 1.24 diff -u -r1.24 ata-lowlevel.c --- ata-lowlevel.c 3 Dec 2003 15:32:53 -0000 1.24 +++ ata-lowlevel.c 18 Dec 2003 16:53:45 -0000 @@ -606,10 +606,14 @@ if (mask == 0x02) /* wait for slave only */ if (!(stat1 & ATA_S_BUSY) || (stat1 == 0xff && timeout > 20)) break; - if (mask == 0x03) /* wait for both master & slave */ - if ((!(stat0 & ATA_S_BUSY) || (stat0 == 0xff && timeout > 20)) && - (!(stat1 & ATA_S_BUSY) || (stat1 == 0xff && timeout > 20))) + if (mask == 0x03) { /* wait for both master & slave */ + if (!(stat0 & ATA_S_BUSY) && !(stat1 & ATA_S_BUSY)) break; + if (stat0 == 0xff && timeout > 20) + mask &= ~0x01; + if (stat1 == 0xff && timeout > 20) + mask &= ~0x02; + } DELAY(100000); } I can commit it for you if you don't have the time. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/