Lines Matching refs:wIndex
473 u16 wIndex, __le32 __iomem *addr, u32 port_status) in xhci_disable_port() argument
492 wIndex, port_status); in xhci_disable_port()
496 u16 wIndex, __le32 __iomem *addr, u32 port_status) in xhci_clear_port_change_bit() argument
542 port_change_bit, wIndex, port_status); in xhci_clear_port_change_bit()
681 u16 wIndex) in xhci_del_comp_mod_timer() argument
690 xhci->port_status_u0 |= 1 << wIndex; in xhci_del_comp_mod_timer()
730 u16 wIndex, u32 raw_port_status, in xhci_get_port_status() argument
776 if (!bus_state->resume_done[wIndex]) { in xhci_get_port_status()
778 if (test_bit(wIndex, &bus_state->resuming_ports)) { in xhci_get_port_status()
792 set_bit(wIndex, &bus_state->resuming_ports); in xhci_get_port_status()
793 bus_state->resume_done[wIndex] = timeout; in xhci_get_port_status()
798 bus_state->resume_done[wIndex])) { in xhci_get_port_status()
802 wIndex + 1); in xhci_get_port_status()
803 bus_state->resume_done[wIndex] = 0; in xhci_get_port_status()
804 clear_bit(wIndex, &bus_state->resuming_ports); in xhci_get_port_status()
806 set_bit(wIndex, &bus_state->rexit_ports); in xhci_get_port_status()
808 xhci_test_and_clear_bit(xhci, port_array, wIndex, in xhci_get_port_status()
810 xhci_set_link_state(xhci, port_array, wIndex, in xhci_get_port_status()
815 &bus_state->rexit_done[wIndex], in xhci_get_port_status()
822 xhci, wIndex + 1); in xhci_get_port_status()
829 int port_status = readl(port_array[wIndex]); in xhci_get_port_status()
834 clear_bit(wIndex, &bus_state->rexit_ports); in xhci_get_port_status()
837 bus_state->port_c_suspend |= 1 << wIndex; in xhci_get_port_status()
838 bus_state->suspended_ports &= ~(1 << wIndex); in xhci_get_port_status()
853 if ((bus_state->resume_done[wIndex] || in xhci_get_port_status()
854 test_bit(wIndex, &bus_state->resuming_ports)) && in xhci_get_port_status()
857 bus_state->resume_done[wIndex] = 0; in xhci_get_port_status()
858 clear_bit(wIndex, &bus_state->resuming_ports); in xhci_get_port_status()
864 if (bus_state->suspended_ports & (1 << wIndex)) { in xhci_get_port_status()
865 bus_state->suspended_ports &= ~(1 << wIndex); in xhci_get_port_status()
867 bus_state->port_c_suspend |= 1 << wIndex; in xhci_get_port_status()
869 bus_state->resume_done[wIndex] = 0; in xhci_get_port_status()
870 clear_bit(wIndex, &bus_state->resuming_ports); in xhci_get_port_status()
895 xhci_del_comp_mod_timer(xhci, raw_port_status, wIndex); in xhci_get_port_status()
899 if (bus_state->port_c_suspend & (1 << wIndex)) in xhci_get_port_status()
906 u16 wIndex, char *buf, u16 wLength) in xhci_hub_control() argument
955 if (!wIndex || wIndex > max_ports) in xhci_hub_control()
957 wIndex--; in xhci_hub_control()
958 temp = readl(port_array[wIndex]); in xhci_hub_control()
964 wIndex, temp, flags); in xhci_hub_control()
969 wIndex, temp); in xhci_hub_control()
982 port_li = readl(port_array[wIndex] + PORTLI); in xhci_hub_control()
989 link_state = (wIndex & 0xff00) >> 3; in xhci_hub_control()
991 wake_mask = wIndex & 0xff00; in xhci_hub_control()
993 timeout = (wIndex & 0xff00) >> 8; in xhci_hub_control()
994 wIndex &= 0xff; in xhci_hub_control()
995 if (!wIndex || wIndex > max_ports) in xhci_hub_control()
997 wIndex--; in xhci_hub_control()
998 temp = readl(port_array[wIndex]); in xhci_hub_control()
1007 temp = readl(port_array[wIndex]); in xhci_hub_control()
1010 xhci_set_link_state(xhci, port_array, wIndex, in xhci_hub_control()
1020 temp = readl(port_array[wIndex]); in xhci_hub_control()
1029 wIndex + 1); in xhci_hub_control()
1039 xhci_set_link_state(xhci, port_array, wIndex, XDEV_U3); in xhci_hub_control()
1045 temp = readl(port_array[wIndex]); in xhci_hub_control()
1046 bus_state->suspended_ports |= 1 << wIndex; in xhci_hub_control()
1049 temp = readl(port_array[wIndex]); in xhci_hub_control()
1053 xhci_dbg(xhci, "Disable port %d\n", wIndex); in xhci_hub_control()
1062 writel(temp | PORT_PE, port_array[wIndex]); in xhci_hub_control()
1063 temp = readl(port_array[wIndex]); in xhci_hub_control()
1069 xhci_dbg(xhci, "Enable port %d\n", wIndex); in xhci_hub_control()
1070 xhci_set_link_state(xhci, port_array, wIndex, in xhci_hub_control()
1072 temp = readl(port_array[wIndex]); in xhci_hub_control()
1088 wIndex + 1); in xhci_hub_control()
1099 xhci_set_link_state(xhci, port_array, wIndex, in xhci_hub_control()
1106 temp = readl(port_array[wIndex]); in xhci_hub_control()
1108 bus_state->suspended_ports |= 1 << wIndex; in xhci_hub_control()
1117 writel(temp | PORT_POWER, port_array[wIndex]); in xhci_hub_control()
1119 temp = readl(port_array[wIndex]); in xhci_hub_control()
1120 xhci_dbg(xhci, "set port power, actual port %d status = 0x%x\n", wIndex, temp); in xhci_hub_control()
1124 wIndex); in xhci_hub_control()
1127 wIndex, true); in xhci_hub_control()
1132 writel(temp, port_array[wIndex]); in xhci_hub_control()
1134 temp = readl(port_array[wIndex]); in xhci_hub_control()
1135 xhci_dbg(xhci, "set port reset, actual port %d status = 0x%x\n", wIndex, temp); in xhci_hub_control()
1139 wIndex, wake_mask); in xhci_hub_control()
1140 temp = readl(port_array[wIndex]); in xhci_hub_control()
1143 wIndex, temp); in xhci_hub_control()
1147 writel(temp, port_array[wIndex]); in xhci_hub_control()
1149 temp = readl(port_array[wIndex]); in xhci_hub_control()
1154 temp = readl(port_array[wIndex] + PORTPMSC); in xhci_hub_control()
1157 writel(temp, port_array[wIndex] + PORTPMSC); in xhci_hub_control()
1162 temp = readl(port_array[wIndex] + PORTPMSC); in xhci_hub_control()
1165 writel(temp, port_array[wIndex] + PORTPMSC); in xhci_hub_control()
1171 temp = readl(port_array[wIndex]); in xhci_hub_control()
1174 if (!wIndex || wIndex > max_ports) in xhci_hub_control()
1176 wIndex--; in xhci_hub_control()
1177 temp = readl(port_array[wIndex]); in xhci_hub_control()
1186 temp = readl(port_array[wIndex]); in xhci_hub_control()
1195 set_bit(wIndex, &bus_state->resuming_ports); in xhci_hub_control()
1196 xhci_set_link_state(xhci, port_array, wIndex, in xhci_hub_control()
1201 xhci_set_link_state(xhci, port_array, wIndex, in xhci_hub_control()
1203 clear_bit(wIndex, &bus_state->resuming_ports); in xhci_hub_control()
1205 bus_state->port_c_suspend |= 1 << wIndex; in xhci_hub_control()
1208 wIndex + 1); in xhci_hub_control()
1216 bus_state->port_c_suspend &= ~(1 << wIndex); in xhci_hub_control()
1224 xhci_clear_port_change_bit(xhci, wValue, wIndex, in xhci_hub_control()
1225 port_array[wIndex], temp); in xhci_hub_control()
1228 xhci_disable_port(hcd, xhci, wIndex, in xhci_hub_control()
1229 port_array[wIndex], temp); in xhci_hub_control()
1232 writel(temp & ~PORT_POWER, port_array[wIndex]); in xhci_hub_control()
1236 wIndex); in xhci_hub_control()
1239 wIndex, false); in xhci_hub_control()