[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANi1PHh4W7KPagKkvZW6cNAQqgAeG3zxaaTJKkg3KiTbsFRMdg@mail.gmail.com>
Date: Mon, 12 Feb 2024 19:39:08 +0100
From: Jan Henrik Weinstock <jan@....re>
To: mathias.nyman@...el.com, gregkh@...uxfoundation.org,
linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: Lukas Jünger <lukas@....re>
Subject: XHCI without USB2 ports
Hi all,
I am currently working on an XHCI platform device simulation model. I
noticed that the Linux driver (Linux 6.5.6 xhci-hcd) stops working
when I configure the model without any USB2 ports. During an interrupt
(TRB_PORT_STATUS), I only get "xhci-hcd 12100000.usb: ignore port
event for removed USB3 hcd."
During xhci_irq, in handle_port_status, xhci->shared_hcd is NULL [1],
so the interrupt gets ignored. However, shared_hcd would only ever be
allocated during xhci_plat_probe [2], if the device has both USB2 and
USB3 ports, i.e. xhci_has_one_roothub returns false [3].
Without any USB2 ports, a shared_hcd will never be allocated in the
first place, and handle_port_status will always exit early.
I am new to the USB driver framework, so it's quite likely I am just
overlooking something; but to me it seems that the driver cannot work
unless I have an XHCI device that has at least one USB2 and one USB3
port. But during boot, I only get "USB2 root hub has no ports", which
is not fatal.
Best regards
Jan
[1] https://elixir.bootlin.com/linux/v6.5.6/source/drivers/usb/host/xhci-ring.c#L1895
[2] https://elixir.bootlin.com/linux/v6.5.6/source/drivers/usb/host/xhci-plat.c#L282
[3] https://elixir.bootlin.com/linux/v6.5.6/source/drivers/usb/host/xhci.h#L2001
--
Dr.-Ing. Jan Henrik Weinstock
Managing Director
MachineWare GmbH | www.machineware.de
Hühnermarkt 19, 52062 Aachen, Germany
Amtsgericht Aachen HRB25734
Geschäftsführung
Lukas Jünger
Dr.-Ing. Jan Henrik Weinstock
Powered by blists - more mailing lists