Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cf987afc authored by Pavaluca Matei-B46610's avatar Pavaluca Matei-B46610 Committed by David S. Miller
Browse files

Add flow control support flags to gianfar's capabilities



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: default avatarPavaluca Matei <matei.pavaluca@freescale.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2c6c49de
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -1687,6 +1687,9 @@ static int init_phy(struct net_device *dev)
	priv->phydev->supported &= (GFAR_SUPPORTED | gigabit_support);
	priv->phydev->supported &= (GFAR_SUPPORTED | gigabit_support);
	priv->phydev->advertising = priv->phydev->supported;
	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;
	return 0;
}
}


+1 −3
Original line number Original line Diff line number Diff line
@@ -145,9 +145,7 @@ extern const char gfar_driver_version[];
		| SUPPORTED_Autoneg \
		| SUPPORTED_Autoneg \
		| SUPPORTED_MII)
		| SUPPORTED_MII)


#define GFAR_SUPPORTED_GBIT (SUPPORTED_1000baseT_Full \
#define GFAR_SUPPORTED_GBIT SUPPORTED_1000baseT_Full
		| SUPPORTED_Pause \
		| SUPPORTED_Asym_Pause)


/* TBI register addresses */
/* TBI register addresses */
#define MII_TBICON		0x11
#define MII_TBICON		0x11