The do_mdio_entry was responsible for generating a phy alias configure
that according to the phy driver's mdio_device_id, before apply this
patch, which alias configure is like "alias mdio:000000010100000100001
1011101????", it doesn't match the phy_id of mdio_uevent, because of
the phy_id was a hexadecimal digit and the mido uevent is consisit of
phy_id with the char 'p', the uevent string is different from alias.
Add this patch that mdio alias configure will can match mdio uevent.
Signed-off-by: Yinbo Zhu <zhuyinbo@loongson.cn>
---
Change in v3:
Rework the patch commit log information.
include/linux/mod_devicetable.h | 2 ++
scripts/mod/file2alias.c | 17 +----------------
2 files changed, 3 insertions(+), 16 deletions(-)
The of_device_uevent_modalias is service for 'of' type platform driver
, which ask the first args must be 'of' that use MODULE_DEVICE_TABLE
when driver was exported, but ethernet phy is a kind of 'mdio' type
device and it is inappropriate if driver use 'of' type for exporting,
in fact, most mainstream ethernet phy driver hasn't used 'of' type,
even though phy driver was exported use 'of' type and it's irrelevant
with mdio_uevent, at this time, platform_uevent was responsible for
reporting uevent to match modules.alias configure, so, whatever that
of_device_uevent_modalias was unnecessary, this patch was to remove it
and add phy_id as modio uevent then ethernet phy module auto load
function will work well.
Signed-off-by: Yinbo Zhu <zhuyinbo@loongson.cn>
---
Change in v3:
Rework the patch commit log information.
drivers/net/phy/mdio_bus.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
@@ -962,12 +962,12 @@ static int mdio_bus_match(struct device *dev, struct device_driver *drv)staticintmdio_uevent(structdevice*dev,structkobj_uevent_env*env){-intrc;+structphy_device*pdev;-/* Some devices have extra OF data and an OF-style MODALIAS */-rc=of_device_uevent_modalias(dev,env);-if(rc!=-ENODEV)-returnrc;+pdev=to_phy_device(dev);++if(add_uevent_var(env,"MODALIAS=mdio:p%08X",pdev->phy_id))+return-ENOMEM;return0;}
From: "Russell King (Oracle)" <linux@armlinux.org.uk> Date: 2021-11-30 09:13:57
On Tue, Nov 30, 2021 at 04:21:56PM +0800, Yinbo Zhu wrote:
The do_mdio_entry was responsible for generating a phy alias configure
that according to the phy driver's mdio_device_id, before apply this
patch, which alias configure is like "alias mdio:000000010100000100001
1011101????", it doesn't match the phy_id of mdio_uevent, because of
the phy_id was a hexadecimal digit and the mido uevent is consisit of
phy_id with the char 'p', the uevent string is different from alias.
Add this patch that mdio alias configure will can match mdio uevent.
This is getting rediculous. You don't appear to be listening to the
technical feedback on your patches, and are just reposting the same
patches. I don't see any point in giving the same feedback, so I'll
keep this brief for both patches:
NAK.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
From: "Russell King (Oracle)" <linux@armlinux.org.uk> Date: 2021-11-30 09:14:02
On Tue, Nov 30, 2021 at 04:21:57PM +0800, Yinbo Zhu wrote:
The of_device_uevent_modalias is service for 'of' type platform driver
, which ask the first args must be 'of' that use MODULE_DEVICE_TABLE
when driver was exported, but ethernet phy is a kind of 'mdio' type
device and it is inappropriate if driver use 'of' type for exporting,
in fact, most mainstream ethernet phy driver hasn't used 'of' type,
even though phy driver was exported use 'of' type and it's irrelevant
with mdio_uevent, at this time, platform_uevent was responsible for
reporting uevent to match modules.alias configure, so, whatever that
of_device_uevent_modalias was unnecessary, this patch was to remove it
and add phy_id as modio uevent then ethernet phy module auto load
function will work well.