diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2007-04-18 07:13:12 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2007-04-18 07:13:12 +0000 |
commit | ba19d9d094f5c9efac0f74c4615572b9acb17af7 (patch) | |
tree | f25887cd45969d9affd532b4654b648130475108 /sys/dev | |
parent | 0afd8e7d8b66f4659f215abf10eff899b31c6db7 (diff) |
reset the port before establishing the interrupt handler during attach
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/if_tht.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/dev/pci/if_tht.c b/sys/dev/pci/if_tht.c index 68257451f40..620d4e7846f 100644 --- a/sys/dev/pci/if_tht.c +++ b/sys/dev/pci/if_tht.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_tht.c,v 1.22 2007/04/18 07:00:11 dlg Exp $ */ +/* $OpenBSD: if_tht.c,v 1.23 2007/04/18 07:13:11 dlg Exp $ */ /* * Copyright (c) 2007 David Gwynne <dlg@openbsd.org> @@ -441,6 +441,12 @@ tht_attach(struct device *parent, struct device *self, void *aux) return; } + if (tht_sw_reset(sc) != 0) { + printf(": unable to reset port\n"); + /* bus_space(9) says we dont have to free subregions */ + return; + } + sc->sc_ih = pci_intr_establish(taa->taa_pa->pa_pc, taa->taa_ih, IPL_NET, tht_intr, sc, DEVNAME(sc)); if (sc->sc_ih == NULL) { |