From owner-freebsd-current@FreeBSD.ORG Mon Feb 2 07:38:29 2004 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 2E9BA16A4CE for ; Mon, 2 Feb 2004 07:38:29 -0800 (PST) Received: from forthnet.gr (athmta01.forthnet.gr [193.92.150.23]) by mx1.FreeBSD.org (Postfix) with ESMTP id E2ADD43D41 for ; Mon, 2 Feb 2004 07:38:23 -0800 (PST) (envelope-from lefcha@hellug.gr) Received: from localhost.my.domain (ppp1-isdn-35.the.forthnet.gr [213.16.246.35]) by forthnet.gr (8.12.2-20030919/8.12.2) with ESMTP id i12FbhEf006880; Mon, 2 Feb 2004 17:37:51 +0200 Received: from localhost.my.domain (localhost [127.0.0.1]) by localhost.my.domain (8.12.10/8.12.10) with ESMTP id i12FbhvZ000785; Mon, 2 Feb 2004 17:37:43 +0200 (EET) (envelope-from lefcha@hellug.gr) Received: (from lefcha@localhost) by localhost.my.domain (8.12.10/8.12.10/Submit) id i12FbalY000784; Mon, 2 Feb 2004 17:37:36 +0200 (EET) (envelope-from lefcha@hellug.gr) X-Authentication-Warning: localhost.my.domain: lefcha set sender to lefcha@hellug.gr using -f Date: Mon, 2 Feb 2004 17:37:36 +0200 From: Lefteris Chatzibarbas To: S?ren Schmidt Message-ID: <20040202153736.GA587@bsd> References: <200401290057.00257.vkushnir@Alfacom.net> <20040129085607.GA568@bsd> <4018DE17.6060308@DeepCore.dk> <20040129113104.GA1401@bsd> <4018F07F.2090700@DeepCore.dk> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="vkogqOf2sHV7VnPd" Content-Disposition: inline In-Reply-To: <4018F07F.2090700@DeepCore.dk> User-Agent: Mutt/1.4.1i cc: freebsd-current@freebsd.org Subject: Re: ATA still broken 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: Mon, 02 Feb 2004 15:38:29 -0000 --vkogqOf2sHV7VnPd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Jan 29, 2004 at 12:37:35PM +0100, S?ren Schmidt wrote: > Lefteris Chatzibarbas wrote: > >After the "sos 2004/01/11 14:08:35 PST" commit mentionted in my previous > >mail, system hangs during boot and I have already sent a more detailed > >message (hardware, verbose boot, etc.) about this on freebsd-current@ a > >couple of days ago (some threads above this): > > > > Date: Sun, 25 Jan 2004 13:17:43 +0200 > > Subject: System still hangs with "ata1-master: TIMEOUT - SETFEATURES SET > > TRANSFER MODE" > > > > http://lists.freebsd.org/pipermail/freebsd-current/2004-January/019497.html > > Well I have no idea whats causing this except those drives does > something they shouldn't. > > I'll try to get ahold of one of those faulty devices, but until then > your best bet is to dive in yourself and try to figure out what goes > wrong. I think we have a Liteon at work that I'll hopefully be able to > borrow late next week, of that shows the troublesome behavior I'll work > on a solution.. I've been able to boot and have all my devices correctly probed with the attached patch. It seems that it is this change that you made to sys/dev/ata/ata-lowlevel.c, that my system does not like. --vkogqOf2sHV7VnPd Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="patch-ata-lowlevel.c.diff" --- sys/dev/ata/ata-lowlevel.c~ Sun Feb 1 14:45:41 2004 +++ sys/dev/ata/ata-lowlevel.c Mon Feb 2 16:47:14 2004 @@ -645,10 +645,6 @@ DELAY(100000); } - /* enable interrupt */ - DELAY(10); - ATA_IDX_OUTB(ch, ATA_ALTSTAT, ATA_A_4BIT); - if (stat0 & ATA_S_BUSY) mask &= ~0x01; if (stat1 & ATA_S_BUSY) @@ -732,6 +728,9 @@ ata_prtdev(atadev, "timeout sending command=%02x\n", command); return -1; } + + /* enable interrupt */ + ATA_IDX_OUTB(atadev->channel, ATA_ALTSTAT, ATA_A_4BIT); /* only use 48bit addressing if needed (avoid bugs and overhead) */ if ((lba > 268435455 || count > 256) && atadev->param && --vkogqOf2sHV7VnPd--