Netdev Archive on
 help / color / Atom feed
* usb: lan78xx: Problem with ERR_STS
@ 2021-02-23  6:54 Sven Schuchmann
  0 siblings, 0 replies; only message in thread
From: Sven Schuchmann @ 2021-02-23  6:54 UTC (permalink / raw)
  To: Woojung.Huh, UNGLinuxDriver, davem, kuba, netdev


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
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))

	if (buf & INT_STS_MAC_ERR_) {
		ret = lan78xx_read_reg(dev, ERR_STS, &buf);
		if (unlikely(ret < 0))

                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))

                ret = lan78xx_write_reg(dev, INT_STS, INT_STS_MAC_ERR_);
                if (unlikely(ret < 0))

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 Schuchmann
Schleißheimer Soft- und
Hardwareentwicklung GmbH
Am Kalkofen 10
61206 Nieder-Wöllstadt
Phone: +49 6034 9148 711
Fax: +49 6034 9148 91

Court of Registration: Amtsgericht Friedberg
Registration Number: HRB 1581
Management Board:
Hans-Joachim Schleißheimer
Christine Schleißheimer

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-23  6:54 usb: lan78xx: Problem with ERR_STS Sven Schuchmann

Netdev Archive on

Archives are clonable:
	git clone --mirror netdev/git/0.git
	git clone --mirror netdev/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 netdev netdev/ \
	public-inbox-index netdev

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone