Lines Matching refs:bus_state
930 struct xhci_bus_state *bus_state; in xhci_handle_usb2_port_link_resume() local
937 bus_state = &port->rhub->bus_state; in xhci_handle_usb2_port_link_resume()
947 if (test_bit(wIndex, &bus_state->resuming_ports)) { in xhci_handle_usb2_port_link_resume()
961 set_bit(wIndex, &bus_state->resuming_ports); in xhci_handle_usb2_port_link_resume()
974 clear_bit(wIndex, &bus_state->resuming_ports); in xhci_handle_usb2_port_link_resume()
1010 bus_state->port_c_suspend |= 1 << wIndex; in xhci_handle_usb2_port_link_resume()
1011 bus_state->suspended_ports &= ~(1 << wIndex); in xhci_handle_usb2_port_link_resume()
1036 struct xhci_bus_state *bus_state; in xhci_get_usb3_port_status() local
1042 bus_state = &port->rhub->bus_state; in xhci_get_usb3_port_status()
1073 if (bus_state->port_remote_wakeup & (1 << portnum)) { in xhci_get_usb3_port_status()
1074 bus_state->port_remote_wakeup &= ~(1 << portnum); in xhci_get_usb3_port_status()
1077 bus_state->suspended_ports &= ~(1 << portnum); in xhci_get_usb3_port_status()
1087 struct xhci_bus_state *bus_state; in xhci_get_usb2_port_status() local
1092 bus_state = &port->rhub->bus_state; in xhci_get_usb2_port_status()
1106 if (bus_state->suspended_ports & (1 << portnum)) { in xhci_get_usb2_port_status()
1107 bus_state->suspended_ports &= ~(1 << portnum); in xhci_get_usb2_port_status()
1108 bus_state->port_c_suspend |= 1 << portnum; in xhci_get_usb2_port_status()
1128 test_bit(portnum, &bus_state->resuming_ports)) { in xhci_get_usb2_port_status()
1130 clear_bit(portnum, &bus_state->resuming_ports); in xhci_get_usb2_port_status()
1134 bus_state->suspended_ports &= ~(1 << portnum); in xhci_get_usb2_port_status()
1149 struct xhci_bus_state *bus_state, in xhci_get_port_status() argument
1191 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()
1353 bus_state->suspended_ports |= 1 << wIndex; in xhci_hub_control()
1486 bus_state->suspended_ports |= 1 << wIndex; in xhci_hub_control()
1575 set_bit(wIndex, &bus_state->resuming_ports); in xhci_hub_control()
1582 clear_bit(wIndex, &bus_state->resuming_ports); in xhci_hub_control()
1585 bus_state->port_c_suspend |= 1 << wIndex; in xhci_hub_control()
1596 bus_state->port_c_suspend &= ~(1 << wIndex); in xhci_hub_control()
1647 struct xhci_bus_state *bus_state; in xhci_hub_status_data() local
1655 bus_state = &rhub->bus_state; in xhci_hub_status_data()
1667 status = bus_state->resuming_ports; in xhci_hub_status_data()
1693 (bus_state->port_c_suspend & 1 << i) || in xhci_hub_status_data()
1719 struct xhci_bus_state *bus_state; in xhci_bus_suspend() local
1729 bus_state = &rhub->bus_state; in xhci_bus_suspend()
1735 if (bus_state->resuming_ports || /* USB2 */ in xhci_bus_suspend()
1736 bus_state->port_remote_wakeup) { /* USB3 */ in xhci_bus_suspend()
1747 bus_state->bus_suspended = 0; in xhci_bus_suspend()
1772 bus_state->bus_suspended = 0; in xhci_bus_suspend()
1780 bus_state->bus_suspended = 0; in xhci_bus_suspend()
1789 set_bit(port_index, &bus_state->bus_suspended); in xhci_bus_suspend()
1823 if (test_bit(port_index, &bus_state->bus_suspended)) { in xhci_bus_suspend()
1837 bus_state->next_statechange = jiffies + msecs_to_jiffies(10); in xhci_bus_suspend()
1840 if (bus_state->bus_suspended) in xhci_bus_suspend()
1877 struct xhci_bus_state *bus_state; in xhci_bus_resume() local
1890 bus_state = &rhub->bus_state; in xhci_bus_resume()
1892 if (time_before(jiffies, bus_state->next_statechange)) in xhci_bus_resume()
1922 clear_bit(port_index, &bus_state->bus_suspended); in xhci_bus_resume()
1926 if (test_bit(port_index, &bus_state->bus_suspended)) in xhci_bus_resume()
1939 &bus_state->bus_suspended); in xhci_bus_resume()
1949 if (bus_state->bus_suspended) { in xhci_bus_resume()
1954 for_each_set_bit(port_index, &bus_state->bus_suspended, in xhci_bus_resume()
1964 for_each_set_bit(port_index, &bus_state->bus_suspended, BITS_PER_LONG) { in xhci_bus_resume()
1979 bus_state->next_statechange = jiffies + msecs_to_jiffies(5); in xhci_bus_resume()
1995 return rhub->bus_state.resuming_ports; /* USB2 ports only */ in xhci_get_resuming_ports()