netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v2 1/3] Add flow control support flags to gianfar's capabilities
@ 2014-10-27  8:42 Matei Pavaluca
  2014-10-27  8:42 ` [PATCH net-next v2 2/3] Fix the way the local advertising flow options are determined Matei Pavaluca
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Matei Pavaluca @ 2014-10-27  8:42 UTC (permalink / raw)
  To: netdev; +Cc: David S. Miller, Claudiu Manoil, Pavaluca Matei-B46610

From: Pavaluca Matei-B46610 <matei.pavaluca@freescale.com>

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>
---

v2:
  - none
 
 drivers/net/ethernet/freescale/gianfar.c | 3 +++
 drivers/net/ethernet/freescale/gianfar.h | 4 +---
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c
index 4fdf0aa..2485b74 100644
--- a/drivers/net/ethernet/freescale/gianfar.c
+++ b/drivers/net/ethernet/freescale/gianfar.c
@@ -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;
 }
 
diff --git a/drivers/net/ethernet/freescale/gianfar.h b/drivers/net/ethernet/freescale/gianfar.h
index 2805cfb..6b00868 100644
--- a/drivers/net/ethernet/freescale/gianfar.h
+++ b/drivers/net/ethernet/freescale/gianfar.h
@@ -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
-- 
1.7.11.7

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-10-29 18:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-27  8:42 [PATCH net-next v2 1/3] Add flow control support flags to gianfar's capabilities Matei Pavaluca
2014-10-27  8:42 ` [PATCH net-next v2 2/3] Fix the way the local advertising flow options are determined Matei Pavaluca
2014-10-29 18:33   ` David Miller
2014-10-27  8:42 ` [PATCH net-next v2 3/3] gianfar: Implement PAUSE frame generation support Matei Pavaluca
2014-10-29 18:34   ` David Miller
2014-10-29 18:33 ` [PATCH net-next v2 1/3] Add flow control support flags to gianfar's capabilities David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).