diff options
author | dg <dg@FreeBSD.org> | 1996-09-20 04:35:15 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 1996-09-20 04:35:15 +0000 |
commit | 42b84ad67d4ced282a5bdafc180fea54679f15b7 (patch) | |
tree | 9033159f8a597d4ab2e7bf433f62998ca7647241 /sys/dev | |
parent | 5e96772b88c5264a3adc227c624859ac36d68090 (diff) | |
download | FreeBSD-src-42b84ad67d4ced282a5bdafc180fea54679f15b7.zip FreeBSD-src-42b84ad67d4ced282a5bdafc180fea54679f15b7.tar.gz |
Add back shutdown support, this time using the at_shutdown() mechanism.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/de/if_de.c | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/sys/dev/de/if_de.c b/sys/dev/de/if_de.c index 9ed9e52..b1c22be 100644 --- a/sys/dev/de/if_de.c +++ b/sys/dev/de/if_de.c @@ -21,7 +21,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: if_de.c,v 1.50 1996/09/06 23:08:50 phk Exp $ + * $Id: if_de.c,v 1.51 1996/09/18 14:44:31 davidg Exp $ * */ @@ -3886,19 +3886,15 @@ static const int tulip_eisa_irqs[4] = { IRQ5, IRQ9, IRQ10, IRQ11 }; #define TULIP_PCI_ATTACH_ARGS pcici_t config_id, int unit -static int -tulip_pci_shutdown( - int unit, - int force) +static void +tulip_shutdown( + int howto, + void *sc) { - tulip_softc_t * const sc = TULIP_UNIT_TO_SOFTC(unit); - if (sc != NULL) { - TULIP_CSR_WRITE(sc, csr_busmode, TULIP_BUSMODE_SWRESET); - DELAY(10); /* Wait 10 microseconds (actually 50 PCI cycles but at - 33MHz that comes to two microseconds but wait a - bit longer anyways) */ - } - return 0; + TULIP_CSR_WRITE((tulip_softc_t *) sc, csr_busmode, TULIP_BUSMODE_SWRESET); + DELAY(10); /* Wait 10 microseconds (actually 50 PCI cycles but at + 33MHz that comes to two microseconds but wait a + bit longer anyways) */ } static char* @@ -3931,7 +3927,7 @@ struct pci_device dedevice = { tulip_pci_probe, tulip_pci_attach, &tulip_pci_count, - tulip_pci_shutdown, + NULL }; DATA_SET (pcidevice_set, dedevice); @@ -4362,6 +4358,7 @@ tulip_pci_attach( return; } } + at_shutdown(tulip_shutdown, sc, SHUTDOWN_POST_SYNC); #endif #if defined(__bsdi__) if ((sc->tulip_flags & TULIP_SLAVEDINTR) == 0) { |