[<prev] [next>] [day] [month] [year] [list]
Message-ID: <7caea37c-993c-f406-e95a-f37b8ffe8949@nexvision.fr>
Date: Fri, 15 Jul 2016 12:12:06 +0200
From: Charles-Antoine Couret <charles-antoine.couret@...vision.fr>
To: netdev <netdev@...r.kernel.org>
Subject: [PATCH 2/4 v4] Marvell phy: add field to get errors from fiber link.
>From 6244e234cced4b3e5ee1f0ab735c4bd52b7ed0a4 Mon Sep 17 00:00:00 2001
From: Charles-Antoine Couret <charles-antoine.couret@...vision.fr>
Date: Fri, 15 Jul 2016 11:56:12 +0200
Subject: [PATCH 2/4] Marvell phy: add field to get errors from fiber link.
Phy not concerned by fiber link don't display that.
Signed-off-by: Charles-Antoine Couret <charles-antoine.couret@...vision.fr>
---
drivers/net/phy/marvell.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
index 97b9148..13a93d8 100644
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -165,8 +165,9 @@ struct marvell_hw_stat {
};
static struct marvell_hw_stat marvell_hw_stats[] = {
- { "phy_receive_errors", 0, 21, 16},
+ { "phy_receive_errors_copper", 0, 21, 16},
{ "phy_idle_errors", 0, 10, 8 },
+ { "phy_receive_errors_fiber", 1, 21, 16},
};
struct marvell_priv {
@@ -1237,7 +1238,10 @@ static int m88e1318_set_wol(struct phy_device *phydev, struct ethtool_wolinfo *w
static int marvell_get_sset_count(struct phy_device *phydev)
{
- return ARRAY_SIZE(marvell_hw_stats);
+ if (phydev->supported & SUPPORTED_FIBRE)
+ return ARRAY_SIZE(marvell_hw_stats);
+ else
+ return ARRAY_SIZE(marvell_hw_stats) - NB_FIBER_STATS;
}
static void marvell_get_strings(struct phy_device *phydev, u8 *data)
--
2.7.4
Powered by blists - more mailing lists