Skip to content

Commit

Permalink
Add flow control support flags to gianfar's capabilities
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Pavaluca Matei-B46610 authored and David S. Miller committed Oct 29, 2014
1 parent 2c6c49d commit cf987af
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 3 additions & 0 deletions drivers/net/ethernet/freescale/gianfar.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
4 changes: 1 addition & 3 deletions drivers/net/ethernet/freescale/gianfar.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cf987af

Please sign in to comment.