Subject: Re: CMD 649 pciide interface
To: Ron Roskens <roskens@elfin.net>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: current-users
Date: 11/14/2001 20:55:51
--dDRMvlgZJXvWKvBx
Content-Type: text/plain; charset=us-ascii

On Tue, Nov 13, 2001 at 11:38:05PM -0600, Ron Roskens wrote:
> in src/sys/dev/pci/pciide.c in cmd0643_9_chip_map() there is a check for
> both the 648 and 649 where it sets it to UDMA_cap to 4. Should it
> really be setting this to 5 for the 649 since its UDMA/100 capable?

OK, I just looked at this; it appears that I didn't have the info available
when I commited the cmd64[89] support (I don't really remember, to be honest :)

The attached patch should do it, could you confirm it works OK ?

--
Manuel Bouyer <bouyer@antioche.eu.org>
--

--dDRMvlgZJXvWKvBx
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=diff

Index: pciide.c
===================================================================
RCS file: /cvsroot/syssrc/sys/dev/pci/pciide.c,v
retrieving revision 1.133
diff -u -r1.133 pciide.c
--- pciide.c	2001/10/26 10:38:12	1.133
+++ pciide.c	2001/11/14 19:56:42
@@ -2428,6 +2428,10 @@
 		sc->sc_wdcdev.cap |= WDC_CAPABILITY_DMA | WDC_CAPABILITY_IRQACK;
 		switch (sc->sc_pp->ide_product) {
 		case PCI_PRODUCT_CMDTECH_649:
+			sc->sc_wdcdev.cap |= WDC_CAPABILITY_UDMA;
+			sc->sc_wdcdev.UDMA_cap = 5;
+			sc->sc_wdcdev.irqack = cmd646_9_irqack;
+			break;
 		case PCI_PRODUCT_CMDTECH_648:
 			sc->sc_wdcdev.cap |= WDC_CAPABILITY_UDMA;
 			sc->sc_wdcdev.UDMA_cap = 4;
Index: pciide_cmd_reg.h
===================================================================
RCS file: /cvsroot/syssrc/sys/dev/pci/pciide_cmd_reg.h,v
retrieving revision 1.10
diff -u -r1.10 pciide_cmd_reg.h
--- pciide_cmd_reg.h	2001/10/21 18:49:20	1.10
+++ pciide_cmd_reg.h	2001/11/14 19:56:43
@@ -98,7 +98,7 @@
 #define CMD_UDMATIM_TIM_MASK	0x3
 #define CMD_UDMATIM_TIM_OFF(drive) (4 + ((drive) * 2))
 static const int8_t cmd0646_9_tim_udma[] __attribute__((__unused__)) =
-    {0x03, 0x02, 0x01, 0x02, 0x01};
+    {0x03, 0x02, 0x01, 0x02, 0x01, 0x00};
 
 /*
  * timings values for the 0643/6/8/9

--dDRMvlgZJXvWKvBx--