Lines Matching refs:bus_state

832 		struct xhci_bus_state *bus_state,  in xhci_get_port_status()  argument
884 if (!bus_state->resume_done[wIndex]) { in xhci_get_port_status()
886 if (test_bit(wIndex, &bus_state->resuming_ports)) { in xhci_get_port_status()
900 set_bit(wIndex, &bus_state->resuming_ports); in xhci_get_port_status()
901 bus_state->resume_done[wIndex] = timeout; in xhci_get_port_status()
906 bus_state->resume_done[wIndex])) { in xhci_get_port_status()
911 bus_state->resume_done[wIndex] = 0; in xhci_get_port_status()
912 clear_bit(wIndex, &bus_state->resuming_ports); in xhci_get_port_status()
914 set_bit(wIndex, &bus_state->rexit_ports); in xhci_get_port_status()
921 &bus_state->rexit_done[wIndex], in xhci_get_port_status()
940 clear_bit(wIndex, &bus_state->rexit_ports); in xhci_get_port_status()
943 bus_state->port_c_suspend |= 1 << wIndex; in xhci_get_port_status()
944 bus_state->suspended_ports &= ~(1 << wIndex); in xhci_get_port_status()
959 if ((bus_state->resume_done[wIndex] || in xhci_get_port_status()
960 test_bit(wIndex, &bus_state->resuming_ports)) && in xhci_get_port_status()
963 bus_state->resume_done[wIndex] = 0; in xhci_get_port_status()
964 clear_bit(wIndex, &bus_state->resuming_ports); in xhci_get_port_status()
970 if (bus_state->suspended_ports & (1 << wIndex)) { in xhci_get_port_status()
971 bus_state->suspended_ports &= ~(1 << wIndex); in xhci_get_port_status()
973 bus_state->port_c_suspend |= 1 << wIndex; in xhci_get_port_status()
975 bus_state->resume_done[wIndex] = 0; in xhci_get_port_status()
976 clear_bit(wIndex, &bus_state->resuming_ports); in xhci_get_port_status()
1005 if (bus_state->port_c_suspend & (1 << wIndex)) in xhci_get_port_status()
1020 struct xhci_bus_state *bus_state; in xhci_hub_control() local
1031 bus_state = &xhci->bus_state[hcd_index(hcd)]; in xhci_hub_control()
1075 status = xhci_get_port_status(hcd, bus_state, wIndex, temp, in xhci_hub_control()
1160 bus_state->suspended_ports |= 1 << wIndex; in xhci_hub_control()
1254 bus_state->suspended_ports |= 1 << wIndex; in xhci_hub_control()
1339 set_bit(wIndex, &bus_state->resuming_ports); in xhci_hub_control()
1347 clear_bit(wIndex, &bus_state->resuming_ports); in xhci_hub_control()
1349 bus_state->port_c_suspend |= 1 << wIndex; in xhci_hub_control()
1360 bus_state->port_c_suspend &= ~(1 << wIndex); in xhci_hub_control()
1411 struct xhci_bus_state *bus_state; in xhci_hub_status_data() local
1419 bus_state = &xhci->bus_state[hcd_index(hcd)]; in xhci_hub_status_data()
1429 status = bus_state->resuming_ports; in xhci_hub_status_data()
1445 (bus_state->port_c_suspend & 1 << i) || in xhci_hub_status_data()
1446 (bus_state->resume_done[i] && time_after_eq( in xhci_hub_status_data()
1447 jiffies, bus_state->resume_done[i]))) { in xhci_hub_status_data()
1468 struct xhci_bus_state *bus_state; in xhci_bus_suspend() local
1476 bus_state = &xhci->bus_state[hcd_index(hcd)]; in xhci_bus_suspend()
1481 if (bus_state->resuming_ports || /* USB2 */ in xhci_bus_suspend()
1482 bus_state->port_remote_wakeup) { /* USB3 */ in xhci_bus_suspend()
1490 bus_state->bus_suspended = 0; in xhci_bus_suspend()
1510 set_bit(port_index, &bus_state->bus_suspended); in xhci_bus_suspend()
1539 bus_state->next_statechange = jiffies + msecs_to_jiffies(10); in xhci_bus_suspend()
1575 struct xhci_bus_state *bus_state; in xhci_bus_resume() local
1588 bus_state = &xhci->bus_state[hcd_index(hcd)]; in xhci_bus_resume()
1590 if (time_before(jiffies, bus_state->next_statechange)) in xhci_bus_resume()
1619 clear_bit(port_index, &bus_state->bus_suspended); in xhci_bus_resume()
1623 if (test_bit(port_index, &bus_state->bus_suspended)) in xhci_bus_resume()
1636 &bus_state->bus_suspended); in xhci_bus_resume()
1646 if (bus_state->bus_suspended) { in xhci_bus_resume()
1651 for_each_set_bit(port_index, &bus_state->bus_suspended, in xhci_bus_resume()
1661 for_each_set_bit(port_index, &bus_state->bus_suspended, BITS_PER_LONG) { in xhci_bus_resume()
1676 bus_state->next_statechange = jiffies + msecs_to_jiffies(5); in xhci_bus_resume()
1690 struct xhci_bus_state *bus_state; in xhci_get_resuming_ports() local
1692 bus_state = &xhci->bus_state[hcd_index(hcd)]; in xhci_get_resuming_ports()
1695 return bus_state->resuming_ports; /* USB2 ports only */ in xhci_get_resuming_ports()