I am currently running a 3.8.4 Kernel on a TCI6638K2K Keystone II (I understand this part is only supported by FAE but this is a generic Keystone II question not part specific). I am using a Marvell 88e1112 Phy on a custom board and have wrote a custom Phy driver to run this phy in 1000 Base X mode. My question comes because when I boot up the kernel DHCP messages do not make it out on the wire. I have verified this by mirroring the port to my PC and using wireshark to check for packets on the wire. What I have found out is that if I remove the fiber cable, and the plug it back it, I get these messages as expected:
libphy: 2090300.mdio:00 - Link is Down
libphy: 2090300.mdio:00 - Link is Up - 1000/Full
And then I am able to call $udhcpc -i eth0 again and I start seeing DHCP messages on the wire and also am able to get an IP address for the interface.
The debugging that I have done has brought me to the writing of 0x00000000 to the mac control register when the Link goes down is the key to freeing up the interface and allowing me to send DHCP messages on the wire. This happens in drivers/net/ethernet/ti/keystone_ethss.c (_cpsw_adjust_link()).
As a work around I have added:
__raw_writel(0, &slave->sliver->mac_control);
slave->mac_control = 0;
at the bottom of 'cpsw_slave_open()'
This causes writing of the register to zero to occur before the interface is completely up and thus the DHCP call during init will let the DHCP messages hit the wire.
Is there any reason why this would be happening, or has anyone else seen this before?