From nobody@FreeBSD.org  Mon Oct 17 20:29:49 2005
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 2FB9316A41F
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 17 Oct 2005 20:29:49 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id F1D4143D46
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 17 Oct 2005 20:29:48 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j9HKTmpX018875
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 17 Oct 2005 20:29:48 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id j9HKTmaS018874;
	Mon, 17 Oct 2005 20:29:48 GMT
	(envelope-from nobody)
Message-Id: <200510172029.j9HKTmaS018874@www.freebsd.org>
Date: Mon, 17 Oct 2005 20:29:48 GMT
From: Jeffrey Doolittle <jdoolittle@kingsquarry.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Loss of SATA support w/SIS 180 RAID controller
X-Send-Pr-Version: www-2.3

>Number:         87585
>Category:       kern
>Synopsis:       [ata] no SATA support w/SIS 180 RAID controller (regression in 6.0)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    sos
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Oct 17 20:30:14 GMT 2005
>Closed-Date:    Wed Jan 04 21:55:29 GMT 2006
>Last-Modified:  Wed Jan 04 21:55:29 GMT 2006
>Originator:     Jeffrey Doolittle
>Release:        6.0-RC1
>Organization:
N/A
>Environment:
FreeBSD mercury.kingsquarry.net 6.0-RC1 FreeBSD 6.0-RC1 #0: Sat Oct 15 13:32:44 EDT 2005     root@mercury.kingsquarry.net:/usr/obj/usr/src/sys/GENERIC  i386

>Description:
         FreeBSD v5.2 - 5.4-STABLE successfully supported the SIS 180
RAID controller (JBOD, RAID-0, & RAID-1).  The current release candidate
does recognize the controller but no longer registers the AR0 device.  I
replaced the RAID-0 configuration with JBOD to use gmirror but learned
the SATA drives aren't even visible.

I've posted three eMail to CURRENT (two with sos on copy) w/o a response
so I've opted to file a bug report.     
>How-To-Repeat:
              Simply install and boot 6.0-RC1 on a ASUS P4R800-V Deluxe
motherboard.
>Fix:
              Unknown
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->sos 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sun Oct 23 18:06:03 GMT 2005 
Responsible-Changed-Why:  
Over to ata maintainer. 

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

Adding to audit trail from misfiled PR kern/88964:

Date: Sun, 13 Nov 2005 16:12:20 -0800
From: Richard Lee <ricky@CSUA.Berkeley.EDU>

 I've run into a similar problem.  On Giga-Byte GA-K8S760M (SIS760/964), only
 the first SATA drive is recognized.  Here's my original posting on -stable:
 
 Before, I was running RELENG_5.4 and was getting:
 
 Nov  5 13:57:51 minawa kernel: atapci0: <SiS 964 UDMA133 controller> port 0xf000-0xf00f,0x376,0x170-0x177,0x3f6,0x1f0-0x1f7 at device 2.5 on pci0
 Nov  5 13:57:51 minawa kernel: ata0: channel #0 on atapci0
 Nov  5 13:57:51 minawa kernel: ata1: channel #1 on atapci0
 Nov  5 13:57:51 minawa kernel: atapci1: <SiS 964 SATA150 controller> port 0xb800-0xb80f,0xb400-0xb403,0xb000-0xb007,0xac00-0xac03,0xa800-0xa807 irq 17 at device 5.0 on pci0
 Nov  5 13:57:51 minawa kernel: ata2: channel #0 on atapci1
 Nov  5 13:57:51 minawa kernel: ata3: channel #1 on atapci1
 Nov  5 13:57:51 minawa kernel: acd0: DVDR <NEC DVD RW ND-3540A/1.6W> at ata0-master UDMA33
 Nov  5 13:57:51 minawa kernel: ad4: 76318MB <ST380817AS/3.42> [155058/16/63] at ata2-master SATA150
 Nov  5 13:57:51 minawa kernel: ad6: 152627MB <ST3160827AS/3.42> [310101/16/63] at ata3-master SATA150
 Nov  5 13:57:51 minawa kernel: cd0 at ata0 bus 0 target 0 lun 0
 
 After the upgrade to 6.0 and RELENG_6, I get:
 
 Nov 13 05:17:14 minawa kernel: atapci0: <SiS 964 UDMA133 controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xf000-0xf00f at device 2.5 on pci0
 Nov 13 05:17:14 minawa kernel: ata0: <ATA channel 0> on atapci0
 Nov 13 05:17:14 minawa kernel: ata1: <ATA channel 1> on atapci0
 Nov 13 05:17:14 minawa kernel: atapci1: <SiS 180 SATA150 controller> port 0xa800-0xa807,0xac00-0xac03,0xb000-0xb007,0xb400-0xb403,0xb800-0xb80f,0xbc00-0xbc7f irq 17 at device 5.0 on pci0
 Nov 13 05:17:14 minawa kernel: ata2: <ATA channel 0> on atapci1
 Nov 13 05:17:14 minawa kernel: ata3: <ATA channel 1> on atapci1
 Nov 13 05:17:14 minawa kernel: acd0: DVDR <NEC DVD RW ND-3540A/1.6W> at ata0-master UDMA33
 Nov 13 05:17:14 minawa kernel: ad4: 76318MB <Seagate ST380817AS 3.42> at ata2-master SATA150
 Nov 13 05:17:14 minawa kernel: cd0 at ata0 bus 0 target 0 lun 0
 
 *** Note ad6 is missing ***
 
 # atacontrol info ata2
 Master:  ad4 <ST380817AS/3.42> Serial ATA v1.0
 Slave:       no device present
 
 # atacontrol info ata3
 Master:      no device present <========= SHOULD BE HERE!
 Slave:       no device present
 
 Even booting off the 6.0R CD-ROM does the same thing (should have checked
 before upgrading, I guess).
 
 --rich

From: =?ISO-8859-1?Q?S=F8ren_Schmidt?= <sos@deepcore.dk>
To: bug-followup@FreeBSD.org, jdoolittle@kingsquarry.net
Cc:  
Subject: Re: kern/87585: [ata] no SATA support w/SIS 180 RAID controller (regression
 in 6.0)
Date: Thu, 24 Nov 2005 20:36:11 +0100

 OK, just got a SiS based board so I can actually test the code in 
 question. There is a bug in how the SATA regs are addressed, thats fixed 
 by the below patch. The SiS RAID metadata was newer supported, but now 
 that I have a system handy that might change as well.
 
 
 diff -u -r1.126.2.4.2.1 ata-chipset.c
 --- ata-chipset.c       14 Oct 2005 09:34:50 -0000      1.126.2.4.2.1
 +++ ata-chipset.c       24 Nov 2005 18:30:32 -0000
 @@ -3931,17 +3931,18 @@
   {
       struct ata_pci_controller *ctlr = 
 device_get_softc(device_get_parent(dev));     struct ata_channel *ch = 
 device_get_softc(dev);
 +    int offset = ch->unit << ((ctlr->chip->chipid == ATA_SIS182) ? 5 : 6);
 
       /* setup the usual register normal pci style */
       if (ata_pci_allocate(dev))
          return ENXIO;
 
       ch->r_io[ATA_SSTATUS].res = ctlr->r_res2;
 -    ch->r_io[ATA_SSTATUS].offset = (ch->unit << 4);
 +    ch->r_io[ATA_SSTATUS].offset = 0x00 + offset;
       ch->r_io[ATA_SERROR].res = ctlr->r_res2;
 -    ch->r_io[ATA_SERROR].offset = 0x04 + (ch->unit << 4);
 +    ch->r_io[ATA_SERROR].offset = 0x04 + offset;
       ch->r_io[ATA_SCONTROL].res = ctlr->r_res2;
 -    ch->r_io[ATA_SCONTROL].offset = 0x08 + (ch->unit << 4);
 +    ch->r_io[ATA_SCONTROL].offset = 0x08 + offset;
       ch->flags |= ATA_NO_SLAVE;
 
       /* XXX SOS PHY hotplug handling missing in SiS chip ?? */
 
 
State-Changed-From-To: open->closed 
State-Changed-By: sos 
State-Changed-When: Wed Jan 4 21:54:17 UTC 2006 
State-Changed-Why:  
SiS support is fixed and support for SiS metadata implemented in -current, 
MFC to RELENG_6 soon. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=87585 
>Unformatted:
