Lines Matching refs:bus_state
934 struct xhci_bus_state *bus_state; in xhci_handle_usb2_port_link_resume() local
940 bus_state = &port->rhub->bus_state; in xhci_handle_usb2_port_link_resume()
950 if (test_bit(wIndex, &bus_state->resuming_ports)) { in xhci_handle_usb2_port_link_resume()
964 set_bit(wIndex, &bus_state->resuming_ports); in xhci_handle_usb2_port_link_resume()
977 clear_bit(wIndex, &bus_state->resuming_ports); in xhci_handle_usb2_port_link_resume()
1011 bus_state->port_c_suspend |= 1 << wIndex; in xhci_handle_usb2_port_link_resume()
1012 bus_state->suspended_ports &= ~(1 << wIndex); in xhci_handle_usb2_port_link_resume()
1037 struct xhci_bus_state *bus_state; in xhci_get_usb3_port_status() local
1043 bus_state = &port->rhub->bus_state; in xhci_get_usb3_port_status()
1074 if (bus_state->port_remote_wakeup & (1 << portnum)) { in xhci_get_usb3_port_status()
1075 bus_state->port_remote_wakeup &= ~(1 << portnum); in xhci_get_usb3_port_status()
1078 bus_state->suspended_ports &= ~(1 << portnum); in xhci_get_usb3_port_status()
1088 struct xhci_bus_state *bus_state; in xhci_get_usb2_port_status() local
1093 bus_state = &port->rhub->bus_state; in xhci_get_usb2_port_status()
1107 if (bus_state->suspended_ports & (1 << portnum)) { in xhci_get_usb2_port_status()
1108 bus_state->suspended_ports &= ~(1 << portnum); in xhci_get_usb2_port_status()
1109 bus_state->port_c_suspend |= 1 << portnum; in xhci_get_usb2_port_status()
1129 test_bit(portnum, &bus_state->resuming_ports)) { in xhci_get_usb2_port_status()
1131 clear_bit(portnum, &bus_state->resuming_ports); in xhci_get_usb2_port_status()
1135 bus_state->suspended_ports &= ~(1 << portnum); in xhci_get_usb2_port_status()
1150 struct xhci_bus_state *bus_state, in xhci_get_port_status() argument
1192 if (bus_state->port_c_suspend & (1 << wIndex)) in xhci_get_port_status()
1206 struct xhci_bus_state *bus_state; in xhci_hub_control() local
1219 bus_state = &rhub->bus_state; in xhci_hub_control()
1266 status = xhci_get_port_status(hcd, bus_state, wIndex, temp, in xhci_hub_control()
1351 bus_state->suspended_ports |= 1 << wIndex; in xhci_hub_control()
1482 bus_state->suspended_ports |= 1 << wIndex; in xhci_hub_control()
1571 set_bit(wIndex, &bus_state->resuming_ports); in xhci_hub_control()
1578 clear_bit(wIndex, &bus_state->resuming_ports); in xhci_hub_control()
1581 bus_state->port_c_suspend |= 1 << wIndex; in xhci_hub_control()
1590 bus_state->port_c_suspend &= ~(1 << wIndex); in xhci_hub_control()
1641 struct xhci_bus_state *bus_state; in xhci_hub_status_data() local
1649 bus_state = &rhub->bus_state; in xhci_hub_status_data()
1661 status = bus_state->resuming_ports; in xhci_hub_status_data()
1687 (bus_state->port_c_suspend & 1 << i) || in xhci_hub_status_data()
1713 struct xhci_bus_state *bus_state; in xhci_bus_suspend() local
1723 bus_state = &rhub->bus_state; in xhci_bus_suspend()
1729 if (bus_state->resuming_ports || /* USB2 */ in xhci_bus_suspend()
1730 bus_state->port_remote_wakeup) { /* USB3 */ in xhci_bus_suspend()
1741 bus_state->bus_suspended = 0; in xhci_bus_suspend()
1766 bus_state->bus_suspended = 0; in xhci_bus_suspend()
1774 bus_state->bus_suspended = 0; in xhci_bus_suspend()
1783 set_bit(port_index, &bus_state->bus_suspended); in xhci_bus_suspend()
1817 if (test_bit(port_index, &bus_state->bus_suspended)) { in xhci_bus_suspend()
1828 bus_state->next_statechange = jiffies + msecs_to_jiffies(10); in xhci_bus_suspend()
1831 if (bus_state->bus_suspended) in xhci_bus_suspend()
1868 struct xhci_bus_state *bus_state; in xhci_bus_resume() local
1880 bus_state = &rhub->bus_state; in xhci_bus_resume()
1882 if (time_before(jiffies, bus_state->next_statechange)) in xhci_bus_resume()
1912 clear_bit(port_index, &bus_state->bus_suspended); in xhci_bus_resume()
1916 if (test_bit(port_index, &bus_state->bus_suspended)) in xhci_bus_resume()
1929 &bus_state->bus_suspended); in xhci_bus_resume()
1939 if (bus_state->bus_suspended) { in xhci_bus_resume()
1944 for_each_set_bit(port_index, &bus_state->bus_suspended, in xhci_bus_resume()
1954 for_each_set_bit(port_index, &bus_state->bus_suspended, BITS_PER_LONG) { in xhci_bus_resume()
1968 bus_state->next_statechange = jiffies + msecs_to_jiffies(5); in xhci_bus_resume()
1984 return rhub->bus_state.resuming_ports; /* USB2 ports only */ in xhci_get_resuming_ports()