Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-6]: src/sys/dev/pci Pull up revision 1.11 (requested by thorpej...
details: https://anonhg.NetBSD.org/src/rev/f997766413f6
branches: netbsd-1-6
changeset: 529566:f997766413f6
user: he <he%NetBSD.org@localhost>
date: Sat Nov 30 13:57:46 2002 +0000
description:
Pull up revision 1.11 (requested by thorpej in ticket #767):
Add support for memory-mapped PCnet-PCI chips.
diffstat:
sys/dev/pci/if_pcn.c | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
diffs (48 lines):
diff -r f7dcc30503f8 -r f997766413f6 sys/dev/pci/if_pcn.c
--- a/sys/dev/pci/if_pcn.c Sat Nov 30 13:54:34 2002 +0000
+++ b/sys/dev/pci/if_pcn.c Sat Nov 30 13:57:46 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_pcn.c,v 1.9.4.2 2002/10/23 07:09:15 lukem Exp $ */
+/* $NetBSD: if_pcn.c,v 1.9.4.3 2002/11/30 13:57:46 he Exp $ */
/*
* Copyright (c) 2001 Wasabi Systems, Inc.
@@ -65,7 +65,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_pcn.c,v 1.9.4.2 2002/10/23 07:09:15 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_pcn.c,v 1.9.4.3 2002/11/30 13:57:46 he Exp $");
#include "bpfilter.h"
@@ -542,10 +542,10 @@
pci_chipset_tag_t pc = pa->pa_pc;
pci_intr_handle_t ih;
const char *intrstr = NULL;
- bus_space_tag_t iot;
- bus_space_handle_t ioh;
+ bus_space_tag_t iot, memt;
+ bus_space_handle_t ioh, memh;
bus_dma_segment_t seg;
- int ioh_valid;
+ int ioh_valid, memh_valid;
int i, rseg, error;
pcireg_t pmode;
uint32_t chipid, reg;
@@ -561,8 +561,14 @@
*/
ioh_valid = (pci_mapreg_map(pa, PCN_PCI_CBIO, PCI_MAPREG_TYPE_IO, 0,
&iot, &ioh, NULL, NULL) == 0);
+ memh_valid = (pci_mapreg_map(pa, PCN_PCI_CBMEM,
+ PCI_MAPREG_TYPE_MEM|PCI_MAPREG_MEM_TYPE_32BIT, 0,
+ &memt, &memh, NULL, NULL) == 0);
- if (ioh_valid) {
+ if (memh_valid) {
+ sc->sc_st = memt;
+ sc->sc_sh = memh;
+ } else if (ioh_valid) {
sc->sc_st = iot;
sc->sc_sh = ioh;
} else {
Home |
Main Index |
Thread Index |
Old Index