From: Nicolai Buchwitz <nb@tipi-net.de>
To: Sven Schuchmann <schuchmann@schleissheimer.de>
Cc: Thangaraj Samynathan <Thangaraj.S@microchip.com>,
Rengarajan Sundararajan <Rengarajan.S@microchip.com>,
UNGLinuxDriver@microchip.com, Woojung.Huh@microchip.com,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: AW: [PATCH net] net: usb: lan78xx: restore VLAN filter table after device reset
Date: Fri, 19 Jun 2026 10:30:23 +0200 [thread overview]
Message-ID: <6d638042ad07a8bfb09ff3ee923e7b3f@tipi-net.de> (raw)
In-Reply-To: <BEZP281MB2245740AE8E3221DD076CE7DD9E22@BEZP281MB2245.DEUP281.PROD.OUTLOOK.COM>
Hi Sven
On 19.6.2026 10:11, Sven Schuchmann wrote:
> Hello Nicolai,
> thank you for the quick response and the quick patch!
>
> But actually it is not working for me... If I disconnect and connect
> the LAN Cable (I have setup an automated test already with two adapters
> connected to my RaspberryPi CM5) the lan78xx_reset() function is not
> called.
>
> Here is a dmesg output from my test.
> I defined DEBUG at the beginning of the driver and added
> netdev_info(dev->net, "function()"); to nearly every function
> in the driver. Also I added my a VLAN compare function:
>
> static void lan78xx_check_vlan_table(struct net_device *netdev)
> {
> struct lan78xx_net *dev = netdev_priv(netdev);
> struct lan78xx_priv *pdata = (struct lan78xx_priv *)(dev->data[0]);
>
> for (int i = 0; i < 1; i++) {
> u32 buf;
> lan78xx_dataport_read(dev, DP_SEL_RSEL_VLAN_DA_, i, 1, &buf);
> if (pdata->vlan_table[i] != buf)
> netdev_err(dev->net, "VLAN TABLE %d: 0x%02x 0x%02x - ERROR", i,
> pdata->vlan_table[i], buf);
> else
> netdev_info(dev->net, "VLAN TABLE %d: 0x%02x 0x%02x - Ok", i,
> pdata->vlan_table[i], buf);
> }
> }
>
> I call this at the end of lan78xx_start_rx_path() and
> lan78xx_mac_link_up().
> I now I get this output. The output ends after 16 disconnects and
> connects.
> Then it is broken. What I am wondering is what is happening after
> lan78xx_start_rx_path() that destroys the table...
> [...]
Can you please try with the following changes to lan78xx_mac_reset()?
ret = lan78xx_stop_rx_path(dev);
if (ret < 0)
goto link_down_fail;
- /* MAC reset seems to not affect MAC configuration, no idea if it is
- * really needed, but it was done in previous driver version. So,
leave
- * it here.
- */
- ret = lan78xx_mac_reset(dev);
- if (ret < 0)
- goto link_down_fail;
-
return;
BR
Nicolai
self NACK (or whatever it takes to withdraw this patch for now)
next prev parent reply other threads:[~2026-06-19 8:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-18 19:11 [PATCH net] net: usb: lan78xx: restore VLAN filter table after device reset Nicolai Buchwitz
2026-06-19 8:11 ` AW: " Sven Schuchmann
2026-06-19 8:30 ` Nicolai Buchwitz [this message]
2026-06-19 9:18 ` AW: " Sven Schuchmann
2026-06-19 9:53 ` Nicolai Buchwitz
2026-06-19 13:31 ` AW: " Sven Schuchmann
2026-06-19 14:01 ` Nicolai Buchwitz
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=6d638042ad07a8bfb09ff3ee923e7b3f@tipi-net.de \
--to=nb@tipi-net.de \
--cc=Rengarajan.S@microchip.com \
--cc=Thangaraj.S@microchip.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=Woojung.Huh@microchip.com \
--cc=andrew+netdev@lunn.ch \
--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=schuchmann@schleissheimer.de \
/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