Ethernet fails if cable plugged in during boot. If plugged in after boot, works.
This is an STM32MP157c based board design with Micrel KSZ9021GN PHY in 100 MII mode.
Have you ever seen this situation before?
Here are the relevant parts of the boot, the early kernel part looks normal and the LEDs are on.
...
[ 2.507568] stm32-dwmac 5800a000.ethernet: PTP uses main clock
[ 2.512079] stm32-dwmac 5800a000.ethernet: no reset control found
[ 2.518073] stm32-dwmac 5800a000.ethernet: No phy clock provided...
[ 2.524955] stm32-dwmac 5800a000.ethernet: User ID: 0x40, Synopsys ID: 0x42
[ 2.531304] stm32-dwmac 5800a000.ethernet: DWMAC4/5
[ 2.536191] stm32-dwmac 5800a000.ethernet: DMA HW capability register supported
[ 2.543532] stm32-dwmac 5800a000.ethernet: RX Checksum Offload Engine supported
[ 2.550811] stm32-dwmac 5800a000.ethernet: TX Checksum insertion supported
[ 2.557657] stm32-dwmac 5800a000.ethernet: Wake-Up On Lan supported
[ 2.563937] stm32-dwmac 5800a000.ethernet: TSO supported
[ 2.569235] stm32-dwmac 5800a000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[ 2.577041] stm32-dwmac 5800a000.ethernet: TSO feature enabled
[ 2.583203] libphy: stmmac: probed
...Then later on, I see the error and the driver asserts reset permanently and lights turn off.
[ 10.557559] stm32-dwmac 5800a000.ethernet eth0: PHY [stmmac-0:03] driver [Generic PHY]
...
[ 13.376644] stm32-dwmac 5800a000.ethernet: Failed to reset the dma
[ 13.388797] stm32-dwmac 5800a000.ethernet eth0: stmmac_hw_setup: DMA engine initialization failed
/dev/mmcblk2p4: fsck 0.0% compl[ 13.399390] stm32-dwmac 5800a000.ethernet eth0: stmmac_open: Hw setup failed
...The board must be (re)booted with the cable unplugged.
The other odd thing that might be a clue? is that when the ethernet IS working, I have to plug->unplug->plug the cable to light up and work. If then unpluged I have to always replug it twice to come up again.
Thanks in advance! BillR.
