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>] [day] [month] [year] [list]
Message-ID: <DB8P190MB0634767F08E9D40E9DEBFDECD9989@DB8P190MB0634.EURP190.PROD.OUTLOOK.COM>
Date:   Wed, 3 Mar 2021 12:47:59 +0000
From:   Sven Schuchmann <schuchmann@...leissheimer.de>
To:     "Woojung.Huh@...rochip.com" <Woojung.Huh@...rochip.com>,
        "UNGLinuxDriver@...rochip.com" <UNGLinuxDriver@...rochip.com>
CC:     "davem@...emloft.net" <davem@...emloft.net>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: net: usb: lan78xx: Problem with ERR_STS

Hello Woojung,

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: mailto: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

Powered by Openwall GNU/*/Linux Powered by OpenVZ