Lines Matching refs:bus_state

689 		struct xhci_bus_state *bus_state,  in xhci_get_port_status()  argument
737 if (!bus_state->resume_done[wIndex]) { in xhci_get_port_status()
739 if (test_bit(wIndex, &bus_state->resuming_ports)) { in xhci_get_port_status()
753 set_bit(wIndex, &bus_state->resuming_ports); in xhci_get_port_status()
754 bus_state->resume_done[wIndex] = timeout; in xhci_get_port_status()
759 bus_state->resume_done[wIndex])) { in xhci_get_port_status()
764 bus_state->resume_done[wIndex] = 0; in xhci_get_port_status()
765 clear_bit(wIndex, &bus_state->resuming_ports); in xhci_get_port_status()
767 set_bit(wIndex, &bus_state->rexit_ports); in xhci_get_port_status()
773 &bus_state->rexit_done[wIndex], in xhci_get_port_status()
792 clear_bit(wIndex, &bus_state->rexit_ports); in xhci_get_port_status()
795 bus_state->port_c_suspend |= 1 << wIndex; in xhci_get_port_status()
796 bus_state->suspended_ports &= ~(1 << wIndex); in xhci_get_port_status()
811 if ((bus_state->resume_done[wIndex] || in xhci_get_port_status()
812 test_bit(wIndex, &bus_state->resuming_ports)) && in xhci_get_port_status()
815 bus_state->resume_done[wIndex] = 0; in xhci_get_port_status()
816 clear_bit(wIndex, &bus_state->resuming_ports); in xhci_get_port_status()
822 if (bus_state->suspended_ports & (1 << wIndex)) { in xhci_get_port_status()
823 bus_state->suspended_ports &= ~(1 << wIndex); in xhci_get_port_status()
825 bus_state->port_c_suspend |= 1 << wIndex; in xhci_get_port_status()
827 bus_state->resume_done[wIndex] = 0; in xhci_get_port_status()
828 clear_bit(wIndex, &bus_state->resuming_ports); in xhci_get_port_status()
857 if (bus_state->port_c_suspend & (1 << wIndex)) in xhci_get_port_status()
873 struct xhci_bus_state *bus_state; in xhci_hub_control() local
879 bus_state = &xhci->bus_state[hcd_index(hcd)]; in xhci_hub_control()
921 status = xhci_get_port_status(hcd, bus_state, port_array, in xhci_hub_control()
1004 bus_state->suspended_ports |= 1 << wIndex; in xhci_hub_control()
1066 bus_state->suspended_ports |= 1 << wIndex; in xhci_hub_control()
1153 set_bit(wIndex, &bus_state->resuming_ports); in xhci_hub_control()
1161 clear_bit(wIndex, &bus_state->resuming_ports); in xhci_hub_control()
1163 bus_state->port_c_suspend |= 1 << wIndex; in xhci_hub_control()
1174 bus_state->port_c_suspend &= ~(1 << wIndex); in xhci_hub_control()
1230 struct xhci_bus_state *bus_state; in xhci_hub_status_data() local
1234 bus_state = &xhci->bus_state[hcd_index(hcd)]; in xhci_hub_status_data()
1244 status = bus_state->resuming_ports; in xhci_hub_status_data()
1257 (bus_state->port_c_suspend & 1 << i) || in xhci_hub_status_data()
1258 (bus_state->resume_done[i] && time_after_eq( in xhci_hub_status_data()
1259 jiffies, bus_state->resume_done[i]))) { in xhci_hub_status_data()
1281 struct xhci_bus_state *bus_state; in xhci_bus_suspend() local
1285 bus_state = &xhci->bus_state[hcd_index(hcd)]; in xhci_bus_suspend()
1290 if (bus_state->resuming_ports || /* USB2 */ in xhci_bus_suspend()
1291 bus_state->port_remote_wakeup) { /* USB3 */ in xhci_bus_suspend()
1299 bus_state->bus_suspended = 0; in xhci_bus_suspend()
1319 set_bit(port_index, &bus_state->bus_suspended); in xhci_bus_suspend()
1341 bus_state->next_statechange = jiffies + msecs_to_jiffies(10); in xhci_bus_suspend()
1351 struct xhci_bus_state *bus_state; in xhci_bus_resume() local
1360 bus_state = &xhci->bus_state[hcd_index(hcd)]; in xhci_bus_resume()
1362 if (time_before(jiffies, bus_state->next_statechange)) in xhci_bus_resume()
1387 if (test_bit(port_index, &bus_state->bus_suspended) && in xhci_bus_resume()
1432 bus_state->next_statechange = jiffies + msecs_to_jiffies(5); in xhci_bus_resume()