示例#1
0
static void brcmf_cancel_all_urbs(struct brcmf_usbdev_info *devinfo)
{
	if (devinfo->ctl_urb)
		usb_kill_urb(devinfo->ctl_urb);
	if (devinfo->bulk_urb)
		usb_kill_urb(devinfo->bulk_urb);
	brcmf_usb_free_q(&devinfo->tx_postq, true);
	brcmf_usb_free_q(&devinfo->rx_postq, true);
}
示例#2
0
static void brcmf_usb_detach(struct brcmf_usbdev_info *devinfo)
{
	brcmf_dbg(USB, "Enter, devinfo %p\n", devinfo);

	/* free the URBS */
	brcmf_usb_free_q(&devinfo->rx_freeq, false);
	brcmf_usb_free_q(&devinfo->tx_freeq, false);

	usb_free_urb(devinfo->ctl_urb);
	usb_free_urb(devinfo->bulk_urb);

	kfree(devinfo->tx_reqs);
	kfree(devinfo->rx_reqs);
}
示例#3
0
文件: usb.c 项目: grate-driver/linux
static void brcmf_usb_detach(struct brcmf_usbdev_info *devinfo)
{
	brcmf_dbg(USB, "Enter, devinfo %p\n", devinfo);

	/* free the URBS */
	brcmf_usb_free_q(&devinfo->rx_freeq);
	brcmf_usb_free_q(&devinfo->tx_freeq);

	usb_free_urb(devinfo->ctl_urb);
	usb_free_urb(devinfo->bulk_urb);

	kfree(devinfo->tx_reqs);
	kfree(devinfo->rx_reqs);

	if (devinfo->settings)
		brcmf_release_module_param(devinfo->settings);
}
示例#4
0
文件: usb.c 项目: serrvius/huawei-p6
static void brcmf_usb_detach(const struct brcmf_usbdev *bus_pub)
{
    struct brcmf_usbdev_info *devinfo =
        (struct brcmf_usbdev_info *)bus_pub;

    brcmf_dbg(TRACE, "devinfo %p\n", devinfo);

    /* store the image globally */
    g_image.data = devinfo->image;
    g_image.len = devinfo->image_len;

    /* free the URBS */
    brcmf_usb_free_q(&devinfo->rx_freeq, false);
    brcmf_usb_free_q(&devinfo->tx_freeq, false);

    usb_free_urb(devinfo->intr_urb);
    usb_free_urb(devinfo->ctl_urb);
    usb_free_urb(devinfo->bulk_urb);

    kfree(devinfo->tx_reqs);
    kfree(devinfo->rx_reqs);
    kfree(devinfo);
}
示例#5
0
文件: usb.c 项目: serrvius/huawei-p6
static void brcmf_usb_down(struct device *dev)
{
    struct brcmf_usbdev_info *devinfo = brcmf_usb_get_businfo(dev);

    if (devinfo == NULL)
        return;

    brcmf_dbg(TRACE, "enter\n");
    if (devinfo->bus_pub.state == BCMFMAC_USB_STATE_DOWN)
        return;

    brcmf_usb_state_change(devinfo, BCMFMAC_USB_STATE_DOWN);
    if (devinfo->intr_urb)
        usb_kill_urb(devinfo->intr_urb);

    if (devinfo->ctl_urb)
        usb_kill_urb(devinfo->ctl_urb);

    if (devinfo->bulk_urb)
        usb_kill_urb(devinfo->bulk_urb);
    brcmf_usb_free_q(&devinfo->tx_postq, true);

    brcmf_usb_free_q(&devinfo->rx_postq, true);
}