if_ndis_usb.c (189719) | if_ndis_usb.c (189950) |
---|---|
1/*- 2 * Copyright (c) 2005 3 * Bill Paul <wpaul@windriver.com>. 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) 2005 3 * Bill Paul <wpaul@windriver.com>. 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/dev/if_ndis/if_ndis_usb.c 189719 2009-03-12 02:51:55Z weongyo $"); | 34__FBSDID("$FreeBSD: head/sys/dev/if_ndis/if_ndis_usb.c 189950 2009-03-18 02:38:35Z weongyo $"); |
35 36#include <sys/param.h> 37#include <sys/systm.h> 38#include <sys/sockio.h> 39#include <sys/module.h> 40#include <sys/malloc.h> 41#include <sys/kernel.h> 42#include <sys/socket.h> --- 162 unchanged lines hidden (view full) --- 205 int i; 206 struct ndis_softc *sc = device_get_softc(self); 207 struct ndisusb_ep *ne;; 208 209 sc->ndisusb_status |= NDISUSB_STATUS_DETACH; 210 211 ndis_pnpevent_nic(self, NDIS_PNP_EVENT_SURPRISE_REMOVED); 212 | 35 36#include <sys/param.h> 37#include <sys/systm.h> 38#include <sys/sockio.h> 39#include <sys/module.h> 40#include <sys/malloc.h> 41#include <sys/kernel.h> 42#include <sys/socket.h> --- 162 unchanged lines hidden (view full) --- 205 int i; 206 struct ndis_softc *sc = device_get_softc(self); 207 struct ndisusb_ep *ne;; 208 209 sc->ndisusb_status |= NDISUSB_STATUS_DETACH; 210 211 ndis_pnpevent_nic(self, NDIS_PNP_EVENT_SURPRISE_REMOVED); 212 |
213 if (sc->ndisusb_status & NDISUSB_STATUS_SETUP_EP) { 214 usb2_transfer_unsetup(sc->ndisusb_dread_ep.ne_xfer, 1); 215 usb2_transfer_unsetup(sc->ndisusb_dwrite_ep.ne_xfer, 1); 216 } |
|
213 for (i = 0; i < NDISUSB_ENDPT_MAX; i++) { 214 ne = &sc->ndisusb_ep[i]; 215 usb2_transfer_unsetup(ne->ne_xfer, 1); 216 } 217 218 (void)ndis_detach(self); 219 220 mtx_destroy(&sc->ndisusb_mtx); 221 return (0); 222} 223 224static struct resource_list * 225ndis_get_resource_list(device_t dev, device_t child) 226{ 227 struct ndis_softc *sc; 228 229 sc = device_get_softc(dev); 230 return (BUS_GET_RESOURCE_LIST(device_get_parent(sc->ndis_dev), dev)); 231} | 217 for (i = 0; i < NDISUSB_ENDPT_MAX; i++) { 218 ne = &sc->ndisusb_ep[i]; 219 usb2_transfer_unsetup(ne->ne_xfer, 1); 220 } 221 222 (void)ndis_detach(self); 223 224 mtx_destroy(&sc->ndisusb_mtx); 225 return (0); 226} 227 228static struct resource_list * 229ndis_get_resource_list(device_t dev, device_t child) 230{ 231 struct ndis_softc *sc; 232 233 sc = device_get_softc(dev); 234 return (BUS_GET_RESOURCE_LIST(device_get_parent(sc->ndis_dev), dev)); 235} |