Lines Matching refs:usb_dev
451 if (wusb_dev->usb_dev == NULL || !wusb_dev->usb_dev->authenticated)
709 * @usb_dev: referenced
722 static int wusb_dev_bos_grok(struct usb_device *usb_dev,
727 struct device *dev = &usb_dev->dev;
782 * @usb_dev: referenced
793 static int wusb_dev_bos_add(struct usb_device *usb_dev,
797 struct device *dev = &usb_dev->dev;
804 result = usb_get_descriptor(usb_dev, USB_DT_BOS, 0, bos, desc_size);
818 result = usb_get_descriptor(usb_dev, USB_DT_BOS, 0, bos, desc_size);
831 result = wusb_dev_bos_grok(usb_dev, wusb_dev, bos, result);
869 * wusb_dev and the usb_dev. So we note it down in wusb_dev and take a
880 * We have a reference on @usb_dev (as we are called at the end of its
883 * NOTE: @usb_dev locked
885 static void wusb_dev_add_ncb(struct usb_device *usb_dev)
890 struct device *dev = &usb_dev->dev;
893 if (usb_dev->wusb == 0 || usb_dev->devnum == 1)
896 usb_set_device_state(usb_dev, USB_STATE_UNAUTHENTICATED);
898 wusbhc = wusbhc_get_by_usb_dev(usb_dev);
902 wusb_dev = __wusb_dev_get_by_usb_dev(wusbhc, usb_dev);
903 port_idx = wusb_port_no_to_idx(usb_dev->portnum);
907 wusb_dev->usb_dev = usb_get_dev(usb_dev);
908 usb_dev->wusb_dev = wusb_dev_get(wusb_dev);
909 result = wusb_dev_sec_add(wusbhc, usb_dev, wusb_dev);
915 result = wusb_dev_bos_add(usb_dev, wusb_dev);
920 result = wusb_dev_sysfs_add(wusbhc, usb_dev, wusb_dev);
944 * NOTE: @usb_dev locked
946 static void wusb_dev_rm_ncb(struct usb_device *usb_dev)
948 struct wusb_dev *wusb_dev = usb_dev->wusb_dev;
950 if (usb_dev->wusb == 0 || usb_dev->devnum == 1)
956 wusb_dev->usb_dev = NULL;
957 usb_dev->wusb_dev = NULL;
959 usb_put_dev(usb_dev);
968 * USB_DEVICE_{ADD,REMOVE} with the usb_dev locked.
994 * Return a referenced wusb_dev given a @wusbhc and @usb_dev
997 struct usb_device *usb_dev)
1002 port_idx = wusb_port_no_to_idx(usb_dev->portnum);