Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-6]: src/sys/dev/pci Pull up revision 1.167 (requested by bouyer...



details:   https://anonhg.NetBSD.org/src/rev/6dbdb1409262
branches:  netbsd-1-6
changeset: 529222:6dbdb1409262
user:      tron <tron%NetBSD.org@localhost>
date:      Fri Nov 01 16:33:33 2002 +0000

description:
Pull up revision 1.167 (requested by bouyer in ticket #727):
Correct setup for Ultra133 capable VIA chipsets, From Matthias Drochner
on current-users, with cross-check and some improvement from linux-2.4.19
and FreeBSD-current.
Also don't set the APO_UDMA_CLK66 bit for Ultra/100 capable chipset, and
support Ultra/133 for the VT8233A.

diffstat:

 sys/dev/pci/pciide.c |  14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diffs (43 lines):

diff -r 68e5283fabfd -r 6dbdb1409262 sys/dev/pci/pciide.c
--- a/sys/dev/pci/pciide.c      Fri Nov 01 16:26:23 2002 +0000
+++ b/sys/dev/pci/pciide.c      Fri Nov 01 16:33:33 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pciide.c,v 1.153.2.7 2002/11/01 16:20:50 tron Exp $    */
+/*     $NetBSD: pciide.c,v 1.153.2.8 2002/11/01 16:33:33 tron Exp $    */
 
 
 /*
@@ -76,7 +76,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pciide.c,v 1.153.2.7 2002/11/01 16:20:50 tron Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pciide.c,v 1.153.2.8 2002/11/01 16:33:33 tron Exp $");
 
 #ifndef WDCDEBUG
 #define WDCDEBUG
@@ -2201,8 +2201,7 @@
                break;
        case PCI_PRODUCT_VIATECH_VT8233A:
                printf("VT8233A ATA133 controller\n");
-               /* XXX use ATA100 untill ATA133 is supported */
-               sc->sc_wdcdev.UDMA_cap = 5;
+               sc->sc_wdcdev.UDMA_cap = 6;
                break;
        default:
                printf("unknown ATA controller\n");
@@ -2303,9 +2302,12 @@
                        drvp->drive_flags &= ~DRIVE_DMA;
                        udmatim_reg |= APO_UDMA_EN(chp->channel, drive) |
                            APO_UDMA_EN_MTH(chp->channel, drive);
-                       if (sc->sc_wdcdev.UDMA_cap == 5) {
+                       if (sc->sc_wdcdev.UDMA_cap == 6) {
+                               /* 8233a */
+                               udmatim_reg |= APO_UDMA_TIME(chp->channel,
+                                   drive, apollo_udma133_tim[drvp->UDMA_mode]);
+                       } else if (sc->sc_wdcdev.UDMA_cap == 5) {
                                /* 686b */
-                               udmatim_reg |= APO_UDMA_CLK66(chp->channel);
                                udmatim_reg |= APO_UDMA_TIME(chp->channel,
                                    drive, apollo_udma100_tim[drvp->UDMA_mode]);
                        } else if (sc->sc_wdcdev.UDMA_cap == 4) {



Home | Main Index | Thread Index | Old Index