Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci Ops, I commited the previous change (improved Si...



details:   https://anonhg.NetBSD.org/src/rev/a7062fd2be45
branches:  trunk
changeset: 544245:a7062fd2be45
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Sat Mar 15 12:23:34 2003 +0000

description:
Ops, I commited the previous change (improved SiS support) from thr wrong tree.
Sync with the latest diff I made available, and also include changes from
kern/20710 which is much better than the hack I've done.

diffstat:

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

diffs (69 lines):

diff -r 7427d9df9491 -r a7062fd2be45 sys/dev/pci/pciide.c
--- a/sys/dev/pci/pciide.c      Sat Mar 15 08:44:16 2003 +0000
+++ b/sys/dev/pci/pciide.c      Sat Mar 15 12:23:34 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pciide.c,v 1.182 2003/03/14 22:46:05 bouyer Exp $      */
+/*     $NetBSD: pciide.c,v 1.183 2003/03/15 12:23:34 bouyer Exp $      */
 
 
 /*
@@ -76,7 +76,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pciide.c,v 1.182 2003/03/14 22:46:05 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pciide.c,v 1.183 2003/03/15 12:23:34 bouyer Exp $");
 
 #ifndef WDCDEBUG
 #define WDCDEBUG
@@ -3232,8 +3232,8 @@
 
        if (pciide_chipen(sc, pa) == 0)
                return;
-       printf("Silicon Integrated System ");
-       pci_find_device(pa, sis_hostbr_match);
+       printf(": Silicon Integrated System ");
+       pci_find_device(NULL, sis_hostbr_match);
        if (sis_hostbr_type_match) {
                if (sis_hostbr_type_match->type == SIS_TYPE_SOUTH) {
                        pciide_pci_write(sc->sc_pc, sc->sc_tag, SIS_REG_57,
@@ -3247,7 +3247,7 @@
                                sc->sc_wdcdev.UDMA_cap =
                                    sis_hostbr_type_match->udma_mode;
                        } else {
-                               if (pci_find_device(pa, sis_south_match)) {
+                               if (pci_find_device(NULL, sis_south_match)) {
                                        sc->sis_type = SIS_TYPE_133OLD;
                                        sc->sc_wdcdev.UDMA_cap =
                                            sis_hostbr_type_match->udma_mode;
@@ -3258,19 +3258,19 @@
                                }
                        }
                } else {
-                       printf(sis_hostbr_type_match->name);
                        sc->sis_type = sis_hostbr_type_match->type;
                        sc->sc_wdcdev.UDMA_cap =
                            sis_hostbr_type_match->udma_mode;
                }
+               printf(sis_hostbr_type_match->name);
        } else {
                printf("5597/5598");
-               sc->sis_type = 0;
                if (rev >= 0xd0) {
-                       sc->sc_wdcdev.cap |= WDC_CAPABILITY_UDMA;
                        sc->sc_wdcdev.UDMA_cap = 2;
+                       sc->sis_type = SIS_TYPE_66;
                } else {
                        sc->sc_wdcdev.UDMA_cap = 0;
+                       sc->sis_type = SIS_TYPE_NOUDMA;
                }
        }
        printf(" IDE controller (rev. 0x%02x)\n", PCI_REVISION(pa->pa_class));
@@ -3487,6 +3487,7 @@
                }
                idedma_ctl |= IDEDMA_CTL_DRV_DMA(drive);
 pio:           switch (sc->sis_type) {
+               case SIS_TYPE_NOUDMA:
                case SIS_TYPE_66:
                case SIS_TYPE_100OLD:
                        sis_tim |= sis_pio_act[drvp->PIO_mode] <<



Home | Main Index | Thread Index | Old Index