From owner-freebsd-stable@FreeBSD.ORG Tue Dec 30 05:45:41 2008 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 091FC106566C for ; Tue, 30 Dec 2008 05:45:41 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forwards5.yandex.ru (forwards5.yandex.ru [77.88.61.37]) by mx1.freebsd.org (Postfix) with ESMTP id 749A38FC08 for ; Tue, 30 Dec 2008 05:45:39 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from smtp19.yandex.ru (smtp19.yandex.ru [77.88.61.35]) by forwards5.yandex.ru (Yandex) with ESMTP id C6757B04015; Tue, 30 Dec 2008 08:45:36 +0300 (MSK) Received: from ns.kirov.so-cdu.ru ([77.72.136.145]:20943 "EHLO [127.0.0.1]" smtp-auth: "bu7cher" TLS-CIPHER: "DHE-RSA-AES256-SHA keybits 256/256 version TLSv1/SSLv3" TLS-PEER-CN1: ) by mail.yandex.ru with ESMTP id S3096827AbYL3Fpb (ORCPT + 1 other); Tue, 30 Dec 2008 08:45:31 +0300 X-Yandex-Spam: 1 X-Yandex-Front: smtp19 X-Yandex-TimeMark: 1230615931 X-BornDate: 1137963600 X-Yandex-Karma: 0 X-Yandex-KarmaStatus: 0 X-MsgDayCount: 3 X-Comment: RFC 2476 MSA function at smtp19.yandex.ru logged sender identity as: bu7cher Message-ID: <4959B579.1000407@yandex.ru> Date: Tue, 30 Dec 2008 08:45:29 +0300 From: "Andrey V. Elsukov" User-Agent: Mozilla Thunderbird 1.5 (FreeBSD/20051231) MIME-Version: 1.0 To: David Ehrmann References: <49582FB2.8030300@gmail.com> <4958652B.80101@gmail.com> <49588FF7.2020702@yandex.ru> <49596A3D.1060003@gmail.com> In-Reply-To: <49596A3D.1060003@gmail.com> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-stable@freebsd.org Subject: Re: SATA hotplug and AHCI X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Dec 2008 05:45:41 -0000 David Ehrmann wrote: > http://pastebin.com/f5ab2ed28 > > dmesg.boot never changes. When I remove the drive, I see this from dmesg: > > ata4: DISCONNECT requested > subdisk8: detached > ad8: detached > ata4: DISCONNECTED > > And when I plug it back in, > > ata4: CONNECT requested > ata4: DISCONNECTED > ata4: CONNECTED > ata4: SATA connect time=0ms > ata4: SIGNATURE: 0000000c > ata4: No signature, asuming disk device > ata4: ahci_reset devices=0x1 > ata4: reiniting channel .. > ata4: SATA connect time=0ms > ata4: SIGNATURE: 0000000c > ata4: No signature, asuming disk device > ata4: ahci_reset devices=0x1 > ata4: reinit done .. > ata4: reiniting channel .. > ata4: SATA connect time=0ms > ata4: SIGNATURE: 0000000c > ata4: No signature, asuming disk device > ata4: ahci_reset devices=0x1 > ata4: reinit done .. There were several similar reports. AHCI driver can't read correct device signature after hard reset and can't detect attached device. This issue was fixed with hack which you can see in this output: > ata4: SIGNATURE: 0000000c > ata4: No signature, asuming disk device > ata4: ahci_reset devices=0x1 Linux's libata driver has a quirk for VIA AHCI: /* vt8251 doesn't clear BSY on signature FIS reception, * request follow-up softreset. */ If i right understand it issues softreset for VIA controllers just after hardreset. And after softreset it is trying to read device signature. FreeBSD CURRENT has similar code, but it is disabled by default. You can try install CURRENT and rebuild ata_ahci driver with AHCI_PM option. May be it will help.. -- WBR, Andrey V. Elsukov