From nobody@FreeBSD.org  Sat Sep 23 22:15:18 2006
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 348D016A403
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 23 Sep 2006 22:15:18 +0000 (UTC)
	(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 03EBE43D55
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 23 Sep 2006 22:15:18 +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 k8NMFHcT030883
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 23 Sep 2006 22:15:17 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id k8NMFHSH030882;
	Sat, 23 Sep 2006 22:15:17 GMT
	(envelope-from nobody)
Message-Id: <200609232215.k8NMFHSH030882@www.freebsd.org>
Date: Sat, 23 Sep 2006 22:15:17 GMT
From: Sven Petai <hadara@bsd.ee>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [ata] [patch] support for ALI 5288
X-Send-Pr-Version: www-2.3

>Number:         103534
>Category:       kern
>Synopsis:       [ata] [patch] support for ALI 5288
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    sos
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Sep 23 22:20:11 GMT 2006
>Closed-Date:    Mon Sep 25 11:27:20 GMT 2006
>Last-Modified:  Mon Sep 25 11:27:20 GMT 2006
>Originator:     Sven Petai
>Release:        current (23.09.2006)
>Organization:
NPO BSD Estonia
>Environment:
FreeBSD  7.0-CURRENT FreeBSD 7.0-CURRENT #33: Sat Sep 23 22:19:06 EEST 2006     root@:/usr/obj/usr/src/sys/DEPRESSION64  amd64
>Description:
ALI (ULI) 5288 ata chipset is not supported, machine will not find any disks
when IDE type is set to RAID (the default) or AHCI in the BIOS. It will find
the disks in UDMA33 mode when non-RAID type is selected from BIOS.

With the above patch disks are recognized as SATA 150 capable devices in all
3 BIOS modes.

PS. this chip can be found on ASROCK 939SLI32-eSATA2 motherboard.
>How-To-Repeat:

>Fix:
--- sys-orig/dev/ata/ata-chipset.c      Sat Sep 23 19:09:32 2006
+++ sys/dev/ata/ata-chipset.c   Sat Sep 23 22:42:58 2006
@@ -950,6 +950,7 @@
     struct ata_chip_id *idx;
     static struct ata_chip_id ids[] =
     {{ ATA_ALI_5289, 0x00, 2, ALISATA, ATA_SA150, "M5289" },
+     { ATA_ALI_5288, 0x00, 4, ALISATA, ATA_SA300, "M5288" },
      { ATA_ALI_5287, 0x00, 4, ALISATA, ATA_SA150, "M5287" },
      { ATA_ALI_5281, 0x00, 2, ALISATA, ATA_SA150, "M5281" },
      { ATA_ALI_5229, 0xc5, 0, ALINEW,  ATA_UDMA6, "M5229" },
@@ -984,6 +985,12 @@
        ctlr->channels = ctlr->chip->cfg1;
        ctlr->allocate = ata_ali_sata_allocate;
        ctlr->setmode = ata_sata_setmode;
+       ctlr->r_type2 = SYS_RES_MEMORY;
+       ctlr->r_rid2 = PCIR_BAR(5);
+
+        if ((ctlr->r_res2 = bus_alloc_resource_any(dev, ctlr->r_type2,
+                                                    &ctlr->r_rid2, RF_ACTIVE)))
+            return ata_ahci_chipinit(dev);

        /* enable PCI interrupt */
        pci_write_config(dev, PCIR_COMMAND,

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->sos 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sat Sep 23 22:55:30 UTC 2006 
Responsible-Changed-Why:  
Over to maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=103534 
State-Changed-From-To: open->closed 
State-Changed-By: sos 
State-Changed-When: Mon Sep 25 11:27:03 UTC 2006 
State-Changed-Why:  
Patch committed, thanks!! 


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