Re: [PATCH] net: usb: lan78xx: Use phy_mac_interrupt() for interrupt handling

From: Daniel Wagner
Date: Thu Oct 24 2019 - 07:06:16 EST


On Thu, Oct 24, 2019 at 12:43:17PM +0200, Sebastian Andrzej Siewior wrote:
> On 2019-10-23 10:06:40 [+0200], Daniel Wagner wrote:
>
> Since this does not improve the situation as a whole it might be best to
> remove the code as suggested by Daniel.

I have tried to fix the above issue. It looks like the interrupt
handler doesn't work at all. Below is the log with all debug prints
enabled. I just see one PHY interrupt. Don't know if that is okay or
not.


[ 3.719647] lan78xx 1-1.1.1:1.0 (unnamed net_device) (uninitialized): deferred multicast write 0x00007ca0
[ 3.861125] lan78xx 1-1.1.1:1.0 (unnamed net_device) (uninitialized): No External EEPROM. Setting MAC Speed
[ 3.872500] libphy: lan78xx-mdiobus: probed
[ 3.883927] lan78xx 1-1.1.1:1.0 (unnamed net_device) (uninitialized): registered mdiobus bus usb-001:004
[ 3.893600] lan78xx 1-1.1.1:1.0 (unnamed net_device) (uninitialized): phydev->irq = 79
[ 4.274367] random: crng init done
[ 4.929478] lan78xx 1-1.1.1:1.0 eth0: receive multicast hash filter
[ 4.935922] lan78xx 1-1.1.1:1.0 eth0: deferred multicast write 0x00007ca2
[ 6.537962] lan78xx 1-1.1.1:1.0 eth0: PHY INTR: 0x00020000
[ 6.549129] lan78xx 1-1.1.1:1.0 eth0: speed: 1000 duplex: 1 anadv: 0x05e1 anlpa: 0xc1e1
[ 6.557293] lan78xx 1-1.1.1:1.0 eth0: rx pause disabled, tx pause disabled
[ 6.572581] Sending DHCP requests ..., OK
[ 12.200693] IP-Config: Got DHCP answer from 192.168.19.2, my address is 192.168.19.53
[ 12.208654] IP-Config: Complete:
[ 12.211929] device=eth0, hwaddr=b8:27:eb:85:c7:c9, ipaddr=192.168.19.53, mask=255.255.255.0, gw=192.168.19.1
[ 12.222350] host=192.168.19.53, domain=, nis-domain=(none)
[ 12.228364] bootserver=192.168.19.2, rootserver=192.168.19.2, rootpath=
[ 12.228369] nameserver0=192.168.19.2
[ 12.239812] ALSA device list:
[ 12.242839] No soundcards found.
[ 12.256896] VFS: Mounted root (nfs filesystem) on device 0:19.
[ 12.263501] devtmpfs: mounted
[ 12.273037] Freeing unused kernel memory: 5504K
[ 12.277769] Run /sbin/init as init process



and after this the NFS timeouts appear. I tried to figure out how the
PHY works [1] and played a bit around with fiddling with a few bits in
the registers. But now success at all.

I agree with Sebastian, with the revert the driver works at least.

Thanks,
Daniel

[1] http://ww1.microchip.com/downloads/en/DeviceDoc/LAN7800-Data-Sheet-DS00001992G.pdf