From: Oleksij Rempel <o.rempel@pengutronix.de>
To: Bhanu Seshu Kumar Valluri <bhanuseshukumar@gmail.com>
Cc: Jakub Kicinski <kuba@kernel.org>,
Thangaraj.S@microchip.com, Rengarajan.S@microchip.com,
UNGLinuxDriver@microchip.com, andrew+netdev@lunn.ch,
davem@davemloft.net, edumazet@google.com, pabeni@redhat.com,
netdev@vger.kernel.org, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org,
syzbot+62ec8226f01cb4ca19d9@syzkaller.appspotmail.com
Subject: Re: [PATCH] net: usb: lan78xx: Fix lost EEPROM read timeout error(-ETIMEDOUT) in lan78xx_read_raw_eeprom
Date: Wed, 1 Oct 2025 10:38:38 +0200 [thread overview]
Message-ID: <aNzojoXK-m1Tn6Lc@pengutronix.de> (raw)
In-Reply-To: <7cc900dd-a49a-4f37-88e9-6794e92fc7d4@gmail.com>
On Wed, Oct 01, 2025 at 02:01:24PM +0530, Bhanu Seshu Kumar Valluri wrote:
> On 01/10/25 13:54, Oleksij Rempel wrote:
> > 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?
> >
>
> On my real hardware timeout didn't occur. So I simulated it once by modifying the code
> to confirm the BUG. The BUG has occurred confirming syzbot finding.
Ok, thank you!
Can you please add similar change to lan78xx_write_raw_eeprom. syzbot
will find it soon or later.
--
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 |
next prev parent reply other threads:[~2025-10-01 8:38 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-30 8:49 [PATCH] net: usb: lan78xx: Fix lost EEPROM read timeout error(-ETIMEDOUT) in lan78xx_read_raw_eeprom Bhanu Seshu Kumar Valluri
2025-10-01 0:39 ` Jakub Kicinski
2025-10-01 4:37 ` Bhanu Seshu Kumar Valluri
2025-10-01 7:42 ` Oleksij Rempel
2025-10-01 8:10 ` Bhanu Seshu Kumar Valluri
2025-10-01 8:24 ` Oleksij Rempel
2025-10-01 8:31 ` Bhanu Seshu Kumar Valluri
2025-10-01 8:38 ` Oleksij Rempel [this message]
2025-10-01 8:45 ` Bhanu Seshu Kumar Valluri
2025-10-01 8:51 ` Oleksij Rempel
2025-10-03 18:00 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aNzojoXK-m1Tn6Lc@pengutronix.de \
--to=o.rempel@pengutronix.de \
--cc=Rengarajan.S@microchip.com \
--cc=Thangaraj.S@microchip.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=andrew+netdev@lunn.ch \
--cc=bhanuseshukumar@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=syzbot+62ec8226f01cb4ca19d9@syzkaller.appspotmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).