[PATCH net-next v14 2/5] net: ti: icssm-prueth: Adds ICSSM Ethernet driver
Parvathi Pudi
parvathi at couthit.com
Tue Sep 2 23:23:57 PDT 2025
Hi,
>
> On 8/22/2025 6:55 PM, Parvathi Pudi wrote:
>> From: Roger Quadros <rogerq at ti.com>
>>
>> Updates Kernel configuration to enable PRUETH driver and its dependencies
>> along with makefile changes to add the new PRUETH driver.
>>
>> Changes includes init and deinit of ICSSM PRU Ethernet driver including
>> net dev registration and firmware loading for DUAL-MAC mode running on
>> PRU-ICSS2 instance.
>>
>> Changes also includes link handling, PRU booting, default firmware loading
>> and PRU stopping using existing remoteproc driver APIs.
>>
>> Signed-off-by: Roger Quadros <rogerq at ti.com>
>> Signed-off-by: Andrew F. Davis <afd at ti.com>
>> Signed-off-by: Basharath Hussain Khaja <basharath at couthit.com>
>> Signed-off-by: Parvathi Pudi <parvathi at couthit.com>
>
> [ ... ]
>
>> + /* get mac address from DT and set private and netdev addr */
>> + ret = of_get_ethdev_address(eth_node, ndev);
>> + if (!is_valid_ether_addr(ndev->dev_addr)) {
>> + eth_hw_addr_random(ndev);
>> + dev_warn(prueth->dev, "port %d: using random MAC addr: %pM\n",
>> + port, ndev->dev_addr);
>> + }
>> + ether_addr_copy(emac->mac_addr, ndev->dev_addr);
>> +
>> + /* connect PHY */
>> + emac->phydev = of_phy_get_and_connect(ndev, eth_node,
>> + icssm_emac_adjust_link);
>> + if (!emac->phydev) {
>> + dev_dbg(prueth->dev, "PHY connection failed\n");
>> + ret = -EPROBE_DEFER;
>> + goto free;
>> + }
>> +
>
> Why are you returning EPROBE_DEFER here? If phy connection fails, you
> should just return and fail the probe. That's what ICSSG driver does.
>
> In drivers/net/ethernet/ti/icssg/icssg_prueth.c
>
> 404 │ ndev->phydev = of_phy_connect(emac->ndev, emac->phy_node,
> 405 │ &emac_adjust_link, 0,
> 406 │ emac->phy_if);
> 407 │ if (!ndev->phydev) {
> 408 │ dev_err(prueth->dev, "couldn't connect to phy %s\n",
> 409 │ emac->phy_node->full_name);
> 410 │ return -ENODEV;
> 411 │ }
>
>
> Before phy connect you do `dev_warn(prueth->dev, "port %d: using random
> MAC addr: %pM\n"`
>
> If device is using random mac address, this will be printed, your phy
> connect fails, you try probe again, print comes again, phy fails again
> and so on ...
>
> This results in system getting spammed with continuos prints of "using
> random MAC addr"
>
> I suggest if phy fails, let the probe fail don't do EPROBE_DEFER.
>
> Saw this issue on few boards which has issue with ICSSG phy.
>
Yes, we will check and address this in the next version.
Thanks and Regards,
Parvathi.
More information about the linux-arm-kernel
mailing list