Subject: kern/17509: Support for Promise PDC20276 IDE Controller
To: None <gnats-bugs@gnats.netbsd.org>
From: None <stephen@degler.net>
List: netbsd-bugs
Date: 07/07/2002 15:19:52
>Number:         17509
>Category:       kern
>Synopsis:       Support for Promise PDC20276 IDE Controller
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jul 07 12:20:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Stephen Degler
>Release:        NetBSD 1.6B
>Organization:
	very little, at best
>Environment:
	
	
System: NetBSD bauhaus.degler.net 1.6B NetBSD 1.6B (BAUHAUS-$Revision: 1.500 $) #0: Thu Jul 4 10:15:31 EDT 2002 sdegler@bauhaus.degler.net:/vol1/NetBSD/kernels/BAUHAUS i386
Architecture: i386
Machine: i386
>Description:
	
	The patch included gets me booted on a PDC20276
	My drive is only ATA100 so I did not get to check ATA133, but
	I believe it should work as well.
	I did this on a MSI KT3 Ultra ARU motherboard, and am ignoring the
	"Raid" features.

>How-To-Repeat:
	apply patch. make kernel. reboot.
	
>Fix:
	
Index: pciide.c
===================================================================
RCS file: /cvsroot/syssrc/sys/dev/pci/pciide.c,v
retrieving revision 1.158
diff -u -r1.158 pciide.c
--- pciide.c	2002/06/10 08:41:11	1.158
+++ pciide.c	2002/07/07 19:09:57
@@ -458,6 +458,11 @@
 	  "Promise Ultra133/ATA Bus Master IDE Accelerator",
 	  pdc202xx_chip_map,
 	},
+	{ PCI_PRODUCT_PROMISE_PDC20276,
+	  IDE_PCI_CLASS_OVERRIDE,
+	  "Promise Ultra133/ATA Bus Master IDE Controller",
+	  pdc202xx_chip_map,
+	},
 	{ 0,
 	  0,
 	  NULL,
@@ -3482,17 +3487,21 @@
 	(sc)->sc_pp->ide_product == PCI_PRODUCT_PROMISE_ULTRA100X ||	\
 	(sc)->sc_pp->ide_product == PCI_PRODUCT_PROMISE_ULTRA100TX2 ||	\
 	(sc)->sc_pp->ide_product == PCI_PRODUCT_PROMISE_ULTRA100TX2v2 || \
-	(sc)->sc_pp->ide_product == PCI_PRODUCT_PROMISE_ULTRA133)
+	(sc)->sc_pp->ide_product == PCI_PRODUCT_PROMISE_ULTRA133 || \
+	(sc)->sc_pp->ide_product == PCI_PRODUCT_PROMISE_PDC20276)
+
 #define PDC_IS_265(sc)							\
 	((sc)->sc_pp->ide_product == PCI_PRODUCT_PROMISE_ULTRA100 ||	\
 	(sc)->sc_pp->ide_product == PCI_PRODUCT_PROMISE_ULTRA100X ||	\
 	(sc)->sc_pp->ide_product == PCI_PRODUCT_PROMISE_ULTRA100TX2 ||	\
 	(sc)->sc_pp->ide_product == PCI_PRODUCT_PROMISE_ULTRA100TX2v2 || \
-	(sc)->sc_pp->ide_product == PCI_PRODUCT_PROMISE_ULTRA133)
+	(sc)->sc_pp->ide_product == PCI_PRODUCT_PROMISE_ULTRA133 || \
+	(sc)->sc_pp->ide_product == PCI_PRODUCT_PROMISE_PDC20276)
 #define PDC_IS_268(sc)							\
 	((sc)->sc_pp->ide_product == PCI_PRODUCT_PROMISE_ULTRA100TX2 ||	\
 	(sc)->sc_pp->ide_product == PCI_PRODUCT_PROMISE_ULTRA100TX2v2 || \
-	(sc)->sc_pp->ide_product == PCI_PRODUCT_PROMISE_ULTRA133)
+	(sc)->sc_pp->ide_product == PCI_PRODUCT_PROMISE_ULTRA133 || \
+	(sc)->sc_pp->ide_product == PCI_PRODUCT_PROMISE_PDC20276)
 
 void
 pdc202xx_chip_map(sc, pa)
Index: pcidevs
===================================================================
RCS file: /cvsroot/syssrc/sys/dev/pci/pcidevs,v
retrieving revision 1.449
diff -u -r1.449 pcidevs
--- pcidevs	2002/07/05 13:59:14	1.449
+++ pcidevs	2002/07/07 19:10:00
@@ -1751,6 +1751,7 @@
 product PROMISE ULTRA100TX2 0x4d68 Ultra100TX2/ATA Bus Master IDE Accelerator
 product PROMISE ULTRA100TX2v2 0x6268 Ultra100TX2v2/ATA Bus Master IDE Accelerator
 product PROMISE ULTRA133 0x4d69 Ultra133/ATA Bus Master IDE Accelerator
+product PROMISE PDC20276 0x5275 Ultra133/ATA Bus Master IDE Controller
 
 /* QLogic products */
 product QLOGIC ISP1020	0x1020	ISP1020
>Release-Note:
>Audit-Trail:
>Unformatted: