From owner-freebsd-current@FreeBSD.ORG Tue Mar 10 16:44:04 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E95171065701; Tue, 10 Mar 2009 16:44:04 +0000 (UTC) (envelope-from hartzell@alerce.com) Received: from merlin.alerce.com (merlin.alerce.com [64.62.142.94]) by mx1.freebsd.org (Postfix) with ESMTP id CB5FC8FC15; Tue, 10 Mar 2009 16:44:04 +0000 (UTC) (envelope-from hartzell@alerce.com) Received: from merlin.alerce.com (localhost [127.0.0.1]) by merlin.alerce.com (Postfix) with ESMTP id 8F40D33C62; Tue, 10 Mar 2009 09:44:04 -0700 (PDT) Received: from merlin.alerce.com (localhost [127.0.0.1]) by merlin.alerce.com (Postfix) with ESMTP id 1F58E33C5B; Tue, 10 Mar 2009 09:44:03 -0700 (PDT) From: George Hartzell MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18870.39124.596500.878010@almost.alerce.com> Date: Tue, 10 Mar 2009 09:44:04 -0700 To: Alexander Motin In-Reply-To: <49B68F09.5060706@FreeBSD.org> References: <1236482586.00083946.1236470402@10.7.7.3> <49B4D781.4040009@FreeBSD.org> <18870.36237.507772.507692@almost.alerce.com> <49B68F09.5060706@FreeBSD.org> X-Mailer: VM 8.0.12 under 22.1.50.1 (i386-apple-darwin8.11.1) X-Virus-Scanned: ClamAV using ClamSMTP X-Mailman-Approved-At: Tue, 10 Mar 2009 16:49:40 +0000 Cc: freebsd-current@freebsd.org Subject: Re: Am I using atacontrol attach properly? (sata hotplug issue). X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: hartzell@alerce.com List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Mar 2009 16:44:05 -0000 Alexander Motin writes: > George Hartzell wrote: > > Alexander Motin writes: > > > George Hartzell wrote: > > > > I have a Gigabyte GA-6KIEH-RH motherboard. It has 5 SATA ports, 4 > > > > attached to a Sil 3114 controller and 1 attach to an ICH8m. The > > > > system is running -CURRENT from yesterday. > > > > > > > > I have two disks attaching as ad4 and ad6 to ata2 and ata3 resp. > > > > > > > > I can set ACHI mode for ICH8m in the BIOS. When I do not enable it, > > > > the 5th SATA conector shows up as slave on ata6. When I do enable it > > > > the 5th connector shows up as master on ata8. > > > > > > > > If I boot without anything connected to the fifth port, then connect a > > > > drive I thought that the following should work to get the drive > > > > recognized: > > > > > > > > sudo atacontrol detach ata8 > > > > sudo atacontrol attach ata8 > > > > > > > > (or a similar dance with ata6 if AHCI isn't enabled). > > > > > > It is ICH8M port, right? > > > > > > > When I set boot_verbose in loader.conf I see the following when I > > > > attach (two separate attempts with different SATA drives): > > > > > > > > ata8: AHCI reset... > > > > ata8: SATA connect status=00000004 > > > > ata8: AHCI reset done: phy reset found no device > > > > ata8: [MPSAFE] > > > > ata8: [ITHREAD] > > > > ata8: Identifying devices: 00000000 > > > > ata8: New devices: 00000000 > > > > ata8: AHCI reset... > > > > ata8: SATA connect status=00000004 > > > > ata8: AHCI reset done: phy reset found no device > > > > ata8: [MPSAFE] > > > > ata8: [ITHREAD] > > > > ata8: Identifying devices: 00000000 > > > > ata8: New devices: 00000000 > > > > > > There is very little part of AHCI driver takes part on this stage. > > > Mostly it is done by common ata_sata_phy_reset() routine. Try to comment > > > if ((ATA_IDX_INL(ch, ATA_SCONTROL) & ATA_SC_DET_MASK) == > > > ATA_SC_DET_IDLE) > > > return ata_sata_connect(ch); > > > lines in there. It will force full hardware reset to the drive. > > > > > > > If the drive's attached at boot time then it's recognized. > > > > > > > > Am I doing something wrong, or is my hardware balky? > > > > > > Every hardware has some specifics. I have successfully tested hot-plug > > > working with AHCI on ICH8, ICH8M and JMB363. > > > > When I comment out those lines I end up with an unbootable kernel. I > > get to the point that it tries to mount root and it gives me a prompt > > asking me what to mount. > > Have you saved any ata messages? > > > I don't know if it's the same problem or > > not, but the USB keyboard is also unresponsive. > > I don't see direct relations. > > > Somehow, in the course of playing with this and rebooting when things > > hung, I've ended up with several hundred errors in the zpool. It'll > > take me a few evenings to reinstall and rebuild things. > > It's a pity. On my systems commenting this lines does not brake anything. I'll build up a simpler test -CURRENT system (no ZFS, etc...) and give it another try. I won't get to it until next Wednesday or so though, work and travel will be keeping me busy. Thanks for the help! g.