net-next: mediatek: properly handle RGMII modes
authorJohn Crispin <john@phrozen.org>
Fri, 3 Jun 2016 08:17:09 +0000 (10:17 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 3 Jun 2016 23:54:16 +0000 (19:54 -0400)
commit37920fce0fc10264410eb880d411968b7934b61d
tree1b04b0c524d54ffc76e368eb15af9cb55a4e17c0
parent0c72c50f6f93b0c3daa9ea35d89ab3a933c7b5a0
net-next: mediatek: properly handle RGMII modes

If an external Gigabit PHY is connected to either of the MACs we need to
be able to tell the PHY to use a delay. Not doing so will result in heavy
packet loss and/or data corruption when using PHYs such as the IC+ IP1001.
We tell the PHY which MII delay mode to use via the devictree.

The ethernet driver needs to be adapted to handle all 3 rgmii-*id modes
in the same way as normal rgmii when setting up the MAC.

Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mediatek/mtk_eth_soc.c