From nobody@FreeBSD.org  Thu Aug 27 14:42:13 2009
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 39C1C106568D
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 27 Aug 2009 14:42:13 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 294958FC4D
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 27 Aug 2009 14:42:13 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n7REgCti062487
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 27 Aug 2009 14:42:12 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id n7REgCOh062486;
	Thu, 27 Aug 2009 14:42:12 GMT
	(envelope-from nobody)
Message-Id: <200908271442.n7REgCOh062486@www.freebsd.org>
Date: Thu, 27 Aug 2009 14:42:12 GMT
From: Carsten Menke <bootsy52@gmx.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Hotswap with SATA drives and AHCI enabled does not work
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         138235
>Category:       kern
>Synopsis:       [ata] Hotswap with SATA drives and AHCI enabled does not work
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Aug 27 14:50:01 UTC 2009
>Closed-Date:    Thu Oct 29 21:36:59 UTC 2009
>Last-Modified:  Fri Oct 30 00:50:01 UTC 2009
>Originator:     Carsten Menke
>Release:        7.2
>Organization:
Prozesse im Unternehmen
>Environment:
FreeBSD server.local 7.2-RELEASE-p3 FreeBSD 7.2-RELEASE-p3 #0: Tue Aug 25 18:58:21 CEST 2009
>Description:
I have a Icydock MB674SPF-B hotswap backplane attached to a Gigabyte
MA78GM-UD2H Motherboard with a AMD SB710 Southbridge and AHCI enabled
in the BIOS.

The good news, it works better than in Linux. However, it does not work
fully, because the removal of a device is recognized, but the re-insertion
of the drive is not. 

cat /var/run/devd.pipe
-subdisk6  at   on ad6
-ad6  at   on ata3
!system=DEVFS subsystem=CDEV type=DESTROY cdev=ad6

If I plug the drive back in, there is NO message generated through
devd.pipe and the drive is not recognized.

The current workaround for me is:

Hotswap remove the drive

atacontrol detach ata3

Put the drive back in

atacontrol attach ata3

then everything works as expected.

Further more, I'm not able to catch the detach event generated through
devd and run atacontrol detach automatically, but that's another problem.`

>How-To-Repeat:
1. Remove drive
2. Insert drive
>Fix:
Workaround:

atacontrol detach ataX
atacontrol attach ataX

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: mav 
State-Changed-When: Thu Oct 29 21:35:30 UTC 2009 
State-Changed-Why:  
This is known issue. Drive hot-plug was disabled to address another problem. 
To detect new drive you have to detach and attach channel back with atacontrol. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=138235 

From: Carsten Menke <bootsy52@gmx.net>
To: bug-followup@FreeBSD.org, bootsy52@gmx.net
Cc:  
Subject: Re: kern/138235: [ata] Hotswap with SATA drives and AHCI enabled
 does not work
Date: Fri, 30 Oct 2009 01:47:33 +0100

 I know that I can get it to work with atacontrol. But this is a workaround and 
 if it was disabled to avoid other problems, this is still a bug. A known problem 
 is also a bug which is not solved.
 
 -- 
 "There are two major products that came out of Berkeley: LSD and UNIX.
    We don't believe this to be a coincidence." --Jeremy S. Anderson
>Unformatted:
