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

33 views
Skip to first unread message

Сергей Мосолов

unread,
Oct 26, 2023, 2:10:12 AM10/26/23
to linux-sunxi

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/linux...@googlegroups.com/msg08585.html https://www.mail-archive.com/linux...@googlegroups.com/msg24227.html

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

Reply all
Reply to author
Forward
Message has been deleted
0 new messages