summaryrefslogtreecommitdiff
path: root/sys/dev/ep/if_ep_pccard.c
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2003-10-25 04:09:49 +0000
committerWarner Losh <imp@FreeBSD.org>2003-10-25 04:09:49 +0000
commitc365ed47e43d10a1b3a3ea971e77a5b8ac06a438 (patch)
tree306fb7c20a7cc6e221f64a629bd2a576a92cad01 /sys/dev/ep/if_ep_pccard.c
parente0eeb660879abd21c06ffd8d3be1c62cb85cb2f8 (diff)
downloadsrc-test2-c365ed47e43d10a1b3a3ea971e77a5b8ac06a438.tar.gz
src-test2-c365ed47e43d10a1b3a3ea971e77a5b8ac06a438.zip
Notes
Diffstat (limited to 'sys/dev/ep/if_ep_pccard.c')
-rw-r--r--sys/dev/ep/if_ep_pccard.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/sys/dev/ep/if_ep_pccard.c b/sys/dev/ep/if_ep_pccard.c
index 623ace736180..67efa1b2c6ed 100644
--- a/sys/dev/ep/if_ep_pccard.c
+++ b/sys/dev/ep/if_ep_pccard.c
@@ -207,26 +207,26 @@ ep_pccard_attach(device_t dev)
/* ROM size = 0, ROM base = 0 */
/* For now, ignore AUTO SELECT feature of 3C589B and later. */
- EP_WRITE_2(sc, EP_W0_ADDRESS_CFG, result & 0xc000);
+ CSR_WRITE_2(sc, EP_W0_ADDRESS_CFG, result & 0xc000);
/* Fake IRQ must be 3 */
- EP_WRITE_2(sc, EP_W0_RESOURCE_CFG, (sc->epb.res_cfg & 0x0fff) | 0x3000);
+ CSR_WRITE_2(sc, EP_W0_RESOURCE_CFG, (sc->epb.res_cfg & 0x0fff) | 0x3000);
- EP_WRITE_2(sc, EP_W0_PRODUCT_ID, sc->epb.prod_id);
+ CSR_WRITE_2(sc, EP_W0_PRODUCT_ID, sc->epb.prod_id);
if (sc->epb.mii_trans) {
/*
* turn on the MII transciever
*/
GO_WINDOW(3);
- EP_WRITE_2(sc, EP_W3_OPTIONS, 0x8040);
+ CSR_WRITE_2(sc, EP_W3_OPTIONS, 0x8040);
DELAY(1000);
- EP_WRITE_2(sc, EP_W3_OPTIONS, 0xc040);
- EP_WRITE_2(sc, EP_COMMAND, RX_RESET);
- EP_WRITE_2(sc, EP_COMMAND, TX_RESET);
- while (EP_READ_2(sc, EP_STATUS) & S_COMMAND_IN_PROGRESS);
+ CSR_WRITE_2(sc, EP_W3_OPTIONS, 0xc040);
+ CSR_WRITE_2(sc, EP_COMMAND, RX_RESET);
+ CSR_WRITE_2(sc, EP_COMMAND, TX_RESET);
+ EP_BUSY_WAIT;
DELAY(1000);
- EP_WRITE_2(sc, EP_W3_OPTIONS, 0x8040);
+ CSR_WRITE_2(sc, EP_W3_OPTIONS, 0x8040);
} else
ep_get_media(sc);
@@ -234,7 +234,7 @@ ep_pccard_attach(device_t dev)
device_printf(dev, "ep_attach() failed! (%d)\n", error);
goto bad;
}
- if ((error = bus_setup_intr(dev, sc->irq, INTR_TYPE_NET, ep_intr,
+ if ((error = bus_setup_intr(dev, sc->irq, INTR_TYPE_NET | INTR_MPSAFE, ep_intr,
sc, &sc->ep_intrhand))) {
device_printf(dev, "bus_setup_intr() failed! (%d)\n", error);
goto bad;