• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/drivers/usb/core/

Lines Matching defs:hdev

36 	struct usb_device	*hdev;
131 /* Note that hdev or one of its children must be locked! */
132 static inline struct usb_hub *hdev_to_hub(struct usb_device *hdev)
134 return usb_get_intfdata(hdev->actconfig->interface[0]);
138 static int get_hub_descriptor(struct usb_device *hdev, void *data, int size)
143 ret = usb_control_msg(hdev, usb_rcvctrlpipe(hdev, 0),
156 static int clear_hub_feature(struct usb_device *hdev, int feature)
158 return usb_control_msg(hdev, usb_sndctrlpipe(hdev, 0),
165 static int clear_port_feature(struct usb_device *hdev, int port1, int feature)
167 return usb_control_msg(hdev, usb_sndctrlpipe(hdev, 0),
175 static int set_port_feature(struct usb_device *hdev, int port1, int feature)
177 return usb_control_msg(hdev, usb_sndctrlpipe(hdev, 0),
192 int status = set_port_feature(hub->hdev, (selector << 8) | port1,
214 struct usb_device *hdev = hub->hdev;
219 if (hdev->state != USB_STATE_CONFIGURED || hub->quiescing)
287 static int get_hub_status(struct usb_device *hdev,
293 status = usb_control_msg(hdev, usb_rcvctrlpipe(hdev, 0),
303 static int get_port_status(struct usb_device *hdev, int port1,
309 status = usb_control_msg(hdev, usb_rcvctrlpipe(hdev, 0),
331 void usb_kick_khubd(struct usb_device *hdev)
333 kick_khubd(hdev_to_hub(hdev));
385 hub_clear_tt_buffer (struct usb_device *hdev, u16 devinfo, u16 tt)
387 return usb_control_msg(hdev, usb_rcvctrlpipe(hdev, 0),
408 struct usb_device *hdev = hub->hdev;
417 status = hub_clear_tt_buffer (hdev, clear->devinfo, clear->tt);
421 dev_err (&hdev->dev,
493 set_port_feature(hub->hdev, port1, USB_PORT_FEAT_POWER);
536 ret = get_hub_status(hub->hdev, &hub->status->hub);
551 struct usb_device *hdev = hub->hdev;
554 if (hdev->children[port1-1] && set_state) {
555 usb_set_device_state(hdev->children[port1-1],
558 ret = clear_port_feature(hdev, port1, USB_PORT_FEAT_ENABLE);
571 struct usb_device *hdev = hub->hdev;
574 for (port1 = 1; port1 <= hdev->maxchild; ++port1) {
575 if (hdev->children[port1 - 1]) {
576 usb_disconnect(&hdev->children[port1 - 1]);
597 struct usb_device *hdev = hub->hdev;
605 hub->buffer = usb_buffer_alloc(hdev, sizeof(*hub->buffer), GFP_KERNEL,
632 ret = get_hub_descriptor(hdev, hub->descriptor,
643 hdev->maxchild = hub->descriptor->bNbrPorts;
644 dev_info (hub_dev, "%d port%s detected\n", hdev->maxchild,
645 (hdev->maxchild == 1) ? "" : "s");
653 for (i = 0; i < hdev->maxchild; i++)
657 portstr[hdev->maxchild] = 0;
691 switch (hdev->descriptor.bDeviceProtocol) {
696 hub->tt.hub = hdev;
699 ret = usb_set_interface(hdev, 0, 1);
706 hub->tt.hub = hdev;
710 hdev->descriptor.bDeviceProtocol);
717 if (hdev->descriptor.bDeviceProtocol != 0) {
756 ret = usb_get_status(hdev, USB_RECIP_DEVICE, 0, &hubstatus);
762 if (hdev == hdev->bus->root_hub) {
763 if (hdev->bus_mA == 0 || hdev->bus_mA >= 500)
766 hub->mA_per_port = hdev->bus_mA;
773 if (hdev->maxchild > 0) {
774 int remaining = hdev->bus_mA -
777 if (remaining < hdev->maxchild * 100)
797 if (hdev->actconfig->desc.bmAttributes & USB_CONFIG_ATT_SELFPOWER)
812 pipe = usb_rcvintpipe(hdev, endpoint->bEndpointAddress);
813 maxp = usb_maxpacket(hdev, pipe, usb_pipeout(pipe));
825 usb_fill_int_urb(hub->urb, hdev, pipe, *hub->buffer, maxp, hub_irq,
850 struct usb_device *hdev;
857 hdev = hub->hdev;
859 if (hdev->speed == USB_SPEED_HIGH)
876 usb_buffer_free(hdev, sizeof(*hub->buffer), hub->buffer,
888 struct usb_device *hdev;
892 hdev = interface_to_usbdev(intf);
895 if (hdev->parent) {
931 hub->hdev = hdev;
937 if (hdev->speed == USB_SPEED_HIGH)
950 struct usb_device *hdev = interface_to_usbdev (intf);
959 if (hdev->devnum <= 0)
962 info->nports = hdev->maxchild;
964 if (hdev->children[i] == NULL)
968 hdev->children[i]->devnum;
990 struct usb_device *hdev;
996 hdev = udev->parent;
997 if (!hdev) {
1005 t = locktree(hdev);
1013 usb_unlock_device(hdev);
1021 usb_unlock_device(hdev);
1416 ret = get_port_status(hub->hdev, port1, &hub->status->port);
1436 if (hub->hdev->parent != NULL) /* not a root hub? */
1438 hcd = container_of(hub->hdev->bus, struct usb_hcd, self);
1513 status = set_port_feature(hub->hdev,
1535 clear_port_feature(hub->hdev,
1611 status = set_port_feature(hub->hdev, port1, USB_PORT_FEAT_SUSPEND);
1774 status = clear_port_feature(hub->hdev,
1808 clear_port_feature(hub->hdev, port1,
1820 if (!hub->hdev->parent && !hub->busy_bits[0])
1821 usb_enable_root_hub_irq(hub->hdev->bus);
1910 struct usb_device *hdev = hub->hdev;
1915 for (port1 = 1; port1 <= hdev->maxchild; port1++) {
1918 udev = hdev->children [port1-1];
1927 if (!hdev->auto_pm)
1940 if (!hdev->parent) {
1941 status = hcd_bus_suspend(hdev->bus);
1943 dev_dbg(&hdev->dev, "'global' suspend %d\n", status);
1953 struct usb_device *hdev = hub->hdev;
1959 if (!hdev->parent) {
1960 struct usb_bus *bus = hdev->bus;
2036 clear_port_feature(hub->hdev, port1,
2099 struct usb_device *hdev = hub->hdev;
2108 if (!hdev->parent) {
2110 if (port1 == hdev->bus->otg_port)
2111 hdev->bus->b_hnp_enable = 0;
2177 if (hdev->tt) {
2178 udev->tt = hdev->tt;
2179 udev->ttport = hdev->ttport;
2181 && hdev->speed == USB_SPEED_HIGH) {
2355 struct usb_device *hdev = hub->hdev;
2362 remaining = hdev->bus_mA - hub->descriptor->bHubContrCurrent;
2363 for (port1 = 1; port1 <= hdev->maxchild; ++port1) {
2364 struct usb_device *udev = hdev->children[port1 - 1];
2374 else if (port1 != udev->bus->otg_port || hdev->parent)
2403 struct usb_device *hdev = hub->hdev;
2418 if (hdev->children[port1-1])
2419 usb_disconnect(&hdev->children[port1-1]);
2424 if (hdev->bus->is_b_host)
2445 set_port_feature(hdev, port1, USB_PORT_FEAT_POWER);
2471 udev = usb_alloc_dev(hdev, hdev->bus, port1);
2482 udev->level = hdev->level + 1;
2535 * no one will look at it until hdev is unlocked.
2544 if (hdev->state == USB_STATE_NOTATTACHED)
2547 hdev->children[port1-1] = udev;
2555 hdev->children[port1-1] = NULL;
2586 struct usb_device *hdev;
2616 hdev = hub->hdev;
2621 hdev->state, hub->descriptor
2633 if (locktree(hdev) < 0) {
2641 if (hdev->state == USB_STATE_NOTATTACHED) {
2662 ret = usb_reset_composite_device(hdev, intf);
2687 if (hub->activating && !hdev->children[i-1] &&
2693 clear_port_feature(hdev, i,
2704 clear_port_feature(hdev, i,
2715 && hdev->children[i-1]) {
2726 clear_port_feature(hdev, i,
2728 if (hdev->children[i-1]) {
2729 ret = remote_wakeup(hdev->
2746 clear_port_feature(hdev, i,
2755 clear_port_feature(hdev, i,
2772 clear_hub_feature(hdev, C_HUB_LOCAL_POWER);
2781 clear_hub_feature(hdev, C_HUB_OVER_CURRENT);
2790 if (!hdev->parent && !hub->busy_bits[0])
2791 usb_enable_root_hub_irq(hdev->bus);
2798 usb_unlock_device(hdev);