diff options
author | Marcus Glocker <mglocker@cvs.openbsd.org> | 2007-02-25 17:03:09 +0000 |
---|---|---|
committer | Marcus Glocker <mglocker@cvs.openbsd.org> | 2007-02-25 17:03:09 +0000 |
commit | f9a1ab22b8694cf0fcb58ba8cd115d4e062024c4 (patch) | |
tree | 6fc335746bfee144caeadecb6e891eb64b825f8d /sys | |
parent | ea84a3edc5fb3ee3e98b5be0871225a310751681 (diff) |
Power on/off cardbus socket at attach/detach time. Makes firmware upload
work on my BCM4318 cardbus device now.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/cardbus/if_bcw_cardbus.c | 4 | ||||
-rw-r--r-- | sys/dev/ic/bcw.c | 14 |
2 files changed, 13 insertions, 5 deletions
diff --git a/sys/dev/cardbus/if_bcw_cardbus.c b/sys/dev/cardbus/if_bcw_cardbus.c index 91d5c089c1e..19c8cee71a4 100644 --- a/sys/dev/cardbus/if_bcw_cardbus.c +++ b/sys/dev/cardbus/if_bcw_cardbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bcw_cardbus.c,v 1.7 2007/02/25 10:06:04 mglocker Exp $ */ +/* $OpenBSD: if_bcw_cardbus.c,v 1.8 2007/02/25 17:03:08 mglocker Exp $ */ /* * Copyright (c) 2006 Jon Simola <jsimola@gmail.com> @@ -146,7 +146,7 @@ bcw_cardbus_attach(struct device *parent, struct device *self, void *aux) #endif bcw_attach(sc); - Cardbus_function_disable(ct); + //Cardbus_function_disable(ct); } int diff --git a/sys/dev/ic/bcw.c b/sys/dev/ic/bcw.c index dd558eb5dc5..31a14521ff4 100644 --- a/sys/dev/ic/bcw.c +++ b/sys/dev/ic/bcw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bcw.c,v 1.58 2007/02/25 09:59:18 mglocker Exp $ */ +/* $OpenBSD: bcw.c,v 1.59 2007/02/25 17:03:08 mglocker Exp $ */ /* * Copyright (c) 2006 Jon Simola <jsimola@gmail.com> @@ -685,14 +685,18 @@ bcw_attach(struct bcw_softc *sc) int error; int i; uint32_t sbval; -// uint16_t sbval16; + //uint16_t sbval16; uint32_t core_id, core_rev, core_vendor; + /* power on cardbus socket */ + if (sc->sc_enable) + sc->sc_enable(sc); + /* * Don't reset the chip here, we can only reset each core and we * haven't identified the cores yet. */ -// bcw_reset(sc); + //bcw_reset(sc); /* * Attach to the Backplane and start the card up @@ -2228,6 +2232,10 @@ bcw_detach(void *arg) bcw_free_rx_ring(sc, &sc->sc_rxring); bcw_free_tx_ring(sc, &sc->sc_txring); + /* power off cardbus socket */ + if (sc->sc_disable) + sc->sc_disable(sc); + return (0); } |