]> git.baikalelectronics.ru Git - kernel.git/commit
net: mvneta: fix operation in 10 Mbit/s mode
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 8 Jul 2014 08:49:43 +0000 (10:49 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 9 Jul 2014 03:01:34 +0000 (20:01 -0700)
commit75f90022d9a1bc4e9cc894e06eafb1e5531b3fdd
treef0c34201e8f62488c2efa7d4ed183506d98a8110
parentf9f74616964651132be1eb38f257022156948b49
net: mvneta: fix operation in 10 Mbit/s mode

As reported by Maggie Mae Roxas, the mvneta driver doesn't behave
properly in 10 Mbit/s mode. This is due to a misconfiguration of the
MVNETA_GMAC_AUTONEG_CONFIG register: bit MVNETA_GMAC_CONFIG_MII_SPEED
must be set for a 100 Mbit/s speed, but cleared for a 10 Mbit/s speed,
which the driver was not properly doing. This commit adjusts that by
setting the MVNETA_GMAC_CONFIG_MII_SPEED bit only in 100 Mbit/s mode,
and relying on the fact that all the speed related bits of this
register are cleared at the beginning of the mvneta_adjust_link()
function.

This problem exists since a2099e3eb275b ("net: mvneta: driver for
Marvell Armada 370/XP network unit") which is the commit that
introduced the mvneta driver in the kernel.

Cc: <stable@vger.kernel.org> # v3.8+
Fixes: a2099e3eb275b ("net: mvneta: driver for Marvell Armada 370/XP network unit")
Reported-by: Maggie Mae Roxas <maggie.mae.roxas@gmail.com>
Cc: Maggie Mae Roxas <maggie.mae.roxas@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvneta.c