summaryrefslogtreecommitdiffstats
path: root/sys/pci
diff options
context:
space:
mode:
authorn_hibma <n_hibma@FreeBSD.org>1999-04-11 14:24:20 +0000
committern_hibma <n_hibma@FreeBSD.org>1999-04-11 14:24:20 +0000
commit60e587adbf6cb4331239ca869243579660028500 (patch)
tree5a44c3551da8331e85fa40e34469c714c0df44a4 /sys/pci
parentd209accdca188fe6dfaba7d2c03891afdafcb6b9 (diff)
downloadFreeBSD-src-60e587adbf6cb4331239ca869243579660028500.zip
FreeBSD-src-60e587adbf6cb4331239ca869243579660028500.tar.gz
Changed pci_config_read() to pci_map_port(). Pointed out by Doug Rabson.
Diffstat (limited to 'sys/pci')
-rw-r--r--sys/pci/uhci_pci.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/pci/uhci_pci.c b/sys/pci/uhci_pci.c
index 501945c..6ed3cee 100644
--- a/sys/pci/uhci_pci.c
+++ b/sys/pci/uhci_pci.c
@@ -1,4 +1,4 @@
-/* FreeBSD $Id: uhci_pci.c,v 1.3 1999/03/27 23:08:43 n_hibma Exp $ */
+/* FreeBSD $Id: uhci_pci.c,v 1.4 1999/04/06 23:09:58 n_hibma Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -141,7 +141,10 @@ uhci_pci_attach(pcici_t config_id, int unit)
}
memset(sc, 0, sizeof(uhci_softc_t));
- sc->sc_iobase = pci_conf_read(config_id, PCI_UHCI_BASE_REG) & 0xffe0;
+ if ( !pci_map_port(config_id, PCI_UHCI_BASE_REG, &sc->sc_iobase) ) {
+ printf("uhci%d: could not map port\n", unit);
+ return;
+ }
if ( !pci_map_int(config_id, (pci_inthand_t *)uhci_intr,
(void *) sc, &bio_imask)) {
OpenPOWER on IntegriCloud