Lines Matching refs:hcd
178 static void xhci_usb2_hub_descriptor(struct usb_hcd *hcd, struct xhci_hcd *xhci, in xhci_usb2_hub_descriptor() argument
231 static void xhci_usb3_hub_descriptor(struct usb_hcd *hcd, struct xhci_hcd *xhci, in xhci_usb3_hub_descriptor() argument
261 static void xhci_hub_descriptor(struct usb_hcd *hcd, struct xhci_hcd *xhci, in xhci_hub_descriptor() argument
265 if (hcd->speed >= HCD_USB3) in xhci_hub_descriptor()
266 xhci_usb3_hub_descriptor(hcd, xhci, desc); in xhci_hub_descriptor()
268 xhci_usb2_hub_descriptor(hcd, xhci, desc); in xhci_hub_descriptor()
342 int xhci_find_slot_id_by_port(struct usb_hcd *hcd, struct xhci_hcd *xhci, in xhci_find_slot_id_by_port() argument
354 if (((speed >= USB_SPEED_SUPER) == (hcd->speed >= HCD_USB3)) in xhci_find_slot_id_by_port()
439 static void xhci_disable_port(struct usb_hcd *hcd, struct xhci_hcd *xhci, in xhci_disable_port() argument
443 if (hcd->speed >= HCD_USB3) { in xhci_disable_port()
506 static int xhci_get_ports(struct usb_hcd *hcd, __le32 __iomem ***port_array) in xhci_get_ports() argument
509 struct xhci_hcd *xhci = hcd_to_xhci(hcd); in xhci_get_ports()
511 if (hcd->speed >= HCD_USB3) { in xhci_get_ports()
688 static u32 xhci_get_port_status(struct usb_hcd *hcd, in xhci_get_port_status() argument
696 struct xhci_hcd *xhci = hcd_to_xhci(hcd); in xhci_get_port_status()
710 if (hcd->speed >= HCD_USB3) { in xhci_get_port_status()
726 if (hcd->speed < HCD_USB3) { in xhci_get_port_status()
755 mod_timer(&hcd->rh_timer, timeout); in xhci_get_port_status()
779 slot_id = xhci_find_slot_id_by_port(hcd, in xhci_get_port_status()
824 if (hcd->speed < HCD_USB3) in xhci_get_port_status()
841 if (hcd->speed >= HCD_USB3) in xhci_get_port_status()
847 if (hcd->speed >= HCD_USB3) { in xhci_get_port_status()
863 int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, in xhci_hub_control() argument
866 struct xhci_hcd *xhci = hcd_to_xhci(hcd); in xhci_hub_control()
878 max_ports = xhci_get_ports(hcd, &port_array); in xhci_hub_control()
879 bus_state = &xhci->bus_state[hcd_index(hcd)]; in xhci_hub_control()
892 if (hcd->speed >= HCD_USB3 && in xhci_hub_control()
899 xhci_hub_descriptor(hcd, xhci, in xhci_hub_control()
906 if (hcd->speed < HCD_USB3) in xhci_hub_control()
921 status = xhci_get_port_status(hcd, bus_state, port_array, in xhci_hub_control()
935 if (hcd->speed < HCD_USB31 || wLength != 8) { in xhci_hub_control()
986 slot_id = xhci_find_slot_id_by_port(hcd, xhci, in xhci_hub_control()
1045 slot_id = xhci_find_slot_id_by_port(hcd, xhci, in xhci_hub_control()
1081 temp = usb_acpi_power_manageable(hcd->self.root_hub, in xhci_hub_control()
1084 usb_acpi_set_power_state(hcd->self.root_hub, in xhci_hub_control()
1110 if (hcd->speed < HCD_USB3) in xhci_hub_control()
1118 if (hcd->speed < HCD_USB3) in xhci_hub_control()
1165 slot_id = xhci_find_slot_id_by_port(hcd, xhci, in xhci_hub_control()
1186 xhci_disable_port(hcd, xhci, wIndex, in xhci_hub_control()
1193 temp = usb_acpi_power_manageable(hcd->self.root_hub, in xhci_hub_control()
1196 usb_acpi_set_power_state(hcd->self.root_hub, in xhci_hub_control()
1221 int xhci_hub_status_data(struct usb_hcd *hcd, char *buf) in xhci_hub_status_data() argument
1227 struct xhci_hcd *xhci = hcd_to_xhci(hcd); in xhci_hub_status_data()
1233 max_ports = xhci_get_ports(hcd, &port_array); in xhci_hub_status_data()
1234 bus_state = &xhci->bus_state[hcd_index(hcd)]; in xhci_hub_status_data()
1268 clear_bit(HCD_FLAG_POLL_RH, &hcd->flags); in xhci_hub_status_data()
1276 int xhci_bus_suspend(struct usb_hcd *hcd) in xhci_bus_suspend() argument
1278 struct xhci_hcd *xhci = hcd_to_xhci(hcd); in xhci_bus_suspend()
1284 max_ports = xhci_get_ports(hcd, &port_array); in xhci_bus_suspend()
1285 bus_state = &xhci->bus_state[hcd_index(hcd)]; in xhci_bus_suspend()
1289 if (hcd->self.root_hub->do_remote_wakeup) { in xhci_bus_suspend()
1310 slot_id = xhci_find_slot_id_by_port(hcd, xhci, in xhci_bus_suspend()
1325 if (hcd->self.root_hub->do_remote_wakeup) { in xhci_bus_suspend()
1340 hcd->state = HC_STATE_SUSPENDED; in xhci_bus_suspend()
1346 int xhci_bus_resume(struct usb_hcd *hcd) in xhci_bus_resume() argument
1348 struct xhci_hcd *xhci = hcd_to_xhci(hcd); in xhci_bus_resume()
1359 max_ports = xhci_get_ports(hcd, &port_array); in xhci_bus_resume()
1360 bus_state = &xhci->bus_state[hcd_index(hcd)]; in xhci_bus_resume()
1366 if (!HCD_HW_ACCESSIBLE(hcd)) { in xhci_bus_resume()
1425 slot_id = xhci_find_slot_id_by_port(hcd, xhci, port_index + 1); in xhci_bus_resume()