提交 5120a266 编写于 作者: J Johan Hovold 提交者: Greg Kroah-Hartman

USB: host: xhci: use max-port define

Use the new define for the maximum number of SuperSpeed ports instead of
a constant when allocating xHCI root hubs.
Signed-off-by: NJohan Hovold <johan@kernel.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 93491ced
...@@ -2307,10 +2307,11 @@ static int xhci_setup_port_arrays(struct xhci_hcd *xhci, gfp_t flags) ...@@ -2307,10 +2307,11 @@ static int xhci_setup_port_arrays(struct xhci_hcd *xhci, gfp_t flags)
/* Place limits on the number of roothub ports so that the hub /* Place limits on the number of roothub ports so that the hub
* descriptors aren't longer than the USB core will allocate. * descriptors aren't longer than the USB core will allocate.
*/ */
if (xhci->num_usb3_ports > 15) { if (xhci->num_usb3_ports > USB_SS_MAXPORTS) {
xhci_dbg_trace(xhci, trace_xhci_dbg_init, xhci_dbg_trace(xhci, trace_xhci_dbg_init,
"Limiting USB 3.0 roothub ports to 15."); "Limiting USB 3.0 roothub ports to %u.",
xhci->num_usb3_ports = 15; USB_SS_MAXPORTS);
xhci->num_usb3_ports = USB_SS_MAXPORTS;
} }
if (xhci->num_usb2_ports > USB_MAXCHILDREN) { if (xhci->num_usb2_ports > USB_MAXCHILDREN) {
xhci_dbg_trace(xhci, trace_xhci_dbg_init, xhci_dbg_trace(xhci, trace_xhci_dbg_init,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册