Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci To disable a channel we need to clear bit 2 or 3...



details:   https://anonhg.NetBSD.org/src/rev/7df288587abe
branches:  trunk
changeset: 583451:7df288587abe
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Sun Aug 07 10:12:39 2005 +0000

description:
To disable a channel we need to clear bit 2 or 3, not all other bits but
bit 2 or 3. Thanks to Takeshi Nakayama for catching it.
(With this mistake the code was still working for the first channel, because
the reset of the second channel would disable/enable the first one).

diffstat:

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

diffs (27 lines):

diff -r 39be79c77837 -r 7df288587abe sys/dev/pci/aceride.c
--- a/sys/dev/pci/aceride.c     Sun Aug 07 09:38:45 2005 +0000
+++ b/sys/dev/pci/aceride.c     Sun Aug 07 10:12:39 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: aceride.c,v 1.17 2005/08/06 22:25:32 bouyer Exp $      */
+/*     $NetBSD: aceride.c,v 1.18 2005/08/07 10:12:39 bouyer Exp $      */
 
 /*
  * Copyright (c) 1999, 2000, 2001 Manuel Bouyer.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: aceride.c,v 1.17 2005/08/06 22:25:32 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: aceride.c,v 1.18 2005/08/07 10:12:39 bouyer Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -220,7 +220,7 @@
        reg = pciide_pci_read(acer_sc->pcib_pa.pa_pc, acer_sc->pcib_pa.pa_tag,
            ACER_PCIB_CTRL);
        pciide_pci_write(acer_sc->pcib_pa.pa_pc, acer_sc->pcib_pa.pa_tag,
-           ACER_PCIB_CTRL, reg & ACER_PCIB_CTRL_ENCHAN(chp->ch_channel));
+           ACER_PCIB_CTRL, reg & ~ACER_PCIB_CTRL_ENCHAN(chp->ch_channel));
        delay(1000);
        pciide_pci_write(acer_sc->pcib_pa.pa_pc, acer_sc->pcib_pa.pa_tag,
            ACER_PCIB_CTRL, reg);



Home | Main Index | Thread Index | Old Index