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 Pullup rev 1.195 (requested by bouyer in ti...



details:   https://anonhg.NetBSD.org/src/rev/30cc84844731
branches:  netbsd-1-6
changeset: 531189:30cc84844731
user:      jmc <jmc%NetBSD.org@localhost>
date:      Sun Mar 28 08:17:13 2004 +0000

description:
Pullup rev 1.195 (requested by bouyer in ticket #1630)

Correct offset for the promise "magic registers" (it depends on channel number).
This makes cable detect work properly for newer promise (pdc268 and newer).

diffstat:

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

diffs (37 lines):

diff -r 0a259216a257 -r 30cc84844731 sys/dev/pci/pciide.c
--- a/sys/dev/pci/pciide.c      Sun Mar 28 08:14:27 2004 +0000
+++ b/sys/dev/pci/pciide.c      Sun Mar 28 08:17:13 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pciide.c,v 1.153.2.14 2003/08/16 15:58:24 tron Exp $   */
+/*     $NetBSD: pciide.c,v 1.153.2.15 2004/03/28 08:17:13 jmc Exp $    */
 
 
 /*
@@ -76,7 +76,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pciide.c,v 1.153.2.14 2003/08/16 15:58:24 tron Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pciide.c,v 1.153.2.15 2004/03/28 08:17:13 jmc Exp $");
 
 #ifndef WDCDEBUG
 #define WDCDEBUG
@@ -4124,14 +4124,14 @@
 
        /* I don't know what this is for, FreeBSD does it ... */
        bus_space_write_1(sc->sc_dma_iot, sc->sc_dma_ioh,
-           IDEDMA_CMD + 0x1, 0x0b);
+           IDEDMA_CMD + 0x1 + IDEDMA_SCH_OFFSET * chp->channel, 0x0b);
 
        /*
-        * I don't know what this is for; FreeBSD checks this ... this is not
-        * cable type detect.
+        * cable type detect, from FreeBSD
         */
        u100 = (bus_space_read_1(sc->sc_dma_iot, sc->sc_dma_ioh,
-           IDEDMA_CMD + 0x3) & 0x04) ? 0 : 1;
+           IDEDMA_CMD + 0x3 + IDEDMA_SCH_OFFSET * chp->channel) & 0x04) ?
+           0 : 1;
 
        for (drive = 0; drive < 2; drive++) {
                drvp = &chp->ch_drive[drive];



Home | Main Index | Thread Index | Old Index