usb: host: xhci-mtk: omit shared hcd if either root hub has no ports
authorChunfeng Yun <chunfeng.yun@mediatek.com>
Fri, 18 Nov 2022 11:01:16 +0000 (19:01 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 22 Nov 2022 16:28:25 +0000 (17:28 +0100)
commite99e1a7d6f88b9c54dc32671bac29f26e58bde80
tree19fec0f2caca0f24f074b1e30dee4ef3472a547f
parent0384e87e3fec735e47f1c133c796f32ef7a72a9b
usb: host: xhci-mtk: omit shared hcd if either root hub has no ports

There is error log when add a usb3 root hub without ports:
"hub 4-0:1.0: config failed, hub doesn't have any ports! (err -19)"

so omit the shared hcd if either of the root hubs has no ports, but
usually there is no usb3 port.

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20221118110116.20165-1-chunfeng.yun@mediatek.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-mtk.c