From owner-freebsd-stable@FreeBSD.ORG Mon Dec 29 05:51:01 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 E54111065670 for ; Mon, 29 Dec 2008 05:51:01 +0000 (UTC) (envelope-from ehrmann@gmail.com) Received: from mxout-03.mxes.net (mxout-03.mxes.net [216.86.168.178]) by mx1.freebsd.org (Postfix) with ESMTP id BE8DF8FC13 for ; Mon, 29 Dec 2008 05:51:01 +0000 (UTC) (envelope-from ehrmann@gmail.com) Received: from [10.0.0.158] (unknown [70.135.135.115]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.mxes.net (Postfix) with ESMTPSA id B32C723E3EB for ; Mon, 29 Dec 2008 00:51:00 -0500 (EST) Message-ID: <4958652B.80101@gmail.com> Date: Sun, 28 Dec 2008 21:50:35 -0800 From: David Ehrmann User-Agent: Thunderbird 2.0.0.18 (Windows/20081105) MIME-Version: 1.0 To: freebsd-stable@freebsd.org References: <49582FB2.8030300@gmail.com> In-Reply-To: <49582FB2.8030300@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: Mon, 29 Dec 2008 05:51:02 -0000 I ran across this on an old thread, somewhere: "Try swapping drives without using atacontrol and read the kernel messages that follow. It will tell you if it automatically detached the old drive and attached the new drive, somewhat like it does with USB. If not, you will need to use atacontrol to manually detach and attach. Either way, you will always need to unmount it, and since this kind of operation has crashed my machine many times, you might as well sync before you do anything too. The feature list doesn't seem to tell you either way if hot plugging is supported. With IDE, it depends on the chipset you're using." So my question (I think): it's been a few years since that was written; is it still the case that inserting a drive might not print a message? Why not? Does this mean I'll have to manually run atacontrol and can't automate it with devd? David Ehrmann wrote: > I'm trying to get real hotplugging to work. My motherboard uses the > Via VT8251 southbridge which, according to the whitesheet, supports > SATA hotplugging: > > http://www.via.com.tw/en/downloads/whitepapers/chipsets/southbridge/chipsets_vt8251.pdf > > > > I set the SATA controller to the AHCI mode in my BIOS. When I unplug > the drive, I see > > subdisk8: detached > ad8: detached > > but plugging it back in, I don't see anything, and atacontrol list > doesn't list any devices on the channel. If I do atacontrol reinit > ata, nothing happens, but if I do atacontrol detach > ata (it fails without detaching, first) atacontrol attach > ata, the drive is recognized > > ata4: [ITHREAD] > ad8: ... > Master: ... > Slace: no device present > > How can I avoid all this and get the drive to be recognized > automatically? Can I do this with devd? Did I do what I needed to > correctly set up hotplugging? >