aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/marvell/pxa168_eth.c
diff options
context:
space:
mode:
authorAntoine Ténart <antoine.tenart@free-electrons.com>2014-09-30 10:28:10 -0400
committerDavid S. Miller <davem@davemloft.net>2014-09-30 16:36:12 -0400
commit09f5da1b6afbebaa0e04e65c7cd732099686ec5a (patch)
treef16826f56d001b541dce8f507f14c12928bbb3ca /drivers/net/ethernet/marvell/pxa168_eth.c
parent18b4bad312ffc82410173f6f265d43f8585d7e65 (diff)
net: pxa168_eth: fix Ethernet flow control status
IEEE 802.3x Ethernet flow control is disabled when bit (1 << 2) is set in the port status register. Fix the flow control detection in the link event handling function which was relying on the opposite assumption. Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/marvell/pxa168_eth.c')
-rw-r--r--drivers/net/ethernet/marvell/pxa168_eth.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/marvell/pxa168_eth.c b/drivers/net/ethernet/marvell/pxa168_eth.c
index c9920c322c8f..46b86714e9d7 100644
--- a/drivers/net/ethernet/marvell/pxa168_eth.c
+++ b/drivers/net/ethernet/marvell/pxa168_eth.c
@@ -163,7 +163,7 @@
163/* Bit definitions for Port status */ 163/* Bit definitions for Port status */
164#define PORT_SPEED_100 (1 << 0) 164#define PORT_SPEED_100 (1 << 0)
165#define FULL_DUPLEX (1 << 1) 165#define FULL_DUPLEX (1 << 1)
166#define FLOW_CONTROL_ENABLED (1 << 2) 166#define FLOW_CONTROL_DISABLED (1 << 2)
167#define LINK_UP (1 << 3) 167#define LINK_UP (1 << 3)
168 168
169/* Bit definitions for work to be done */ 169/* Bit definitions for work to be done */
@@ -885,7 +885,7 @@ static void handle_link_event(struct pxa168_eth_private *pep)
885 speed = 10; 885 speed = 10;
886 886
887 duplex = (port_status & FULL_DUPLEX) ? 1 : 0; 887 duplex = (port_status & FULL_DUPLEX) ? 1 : 0;
888 fc = (port_status & FLOW_CONTROL_ENABLED) ? 1 : 0; 888 fc = (port_status & FLOW_CONTROL_DISABLED) ? 0 : 1;
889 netdev_info(dev, "link up, %d Mb/s, %s duplex, flow control %sabled\n", 889 netdev_info(dev, "link up, %d Mb/s, %s duplex, flow control %sabled\n",
890 speed, duplex ? "full" : "half", fc ? "en" : "dis"); 890 speed, duplex ? "full" : "half", fc ? "en" : "dis");
891 if (!netif_carrier_ok(dev)) 891 if (!netif_carrier_ok(dev))