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] [thread-next>] [day] [month] [year] [list]
Message-ID: <aNzlNkUKEFs0GFdL@pengutronix.de>
Date: Wed, 1 Oct 2025 10:24:22 +0200
From: Oleksij Rempel <o.rempel@...gutronix.de>
To: Bhanu Seshu Kumar Valluri <bhanuseshukumar@...il.com>
Cc: Jakub Kicinski <kuba@...nel.org>, Thangaraj.S@...rochip.com,
	Rengarajan.S@...rochip.com, UNGLinuxDriver@...rochip.com,
	andrew+netdev@...n.ch, davem@...emloft.net, edumazet@...gle.com,
	pabeni@...hat.com, netdev@...r.kernel.org,
	linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
	syzbot+62ec8226f01cb4ca19d9@...kaller.appspotmail.com
Subject: Re: [PATCH] net: usb: lan78xx: Fix lost EEPROM read timeout
 error(-ETIMEDOUT) in lan78xx_read_raw_eeprom

On Wed, Oct 01, 2025 at 01:40:56PM +0530, Bhanu Seshu Kumar Valluri wrote:
> On 01/10/25 13:12, Oleksij Rempel wrote:
> > Hi,
> > 
> > On Wed, Oct 01, 2025 at 10:07:21AM +0530, Bhanu Seshu Kumar Valluri wrote:
> >> On 01/10/25 06:09, Jakub Kicinski wrote:
> >>> On Tue, 30 Sep 2025 14:19:02 +0530 Bhanu Seshu Kumar Valluri wrote:
> >>>> +	if (dev->chipid == ID_REV_CHIP_ID_7800_) {
> >>>> +		int rc = lan78xx_write_reg(dev, HW_CFG, saved);
> >>>> +		/* If USB fails, there is nothing to do */
> >>>> +		if (rc < 0)
> >>>> +			return rc;
> >>>> +	}
> >>>> +	return ret;
> >>>
> >>> I don't think you need to add and handle rc here separately?
> >>> rc can only be <= so save the answer to ret and "fall thru"?
> >>
> >> The fall thru path might have been reached with ret holding EEPROM read timeout
> >> error status. So if ret is used instead of rc it might over write the ret with 0 when 
> >> lan78xx_write_reg returns success and timeout error status would be lost.
> > 
> > Ack, I see. It may happen if communication with EEPROM will fail. The same
> > would happen on write path too. Is it happened with real HW or it is
> > some USB emulation test? For me it is interesting why EEPROM is timed
> > out.
> 
> The sysbot's log with message "EEPROM read operation timeout" confirms that EEPROM read
> timeout occurring. I tested the same condition on EVB-LAN7800LC by simulating 
> timeout during probe.

Do you simulating timeout during probe by modifying the code, or it is
real HW issue?

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ