Lines Matching refs:num_ports

826 	unsigned int			num_ports;  in xhci_alloc_tt_info()  local
831 num_ports = 1; in xhci_alloc_tt_info()
833 num_ports = hdev->maxchild; in xhci_alloc_tt_info()
835 for (i = 0; i < num_ports; i++, tt_info++) { in xhci_alloc_tt_info()
1838 int i, j, num_ports; in xhci_mem_cleanup() local
1855 num_ports = HCS_MAX_PORTS(xhci->hcs_params1); in xhci_mem_cleanup()
1856 for (i = 0; i < num_ports && xhci->rh_bw; i++) { in xhci_mem_cleanup()
1896 for (i = 0; i < num_ports; i++) { in xhci_mem_cleanup()
1906 xhci->usb2_rhub.num_ports = 0; in xhci_mem_cleanup()
1907 xhci->usb3_rhub.num_ports = 0; in xhci_mem_cleanup()
2114 static void xhci_add_in_port(struct xhci_hcd *xhci, unsigned int num_ports, in xhci_add_in_port() argument
2162 if (port_offset == 0 || (port_offset + port_count - 1) > num_ports) in xhci_add_in_port()
2227 hw_port->rhub->num_ports--; in xhci_add_in_port()
2234 rhub->num_ports++; in xhci_add_in_port()
2246 if (!rhub->num_ports) in xhci_create_rhub_port_array()
2248 rhub->ports = kcalloc_node(rhub->num_ports, sizeof(*rhub->ports), in xhci_create_rhub_port_array()
2260 if (port_index == rhub->num_ports) in xhci_create_rhub_port_array()
2276 unsigned int num_ports; in xhci_setup_port_arrays() local
2282 num_ports = HCS_MAX_PORTS(xhci->hcs_params1); in xhci_setup_port_arrays()
2283 xhci->hw_ports = kcalloc_node(num_ports, sizeof(*xhci->hw_ports), in xhci_setup_port_arrays()
2288 for (i = 0; i < num_ports; i++) { in xhci_setup_port_arrays()
2294 xhci->rh_bw = kcalloc_node(num_ports, sizeof(*xhci->rh_bw), flags, in xhci_setup_port_arrays()
2298 for (i = 0; i < num_ports; i++) { in xhci_setup_port_arrays()
2335 xhci_add_in_port(xhci, num_ports, base + offset, cap_count); in xhci_setup_port_arrays()
2336 if (xhci->usb2_rhub.num_ports + xhci->usb3_rhub.num_ports == in xhci_setup_port_arrays()
2337 num_ports) in xhci_setup_port_arrays()
2342 if (xhci->usb2_rhub.num_ports == 0 && xhci->usb3_rhub.num_ports == 0) { in xhci_setup_port_arrays()
2348 xhci->usb2_rhub.num_ports, xhci->usb3_rhub.num_ports); in xhci_setup_port_arrays()
2353 if (xhci->usb3_rhub.num_ports > USB_SS_MAXPORTS) { in xhci_setup_port_arrays()
2357 xhci->usb3_rhub.num_ports = USB_SS_MAXPORTS; in xhci_setup_port_arrays()
2359 if (xhci->usb2_rhub.num_ports > USB_MAXCHILDREN) { in xhci_setup_port_arrays()
2363 xhci->usb2_rhub.num_ports = USB_MAXCHILDREN; in xhci_setup_port_arrays()
2366 if (!xhci->usb2_rhub.num_ports) in xhci_setup_port_arrays()
2369 if (!xhci->usb3_rhub.num_ports) in xhci_setup_port_arrays()