if_ste.c (149646) | if_ste.c (150213) |
---|---|
1/*- 2 * Copyright (c) 1997, 1998, 1999 3 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 30 * THE POSSIBILITY OF SUCH DAMAGE. 31 */ 32 33#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1997, 1998, 1999 3 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 30 * THE POSSIBILITY OF SUCH DAMAGE. 31 */ 32 33#include <sys/cdefs.h> |
34__FBSDID("$FreeBSD: head/sys/pci/if_ste.c 149646 2005-08-30 20:35:08Z jhb $"); | 34__FBSDID("$FreeBSD: head/sys/pci/if_ste.c 150213 2005-09-16 11:11:51Z ru $"); |
35 36#include <sys/param.h> 37#include <sys/systm.h> 38#include <sys/sockio.h> 39#include <sys/mbuf.h> 40#include <sys/malloc.h> 41#include <sys/kernel.h> 42#include <sys/module.h> --- 1079 unchanged lines hidden (view full) --- 1122 1123 /* Hook interrupt last to avoid having to lock softc */ 1124 error = bus_setup_intr(dev, sc->ste_irq, INTR_TYPE_NET | INTR_MPSAFE, 1125 ste_intr, sc, &sc->ste_intrhand); 1126 1127 if (error) { 1128 device_printf(dev, "couldn't set up irq\n"); 1129 ether_ifdetach(ifp); | 35 36#include <sys/param.h> 37#include <sys/systm.h> 38#include <sys/sockio.h> 39#include <sys/mbuf.h> 40#include <sys/malloc.h> 41#include <sys/kernel.h> 42#include <sys/module.h> --- 1079 unchanged lines hidden (view full) --- 1122 1123 /* Hook interrupt last to avoid having to lock softc */ 1124 error = bus_setup_intr(dev, sc->ste_irq, INTR_TYPE_NET | INTR_MPSAFE, 1125 ste_intr, sc, &sc->ste_intrhand); 1126 1127 if (error) { 1128 device_printf(dev, "couldn't set up irq\n"); 1129 ether_ifdetach(ifp); |
1130 if_free(ifp); | |
1131 goto fail; 1132 } 1133 1134fail: 1135 if (error) 1136 ste_detach(dev); 1137 1138 return(error); --- 19 unchanged lines hidden (view full) --- 1158 1159 /* These should only be active if attach succeeded */ 1160 if (device_is_attached(dev)) { 1161 STE_LOCK(sc); 1162 ste_stop(sc); 1163 STE_UNLOCK(sc); 1164 callout_drain(&sc->ste_stat_callout); 1165 ether_ifdetach(ifp); | 1130 goto fail; 1131 } 1132 1133fail: 1134 if (error) 1135 ste_detach(dev); 1136 1137 return(error); --- 19 unchanged lines hidden (view full) --- 1157 1158 /* These should only be active if attach succeeded */ 1159 if (device_is_attached(dev)) { 1160 STE_LOCK(sc); 1161 ste_stop(sc); 1162 STE_UNLOCK(sc); 1163 callout_drain(&sc->ste_stat_callout); 1164 ether_ifdetach(ifp); |
1166 if_free(ifp); | |
1167 } | 1165 } |
1166 if (ifp) 1167 if_free(ifp); |
|
1168 if (sc->ste_miibus) 1169 device_delete_child(dev, sc->ste_miibus); 1170 bus_generic_detach(dev); 1171 1172 if (sc->ste_intrhand) 1173 bus_teardown_intr(dev, sc->ste_irq, sc->ste_intrhand); 1174 if (sc->ste_irq) 1175 bus_release_resource(dev, SYS_RES_IRQ, 0, sc->ste_irq); --- 559 unchanged lines hidden --- | 1168 if (sc->ste_miibus) 1169 device_delete_child(dev, sc->ste_miibus); 1170 bus_generic_detach(dev); 1171 1172 if (sc->ste_intrhand) 1173 bus_teardown_intr(dev, sc->ste_irq, sc->ste_intrhand); 1174 if (sc->ste_irq) 1175 bus_release_resource(dev, SYS_RES_IRQ, 0, sc->ste_irq); --- 559 unchanged lines hidden --- |