lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <806290623.278790.1756880637551.JavaMail.zimbra@couthit.local>
Date: Wed, 3 Sep 2025 11:53:57 +0530 (IST)
From: Parvathi Pudi <parvathi@...thit.com>
To: Md Danish Anwar <a0501179@...com>
Cc: parvathi <parvathi@...thit.com>, danishanwar <danishanwar@...com>, 
	rogerq <rogerq@...nel.org>, andrew+netdev <andrew+netdev@...n.ch>, 
	davem <davem@...emloft.net>, edumazet <edumazet@...gle.com>, 
	kuba <kuba@...nel.org>, pabeni <pabeni@...hat.com>, 
	robh <robh@...nel.org>, krzk+dt <krzk+dt@...nel.org>, 
	conor+dt <conor+dt@...nel.org>, ssantosh <ssantosh@...nel.org>, 
	richardcochran <richardcochran@...il.com>, 
	m-malladi <m-malladi@...com>, s hauer <s.hauer@...gutronix.de>, 
	afd <afd@...com>, jacob e keller <jacob.e.keller@...el.com>, 
	horms <horms@...nel.org>, johan <johan@...nel.org>, 
	m-karicheri2 <m-karicheri2@...com>, s-anna <s-anna@...com>, 
	glaroque <glaroque@...libre.com>, 
	saikrishnag <saikrishnag@...vell.com>, 
	kory maincent <kory.maincent@...tlin.com>, 
	diogo ivo <diogo.ivo@...mens.com>, 
	javier carrasco cruz <javier.carrasco.cruz@...il.com>, 
	basharath <basharath@...thit.com>, 
	linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>, 
	netdev <netdev@...r.kernel.org>, 
	devicetree <devicetree@...r.kernel.org>, 
	linux-kernel <linux-kernel@...r.kernel.org>, 
	Vadim Fedorenko <vadim.fedorenko@...ux.dev>, 
	ALOK TIWARI <alok.a.tiwari@...cle.com>, 
	Bastien Curutchet <bastien.curutchet@...tlin.com>, 
	pratheesh <pratheesh@...com>, Prajith Jayarajan <prajith@...com>, 
	Vignesh Raghavendra <vigneshr@...com>, praneeth <praneeth@...com>, 
	srk <srk@...com>, rogerq <rogerq@...com>, 
	krishna <krishna@...thit.com>, pmohan <pmohan@...thit.com>, 
	mohan <mohan@...thit.com>
Subject: Re: [PATCH net-next v14 2/5] net: ti: icssm-prueth: Adds ICSSM
 Ethernet driver

Hi,

> 
> On 8/22/2025 6:55 PM, Parvathi Pudi wrote:
>> From: Roger Quadros <rogerq@...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@...com>
>> Signed-off-by: Andrew F. Davis <afd@...com>
>> Signed-off-by: Basharath Hussain Khaja <basharath@...thit.com>
>> Signed-off-by: Parvathi Pudi <parvathi@...thit.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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ