Lines Matching refs:pHub
149 struct usb_hub *pHub = (struct usb_hub *)urb->pContext; in ms_hub_irq() local
166 if ((++pHub->nerrors < 10) || pHub->error) in ms_hub_irq()
168 pHub->error = urb->s32Status; in ms_hub_irq()
174 pHub->nerrors = 0; in ms_hub_irq()
177 if (!pHub->disconnected && ms_is_empty_list(&pHub->event_list)) in ms_hub_irq()
180 ms_insert_list_after(&pHub->event_list, hcd->phub_event); // new, link to the right hcd in ms_hub_irq()
182 …ms_usbhost_debug("%s:%s >>> Add HUB EVENT!\n", hcd->product_desc, interface_to_usbdev(pHub->intf)-… in ms_hub_irq()
187 if ((status = ms_usb_submit_urb (pHub->urb, GFP_ATOMIC)) != 0 in ms_hub_irq()
444 struct usb_hub *pHub = (struct usb_hub*) ms_usb_get_intfdata (intf); in ms_hub_disconnect() local
447 if (!pHub) in ms_hub_disconnect()
452 if (!ms_is_empty_list(&pHub->event_list)) in ms_hub_disconnect()
454 ms_list_remove(&pHub->event_list); in ms_hub_disconnect()
455 ms_list_init(&pHub->event_list); in ms_hub_disconnect()
459 pHub->disconnected = 1; in ms_hub_disconnect()
463 pHub->error = 0; in ms_hub_disconnect()
468 if (pHub->urb) in ms_hub_disconnect()
470 ms_usbhost_debug("hub_disconnect: unlink urb %p\n", pHub->urb); in ms_hub_disconnect()
472 ms_usb_free_urb(pHub->urb); in ms_hub_disconnect()
473 pHub->urb = NULL; in ms_hub_disconnect()
476 if (pHub->buffer) in ms_hub_disconnect()
479 sizeof(*pHub->buffer), pHub->buffer, pHub->buffer_dma); in ms_hub_disconnect()
480 pHub->buffer = NULL; in ms_hub_disconnect()
483 kfree(pHub); in ms_hub_disconnect()
499 struct usb_hub *pHub; in ms_hub_probe() local
538 pHub = (struct usb_hub*) kmalloc(sizeof(*pHub), GFP_KERNEL); in ms_hub_probe()
539 if (!pHub) in ms_hub_probe()
545 memset(pHub, 0, sizeof(*pHub)); in ms_hub_probe()
547 ms_list_init(&pHub->event_list); in ms_hub_probe()
548 pHub->intf = pIntf; in ms_hub_probe()
555 ms_usb_set_intfdata (pIntf, pHub); in ms_hub_probe()
557 if (ms_hub_configure(pHub, pEndpoint) >= 0) in ms_hub_probe()
897 struct usb_device *pHub = interface_to_usbdev(hubstate->intf); in ms_hub_port_connect_change() local
900 struct usb_hcd *pHcd = (struct usb_hcd*) pHub->bus->hcpriv; in ms_hub_port_connect_change()
912 if (pHub->parent == NULL) in ms_hub_port_connect_change()
928 if (pHub->children[port]) in ms_hub_port_connect_change()
929 ms_usb_disconnect(&pHub->children[port]); in ms_hub_port_connect_change()
934 ms_hub_port_disable(pHub, port); in ms_hub_port_connect_change()
936 else if (pHub->parent == NULL) // limited at roothub in ms_hub_port_connect_change()
941 if (ms_hub_port_debounce(pHub, port)) in ms_hub_port_connect_change()
945 ms_hub_port_disable(pHub, port); in ms_hub_port_connect_change()
949 if (!pHub->parent) in ms_hub_port_connect_change()
959 pUdev = ms_usb_alloc_dev(pHub, pHub->bus); in ms_hub_port_connect_change()
965 pHub->children[port] = pUdev; in ms_hub_port_connect_change()
970 if ( (pHub->parent == NULL) && (pHcd->isBadDevice) ) in ms_hub_port_connect_change()
977 if (pHub->parent == NULL && (pHcd->isBadDeviceRH == TRUE)) in ms_hub_port_connect_change()
983 if (ms_hub_port_reset(pHub, port, pUdev, u32Delay)) { in ms_hub_port_connect_change()
989 if (pHub->parent == NULL) in ms_hub_port_connect_change()
1003 pUdev->level = pHub->level + 1; in ms_hub_port_connect_change()
1007 if (pHub->tt) { in ms_hub_port_connect_change()
1008 pUdev->tt = pHub->tt; in ms_hub_port_connect_change()
1009 pUdev->u32TTPort = pHub->u32TTPort; in ms_hub_port_connect_change()
1013 && (pHub->parent == NULL || pHub->eSpeed == USB_HIGH_SPEED)) { in ms_hub_port_connect_change()
1034 if (!(sErr = ms_usb_new_device(pUdev, &pHub->dev))) in ms_hub_port_connect_change()
1038 ms_hub_port_disable(pHub, port); // patch from Linux code in ms_hub_port_connect_change()
1060 if (i >= HUB_PROBE_TRIES && pHub->parent == NULL) // 3 reset retries in ms_hub_port_connect_change()
1065 pHub->children[port] = NULL; in ms_hub_port_connect_change()
1066 ms_hub_port_disable(pHub, port); in ms_hub_port_connect_change()