Talk:Ethernet

From linux-sunxi.org
Jump to navigation Jump to search

Allwinner A20 EMAC(PH)+GMAC(PA) simultaneously not working (?)

We have custom board with Allwinner A20 EMAC(on port H) and GMAC(on port A). It's planned to have 2 independent ethernet interfaces. However, in reality, GMAC and EMAC works only when both of them have RJ45 cables connected. I'm constantly observing same weird behavior: if I pull out ethernet cable from GMAC - EMAC also stop working. I've traced this behavior up to: https://elixir.bootlin.com/linux/v6.1.56/source/drivers/net/ethernet/allwinner/sun4i-emac.c#L783 - for some reason int_status (which is read from A20 register) stops maintaining bit 0x100 (new rx data), interrupt still works because the tx part of the interrupt handler is continue to be served. If I reinit emac (ifdown && ifup) it starts working for short period (about 1 sec).

It looks like that I'm not alone with this situation: https://www.olimex.com/forum/index.php?topic=7728.msg28979#msg28979

https://www.mail-archive.com/[email protected]/msg08585.html https://www.mail-archive.com/[email protected]/msg24227.html

I want to include description of this behavior of GMAC+EMAC into wiki to help the others to not make the same mistake I did if that's all true.