Lines Matching defs:hcd
192 static void xhci_usb2_hub_descriptor(struct usb_hcd *hcd, struct xhci_hcd *xhci,
247 static void xhci_usb3_hub_descriptor(struct usb_hcd *hcd, struct xhci_hcd *xhci,
280 static void xhci_hub_descriptor(struct usb_hcd *hcd, struct xhci_hcd *xhci,
284 if (hcd->speed >= HCD_USB3)
285 xhci_usb3_hub_descriptor(hcd, xhci, desc);
287 xhci_usb2_hub_descriptor(hcd, xhci, desc);
361 int xhci_find_slot_id_by_port(struct usb_hcd *hcd, struct xhci_hcd *xhci,
373 if (((speed >= USB_SPEED_SUPER) == (hcd->speed >= HCD_USB3))
481 static void xhci_disable_port(struct usb_hcd *hcd, struct xhci_hcd *xhci,
485 if (hcd->speed >= HCD_USB3) {
501 hcd->self.busnum, wIndex + 1, port_status);
555 struct xhci_hub *xhci_get_rhub(struct usb_hcd *hcd)
557 struct xhci_hcd *xhci = hcd_to_xhci(hcd);
559 if (hcd->speed >= HCD_USB3)
569 static void xhci_set_port_power(struct xhci_hcd *xhci, struct usb_hcd *hcd,
577 rhub = xhci_get_rhub(hcd);
582 hcd->self.busnum, index + 1, on ? "ON" : "OFF", temp);
596 temp = usb_acpi_power_manageable(hcd->self.root_hub,
599 usb_acpi_set_power_state(hcd->self.root_hub,
695 port->rhub->hcd->self.busnum, port->hcd_portnum + 1,
827 struct usb_hcd *hcd;
831 hcd = port->rhub->hcd;
833 xhci = hcd_to_xhci(hcd);
858 mod_timer(&hcd->rh_timer, timeout);
859 usb_hcd_start_port_resume(&hcd->self, wIndex);
866 hcd->self.busnum, wIndex + 1);
884 slot_id = xhci_find_slot_id_by_port(hcd, xhci,
895 hcd->self.busnum, wIndex + 1, port_status);
904 usb_hcd_end_port_resume(&hcd->self, wIndex);
933 struct usb_hcd *hcd;
938 xhci = hcd_to_xhci(port->rhub->hcd);
939 hcd = port->rhub->hcd;
970 usb_hcd_end_port_resume(&hcd->self, portnum);
1026 usb_hcd_end_port_resume(&port->rhub->hcd->self, portnum);
1043 static u32 xhci_get_port_status(struct usb_hcd *hcd,
1054 rhub = xhci_get_rhub(hcd);
1080 if (hcd->speed >= HCD_USB3)
1092 int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
1095 struct xhci_hcd *xhci = hcd_to_xhci(hcd);
1111 rhub = xhci_get_rhub(hcd);
1128 if (hcd->speed >= HCD_USB3 &&
1135 xhci_hub_descriptor(hcd, xhci,
1142 if (hcd->speed < HCD_USB3)
1161 status = xhci_get_port_status(hcd, bus_state, wIndex, temp,
1167 hcd->self.busnum, portnum1, temp, status);
1174 if (hcd->speed < HCD_USB31 || wLength != 8) {
1226 hcd->self.busnum, portnum1);
1230 slot_id = xhci_find_slot_id_by_port(hcd, xhci,
1255 hcd->self.busnum, portnum1);
1272 hcd->self.busnum, portnum1);
1304 hcd->self.busnum, portnum1);
1318 hcd->self.busnum, portnum1, link_state);
1353 hcd->self.busnum, portnum1);
1361 slot_id = xhci_find_slot_id_by_port(hcd, xhci,
1391 xhci_set_port_power(xhci, hcd, wIndex, true, &flags);
1399 hcd->self.busnum, portnum1, temp);
1405 hcd->self.busnum, portnum1, temp);
1413 if (hcd->speed < HCD_USB3)
1421 if (hcd->speed < HCD_USB3)
1430 if (hcd->speed != HCD_USB2)
1471 usb_hcd_start_port_resume(&hcd->self, wIndex);
1478 usb_hcd_end_port_resume(&hcd->self, wIndex);
1482 slot_id = xhci_find_slot_id_by_port(hcd, xhci,
1504 xhci_disable_port(hcd, xhci, wIndex,
1508 xhci_set_port_power(xhci, hcd, wIndex, false, &flags);
1534 int xhci_hub_status_data(struct usb_hcd *hcd, char *buf)
1540 struct xhci_hcd *xhci = hcd_to_xhci(hcd);
1547 rhub = xhci_get_rhub(hcd);
1601 clear_bit(HCD_FLAG_POLL_RH, &hcd->flags);
1609 int xhci_bus_suspend(struct usb_hcd *hcd)
1611 struct xhci_hcd *xhci = hcd_to_xhci(hcd);
1620 rhub = xhci_get_rhub(hcd);
1624 wake_enabled = hcd->self.root_hub->do_remote_wakeup;
1654 if ((hcd->speed >= HCD_USB3) && retries-- &&
1660 hcd->self.busnum, port_index + 1);
1679 hcd->self.busnum, port_index + 1);
1698 (hcd->speed < HCD_USB3)) {
1699 if (usb_amd_pt_check_port(hcd->self.controller,
1719 slot_id = xhci_find_slot_id_by_port(hcd, xhci,
1729 hcd->state = HC_STATE_SUSPENDED;
1767 int xhci_bus_resume(struct usb_hcd *hcd)
1769 struct xhci_hcd *xhci = hcd_to_xhci(hcd);
1780 rhub = xhci_get_rhub(hcd);
1789 if (!HCD_HW_ACCESSIBLE(hcd)) {
1800 if (hcd->speed >= HCD_USB3)
1811 (hcd->speed >= HCD_USB3) &&
1814 hcd->self.busnum, port_index + 1);
1841 if (hcd->speed < HCD_USB3) {
1862 hcd->self.busnum, port_index + 1);
1866 slot_id = xhci_find_slot_id_by_port(hcd, xhci, port_index + 1);
1883 unsigned long xhci_get_resuming_ports(struct usb_hcd *hcd)
1885 struct xhci_hub *rhub = xhci_get_rhub(hcd);