Re: [PATCH net-next v2 06/10] net: usb: lan78xx: Improve error handling in EEPROM and OTP operations
flat view
From: Mark Brown <broonie@kernel.org>
Date: 2025-03-03 18:02:28
Also in:
lkml
On Wed, Dec 04, 2024 at 09:41:38AM +0100, Oleksij Rempel wrote:
Refine error handling in EEPROM and OTP read/write functions by: - Return error values immediately upon detection. - Avoid overwriting correct error codes with `-EIO`. - Preserve initial error codes as they were appropriate for specific failures. - Use `-ETIMEDOUT` for timeout conditions instead of `-EIO`.
This patch (which is in Linus' tree) appears to break booting with a NFS root filesystem on Raspberry Pi 3B+. There appears to be at least no incoming traffic seen on the device, I've not checked if there's anything outgoing: [ 19.234086] usb 1-1.1.1: new high-speed USB device number 6 using dwc2 [ 19.394134] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50 [ 19.710839] lan78xx 1-1.1.1:1.0 enxb827ebea22ac: renamed from eth0 Device /sys/class/net/enxb827ebea22ac found done. Begin: Waiting up to 180 secs for any network device to become available ... done. IP-Config: enxb827ebea22ac hardware address b8:27:eb:ea:22:ac mt[ 20.663606] lan78xx 1-1.1.1:1.0 enxb827ebea22ac: Link is Down u 1500 DHCP [ 22.708103] lan78xx 1-1.1.1:1.0 enxb827ebea22ac: Link is Up - 1Gbps/Full - flow control off IP-Config: no response after 2 secs - giving up The link did look like it was up on the switch. Full log: https://lava.sirena.org.uk/scheduler/job/1158809#L965 A bisect points to this commit fairly cleanly: git bisect start # status: waiting for both good and bad commits # bad: [7eb172143d5508b4da468ed59ee857c6e5e01da6] Linux 6.14-rc5 git bisect bad 7eb172143d5508b4da468ed59ee857c6e5e01da6 # status: waiting for good commit(s), bad commit known # good: [ffd294d346d185b70e28b1a28abe367bbfe53c04] Linux 6.13 git bisect good ffd294d346d185b70e28b1a28abe367bbfe53c04 # bad: [f1c243fc78ca94fd72e2e6e8f0f49b7360fef475] Merge tag 'iommu-updates-v6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/iommu/linux git bisect bad f1c243fc78ca94fd72e2e6e8f0f49b7360fef475 # good: [5f537664e705b0bf8b7e329861f20128534f6a83] cachestat: fix page cache statistics permission checking git bisect good 5f537664e705b0bf8b7e329861f20128534f6a83 # bad: [7b081a74c07d9e097f6829a1749f0aa441553c5e] Merge tag 'regulator-v6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator git bisect bad 7b081a74c07d9e097f6829a1749f0aa441553c5e # bad: [7b24f164cf005b9649138ef6de94aaac49c9f3d1] Merge tag 'ipsec-next-2025-01-09' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next git bisect bad 7b24f164cf005b9649138ef6de94aaac49c9f3d1 # bad: [75e2c86c7b180fd1068ad271178c2820a199e7eb] net: netlink: catch attempts to send empty messages git bisect bad 75e2c86c7b180fd1068ad271178c2820a199e7eb # bad: [bf361b18d91e96dee50c5794097a80ff3594725c] net: usb: lan78xx: Fix return value handling in lan78xx_set_features git bisect bad bf361b18d91e96dee50c5794097a80ff3594725c # bad: [195c3d4631816f02071f0e01d2d2def51cf5067a] octeontx2-pf: map skb data as device writeable git bisect bad 195c3d4631816f02071f0e01d2d2def51cf5067a # good: [dcf3827cde8621d2317a7f98e069adbdc2112982] xdp, xsk: constify read-only arguments of some static inline helpers git bisect good dcf3827cde8621d2317a7f98e069adbdc2112982 # good: [7a2716ac9a5b2a2dd0443b101766d3721f094ee1] Merge branch 'net-phylib-eee-cleanups' git bisect good 7a2716ac9a5b2a2dd0443b101766d3721f094ee1 # bad: [18eabadd73ae60023ab05e376246bd725fb0c113] vrf: Make pcpu_dstats update functions available to other modules. git bisect bad 18eabadd73ae60023ab05e376246bd725fb0c113 # bad: [8b1b2ca83b200fa46fdfb81e80ad5fe34537e6d4] net: usb: lan78xx: Improve error handling in EEPROM and OTP operations git bisect bad 8b1b2ca83b200fa46fdfb81e80ad5fe34537e6d4 # good: [39aa1d620d10cdd276f4728da50f136dbe939643] net: usb: lan78xx: move functions to avoid forward definitions git bisect good 39aa1d620d10cdd276f4728da50f136dbe939643 # good: [32ee0dc764505278229078e496e7b56a6d65224b] net: usb: lan78xx: Fix error handling in MII read/write functions git bisect good 32ee0dc764505278229078e496e7b56a6d65224b # first bad commit: [8b1b2ca83b200fa46fdfb81e80ad5fe34537e6d4] net: usb: lan78xx: Improve error handling in EEPROM and OTP operations
Attachments
- signature.asc [application/pgp-signature] 488 bytes