Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src/sys/dev/pci Pull up revision 1.105 (requested by bouyer):
details: https://anonhg.NetBSD.org/src/rev/73803f7f2541
branches: netbsd-1-5
changeset: 490647:73803f7f2541
user: he <he%NetBSD.org@localhost>
date: Sun Feb 04 18:55:05 2001 +0000
description:
Pull up revision 1.105 (requested by bouyer):
Fix bug which affects pciide controllers in native mode. Main
effect was a non-functionnal IDE controller on some sparc64 and
macppc when booted from IDE disk.
diffstat:
sys/dev/pci/pciide.c | 17 +++++++++++++++--
1 files changed, 15 insertions(+), 2 deletions(-)
diffs (36 lines):
diff -r 22d6a58f678c -r 73803f7f2541 sys/dev/pci/pciide.c
--- a/sys/dev/pci/pciide.c Sun Feb 04 18:54:48 2001 +0000
+++ b/sys/dev/pci/pciide.c Sun Feb 04 18:55:05 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pciide.c,v 1.68.2.18 2001/02/04 18:52:41 he Exp $ */
+/* $NetBSD: pciide.c,v 1.68.2.19 2001/02/04 18:55:05 he Exp $ */
/*
@@ -668,12 +668,25 @@
if (pci_mapreg_map(pa, PCIIDE_REG_CTL_BASE(wdc_cp->channel),
PCI_MAPREG_TYPE_IO, 0,
- &wdc_cp->ctl_iot, &wdc_cp->ctl_ioh, NULL, ctlsizep) != 0) {
+ &wdc_cp->ctl_iot, &cp->ctl_baseioh, NULL, ctlsizep) != 0) {
printf("%s: couldn't map %s channel ctl regs\n",
sc->sc_wdcdev.sc_dev.dv_xname, cp->name);
bus_space_unmap(wdc_cp->cmd_iot, wdc_cp->cmd_ioh, *cmdsizep);
return 0;
}
+ /*
+ * In native mode, 4 bytes of I/O space are mapped for the control
+ * register, the control register is at offset 2. Pass the generic
+ * code a handle for only one byte at the rigth offset.
+ */
+ if (bus_space_subregion(wdc_cp->ctl_iot, cp->ctl_baseioh, 2, 1,
+ &wdc_cp->ctl_ioh) != 0) {
+ printf("%s: unable to subregion %s channel ctl regs\n",
+ sc->sc_wdcdev.sc_dev.dv_xname, cp->name);
+ bus_space_unmap(wdc_cp->cmd_iot, wdc_cp->cmd_ioh, *cmdsizep);
+ bus_space_unmap(wdc_cp->cmd_iot, cp->ctl_baseioh, *ctlsizep);
+ return 0;
+ }
return (1);
}
Home |
Main Index |
Thread Index |
Old Index