Patch "net: hns: Fix ethtool private flags" has been added to the 4.9-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
net: hns: Fix ethtool private flags
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
net-hns-fix-ethtool-private-flags.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
d61d263c8d82db7c4404a29ebc29674b1c0c05c9Mon Sep 17 00:00:00 2001
From: Matthias Brugger <[email protected]>
Date: Thu, 15 Mar 2018 17:54:20 +0100
Subject: net: hns: Fix ethtool private flags
From: Matthias Brugger <[email protected]>
commit d61d263c8d82db7c4404a29ebc29674b1c0c05c9 upstream.
The driver implementation returns support for private flags, while no private flags are present. When asked for the number of private flags it returns the number of statistic flag names.
Fix this by returning EOPNOTSUPP for not implemented ethtool flags.
--- drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c | 2 +- drivers/net/ethernet/hisilicon/hns/hns_dsaf_ppe.c | 2 +- drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c | 2 +- drivers/net/ethernet/hisilicon/hns/hns_ethtool.c | 4 +++- 4 files changed, 6 insertions(+), 4 deletions(-)
drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c +1 -1
@@ -671,7 +671,7 @@ static void hns_gmac_get_strings(u32 strstatic int hns_gmac_get_sset_count (int stringset) { -if (stringset ==ETH_SS_STATS || stringset ==ETH_SS_PRIV_FLAGS ) +if (stringset ==ETH_SS_STATS )return ARRAY_SIZE (g_gmac_stats_string);return 0 ;
drivers/net/ethernet/hisilicon/hns/hns_dsaf_ppe.c +1 -1
@@ -422,7 +422,7 @@ void hns_ppe_update_stats(struct hns_ppeint hns_ppe_get_sset_count (int stringset) { -if (stringset ==ETH_SS_STATS || stringset ==ETH_SS_PRIV_FLAGS ) +if (stringset ==ETH_SS_STATS )return ETH_PPE_STATIC_NUM ;return 0 ; }
drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c +1 -1
@@ -798,7 +798,7 @@ void hns_rcb_get_stats(struct hnae_queue*/ int hns_rcb_get_ring_sset_count (int stringset) { -if (stringset ==ETH_SS_STATS || stringset ==ETH_SS_PRIV_FLAGS ) +if (stringset ==ETH_SS_STATS )return HNS_RING_STATIC_REG_NUM ;return 0 ;
drivers/net/ethernet/hisilicon/hns/hns_ethtool.c +3 -1
@@ -1017,8 +1017,10 @@ int hns_get_sset_count(struct net_device cnt--;return cnt; - }else { + }else if (stringset ==ETH_SS_STATS ) {return (HNS_NET_STATS_CNT + ops->get_sset_count (h, stringset)); + }else { +return -EOPNOTSUPP ; } }
Patches currently in stable-queue which might be from [email protected] are
queue-4.9/net-hns-fix-ethtool-private-flags.patch