[<prev] [next>] [day] [month] [year] [list]
Message-ID: <DB8P190MB0634AA6DFAEAD1D235F6AD7FD9809@DB8P190MB0634.EURP190.PROD.OUTLOOK.COM>
Date: Tue, 23 Feb 2021 06:54:57 +0000
From: Sven Schuchmann <schuchmann@...leissheimer.de>
To: "Woojung.Huh@...rochip.com" <Woojung.Huh@...rochip.com>,
"UNGLinuxDriver@...rochip.com" <UNGLinuxDriver@...rochip.com>,
"davem@...emloft.net" <davem@...emloft.net>,
"kuba@...nel.org" <kuba@...nel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: usb: lan78xx: Problem with ERR_STS
Hello,
I am currently working on a project where we use a LAN7801
together with a DP83TC811R phy. The Problem is that if we change
link state of the phy to down and up again the LAN7801 is
not receiving anything anymore, while sending still works.
I already discussed this on the TI Forums
https://e2e.ti.com/support/interface/f/138/t/977492
but I still have no solution.
I placed the following code into lan78xx_link_status_change():
ret = lan78xx_read_reg(dev, INT_STS, &buf);
if (unlikely(ret < 0))
return;
if (buf & INT_STS_MAC_ERR_) {
ret = lan78xx_read_reg(dev, ERR_STS, &buf);
if (unlikely(ret < 0))
return;
netdev_err(dev->net, "MAC Error Interrupt, ERR_STS: 0x%08x\n", buf);
ret = lan78xx_write_reg(dev, ERR_STS, 0x3FC);
if (unlikely(ret < 0))
return;
ret = lan78xx_write_reg(dev, INT_STS, INT_STS_MAC_ERR_);
if (unlikely(ret < 0))
return;
}
If the Link of the phy is going down I see the following output:
[ 151.374983] lan78xx 1-1.4:1.0 broadr0: MAC Error Interrupt, ERR_STS: 0x00000308
So the lan7801 seems to detect an INT_STS_MAC_ERR error (where the contents of
ERR_STS are not always the same). The Problem is now that the lan7801 does not
receive anything from the phy anymore, whereas the phy sends valid data on RGMII
if it goes up again. Strangely it is still possible to send data from lan7801,
e.g. echo requests are still on the line, but response is not received.
The only way I can recover this state is unload/load the lan78xx driver.
Does anyone know how to recover the lan7801 to receive data again?
Any ideas in which registers/functions to look why rx is not working anymore?
Best Regards,
Sven
Sven Schuchmann
Schleißheimer Soft- und
Hardwareentwicklung GmbH
Am Kalkofen 10
61206 Nieder-Wöllstadt
GERMANY
Phone: +49 6034 9148 711
Fax: +49 6034 9148 91
Email: schuchmann@...leissheimer.de
Court of Registration: Amtsgericht Friedberg
Registration Number: HRB 1581
Management Board:
Hans-Joachim Schleißheimer
Christine Schleißheimer
Powered by blists - more mailing lists