Re: Lockup in phy_probe() for MDIO device (Broadcom's switch)
From: Rafał Miłecki <zajec5@gmail.com>
Date: 2021-09-30 13:47:30
On 30.09.2021 15:32, Andrew Lunn wrote:
quoted
I should also point out that as this b53 driver that is causing the problem only exists in OpenWRT, this is really a matter for OpenWRT developers rather than mainline which does not suffer this problem. I suspect that OpenWRT developers will not be happy with either of the two patches I've posted above - I suspect they are trying to support both DSA and swconfig approaches with a single DT. That can be made to work, but not with a PHYLIB driver being a wrapper around the swconfig stuff (precisely because there's no phy_device in this scenario.) The only reason to patch mainline kernels would be to make them more robust, and maybe to also make an explicit statement about what isn't supported (having a phy_driver with its of_match_table member set.)I agree with you here. This is an OpenWRT problem. We would hopefully catch such a driver at review time and reject it. We could make it more robust in mainline, but as you said, OpenWRT developers might not actually like it more robust.
I was thinking about patching mdio_bus_match() / phy_driver_register() to prevent other developers from doing the same mistake as OpenWrt & b53. Also saving your time from reports similar to mine. I understand it's an issue that OpenWrt has to handle downstream. Thank you a lot for helping me investigate this problem.