Microchip-Ethernet / EVB-KSZ9477

Repository for using Microchip EVB-KSZ9477 board. Product Supported: KSZ9477, KSZ9567, KSZ9897, KSZ9896, KSZ8567, KSZ8565, KSZ9893, KSZ9563, KSZ8563, LAN9646, Phys(KSZ9031/9131, LAN8770
76 stars 78 forks source link

ksz_probe_next() fails when strap=RMII (100 mbps host) #18

Open mads-bn opened 5 years ago

mads-bn commented 5 years ago

When default REG_PORT_XMII_CTRL_0=RMII the driver still decide to use RGMII. There is a lot of "#if 1" code in this file, which often is a sign of unstable code sections. Also the typecast of data to data_hi / data_lo looks suspicious and makes code harder to read.

https://github.com/Microchip-Ethernet/EVB-KSZ9477/blob/d7129fdf2b582ff7e25c63e458cc60dd4739226f/KSZ/linux-drivers/ksz9897/linux-4.14/drivers/net/ethernet/micrel/ksz_sw_9897.c#L18268-L18272