]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Add flow control support flags to gianfar's capabilities
authorPavaluca Matei-B46610 <matei.pavaluca@freescale.com>
Mon, 27 Oct 2014 08:42:42 +0000 (10:42 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 29 Oct 2014 18:33:15 +0000 (14:33 -0400)
The phy device supports 802.3x flow control, but the specific flags are not set
in the phy initialisation code. Flow control flags need to be added to the
supported capabilities of the phydev by the driver.

This is needed in order for ethtool to work ('ethtool -A' code checks for these
flags)

Signed-off-by: Pavaluca Matei <matei.pavaluca@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/gianfar.c
drivers/net/ethernet/freescale/gianfar.h

index 4fdf0aa16978baf237ae8f778ed941792e922d90..2485b742ba704e44efe00d384846a4b5e72972d7 100644 (file)
@@ -1687,6 +1687,9 @@ static int init_phy(struct net_device *dev)
        priv->phydev->supported &= (GFAR_SUPPORTED | gigabit_support);
        priv->phydev->advertising = priv->phydev->supported;
 
+       /* Add support for flow control, but don't advertise it by default */
+       priv->phydev->supported |= (SUPPORTED_Pause | SUPPORTED_Asym_Pause);
+
        return 0;
 }
 
index 2805cfbf1765147487c2f3da6390858803c5cd33..6b008685837cb217f28f2a6985aaa30e4268b6ba 100644 (file)
@@ -145,9 +145,7 @@ extern const char gfar_driver_version[];
                | SUPPORTED_Autoneg \
                | SUPPORTED_MII)
 
-#define GFAR_SUPPORTED_GBIT (SUPPORTED_1000baseT_Full \
-               | SUPPORTED_Pause \
-               | SUPPORTED_Asym_Pause)
+#define GFAR_SUPPORTED_GBIT SUPPORTED_1000baseT_Full
 
 /* TBI register addresses */
 #define MII_TBICON             0x11