From nobody@FreeBSD.org  Thu Aug 12 15:39:37 2010
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 D497B1065698
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 12 Aug 2010 15:39:37 +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 C3C608FC16
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 12 Aug 2010 15:39:37 +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 o7CFda99034752
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 12 Aug 2010 15:39:36 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id o7CFdaD1034745;
	Thu, 12 Aug 2010 15:39:36 GMT
	(envelope-from nobody)
Message-Id: <201008121539.o7CFdaD1034745@www.freebsd.org>
Date: Thu, 12 Aug 2010 15:39:36 GMT
From: Bryce Simonds <bsimonds@veriam.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: When using an SIIG SATA card the error "Unexpected signature 0xa05f" is reported when a new drive is connected
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         149580
>Category:       kern
>Synopsis:       [ata] [patch] When using an SIIG SATA card the error "Unexpected signature 0xa05f" is reported when a new drive is connected
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    mav
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Aug 12 15:40:03 UTC 2010
>Closed-Date:    
>Last-Modified:  Mon Aug 16 19:00:08 UTC 2010
>Originator:     Bryce Simonds
>Release:        8.1-RELEASE
>Organization:
Veriam Technology, Inc.
>Environment:
FreeBSD fossel 8.1-RELEASE FreeBSD 8.1-RELEASE #1: Thu Aug 12 10:08:51 CDT 2010     bsimonds@fossel:/usr/src/sys/i386/compile/FOSSEL  i386

>Description:
When using the SIIG DP SATA 6Gb/s 2S1P PCIe card an error is reported when a drive is hot plugged into the card:

Aug 11 16:59:05 fossel kernel: (aprobe0:ahcich0:0:0:0): Unexpected signature 0xa05f

The SATA controller on the motherboard works fine.
>How-To-Repeat:
Need a SIIG DP SATA 6Gb/s 2S1P PCIe card.

While using the ahci(4) driver, hot plug a SATA drive into the card, this should generate the error (the error is viewable from dmesg)
>Fix:
Submitted a patch that appears to work around the problem okay, but I'm not certain this this is a correct fix.

I believe this might be a RAID signature code, but I'm using the card for individual SATA drives not the RAID portion so it suits our needs.

Patch attached with submission follows:

--- ata_xpt.c.orig	2010-08-12 10:16:46.000000000 -0500
+++ ata_xpt.c	2010-08-12 10:08:29.000000000 -0500
@@ -776,7 +776,10 @@
 		    done_ccb->ataio.res.lba_mid;
 		if (bootverbose)
 			xpt_print(path, "SIGNATURE: %04x\n", sign);
-		if (sign == 0x0000 &&
+/* BEGIN VERIAM HACK! */
+/*		if (sign == 0x0000 && */
+		if ( ((sign == 0x0000) || (sign == 0xA05F)) &&
+/* END VERIAM HACK! */
 		    done_ccb->ccb_h.target_id != 15) {
 			path->device->protocol = PROTO_ATA;
 			PROBE_SET_ACTION(softc, PROBE_IDENTIFY);


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->mav 
Responsible-Changed-By: vwe 
Responsible-Changed-When: Sun Aug 15 21:24:13 UTC 2010 
Responsible-Changed-Why:  
Alexander, can you care about this? Thx! 

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

From: Alexander Motin <mav@FreeBSD.org>
To: bug-followup@FreeBSD.org, bsimonds@veriam.com
Cc:  
Subject: Re: kern/149580: [ata] [patch] When using an SIIG SATA card the error
 "Unexpected signature 0xa05f" is reported when a new drive is connected
Date: Mon, 16 Aug 2010 00:52:06 +0300

 This signature is unknown to me. It is not defined in standard. As I
 understand, this controller based on some Marvell 88SE912x chip. I've
 tested few of them and they were working fine. Could you collect more
 data, including `pciconf -lvbc` output?
 
 -- 
 Alexander Motin

From: "Bryce Simonds" <bsimonds@veriam.com>
To: "'Alexander Motin'" <mav@FreeBSD.org>,
	<bug-followup@FreeBSD.org>
Cc:  
Subject: RE: kern/149580: [ata] [patch] When using an SIIG SATA card the error "Unexpected signature 0xa05f" is reported when a new drive is connected
Date: Mon, 16 Aug 2010 11:10:12 -0500

 This is a multi-part message in MIME format.
 
 ------=_NextPart_000_000A_01CB3D33.99ED4000
 Content-Type: text/plain;
 	charset="us-ascii"
 Content-Transfer-Encoding: 7bit
 
 Sure thing, here it is.
 
 I had fiddled with the hardware configuration of this box (moved the card
 into another slot) and the signature changed: "Unexpected signature 0x2c56"
 
 My hack also didn't correct the problem permanently like I had originally
 thought:
 
 [[ FIRST INSERT ]]
 (aprobe0:ahcich0:0:0:0): Unexpected signature 0x2c560000, assuming ATA
 drive.
 ada1 at ahcich0 bus 0 scbus0 target 0 lun 0
 ada1: <WDC WD1600JS-75NCB3 10.02E04> ATA-7 SATA 2.x device
 ada1: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
 ada1: Command Queueing enabled
 ada1: 157066MB (321672960 512 byte sectors: 16H 63S/T 16383C)
 
 [[ REMOVAL ]]
 (ada1:ahcich0:0:0:0): lost device
 (ada1:ahcich0:0:0:0): removing device entry
 
 [[ SECOND INSERT ]]
 ahcich0: device is not ready after soft-reset: tfd = 000000ff
 
 [[ THIRD INSERT ]]
 ahcich0: device is not ready after soft-reset: tfd = 000000ff
 
 It continues like this until I reboot.
 
 
 Looking at 7.2's ATA driver it would appear that the driver there attempts
 to treat any unknown signatures as an ATA disk drive.  However, that driver
 consequently doesn't seem to pick up drives hot plugged into the SATA
 controllers built into my MB, with a similar such problem:
 
 Aug 16 23:48:34 carbon kernel: ata16: CONNECT requested
 Aug 16 23:48:34 carbon kernel: ata16: CONNECTED
 Aug 16 23:48:34 carbon kernel: ata16: SATA connect time=0ms
 Aug 16 23:48:34 carbon kernel: ata16: SIGNATURE: ffffffff
 Aug 16 23:48:34 carbon kernel: ata16: No signature, asuming disk device
 Aug 16 23:48:34 carbon kernel: ata16: ahci_reset devices=0x1<ATA_MASTER>
 Aug 16 23:48:35 carbon kernel: ata16: reiniting channel ..
 Aug 16 23:48:35 carbon kernel: ata16: SATA connect time=0ms
 Aug 16 23:48:35 carbon kernel: ata16: SIGNATURE: ffffffff
 Aug 16 23:48:35 carbon kernel: ata16: No signature, asuming disk device
 Aug 16 23:48:35 carbon kernel: ata16: ahci_reset devices=0x1<ATA_MASTER>
 Aug 16 23:48:35 carbon kernel: ata16: reinit done ..
 Aug 16 23:48:36 carbon kernel: ata16: reiniting channel ..
 Aug 16 23:48:36 carbon kernel: ata16: SATA connect time=0ms
 Aug 16 23:48:36 carbon kernel: ata16: SIGNATURE: ffffffff
 Aug 16 23:48:36 carbon kernel: ata16: No signature, asuming disk device
 Aug 16 23:48:36 carbon kernel: ata16: ahci_reset devices=0x1<ATA_MASTER>
 Aug 16 23:48:36 carbon kernel: ata16: reinit done ..
 
 The only benefit about 7.2 at this point right now for me is that if I use
 the atacontrol command to detach and reattach the ATA controller the drive
 will then show up okay.  The problem is that I'm writing some software that
 needs to be able to pick up drive attachments automatically so it can begin
 purging the disk of its contents; constantly issuing an attach/detach to
 that controller while it's trying to do the above reinit causes the kernel
 to panic. :/
 
 Any help you can provide on this would be much appreciated.
 
 Thank you,
 Bryce Simonds
 Veriam Technologies, Inc.
 
 -----Original Message-----
 From: Alexander Motin [mailto:mavbsd@gmail.com] On Behalf Of Alexander Motin
 Sent: Sunday, August 15, 2010 4:52 PM
 To: bug-followup@FreeBSD.org; bsimonds@veriam.com
 Subject: Re: kern/149580: [ata] [patch] When using an SIIG SATA card the
 error "Unexpected signature 0xa05f" is reported when a new drive is
 connected
 
 This signature is unknown to me. It is not defined in standard. As I
 understand, this controller based on some Marvell 88SE912x chip. I've
 tested few of them and they were working fine. Could you collect more
 data, including `pciconf -lvbc` output?
 
 -- 
 Alexander Motin
 
 ------=_NextPart_000_000A_01CB3D33.99ED4000
 Content-Type: text/plain;
 	name="pcidump.txt"
 Content-Transfer-Encoding: quoted-printable
 Content-Disposition: attachment;
 	filename="pcidump.txt"
 
 hostb0@pci0:0:0:0:	class=3D0x060000 card=3D0x50001458 chip=3D0xd1318086 =
 rev=3D0x11 hdr=3D0x00=0A=
     vendor     =3D 'Intel Corporation'=0A=
     class      =3D bridge=0A=
     subclass   =3D HOST-PCI=0A=
     cap 00[40] =3D unknown=0A=
 pcib1@pci0:0:3:0:	class=3D0x060400 card=3D0x50011458 chip=3D0xd1388086 =
 rev=3D0x11 hdr=3D0x01=0A=
     vendor     =3D 'Intel Corporation'=0A=
     class      =3D bridge=0A=
     subclass   =3D PCI-PCI=0A=
     cap 0d[40] =3D PCI Bridge card=3D0x50011458=0A=
     cap 05[60] =3D MSI supports 2 messages, vector masks =0A=
     cap 10[90] =3D PCI-Express 2 root port max data 256(256) link x0(x8)=0A=
     cap 01[e0] =3D powerspec 3  supports D0 D3  current D0=0A=
 pcib2@pci0:0:5:0:	class=3D0x060400 card=3D0x50011458 chip=3D0xd13a8086 =
 rev=3D0x11 hdr=3D0x01=0A=
     vendor     =3D 'Intel Corporation'=0A=
     class      =3D bridge=0A=
     subclass   =3D PCI-PCI=0A=
     cap 0d[40] =3D PCI Bridge card=3D0x50011458=0A=
     cap 05[60] =3D MSI supports 2 messages, vector masks =0A=
     cap 10[90] =3D PCI-Express 2 root port max data 256(256) link x1(x8)=0A=
     cap 01[e0] =3D powerspec 3  supports D0 D3  current D0=0A=
 none0@pci0:0:8:0:	class=3D0x088000 card=3D0x00000000 chip=3D0xd1558086 =
 rev=3D0x11 hdr=3D0x00=0A=
     vendor     =3D 'Intel Corporation'=0A=
     class      =3D base peripheral=0A=
     cap 10[40] =3D PCI-Express 2 root endpoint max data 128(128) link =
 x0(x0)=0A=
 none1@pci0:0:8:1:	class=3D0x088000 card=3D0x00000000 chip=3D0xd1568086 =
 rev=3D0x11 hdr=3D0x00=0A=
     vendor     =3D 'Intel Corporation'=0A=
     class      =3D base peripheral=0A=
     cap 10[40] =3D PCI-Express 2 root endpoint max data 128(128) link =
 x0(x0)=0A=
 none2@pci0:0:8:2:	class=3D0x088000 card=3D0x00000000 chip=3D0xd1578086 =
 rev=3D0x11 hdr=3D0x00=0A=
     vendor     =3D 'Intel Corporation'=0A=
     class      =3D base peripheral=0A=
     cap 10[40] =3D PCI-Express 2 root endpoint max data 128(128) link =
 x0(x0)=0A=
 none3@pci0:0:8:3:	class=3D0x088000 card=3D0x00000000 chip=3D0xd1588086 =
 rev=3D0x11 hdr=3D0x00=0A=
     vendor     =3D 'Intel Corporation'=0A=
     class      =3D base peripheral=0A=
 none4@pci0:0:16:0:	class=3D0x088000 card=3D0x00000000 chip=3D0xd1508086 =
 rev=3D0x11 hdr=3D0x00=0A=
     vendor     =3D 'Intel Corporation'=0A=
     class      =3D base peripheral=0A=
 none5@pci0:0:16:1:	class=3D0x088000 card=3D0x00000000 chip=3D0xd1518086 =
 rev=3D0x11 hdr=3D0x00=0A=
     vendor     =3D 'Intel Corporation'=0A=
     class      =3D base peripheral=0A=
 uhci0@pci0:0:26:0:	class=3D0x0c0300 card=3D0x50041458 chip=3D0x3b3b8086 =
 rev=3D0x06 hdr=3D0x00=0A=
     vendor     =3D 'Intel Corporation'=0A=
     class      =3D serial bus=0A=
     subclass   =3D USB=0A=
     bar   [20] =3D type I/O Port, range 32, base 0xff00, size 32, enabled=0A=
     cap 13[50] =3D PCI Advanced Features: FLR TP=0A=
 uhci1@pci0:0:26:1:	class=3D0x0c0300 card=3D0x50041458 chip=3D0x3b3e8086 =
 rev=3D0x06 hdr=3D0x00=0A=
     vendor     =3D 'Intel Corporation'=0A=
     class      =3D serial bus=0A=
     subclass   =3D USB=0A=
     bar   [20] =3D type I/O Port, range 32, base 0xfe00, size 32, enabled=0A=
     cap 13[50] =3D PCI Advanced Features: FLR TP=0A=
 uhci2@pci0:0:26:2:	class=3D0x0c0300 card=3D0x50041458 chip=3D0x3b3f8086 =
 rev=3D0x06 hdr=3D0x00=0A=
     vendor     =3D 'Intel Corporation'=0A=
     class      =3D serial bus=0A=
     subclass   =3D USB=0A=
     bar   [20] =3D type I/O Port, range 32, base 0xfd00, size 32, enabled=0A=
     cap 13[50] =3D PCI Advanced Features: FLR TP=0A=
 ehci0@pci0:0:26:7:	class=3D0x0c0320 card=3D0x50061458 chip=3D0x3b3c8086 =
 rev=3D0x06 hdr=3D0x00=0A=
     vendor     =3D 'Intel Corporation'=0A=
     class      =3D serial bus=0A=
     subclass   =3D USB=0A=
     bar   [10] =3D type Memory, range 32, base 0xfbfff000, size 1024, =
 enabled=0A=
     cap 01[50] =3D powerspec 2  supports D0 D3  current D0=0A=
     cap 0a[58] =3D EHCI Debug Port at offset 0xa0 in map 0x14=0A=
     cap 13[98] =3D PCI Advanced Features: FLR TP=0A=
 none6@pci0:0:27:0:	class=3D0x040300 card=3D0xa1021458 chip=3D0x3b568086 =
 rev=3D0x06 hdr=3D0x00=0A=
     vendor     =3D 'Intel Corporation'=0A=
     class      =3D multimedia=0A=
     subclass   =3D HDA=0A=
     bar   [10] =3D type Memory, range 64, base 0xfbff8000, size 16384, =
 enabled=0A=
     cap 01[50] =3D powerspec 2  supports D0 D3  current D0=0A=
     cap 05[60] =3D MSI supports 1 message, 64 bit =0A=
     cap 10[70] =3D PCI-Express 1 root endpoint max data 128(128) link =
 x0(x0)=0A=
 pcib3@pci0:0:28:0:	class=3D0x060400 card=3D0x50011458 chip=3D0x3b428086 =
 rev=3D0x06 hdr=3D0x01=0A=
     vendor     =3D 'Intel Corporation'=0A=
     class      =3D bridge=0A=
     subclass   =3D PCI-PCI=0A=
     cap 10[40] =3D PCI-Express 2 root port max data 128(128) link x0(x1)=0A=
     cap 05[80] =3D MSI supports 1 message =0A=
     cap 0d[90] =3D PCI Bridge card=3D0x50011458=0A=
     cap 01[a0] =3D powerspec 2  supports D0 D3  current D0=0A=
 pcib4@pci0:0:28:1:	class=3D0x060400 card=3D0x50011458 chip=3D0x3b448086 =
 rev=3D0x06 hdr=3D0x01=0A=
     vendor     =3D 'Intel Corporation'=0A=
     class      =3D bridge=0A=
     subclass   =3D PCI-PCI=0A=
     cap 10[40] =3D PCI-Express 2 root port max data 128(128) link x1(x1)=0A=
     cap 05[80] =3D MSI supports 1 message =0A=
     cap 0d[90] =3D PCI Bridge card=3D0x50011458=0A=
     cap 01[a0] =3D powerspec 2  supports D0 D3  current D0=0A=
 pcib5@pci0:0:28:3:	class=3D0x060400 card=3D0x50011458 chip=3D0x3b488086 =
 rev=3D0x06 hdr=3D0x01=0A=
     vendor     =3D 'Intel Corporation'=0A=
     class      =3D bridge=0A=
     subclass   =3D PCI-PCI=0A=
     cap 10[40] =3D PCI-Express 2 root port max data 128(128) link x1(x1)=0A=
     cap 05[80] =3D MSI supports 1 message =0A=
     cap 0d[90] =3D PCI Bridge card=3D0x50011458=0A=
     cap 01[a0] =3D powerspec 2  supports D0 D3  current D0=0A=
 pcib6@pci0:0:28:4:	class=3D0x060400 card=3D0x50011458 chip=3D0x3b4a8086 =
 rev=3D0x06 hdr=3D0x01=0A=
     vendor     =3D 'Intel Corporation'=0A=
     class      =3D bridge=0A=
     subclass   =3D PCI-PCI=0A=
     cap 10[40] =3D PCI-Express 2 root port max data 128(128) link x1(x1)=0A=
     cap 05[80] =3D MSI supports 1 message =0A=
     cap 0d[90] =3D PCI Bridge card=3D0x50011458=0A=
     cap 01[a0] =3D powerspec 2  supports D0 D3  current D0=0A=
 pcib7@pci0:0:28:5:	class=3D0x060400 card=3D0x50011458 chip=3D0x3b4c8086 =
 rev=3D0x06 hdr=3D0x01=0A=
     vendor     =3D 'Intel Corporation'=0A=
     class      =3D bridge=0A=
     subclass   =3D PCI-PCI=0A=
     cap 10[40] =3D PCI-Express 2 root port max data 128(128) link x1(x1)=0A=
     cap 05[80] =3D MSI supports 1 message =0A=
     cap 0d[90] =3D PCI Bridge card=3D0x50011458=0A=
     cap 01[a0] =3D powerspec 2  supports D0 D3  current D0=0A=
 pcib8@pci0:0:28:6:	class=3D0x060400 card=3D0x50011458 chip=3D0x3b4e8086 =
 rev=3D0x06 hdr=3D0x01=0A=
     vendor     =3D 'Intel Corporation'=0A=
     class      =3D bridge=0A=
     subclass   =3D PCI-PCI=0A=
     cap 10[40] =3D PCI-Express 2 root port max data 128(128) link x1(x1)=0A=
     cap 05[80] =3D MSI supports 1 message =0A=
     cap 0d[90] =3D PCI Bridge card=3D0x50011458=0A=
     cap 01[a0] =3D powerspec 2  supports D0 D3  current D0=0A=
 pcib9@pci0:0:28:7:	class=3D0x060400 card=3D0x50011458 chip=3D0x3b508086 =
 rev=3D0x06 hdr=3D0x01=0A=
     vendor     =3D 'Intel Corporation'=0A=
     class      =3D bridge=0A=
     subclass   =3D PCI-PCI=0A=
     cap 10[40] =3D PCI-Express 2 root port max data 128(128) link x1(x1)=0A=
     cap 05[80] =3D MSI supports 1 message =0A=
     cap 0d[90] =3D PCI Bridge card=3D0x50011458=0A=
     cap 01[a0] =3D powerspec 2  supports D0 D3  current D0=0A=
 uhci3@pci0:0:29:0:	class=3D0x0c0300 card=3D0x50041458 chip=3D0x3b368086 =
 rev=3D0x06 hdr=3D0x00=0A=
     vendor     =3D 'Intel Corporation'=0A=
     class      =3D serial bus=0A=
     subclass   =3D USB=0A=
     bar   [20] =3D type I/O Port, range 32, base 0xfc00, size 32, enabled=0A=
     cap 13[50] =3D PCI Advanced Features: FLR TP=0A=
 uhci4@pci0:0:29:1:	class=3D0x0c0300 card=3D0x50041458 chip=3D0x3b378086 =
 rev=3D0x06 hdr=3D0x00=0A=
     vendor     =3D 'Intel Corporation'=0A=
     class      =3D serial bus=0A=
     subclass   =3D USB=0A=
     bar   [20] =3D type I/O Port, range 32, base 0xfb00, size 32, enabled=0A=
     cap 13[50] =3D PCI Advanced Features: FLR TP=0A=
 uhci5@pci0:0:29:2:	class=3D0x0c0300 card=3D0x50041458 chip=3D0x3b388086 =
 rev=3D0x06 hdr=3D0x00=0A=
     vendor     =3D 'Intel Corporation'=0A=
     class      =3D serial bus=0A=
     subclass   =3D USB=0A=
     bar   [20] =3D type I/O Port, range 32, base 0xfa00, size 32, enabled=0A=
     cap 13[50] =3D PCI Advanced Features: FLR TP=0A=
 uhci6@pci0:0:29:3:	class=3D0x0c0300 card=3D0x50041458 chip=3D0x3b398086 =
 rev=3D0x06 hdr=3D0x00=0A=
     vendor     =3D 'Intel Corporation'=0A=
     class      =3D serial bus=0A=
     subclass   =3D USB=0A=
     bar   [20] =3D type I/O Port, range 32, base 0xf900, size 32, enabled=0A=
     cap 13[50] =3D PCI Advanced Features: FLR TP=0A=
 ehci1@pci0:0:29:7:	class=3D0x0c0320 card=3D0x50061458 chip=3D0x3b348086 =
 rev=3D0x06 hdr=3D0x00=0A=
     vendor     =3D 'Intel Corporation'=0A=
     class      =3D serial bus=0A=
     subclass   =3D USB=0A=
     bar   [10] =3D type Memory, range 32, base 0xfbffe000, size 1024, =
 enabled=0A=
     cap 01[50] =3D powerspec 2  supports D0 D3  current D0=0A=
     cap 0a[58] =3D EHCI Debug Port at offset 0xa0 in map 0x14=0A=
     cap 13[98] =3D PCI Advanced Features: FLR TP=0A=
 pcib10@pci0:0:30:0:	class=3D0x060401 card=3D0x50001458 chip=3D0x244e8086 =
 rev=3D0xa6 hdr=3D0x01=0A=
     vendor     =3D 'Intel Corporation'=0A=
     device     =3D '82801 Family (ICH2/3/4/5/6/7/8/9,63xxESB) Hub =
 Interface to PCI Bridge'=0A=
     class      =3D bridge=0A=
     subclass   =3D PCI-PCI=0A=
     cap 0d[50] =3D PCI Bridge card=3D0x50001458=0A=
 isab0@pci0:0:31:0:	class=3D0x060100 card=3D0x50011458 chip=3D0x3b028086 =
 rev=3D0x06 hdr=3D0x00=0A=
     vendor     =3D 'Intel Corporation'=0A=
     class      =3D bridge=0A=
     subclass   =3D PCI-ISA=0A=
     cap 09[e0] =3D vendor (length 16) Intel cap 1 version 1=0A=
 ahci4@pci0:0:31:2:	class=3D0x010601 card=3D0xb0051458 chip=3D0x3b228086 =
 rev=3D0x06 hdr=3D0x00=0A=
     vendor     =3D 'Intel Corporation'=0A=
     device     =3D 'IBEX AHCI Controller(6Port) (Intel Q57 Express)'=0A=
     class      =3D mass storage=0A=
     subclass   =3D SATA=0A=
     bar   [10] =3D type I/O Port, range 32, base 0xf800, size  8, enabled=0A=
     bar   [14] =3D type I/O Port, range 32, base 0xf700, size  4, enabled=0A=
     bar   [18] =3D type I/O Port, range 32, base 0xf600, size  8, enabled=0A=
     bar   [1c] =3D type I/O Port, range 32, base 0xf500, size  4, enabled=0A=
     bar   [20] =3D type I/O Port, range 32, base 0xf400, size 32, enabled=0A=
     bar   [24] =3D type Memory, range 32, base 0xfbffd000, size 2048, =
 enabled=0A=
     cap 05[80] =3D MSI supports 1 message enabled with 1 message=0A=
     cap 01[70] =3D powerspec 3  supports D0 D3  current D0=0A=
     cap 12[a8] =3D SATA Index-Data Pair=0A=
     cap 13[b0] =3D PCI Advanced Features: FLR TP=0A=
 none7@pci0:0:31:3:	class=3D0x0c0500 card=3D0x50011458 chip=3D0x3b308086 =
 rev=3D0x06 hdr=3D0x00=0A=
     vendor     =3D 'Intel Corporation'=0A=
     class      =3D serial bus=0A=
     subclass   =3D SMBus=0A=
     bar   [10] =3D type Memory, range 64, base 0xfbffc000, size 256, =
 enabled=0A=
     bar   [20] =3D type I/O Port, range 32, base 0x500, size 32, enabled=0A=
 ahci0@pci0:2:0:0:	class=3D0x010601 card=3D0x91231b4b chip=3D0x91231b4b =
 rev=3D0x11 hdr=3D0x00=0A=
     class      =3D mass storage=0A=
     subclass   =3D SATA=0A=
     bar   [10] =3D type I/O Port, range 32, base 0xaf00, size  8, enabled=0A=
     bar   [14] =3D type I/O Port, range 32, base 0xae00, size  4, enabled=0A=
     bar   [18] =3D type I/O Port, range 32, base 0xad00, size  8, enabled=0A=
     bar   [1c] =3D type I/O Port, range 32, base 0xac00, size  4, enabled=0A=
     bar   [20] =3D type I/O Port, range 32, base 0xab00, size 16, enabled=0A=
     bar   [24] =3D type Memory, range 32, base 0xfb8ff000, size 2048, =
 enabled=0A=
     cap 01[40] =3D powerspec 3  supports D0 D3  current D0=0A=
     cap 05[50] =3D MSI supports 1 message enabled with 1 message=0A=
     cap 10[70] =3D PCI-Express 2 legacy endpoint max data 256(512) link =
 x1(x1)=0A=
 atapci0@pci0:2:0:1:	class=3D0x01018f card=3D0x91a41b4b chip=3D0x91a41b4b =
 rev=3D0x11 hdr=3D0x00=0A=
     class      =3D mass storage=0A=
     subclass   =3D ATA=0A=
     bar   [10] =3D type I/O Port, range 32, base 0xaa00, size  8, enabled=0A=
     bar   [14] =3D type I/O Port, range 32, base 0xa900, size  4, enabled=0A=
     bar   [18] =3D type I/O Port, range 32, base 0xa800, size  8, enabled=0A=
     bar   [1c] =3D type I/O Port, range 32, base 0xa700, size  4, enabled=0A=
     bar   [20] =3D type I/O Port, range 32, base 0xa600, size 16, enabled=0A=
     bar   [24] =3D type Memory, range 32, base 0xfb8fe000, size 16, =
 enabled=0A=
     cap 01[40] =3D powerspec 3  supports D0 D3  current D0=0A=
     cap 05[50] =3D MSI supports 1 message =0A=
     cap 10[70] =3D PCI-Express 2 legacy endpoint max data 256(512) link =
 x1(x1)=0A=
 ahci1@pci0:4:0:0:	class=3D0x010601 card=3D0x91231b4b chip=3D0x91231b4b =
 rev=3D0x11 hdr=3D0x00=0A=
     class      =3D mass storage=0A=
     subclass   =3D SATA=0A=
     bar   [10] =3D type I/O Port, range 32, base 0x9f00, size  8, enabled=0A=
     bar   [14] =3D type I/O Port, range 32, base 0x9e00, size  4, enabled=0A=
     bar   [18] =3D type I/O Port, range 32, base 0x9d00, size  8, enabled=0A=
     bar   [1c] =3D type I/O Port, range 32, base 0x9c00, size  4, enabled=0A=
     bar   [20] =3D type I/O Port, range 32, base 0x9b00, size 16, enabled=0A=
     bar   [24] =3D type Memory, range 32, base 0xfb7ff000, size 2048, =
 enabled=0A=
     cap 01[40] =3D powerspec 3  supports D0 D3  current D0=0A=
     cap 05[50] =3D MSI supports 1 message enabled with 1 message=0A=
     cap 10[70] =3D PCI-Express 2 legacy endpoint max data 128(512) link =
 x1(x1)=0A=
 atapci1@pci0:4:0:1:	class=3D0x01018f card=3D0x91a41b4b chip=3D0x91a41b4b =
 rev=3D0x11 hdr=3D0x00=0A=
     class      =3D mass storage=0A=
     subclass   =3D ATA=0A=
     bar   [10] =3D type I/O Port, range 32, base 0x9a00, size  8, enabled=0A=
     bar   [14] =3D type I/O Port, range 32, base 0x9900, size  4, enabled=0A=
     bar   [18] =3D type I/O Port, range 32, base 0x9800, size  8, enabled=0A=
     bar   [1c] =3D type I/O Port, range 32, base 0x9700, size  4, enabled=0A=
     bar   [20] =3D type I/O Port, range 32, base 0x9600, size 16, enabled=0A=
     bar   [24] =3D type Memory, range 32, base 0xfb7fe000, size 16, =
 enabled=0A=
     cap 01[40] =3D powerspec 3  supports D0 D3  current D0=0A=
     cap 05[50] =3D MSI supports 1 message =0A=
     cap 10[70] =3D PCI-Express 2 legacy endpoint max data 128(512) link =
 x1(x1)=0A=
 none8@pci0:5:0:0:	class=3D0x0c0330 card=3D0x50071458 chip=3D0x01941033 =
 rev=3D0x03 hdr=3D0x00=0A=
     vendor     =3D 'NEC Electronics Hong Kong'=0A=
     class      =3D serial bus=0A=
     subclass   =3D USB=0A=
     bar   [10] =3D type Memory, range 64, base 0xfb6fe000, size 8192, =
 enabled=0A=
     cap 01[50] =3D powerspec 3  supports D0 D3  current D0=0A=
     cap 05[70] =3D MSI supports 8 messages, 64 bit =0A=
     cap 11[90] =3D MSI-X supports 8 messages in map 0x10=0A=
     cap 10[a0] =3D PCI-Express 2 endpoint max data 128(128) link x1(x1)=0A=
 atapci2@pci0:6:0:0:	class=3D0x010601 card=3D0xb0001458 chip=3D0x2363197b =
 rev=3D0x03 hdr=3D0x00=0A=
     vendor     =3D 'JMicron Technology Corp.'=0A=
     device     =3D 'JMicron JMB362/JMB363 AHCI Controller (JMB36X)'=0A=
     class      =3D mass storage=0A=
     subclass   =3D SATA=0A=
     bar   [10] =3D type I/O Port, range 32, base 0x8f00, size  8, enabled=0A=
     bar   [14] =3D type I/O Port, range 32, base 0x8e00, size  4, enabled=0A=
     bar   [18] =3D type I/O Port, range 32, base 0x8d00, size  8, enabled=0A=
     bar   [1c] =3D type I/O Port, range 32, base 0x8c00, size  4, enabled=0A=
     bar   [20] =3D type I/O Port, range 32, base 0x8b00, size 16, enabled=0A=
     bar   [24] =3D type Memory, range 32, base 0xfbefe000, size 8192, =
 enabled=0A=
     cap 01[68] =3D powerspec 2  supports D0 D3  current D0=0A=
     cap 10[50] =3D PCI-Express 1 legacy endpoint IRQ 2 max data 128(128) =
 link x1(x1)=0A=
 ahci3@pci0:7:0:0:	class=3D0x010601 card=3D0xb0001458 chip=3D0x91281b4b =
 rev=3D0x11 hdr=3D0x00=0A=
     class      =3D mass storage=0A=
     subclass   =3D SATA=0A=
     bar   [10] =3D type I/O Port, range 32, base 0x7f00, size  8, enabled=0A=
     bar   [14] =3D type I/O Port, range 32, base 0x7e00, size  4, enabled=0A=
     bar   [18] =3D type I/O Port, range 32, base 0x7d00, size  8, enabled=0A=
     bar   [1c] =3D type I/O Port, range 32, base 0x7c00, size  4, enabled=0A=
     bar   [20] =3D type I/O Port, range 32, base 0x7b00, size 16, enabled=0A=
     bar   [24] =3D type Memory, range 32, base 0xfbdff000, size 2048, =
 enabled=0A=
     cap 01[40] =3D powerspec 3  supports D0 D3  current D0=0A=
     cap 05[50] =3D MSI supports 1 message enabled with 1 message=0A=
     cap 10[70] =3D PCI-Express 2 legacy endpoint max data 128(512) link =
 x1(x1)=0A=
 re0@pci0:8:0:0:	class=3D0x020000 card=3D0xe0001458 chip=3D0x816810ec =
 rev=3D0x03 hdr=3D0x00=0A=
     vendor     =3D 'Realtek Semiconductor'=0A=
     device     =3D 'Gigabit Ethernet NIC(NDIS 6.0) (RTL8168/8111/8111c)'=0A=
     class      =3D network=0A=
     subclass   =3D ethernet=0A=
     bar   [10] =3D type I/O Port, range 32, base 0xce00, size 256, =
 enabled=0A=
     bar   [18] =3D type Prefetchable Memory, range 64, base 0xfbbff000, =
 size 4096, enabled=0A=
     bar   [20] =3D type Prefetchable Memory, range 64, base 0xfbbf8000, =
 size 16384, enabled=0A=
     cap 01[40] =3D powerspec 3  supports D0 D1 D2 D3  current D0=0A=
     cap 05[50] =3D MSI supports 1 message, 64 bit enabled with 1 message=0A=
     cap 10[70] =3D PCI-Express 2 endpoint IRQ 2 max data 128(256) link =
 x1(x1)=0A=
     cap 11[ac] =3D MSI-X supports 4 messages in map 0x20=0A=
     cap 03[cc] =3D VPD=0A=
 re1@pci0:9:0:0:	class=3D0x020000 card=3D0xe0001458 chip=3D0x816810ec =
 rev=3D0x03 hdr=3D0x00=0A=
     vendor     =3D 'Realtek Semiconductor'=0A=
     device     =3D 'Gigabit Ethernet NIC(NDIS 6.0) (RTL8168/8111/8111c)'=0A=
     class      =3D network=0A=
     subclass   =3D ethernet=0A=
     bar   [10] =3D type I/O Port, range 32, base 0xbe00, size 256, =
 enabled=0A=
     bar   [18] =3D type Prefetchable Memory, range 64, base 0xfb9ff000, =
 size 4096, enabled=0A=
     bar   [20] =3D type Prefetchable Memory, range 64, base 0xfb9f8000, =
 size 16384, enabled=0A=
     cap 01[40] =3D powerspec 3  supports D0 D1 D2 D3  current D0=0A=
     cap 05[50] =3D MSI supports 1 message, 64 bit enabled with 1 message=0A=
     cap 10[70] =3D PCI-Express 2 endpoint IRQ 2 max data 128(256) link =
 x1(x1)=0A=
     cap 11[ac] =3D MSI-X supports 4 messages in map 0x20=0A=
     cap 03[cc] =3D VPD=0A=
 pcib11@pci0:10:2:0:	class=3D0x060400 card=3D0x00000000 chip=3D0x811210b5 =
 rev=3D0xaa hdr=3D0x01=0A=
     vendor     =3D 'PLX Technology Inc.'=0A=
     device     =3D '1 Lane PCI Express to PCI bridge (PEX8112)'=0A=
     class      =3D bridge=0A=
     subclass   =3D PCI-PCI=0A=
     cap 01[40] =3D powerspec 2  supports D0 D1 D3  current D0=0A=
     cap 05[50] =3D MSI supports 1 message, 64 bit =0A=
     cap 10[60] =3D PCI-Express 1 PCI to PCIe bridge max data 128(128) =
 link x1(x1)=0A=
 atapci3@pci0:10:3:0:	class=3D0x010185 card=3D0xb0001458 =
 chip=3D0x82131283 rev=3D0x00 hdr=3D0x00=0A=
     vendor     =3D 'Integrated Technology Express (ITE) Inc'=0A=
     device     =3D 'IDE Controller (IT8213F)'=0A=
     class      =3D mass storage=0A=
     subclass   =3D ATA=0A=
     bar   [10] =3D type I/O Port, range 32, base 0xef00, size  8, enabled=0A=
     bar   [14] =3D type I/O Port, range 32, base 0xee00, size  4, enabled=0A=
     bar   [18] =3D type I/O Port, range 32, base 0xed00, size  8, enabled=0A=
     bar   [1c] =3D type I/O Port, range 32, base 0xec00, size  4, enabled=0A=
     bar   [20] =3D type I/O Port, range 32, base 0xeb00, size 16, enabled=0A=
     cap 01[80] =3D powerspec 2  supports D0 D3  current D0=0A=
 vgapci0@pci0:11:0:0:	class=3D0x030000 card=3D0xb7243842 =
 chip=3D0x06e410de rev=3D0xa1 hdr=3D0x00=0A=
     vendor     =3D 'NVIDIA Corporation'=0A=
     device     =3D 'NVIDIA GeForce 8400 GS (G98)'=0A=
     class      =3D display=0A=
     subclass   =3D VGA=0A=
     bar   [10] =3D type Memory, range 32, base 0xf8000000, size =
 16777216, enabled=0A=
     bar   [14] =3D type Prefetchable Memory, range 64, base 0xe0000000, =
 size 268435456, enabled=0A=
     bar   [1c] =3D type Memory, range 64, base 0xf6000000, size =
 33554432, enabled=0A=
     bar   [24] =3D type I/O Port, range 32, base 0xdf00, size 128, =
 enabled=0A=
     cap 01[60] =3D powerspec 3  supports D0 D3  current D0=0A=
     cap 05[68] =3D MSI supports 1 message, 64 bit =0A=
     cap 10[78] =3D PCI-Express 1 endpoint max data 128(128) link x1(x16)=0A=
 
 ------=_NextPart_000_000A_01CB3D33.99ED4000--
 

From: Alexander Motin <mav@FreeBSD.org>
To: Bryce Simonds <bsimonds@veriam.com>
Cc: bug-followup@FreeBSD.org
Subject: Re: kern/149580: [ata] [patch] When using an SIIG SATA card the error
 "Unexpected signature 0xa05f" is reported when a new drive is connected
Date: Mon, 16 Aug 2010 21:14:36 +0300

 Bryce Simonds wrote:
 > Sure thing, here it is.
 
 I have board with the same chip revision. I've remade small series of
 tests and couldn't found problem. Both initial probe and hot-plug were
 working fine for Intel SSD and WD Green HDD.
 
 > I had fiddled with the hardware configuration of this box (moved the card
 > into another slot) and the signature changed: "Unexpected signature 0x2c56"
 > 
 > My hack also didn't correct the problem permanently like I had originally
 > thought:
 > 
 > [[ FIRST INSERT ]]
 > (aprobe0:ahcich0:0:0:0): Unexpected signature 0x2c560000, assuming ATA
 > drive.
 > ada1 at ahcich0 bus 0 scbus0 target 0 lun 0
 > ada1: <WDC WD1600JS-75NCB3 10.02E04> ATA-7 SATA 2.x device
 > ada1: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
 > ada1: Command Queueing enabled
 > ada1: 157066MB (321672960 512 byte sectors: 16H 63S/T 16383C)
 
 This may mean that reset sequence was completed prematurely, before
 drive reported signature. What is also looks strange in this output - is
 how last signature value can be bigger then 16 bits, looking on the code:
 	int sign = (done_ccb->ataio.res.lba_high << 8) +
 	    done_ccb->ataio.res.lba_mid;
 
 It is difficult to say something until I can reproduce problem and make
 set of experiments. Unless I can reproduce it locally, it could help if
 you give me an access to the problematic system and help to setup
 reproducible fault.
 
 BTW, you are only speaking about hot-plug problems. Does it work fine
 during boot?
 
 -- 
 Alexander Motin

From: "Bryce Simonds" <bsimonds@veriam.com>
To: "'Alexander Motin'" <mav@FreeBSD.org>
Cc: <bug-followup@FreeBSD.org>
Subject: RE: kern/149580: [ata] [patch] When using an SIIG SATA card the error "Unexpected signature 0xa05f" is reported when a new drive is connected
Date: Mon, 16 Aug 2010 13:49:53 -0500

 I don't mind giving you access to the system, I will need a login and a SSH
 key for me to put into that login for you.  After I receive that I'll give
 you the directions for accessing the system.
 
 The signature is > 16 bits on the one because I had hacked the driver in an
 effort to try and correct the issue on my own.  I can leave that in place on
 the system I can give you access to if you want, the original source file is
 still there for me to go back to pretty quickly.
 
 If I put the drives in at boot it does work fine, however, this is for an
 appliance that will have the drives added and removed quite frequently,
 several times in a day quite possibly on the order of hundreds.  The system
 will ultimately have every last PCIe slot filled with one of these cards
 connected to a hot swapping SATA tray.
 
 If it helps, it is quite possible that it could be because I have an older
 drive.  The WD Green drives are fairly new large drives IIRC.  The drives
 that I'm working with are refurbished/used drives destined for erasure
 before getting resold.
 
 
 -----Original Message-----
 From: Alexander Motin [mailto:mavbsd@gmail.com] On Behalf Of Alexander Motin
 Sent: Monday, August 16, 2010 1:15 PM
 To: Bryce Simonds
 Cc: bug-followup@FreeBSD.org
 Subject: Re: kern/149580: [ata] [patch] When using an SIIG SATA card the
 error "Unexpected signature 0xa05f" is reported when a new drive is
 connected
 
 Bryce Simonds wrote:
 > Sure thing, here it is.
 
 I have board with the same chip revision. I've remade small series of
 tests and couldn't found problem. Both initial probe and hot-plug were
 working fine for Intel SSD and WD Green HDD.
 
 > I had fiddled with the hardware configuration of this box (moved the card
 > into another slot) and the signature changed: "Unexpected signature
 0x2c56"
 > 
 > My hack also didn't correct the problem permanently like I had originally
 > thought:
 > 
 > [[ FIRST INSERT ]]
 > (aprobe0:ahcich0:0:0:0): Unexpected signature 0x2c560000, assuming ATA
 > drive.
 > ada1 at ahcich0 bus 0 scbus0 target 0 lun 0
 > ada1: <WDC WD1600JS-75NCB3 10.02E04> ATA-7 SATA 2.x device
 > ada1: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
 > ada1: Command Queueing enabled
 > ada1: 157066MB (321672960 512 byte sectors: 16H 63S/T 16383C)
 
 This may mean that reset sequence was completed prematurely, before
 drive reported signature. What is also looks strange in this output - is
 how last signature value can be bigger then 16 bits, looking on the code:
 	int sign = (done_ccb->ataio.res.lba_high << 8) +
 	    done_ccb->ataio.res.lba_mid;
 
 It is difficult to say something until I can reproduce problem and make
 set of experiments. Unless I can reproduce it locally, it could help if
 you give me an access to the problematic system and help to setup
 reproducible fault.
 
 BTW, you are only speaking about hot-plug problems. Does it work fine
 during boot?
 
 -- 
 Alexander Motin
 
>Unformatted:
