Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci bus_space_unmap() ctl_baseioh instead of ctl_ioh...



details:   https://anonhg.NetBSD.org/src/rev/a7b83949f112
branches:  trunk
changeset: 525650:a7b83949f112
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Sun Apr 14 16:55:08 2002 +0000

description:
bus_space_unmap() ctl_baseioh instead of ctl_ioh for the native case.
Pointed out by enami, and should fix kern/16307.

diffstat:

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

diffs (33 lines):

diff -r e010127b1b4a -r a7b83949f112 sys/dev/pci/pciide.c
--- a/sys/dev/pci/pciide.c      Sun Apr 14 14:40:13 2002 +0000
+++ b/sys/dev/pci/pciide.c      Sun Apr 14 16:55:08 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pciide.c,v 1.149 2002/04/12 18:02:04 mycroft Exp $     */
+/*     $NetBSD: pciide.c,v 1.150 2002/04/14 16:55:08 bouyer Exp $      */
 
 
 /*
@@ -77,7 +77,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pciide.c,v 1.149 2002/04/12 18:02:04 mycroft Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pciide.c,v 1.150 2002/04/14 16:55:08 bouyer Exp $");
 
 #ifndef WDCDEBUG
 #define WDCDEBUG
@@ -1426,8 +1426,12 @@
                        cp->hw_ok = 0;
                        bus_space_unmap(cp->wdc_channel.cmd_iot,
                            cp->wdc_channel.cmd_ioh, cmdsize);
-                       bus_space_unmap(cp->wdc_channel.ctl_iot,
-                           cp->wdc_channel.ctl_ioh, ctlsize);
+                       if (interface & PCIIDE_INTERFACE_PCI(channel))
+                               bus_space_unmap(cp->wdc_channel.ctl_iot,
+                                   cp->ctl_baseioh, ctlsize);
+                       else
+                               bus_space_unmap(cp->wdc_channel.ctl_iot,
+                                   cp->wdc_channel.ctl_ioh, ctlsize);
                } else {
                        pciide_map_compat_intr(pa, cp, channel, interface);
                }



Home | Main Index | Thread Index | Old Index