summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_ep_pci.c
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1996-11-28 23:28:18 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1996-11-28 23:28:18 +0000
commit1c7998136960f5cd78adc56dff1c8f9352da3445 (patch)
tree6b334b57971c98fdbe305b8359ae1097b753f699 /sys/dev/pci/if_ep_pci.c
parent1044779b3ae9b633aece0922893e08ff6efc74c0 (diff)
Adaption to new bus.h from NetBSD. Various driver has been updated to
NetBSD 961107 state. Other has not, partly because sometimes the bus.h changes was coupled with other changes.
Diffstat (limited to 'sys/dev/pci/if_ep_pci.c')
-rw-r--r--sys/dev/pci/if_ep_pci.c45
1 files changed, 22 insertions, 23 deletions
diff --git a/sys/dev/pci/if_ep_pci.c b/sys/dev/pci/if_ep_pci.c
index 15bee326225..6a205592233 100644
--- a/sys/dev/pci/if_ep_pci.c
+++ b/sys/dev/pci/if_ep_pci.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ep_pci.c,v 1.7 1996/05/13 00:03:15 mycroft Exp $ */
+/* $NetBSD: if_ep_pci.c,v 1.13 1996/10/21 22:56:38 thorpej Exp $ */
/*
* Copyright (c) 1994 Herb Peyerl <hpeyerl@beer.org>
@@ -60,7 +60,7 @@
#endif
#include <machine/cpu.h>
-#include <machine/bus.old.h>
+#include <machine/bus.h>
#include <machine/intr.h>
#include <dev/ic/elink3var.h>
@@ -96,13 +96,13 @@ ep_pci_match(parent, match, aux)
switch (PCI_PRODUCT(pa->pa_id)) {
case PCI_PRODUCT_3COM_3C590:
- case PCI_PRODUCT_3COM_3C595:
- case PCI_PRODUCT_3COM_3C595T:
- case PCI_PRODUCT_3COM_3C595TM:
- case PCI_PRODUCT_3COM_3C900:
- case PCI_PRODUCT_3COM_3C900T:
- case PCI_PRODUCT_3COM_3C905:
- case PCI_PRODUCT_3COM_3C905T:
+ case PCI_PRODUCT_3COM_3C595MII:
+ case PCI_PRODUCT_3COM_3C595T4:
+ case PCI_PRODUCT_3COM_3C595TX:
+ case PCI_PRODUCT_3COM_3C900COMBO:
+ case PCI_PRODUCT_3COM_3C900TPO:
+ case PCI_PRODUCT_3COM_3C905T4:
+ case PCI_PRODUCT_3COM_3C905TX:
break;
default:
return 0;
@@ -119,9 +119,9 @@ ep_pci_attach(parent, self, aux)
struct ep_softc *sc = (void *)self;
struct pci_attach_args *pa = aux;
pci_chipset_tag_t pc = pa->pa_pc;
- bus_chipset_tag_t bc = pa->pa_bc;
- bus_io_addr_t iobase;
- bus_io_size_t iosize;
+ bus_space_tag_t iot = pa->pa_iot;
+ bus_addr_t iobase;
+ bus_size_t iosize;
pci_intr_handle_t ih;
u_short conn = 0;
pcireg_t i;
@@ -133,12 +133,12 @@ ep_pci_attach(parent, self, aux)
return;
}
- if (bus_io_map(bc, iobase, iosize, &sc->sc_ioh)) {
+ if (bus_space_map(iot, iobase, iosize, 0, &sc->sc_ioh)) {
printf(": can't map i/o space\n");
return;
}
- sc->sc_bc = bc;
+ sc->sc_iot = iot;
sc->bustype = EP_BUS_PCI;
i = pci_conf_read(pc, pa->pa_tag, PCI_CONN);
@@ -160,21 +160,22 @@ ep_pci_attach(parent, self, aux)
case PCI_PRODUCT_3COM_3C590:
model = "3Com 3C590 Ethernet";
break;
- case PCI_PRODUCT_3COM_3C595:
- case PCI_PRODUCT_3COM_3C595T:
- case PCI_PRODUCT_3COM_3C595TM:
+ case PCI_PRODUCT_3COM_3C595MII:
+ case PCI_PRODUCT_3COM_3C595T4:
+ case PCI_PRODUCT_3COM_3C595TX:
model = "3Com 3C595 Ethernet";
break;
- case PCI_PRODUCT_3COM_3C900:
- case PCI_PRODUCT_3COM_3C900T:
+ case PCI_PRODUCT_3COM_3C900COMBO:
+ case PCI_PRODUCT_3COM_3C900TPO:
model = "3Com 3C900 Ethernet";
break;
- case PCI_PRODUCT_3COM_3C905:
- case PCI_PRODUCT_3COM_3C905T:
+ case PCI_PRODUCT_3COM_3C905T4:
+ case PCI_PRODUCT_3COM_3C905TX:
model = "3Com 3C905 Ethernet";
break;
default:
model = "unknown model!";
+ break;
}
printf(": <%s> ", model);
@@ -204,6 +205,4 @@ ep_pci_attach(parent, self, aux)
return;
}
printf("%s: interrupting at %s\n", sc->sc_dev.dv_xname, intrstr);
-
- epstop(sc);
}