Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Make the driver try mapping memory first, the tr...
details: https://anonhg.NetBSD.org/src/rev/be566669dfaf
branches: trunk
changeset: 502028:be566669dfaf
user: martin <martin%NetBSD.org@localhost>
date: Wed Jan 10 20:31:49 2001 +0000
description:
Make the driver try mapping memory first, the try io.
diffstat:
sys/dev/pci/i4b_avm_fritz_pci.c | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diffs (37 lines):
diff -r 7087c78c65ac -r be566669dfaf sys/dev/pci/i4b_avm_fritz_pci.c
--- a/sys/dev/pci/i4b_avm_fritz_pci.c Wed Jan 10 19:22:08 2001 +0000
+++ b/sys/dev/pci/i4b_avm_fritz_pci.c Wed Jan 10 20:31:49 2001 +0000
@@ -35,7 +35,7 @@
* Fritz!Card PCI specific routines for isic driver
* ------------------------------------------------
*
- * $Id: i4b_avm_fritz_pci.c,v 1.1.1.1 2001/01/05 12:50:20 martin Exp $
+ * $Id: i4b_avm_fritz_pci.c,v 1.2 2001/01/10 20:31:49 martin Exp $
*
* last edit-date: [Fri Jan 5 11:38:58 2001]
*
@@ -98,7 +98,8 @@
#include <dev/pci/pci_isic.h>
/* PCI config map to use (only one in this driver) */
-#define FRITZPCI_PORT0_MAPOFF PCI_MAPREG_START+4
+#define FRITZPCI_PORT0_IO_MAPOFF PCI_MAPREG_START+4
+#define FRITZPCI_PORT0_MEM_MAPOFF PCI_MAPREG_START
#endif
@@ -811,9 +812,11 @@
sc->sc_num_mappings = 1;
MALLOC_MAPS(sc);
sc->sc_maps[0].size = 0;
- if (pci_mapreg_map(pa, FRITZPCI_PORT0_MAPOFF, PCI_MAPREG_TYPE_IO, 0,
- &sc->sc_maps[0].t, &sc->sc_maps[0].h, NULL, NULL)) {
- printf("%s: can't map i/o space\n", sc->sc_dev.dv_xname);
+ if (pci_mapreg_map(pa, FRITZPCI_PORT0_MEM_MAPOFF, PCI_MAPREG_TYPE_MEM, 0,
+ &sc->sc_maps[0].t, &sc->sc_maps[0].h, NULL, NULL) != 0
+ && pci_mapreg_map(pa, FRITZPCI_PORT0_IO_MAPOFF, PCI_MAPREG_TYPE_IO, 0,
+ &sc->sc_maps[0].t, &sc->sc_maps[0].h, NULL, NULL) != 0) {
+ printf("%s: can't map card\n", sc->sc_dev.dv_xname);
return;
}
Home |
Main Index |
Thread Index |
Old Index