[ewg] [PATCH] cxgb3: ethtool stats broken in backports
Jon Mason
jon at opengridcomputing.com
Wed Sep 10 14:36:48 PDT 2008
In more recent Linux kernels, ethtool get_stats_count has been replaced
with get_sset_count. These functions are used to determine the size of the
array to allocate for the device specific statistics. However, the OFED
backport patches for cxgb3 are not properly reverting the code to its
former state and simply removing the get_sset_count references. This
causes device specific statistics to not be queried.
The patch below correctly reverts the changes for older kernels and
should fix all the backports. It has been successfully tested on FC7
kernels.
Thanks,
Jon
Signed-off-by: Jon Mason <jon at opengridcomputing.com>
diff --git a/kernel_patches/backport/2.6.16/cxgb3_0030_sset.patch b/kernel_patches/backport/2.6.16/cxgb3_0030_sset.patch
index 1e6ea0f..14180fa 100644
--- a/kernel_patches/backport/2.6.16/cxgb3_0030_sset.patch
+++ b/kernel_patches/backport/2.6.16/cxgb3_0030_sset.patch
@@ -1,27 +1,30 @@
---- a/drivers/net/cxgb3/cxgb3_main.c 2008-06-12 09:48:05.000000000 -0500
-+++ b/drivers/net/cxgb3/cxgb3_main.c 2008-06-12 09:48:15.000000000 -0500
-@@ -1248,16 +1248,6 @@ static char stats_strings[][ETH_GSTRING_
+diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c
+index 5447f3e..8293fa5 100644
+--- a/drivers/net/cxgb3/cxgb3_main.c
++++ b/drivers/net/cxgb3/cxgb3_main.c
+@@ -1222,14 +1222,9 @@ static char stats_strings[][ETH_GSTRING_LEN] = {
};
-static int get_sset_count(struct net_device *dev, int sset)
--{
++static int get_stats_count(struct net_device *dev)
+ {
- switch (sset) {
- case ETH_SS_STATS:
- return ARRAY_SIZE(stats_strings);
- default:
- return -EOPNOTSUPP;
- }
--}
--
- #define T3_REGMAP_SIZE (3 * 1024)
++ return ARRAY_SIZE(stats_strings);
+ }
- static int get_regs_len(struct net_device *dev)
-@@ -1763,7 +1753,6 @@ static const struct ethtool_ops cxgb_eth
+ #define T3_REGMAP_SIZE (3 * 1024)
+@@ -1747,7 +1742,7 @@ static const struct ethtool_ops cxgb_ethtool_ops = {
.get_strings = get_strings,
.phys_id = cxgb3_phys_id,
.nway_reset = restart_autoneg,
- .get_sset_count = get_sset_count,
++ .get_stats_count = get_stats_count,
.get_ethtool_stats = get_stats,
.get_regs_len = get_regs_len,
.get_regs = get_regs,
diff --git a/kernel_patches/backport/2.6.16_sles10/cxgb3_0030_sset.patch b/kernel_patches/backport/2.6.16_sles10/cxgb3_0030_sset.patch
index 1e6ea0f..14180fa 100644
--- a/kernel_patches/backport/2.6.16_sles10/cxgb3_0030_sset.patch
+++ b/kernel_patches/backport/2.6.16_sles10/cxgb3_0030_sset.patch
@@ -1,27 +1,30 @@
---- a/drivers/net/cxgb3/cxgb3_main.c 2008-06-12 09:48:05.000000000 -0500
-+++ b/drivers/net/cxgb3/cxgb3_main.c 2008-06-12 09:48:15.000000000 -0500
-@@ -1248,16 +1248,6 @@ static char stats_strings[][ETH_GSTRING_
+diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c
+index 5447f3e..8293fa5 100644
+--- a/drivers/net/cxgb3/cxgb3_main.c
++++ b/drivers/net/cxgb3/cxgb3_main.c
+@@ -1222,14 +1222,9 @@ static char stats_strings[][ETH_GSTRING_LEN] = {
};
-static int get_sset_count(struct net_device *dev, int sset)
--{
++static int get_stats_count(struct net_device *dev)
+ {
- switch (sset) {
- case ETH_SS_STATS:
- return ARRAY_SIZE(stats_strings);
- default:
- return -EOPNOTSUPP;
- }
--}
--
- #define T3_REGMAP_SIZE (3 * 1024)
++ return ARRAY_SIZE(stats_strings);
+ }
- static int get_regs_len(struct net_device *dev)
-@@ -1763,7 +1753,6 @@ static const struct ethtool_ops cxgb_eth
+ #define T3_REGMAP_SIZE (3 * 1024)
+@@ -1747,7 +1742,7 @@ static const struct ethtool_ops cxgb_ethtool_ops = {
.get_strings = get_strings,
.phys_id = cxgb3_phys_id,
.nway_reset = restart_autoneg,
- .get_sset_count = get_sset_count,
++ .get_stats_count = get_stats_count,
.get_ethtool_stats = get_stats,
.get_regs_len = get_regs_len,
.get_regs = get_regs,
diff --git a/kernel_patches/backport/2.6.16_sles10_sp1/cxgb3_0030_sset.patch b/kernel_patches/backport/2.6.16_sles10_sp1/cxgb3_0030_sset.patch
index 1e6ea0f..14180fa 100644
--- a/kernel_patches/backport/2.6.16_sles10_sp1/cxgb3_0030_sset.patch
+++ b/kernel_patches/backport/2.6.16_sles10_sp1/cxgb3_0030_sset.patch
@@ -1,27 +1,30 @@
---- a/drivers/net/cxgb3/cxgb3_main.c 2008-06-12 09:48:05.000000000 -0500
-+++ b/drivers/net/cxgb3/cxgb3_main.c 2008-06-12 09:48:15.000000000 -0500
-@@ -1248,16 +1248,6 @@ static char stats_strings[][ETH_GSTRING_
+diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c
+index 5447f3e..8293fa5 100644
+--- a/drivers/net/cxgb3/cxgb3_main.c
++++ b/drivers/net/cxgb3/cxgb3_main.c
+@@ -1222,14 +1222,9 @@ static char stats_strings[][ETH_GSTRING_LEN] = {
};
-static int get_sset_count(struct net_device *dev, int sset)
--{
++static int get_stats_count(struct net_device *dev)
+ {
- switch (sset) {
- case ETH_SS_STATS:
- return ARRAY_SIZE(stats_strings);
- default:
- return -EOPNOTSUPP;
- }
--}
--
- #define T3_REGMAP_SIZE (3 * 1024)
++ return ARRAY_SIZE(stats_strings);
+ }
- static int get_regs_len(struct net_device *dev)
-@@ -1763,7 +1753,6 @@ static const struct ethtool_ops cxgb_eth
+ #define T3_REGMAP_SIZE (3 * 1024)
+@@ -1747,7 +1742,7 @@ static const struct ethtool_ops cxgb_ethtool_ops = {
.get_strings = get_strings,
.phys_id = cxgb3_phys_id,
.nway_reset = restart_autoneg,
- .get_sset_count = get_sset_count,
++ .get_stats_count = get_stats_count,
.get_ethtool_stats = get_stats,
.get_regs_len = get_regs_len,
.get_regs = get_regs,
diff --git a/kernel_patches/backport/2.6.16_sles10_sp2/cxgb3_0030_sset.patch b/kernel_patches/backport/2.6.16_sles10_sp2/cxgb3_0030_sset.patch
index 1e6ea0f..14180fa 100644
--- a/kernel_patches/backport/2.6.16_sles10_sp2/cxgb3_0030_sset.patch
+++ b/kernel_patches/backport/2.6.16_sles10_sp2/cxgb3_0030_sset.patch
@@ -1,27 +1,30 @@
---- a/drivers/net/cxgb3/cxgb3_main.c 2008-06-12 09:48:05.000000000 -0500
-+++ b/drivers/net/cxgb3/cxgb3_main.c 2008-06-12 09:48:15.000000000 -0500
-@@ -1248,16 +1248,6 @@ static char stats_strings[][ETH_GSTRING_
+diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c
+index 5447f3e..8293fa5 100644
+--- a/drivers/net/cxgb3/cxgb3_main.c
++++ b/drivers/net/cxgb3/cxgb3_main.c
+@@ -1222,14 +1222,9 @@ static char stats_strings[][ETH_GSTRING_LEN] = {
};
-static int get_sset_count(struct net_device *dev, int sset)
--{
++static int get_stats_count(struct net_device *dev)
+ {
- switch (sset) {
- case ETH_SS_STATS:
- return ARRAY_SIZE(stats_strings);
- default:
- return -EOPNOTSUPP;
- }
--}
--
- #define T3_REGMAP_SIZE (3 * 1024)
++ return ARRAY_SIZE(stats_strings);
+ }
- static int get_regs_len(struct net_device *dev)
-@@ -1763,7 +1753,6 @@ static const struct ethtool_ops cxgb_eth
+ #define T3_REGMAP_SIZE (3 * 1024)
+@@ -1747,7 +1742,7 @@ static const struct ethtool_ops cxgb_ethtool_ops = {
.get_strings = get_strings,
.phys_id = cxgb3_phys_id,
.nway_reset = restart_autoneg,
- .get_sset_count = get_sset_count,
++ .get_stats_count = get_stats_count,
.get_ethtool_stats = get_stats,
.get_regs_len = get_regs_len,
.get_regs = get_regs,
diff --git a/kernel_patches/backport/2.6.17/cxgb3_0030_sset.patch b/kernel_patches/backport/2.6.17/cxgb3_0030_sset.patch
index 1e6ea0f..14180fa 100644
--- a/kernel_patches/backport/2.6.17/cxgb3_0030_sset.patch
+++ b/kernel_patches/backport/2.6.17/cxgb3_0030_sset.patch
@@ -1,27 +1,30 @@
---- a/drivers/net/cxgb3/cxgb3_main.c 2008-06-12 09:48:05.000000000 -0500
-+++ b/drivers/net/cxgb3/cxgb3_main.c 2008-06-12 09:48:15.000000000 -0500
-@@ -1248,16 +1248,6 @@ static char stats_strings[][ETH_GSTRING_
+diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c
+index 5447f3e..8293fa5 100644
+--- a/drivers/net/cxgb3/cxgb3_main.c
++++ b/drivers/net/cxgb3/cxgb3_main.c
+@@ -1222,14 +1222,9 @@ static char stats_strings[][ETH_GSTRING_LEN] = {
};
-static int get_sset_count(struct net_device *dev, int sset)
--{
++static int get_stats_count(struct net_device *dev)
+ {
- switch (sset) {
- case ETH_SS_STATS:
- return ARRAY_SIZE(stats_strings);
- default:
- return -EOPNOTSUPP;
- }
--}
--
- #define T3_REGMAP_SIZE (3 * 1024)
++ return ARRAY_SIZE(stats_strings);
+ }
- static int get_regs_len(struct net_device *dev)
-@@ -1763,7 +1753,6 @@ static const struct ethtool_ops cxgb_eth
+ #define T3_REGMAP_SIZE (3 * 1024)
+@@ -1747,7 +1742,7 @@ static const struct ethtool_ops cxgb_ethtool_ops = {
.get_strings = get_strings,
.phys_id = cxgb3_phys_id,
.nway_reset = restart_autoneg,
- .get_sset_count = get_sset_count,
++ .get_stats_count = get_stats_count,
.get_ethtool_stats = get_stats,
.get_regs_len = get_regs_len,
.get_regs = get_regs,
diff --git a/kernel_patches/backport/2.6.18-EL5.1/cxgb3_0030_sset.patch b/kernel_patches/backport/2.6.18-EL5.1/cxgb3_0030_sset.patch
index 1e6ea0f..14180fa 100644
--- a/kernel_patches/backport/2.6.18-EL5.1/cxgb3_0030_sset.patch
+++ b/kernel_patches/backport/2.6.18-EL5.1/cxgb3_0030_sset.patch
@@ -1,27 +1,30 @@
---- a/drivers/net/cxgb3/cxgb3_main.c 2008-06-12 09:48:05.000000000 -0500
-+++ b/drivers/net/cxgb3/cxgb3_main.c 2008-06-12 09:48:15.000000000 -0500
-@@ -1248,16 +1248,6 @@ static char stats_strings[][ETH_GSTRING_
+diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c
+index 5447f3e..8293fa5 100644
+--- a/drivers/net/cxgb3/cxgb3_main.c
++++ b/drivers/net/cxgb3/cxgb3_main.c
+@@ -1222,14 +1222,9 @@ static char stats_strings[][ETH_GSTRING_LEN] = {
};
-static int get_sset_count(struct net_device *dev, int sset)
--{
++static int get_stats_count(struct net_device *dev)
+ {
- switch (sset) {
- case ETH_SS_STATS:
- return ARRAY_SIZE(stats_strings);
- default:
- return -EOPNOTSUPP;
- }
--}
--
- #define T3_REGMAP_SIZE (3 * 1024)
++ return ARRAY_SIZE(stats_strings);
+ }
- static int get_regs_len(struct net_device *dev)
-@@ -1763,7 +1753,6 @@ static const struct ethtool_ops cxgb_eth
+ #define T3_REGMAP_SIZE (3 * 1024)
+@@ -1747,7 +1742,7 @@ static const struct ethtool_ops cxgb_ethtool_ops = {
.get_strings = get_strings,
.phys_id = cxgb3_phys_id,
.nway_reset = restart_autoneg,
- .get_sset_count = get_sset_count,
++ .get_stats_count = get_stats_count,
.get_ethtool_stats = get_stats,
.get_regs_len = get_regs_len,
.get_regs = get_regs,
diff --git a/kernel_patches/backport/2.6.18-EL5.2/cxgb3_0030_sset.patch b/kernel_patches/backport/2.6.18-EL5.2/cxgb3_0030_sset.patch
index 1e6ea0f..14180fa 100644
--- a/kernel_patches/backport/2.6.18-EL5.2/cxgb3_0030_sset.patch
+++ b/kernel_patches/backport/2.6.18-EL5.2/cxgb3_0030_sset.patch
@@ -1,27 +1,30 @@
---- a/drivers/net/cxgb3/cxgb3_main.c 2008-06-12 09:48:05.000000000 -0500
-+++ b/drivers/net/cxgb3/cxgb3_main.c 2008-06-12 09:48:15.000000000 -0500
-@@ -1248,16 +1248,6 @@ static char stats_strings[][ETH_GSTRING_
+diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c
+index 5447f3e..8293fa5 100644
+--- a/drivers/net/cxgb3/cxgb3_main.c
++++ b/drivers/net/cxgb3/cxgb3_main.c
+@@ -1222,14 +1222,9 @@ static char stats_strings[][ETH_GSTRING_LEN] = {
};
-static int get_sset_count(struct net_device *dev, int sset)
--{
++static int get_stats_count(struct net_device *dev)
+ {
- switch (sset) {
- case ETH_SS_STATS:
- return ARRAY_SIZE(stats_strings);
- default:
- return -EOPNOTSUPP;
- }
--}
--
- #define T3_REGMAP_SIZE (3 * 1024)
++ return ARRAY_SIZE(stats_strings);
+ }
- static int get_regs_len(struct net_device *dev)
-@@ -1763,7 +1753,6 @@ static const struct ethtool_ops cxgb_eth
+ #define T3_REGMAP_SIZE (3 * 1024)
+@@ -1747,7 +1742,7 @@ static const struct ethtool_ops cxgb_ethtool_ops = {
.get_strings = get_strings,
.phys_id = cxgb3_phys_id,
.nway_reset = restart_autoneg,
- .get_sset_count = get_sset_count,
++ .get_stats_count = get_stats_count,
.get_ethtool_stats = get_stats,
.get_regs_len = get_regs_len,
.get_regs = get_regs,
diff --git a/kernel_patches/backport/2.6.18/cxgb3_0030_sset.patch b/kernel_patches/backport/2.6.18/cxgb3_0030_sset.patch
index 1e6ea0f..14180fa 100644
--- a/kernel_patches/backport/2.6.18/cxgb3_0030_sset.patch
+++ b/kernel_patches/backport/2.6.18/cxgb3_0030_sset.patch
@@ -1,27 +1,30 @@
---- a/drivers/net/cxgb3/cxgb3_main.c 2008-06-12 09:48:05.000000000 -0500
-+++ b/drivers/net/cxgb3/cxgb3_main.c 2008-06-12 09:48:15.000000000 -0500
-@@ -1248,16 +1248,6 @@ static char stats_strings[][ETH_GSTRING_
+diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c
+index 5447f3e..8293fa5 100644
+--- a/drivers/net/cxgb3/cxgb3_main.c
++++ b/drivers/net/cxgb3/cxgb3_main.c
+@@ -1222,14 +1222,9 @@ static char stats_strings[][ETH_GSTRING_LEN] = {
};
-static int get_sset_count(struct net_device *dev, int sset)
--{
++static int get_stats_count(struct net_device *dev)
+ {
- switch (sset) {
- case ETH_SS_STATS:
- return ARRAY_SIZE(stats_strings);
- default:
- return -EOPNOTSUPP;
- }
--}
--
- #define T3_REGMAP_SIZE (3 * 1024)
++ return ARRAY_SIZE(stats_strings);
+ }
- static int get_regs_len(struct net_device *dev)
-@@ -1763,7 +1753,6 @@ static const struct ethtool_ops cxgb_eth
+ #define T3_REGMAP_SIZE (3 * 1024)
+@@ -1747,7 +1742,7 @@ static const struct ethtool_ops cxgb_ethtool_ops = {
.get_strings = get_strings,
.phys_id = cxgb3_phys_id,
.nway_reset = restart_autoneg,
- .get_sset_count = get_sset_count,
++ .get_stats_count = get_stats_count,
.get_ethtool_stats = get_stats,
.get_regs_len = get_regs_len,
.get_regs = get_regs,
diff --git a/kernel_patches/backport/2.6.18_FC6/cxgb3_0030_sset.patch b/kernel_patches/backport/2.6.18_FC6/cxgb3_0030_sset.patch
index 1e6ea0f..14180fa 100644
--- a/kernel_patches/backport/2.6.18_FC6/cxgb3_0030_sset.patch
+++ b/kernel_patches/backport/2.6.18_FC6/cxgb3_0030_sset.patch
@@ -1,27 +1,30 @@
---- a/drivers/net/cxgb3/cxgb3_main.c 2008-06-12 09:48:05.000000000 -0500
-+++ b/drivers/net/cxgb3/cxgb3_main.c 2008-06-12 09:48:15.000000000 -0500
-@@ -1248,16 +1248,6 @@ static char stats_strings[][ETH_GSTRING_
+diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c
+index 5447f3e..8293fa5 100644
+--- a/drivers/net/cxgb3/cxgb3_main.c
++++ b/drivers/net/cxgb3/cxgb3_main.c
+@@ -1222,14 +1222,9 @@ static char stats_strings[][ETH_GSTRING_LEN] = {
};
-static int get_sset_count(struct net_device *dev, int sset)
--{
++static int get_stats_count(struct net_device *dev)
+ {
- switch (sset) {
- case ETH_SS_STATS:
- return ARRAY_SIZE(stats_strings);
- default:
- return -EOPNOTSUPP;
- }
--}
--
- #define T3_REGMAP_SIZE (3 * 1024)
++ return ARRAY_SIZE(stats_strings);
+ }
- static int get_regs_len(struct net_device *dev)
-@@ -1763,7 +1753,6 @@ static const struct ethtool_ops cxgb_eth
+ #define T3_REGMAP_SIZE (3 * 1024)
+@@ -1747,7 +1742,7 @@ static const struct ethtool_ops cxgb_ethtool_ops = {
.get_strings = get_strings,
.phys_id = cxgb3_phys_id,
.nway_reset = restart_autoneg,
- .get_sset_count = get_sset_count,
++ .get_stats_count = get_stats_count,
.get_ethtool_stats = get_stats,
.get_regs_len = get_regs_len,
.get_regs = get_regs,
diff --git a/kernel_patches/backport/2.6.18_suse10_2/cxgb3_0030_sset.patch b/kernel_patches/backport/2.6.18_suse10_2/cxgb3_0030_sset.patch
index 1e6ea0f..14180fa 100644
--- a/kernel_patches/backport/2.6.18_suse10_2/cxgb3_0030_sset.patch
+++ b/kernel_patches/backport/2.6.18_suse10_2/cxgb3_0030_sset.patch
@@ -1,27 +1,30 @@
---- a/drivers/net/cxgb3/cxgb3_main.c 2008-06-12 09:48:05.000000000 -0500
-+++ b/drivers/net/cxgb3/cxgb3_main.c 2008-06-12 09:48:15.000000000 -0500
-@@ -1248,16 +1248,6 @@ static char stats_strings[][ETH_GSTRING_
+diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c
+index 5447f3e..8293fa5 100644
+--- a/drivers/net/cxgb3/cxgb3_main.c
++++ b/drivers/net/cxgb3/cxgb3_main.c
+@@ -1222,14 +1222,9 @@ static char stats_strings[][ETH_GSTRING_LEN] = {
};
-static int get_sset_count(struct net_device *dev, int sset)
--{
++static int get_stats_count(struct net_device *dev)
+ {
- switch (sset) {
- case ETH_SS_STATS:
- return ARRAY_SIZE(stats_strings);
- default:
- return -EOPNOTSUPP;
- }
--}
--
- #define T3_REGMAP_SIZE (3 * 1024)
++ return ARRAY_SIZE(stats_strings);
+ }
- static int get_regs_len(struct net_device *dev)
-@@ -1763,7 +1753,6 @@ static const struct ethtool_ops cxgb_eth
+ #define T3_REGMAP_SIZE (3 * 1024)
+@@ -1747,7 +1742,7 @@ static const struct ethtool_ops cxgb_ethtool_ops = {
.get_strings = get_strings,
.phys_id = cxgb3_phys_id,
.nway_reset = restart_autoneg,
- .get_sset_count = get_sset_count,
++ .get_stats_count = get_stats_count,
.get_ethtool_stats = get_stats,
.get_regs_len = get_regs_len,
.get_regs = get_regs,
diff --git a/kernel_patches/backport/2.6.19/cxgb3_0030_sset.patch b/kernel_patches/backport/2.6.19/cxgb3_0030_sset.patch
index 1e6ea0f..14180fa 100644
--- a/kernel_patches/backport/2.6.19/cxgb3_0030_sset.patch
+++ b/kernel_patches/backport/2.6.19/cxgb3_0030_sset.patch
@@ -1,27 +1,30 @@
---- a/drivers/net/cxgb3/cxgb3_main.c 2008-06-12 09:48:05.000000000 -0500
-+++ b/drivers/net/cxgb3/cxgb3_main.c 2008-06-12 09:48:15.000000000 -0500
-@@ -1248,16 +1248,6 @@ static char stats_strings[][ETH_GSTRING_
+diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c
+index 5447f3e..8293fa5 100644
+--- a/drivers/net/cxgb3/cxgb3_main.c
++++ b/drivers/net/cxgb3/cxgb3_main.c
+@@ -1222,14 +1222,9 @@ static char stats_strings[][ETH_GSTRING_LEN] = {
};
-static int get_sset_count(struct net_device *dev, int sset)
--{
++static int get_stats_count(struct net_device *dev)
+ {
- switch (sset) {
- case ETH_SS_STATS:
- return ARRAY_SIZE(stats_strings);
- default:
- return -EOPNOTSUPP;
- }
--}
--
- #define T3_REGMAP_SIZE (3 * 1024)
++ return ARRAY_SIZE(stats_strings);
+ }
- static int get_regs_len(struct net_device *dev)
-@@ -1763,7 +1753,6 @@ static const struct ethtool_ops cxgb_eth
+ #define T3_REGMAP_SIZE (3 * 1024)
+@@ -1747,7 +1742,7 @@ static const struct ethtool_ops cxgb_ethtool_ops = {
.get_strings = get_strings,
.phys_id = cxgb3_phys_id,
.nway_reset = restart_autoneg,
- .get_sset_count = get_sset_count,
++ .get_stats_count = get_stats_count,
.get_ethtool_stats = get_stats,
.get_regs_len = get_regs_len,
.get_regs = get_regs,
diff --git a/kernel_patches/backport/2.6.20/cxgb3_0030_sset.patch b/kernel_patches/backport/2.6.20/cxgb3_0030_sset.patch
index 1e6ea0f..14180fa 100644
--- a/kernel_patches/backport/2.6.20/cxgb3_0030_sset.patch
+++ b/kernel_patches/backport/2.6.20/cxgb3_0030_sset.patch
@@ -1,27 +1,30 @@
---- a/drivers/net/cxgb3/cxgb3_main.c 2008-06-12 09:48:05.000000000 -0500
-+++ b/drivers/net/cxgb3/cxgb3_main.c 2008-06-12 09:48:15.000000000 -0500
-@@ -1248,16 +1248,6 @@ static char stats_strings[][ETH_GSTRING_
+diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c
+index 5447f3e..8293fa5 100644
+--- a/drivers/net/cxgb3/cxgb3_main.c
++++ b/drivers/net/cxgb3/cxgb3_main.c
+@@ -1222,14 +1222,9 @@ static char stats_strings[][ETH_GSTRING_LEN] = {
};
-static int get_sset_count(struct net_device *dev, int sset)
--{
++static int get_stats_count(struct net_device *dev)
+ {
- switch (sset) {
- case ETH_SS_STATS:
- return ARRAY_SIZE(stats_strings);
- default:
- return -EOPNOTSUPP;
- }
--}
--
- #define T3_REGMAP_SIZE (3 * 1024)
++ return ARRAY_SIZE(stats_strings);
+ }
- static int get_regs_len(struct net_device *dev)
-@@ -1763,7 +1753,6 @@ static const struct ethtool_ops cxgb_eth
+ #define T3_REGMAP_SIZE (3 * 1024)
+@@ -1747,7 +1742,7 @@ static const struct ethtool_ops cxgb_ethtool_ops = {
.get_strings = get_strings,
.phys_id = cxgb3_phys_id,
.nway_reset = restart_autoneg,
- .get_sset_count = get_sset_count,
++ .get_stats_count = get_stats_count,
.get_ethtool_stats = get_stats,
.get_regs_len = get_regs_len,
.get_regs = get_regs,
diff --git a/kernel_patches/backport/2.6.21/cxgb3_0030_sset.patch b/kernel_patches/backport/2.6.21/cxgb3_0030_sset.patch
index 1e6ea0f..14180fa 100644
--- a/kernel_patches/backport/2.6.21/cxgb3_0030_sset.patch
+++ b/kernel_patches/backport/2.6.21/cxgb3_0030_sset.patch
@@ -1,27 +1,30 @@
---- a/drivers/net/cxgb3/cxgb3_main.c 2008-06-12 09:48:05.000000000 -0500
-+++ b/drivers/net/cxgb3/cxgb3_main.c 2008-06-12 09:48:15.000000000 -0500
-@@ -1248,16 +1248,6 @@ static char stats_strings[][ETH_GSTRING_
+diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c
+index 5447f3e..8293fa5 100644
+--- a/drivers/net/cxgb3/cxgb3_main.c
++++ b/drivers/net/cxgb3/cxgb3_main.c
+@@ -1222,14 +1222,9 @@ static char stats_strings[][ETH_GSTRING_LEN] = {
};
-static int get_sset_count(struct net_device *dev, int sset)
--{
++static int get_stats_count(struct net_device *dev)
+ {
- switch (sset) {
- case ETH_SS_STATS:
- return ARRAY_SIZE(stats_strings);
- default:
- return -EOPNOTSUPP;
- }
--}
--
- #define T3_REGMAP_SIZE (3 * 1024)
++ return ARRAY_SIZE(stats_strings);
+ }
- static int get_regs_len(struct net_device *dev)
-@@ -1763,7 +1753,6 @@ static const struct ethtool_ops cxgb_eth
+ #define T3_REGMAP_SIZE (3 * 1024)
+@@ -1747,7 +1742,7 @@ static const struct ethtool_ops cxgb_ethtool_ops = {
.get_strings = get_strings,
.phys_id = cxgb3_phys_id,
.nway_reset = restart_autoneg,
- .get_sset_count = get_sset_count,
++ .get_stats_count = get_stats_count,
.get_ethtool_stats = get_stats,
.get_regs_len = get_regs_len,
.get_regs = get_regs,
diff --git a/kernel_patches/backport/2.6.22/cxgb3_0030_sset.patch b/kernel_patches/backport/2.6.22/cxgb3_0030_sset.patch
index 1e6ea0f..14180fa 100644
--- a/kernel_patches/backport/2.6.22/cxgb3_0030_sset.patch
+++ b/kernel_patches/backport/2.6.22/cxgb3_0030_sset.patch
@@ -1,27 +1,30 @@
---- a/drivers/net/cxgb3/cxgb3_main.c 2008-06-12 09:48:05.000000000 -0500
-+++ b/drivers/net/cxgb3/cxgb3_main.c 2008-06-12 09:48:15.000000000 -0500
-@@ -1248,16 +1248,6 @@ static char stats_strings[][ETH_GSTRING_
+diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c
+index 5447f3e..8293fa5 100644
+--- a/drivers/net/cxgb3/cxgb3_main.c
++++ b/drivers/net/cxgb3/cxgb3_main.c
+@@ -1222,14 +1222,9 @@ static char stats_strings[][ETH_GSTRING_LEN] = {
};
-static int get_sset_count(struct net_device *dev, int sset)
--{
++static int get_stats_count(struct net_device *dev)
+ {
- switch (sset) {
- case ETH_SS_STATS:
- return ARRAY_SIZE(stats_strings);
- default:
- return -EOPNOTSUPP;
- }
--}
--
- #define T3_REGMAP_SIZE (3 * 1024)
++ return ARRAY_SIZE(stats_strings);
+ }
- static int get_regs_len(struct net_device *dev)
-@@ -1763,7 +1753,6 @@ static const struct ethtool_ops cxgb_eth
+ #define T3_REGMAP_SIZE (3 * 1024)
+@@ -1747,7 +1742,7 @@ static const struct ethtool_ops cxgb_ethtool_ops = {
.get_strings = get_strings,
.phys_id = cxgb3_phys_id,
.nway_reset = restart_autoneg,
- .get_sset_count = get_sset_count,
++ .get_stats_count = get_stats_count,
.get_ethtool_stats = get_stats,
.get_regs_len = get_regs_len,
.get_regs = get_regs,
diff --git a/kernel_patches/backport/2.6.22_suse10_3/cxgb3_0030_sset.patch b/kernel_patches/backport/2.6.22_suse10_3/cxgb3_0030_sset.patch
index 1e6ea0f..14180fa 100644
--- a/kernel_patches/backport/2.6.22_suse10_3/cxgb3_0030_sset.patch
+++ b/kernel_patches/backport/2.6.22_suse10_3/cxgb3_0030_sset.patch
@@ -1,27 +1,30 @@
---- a/drivers/net/cxgb3/cxgb3_main.c 2008-06-12 09:48:05.000000000 -0500
-+++ b/drivers/net/cxgb3/cxgb3_main.c 2008-06-12 09:48:15.000000000 -0500
-@@ -1248,16 +1248,6 @@ static char stats_strings[][ETH_GSTRING_
+diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c
+index 5447f3e..8293fa5 100644
+--- a/drivers/net/cxgb3/cxgb3_main.c
++++ b/drivers/net/cxgb3/cxgb3_main.c
+@@ -1222,14 +1222,9 @@ static char stats_strings[][ETH_GSTRING_LEN] = {
};
-static int get_sset_count(struct net_device *dev, int sset)
--{
++static int get_stats_count(struct net_device *dev)
+ {
- switch (sset) {
- case ETH_SS_STATS:
- return ARRAY_SIZE(stats_strings);
- default:
- return -EOPNOTSUPP;
- }
--}
--
- #define T3_REGMAP_SIZE (3 * 1024)
++ return ARRAY_SIZE(stats_strings);
+ }
- static int get_regs_len(struct net_device *dev)
-@@ -1763,7 +1753,6 @@ static const struct ethtool_ops cxgb_eth
+ #define T3_REGMAP_SIZE (3 * 1024)
+@@ -1747,7 +1742,7 @@ static const struct ethtool_ops cxgb_ethtool_ops = {
.get_strings = get_strings,
.phys_id = cxgb3_phys_id,
.nway_reset = restart_autoneg,
- .get_sset_count = get_sset_count,
++ .get_stats_count = get_stats_count,
.get_ethtool_stats = get_stats,
.get_regs_len = get_regs_len,
.get_regs = get_regs,
diff --git a/kernel_patches/backport/2.6.23/cxgb3_0030_sset.patch b/kernel_patches/backport/2.6.23/cxgb3_0030_sset.patch
index 1e6ea0f..14180fa 100644
--- a/kernel_patches/backport/2.6.23/cxgb3_0030_sset.patch
+++ b/kernel_patches/backport/2.6.23/cxgb3_0030_sset.patch
@@ -1,27 +1,30 @@
---- a/drivers/net/cxgb3/cxgb3_main.c 2008-06-12 09:48:05.000000000 -0500
-+++ b/drivers/net/cxgb3/cxgb3_main.c 2008-06-12 09:48:15.000000000 -0500
-@@ -1248,16 +1248,6 @@ static char stats_strings[][ETH_GSTRING_
+diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c
+index 5447f3e..8293fa5 100644
+--- a/drivers/net/cxgb3/cxgb3_main.c
++++ b/drivers/net/cxgb3/cxgb3_main.c
+@@ -1222,14 +1222,9 @@ static char stats_strings[][ETH_GSTRING_LEN] = {
};
-static int get_sset_count(struct net_device *dev, int sset)
--{
++static int get_stats_count(struct net_device *dev)
+ {
- switch (sset) {
- case ETH_SS_STATS:
- return ARRAY_SIZE(stats_strings);
- default:
- return -EOPNOTSUPP;
- }
--}
--
- #define T3_REGMAP_SIZE (3 * 1024)
++ return ARRAY_SIZE(stats_strings);
+ }
- static int get_regs_len(struct net_device *dev)
-@@ -1763,7 +1753,6 @@ static const struct ethtool_ops cxgb_eth
+ #define T3_REGMAP_SIZE (3 * 1024)
+@@ -1747,7 +1742,7 @@ static const struct ethtool_ops cxgb_ethtool_ops = {
.get_strings = get_strings,
.phys_id = cxgb3_phys_id,
.nway_reset = restart_autoneg,
- .get_sset_count = get_sset_count,
++ .get_stats_count = get_stats_count,
.get_ethtool_stats = get_stats,
.get_regs_len = get_regs_len,
.get_regs = get_regs,
diff --git a/kernel_patches/backport/2.6.9_U4/cxgb3_0030_sset.patch b/kernel_patches/backport/2.6.9_U4/cxgb3_0030_sset.patch
index 1e6ea0f..14180fa 100644
--- a/kernel_patches/backport/2.6.9_U4/cxgb3_0030_sset.patch
+++ b/kernel_patches/backport/2.6.9_U4/cxgb3_0030_sset.patch
@@ -1,27 +1,30 @@
---- a/drivers/net/cxgb3/cxgb3_main.c 2008-06-12 09:48:05.000000000 -0500
-+++ b/drivers/net/cxgb3/cxgb3_main.c 2008-06-12 09:48:15.000000000 -0500
-@@ -1248,16 +1248,6 @@ static char stats_strings[][ETH_GSTRING_
+diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c
+index 5447f3e..8293fa5 100644
+--- a/drivers/net/cxgb3/cxgb3_main.c
++++ b/drivers/net/cxgb3/cxgb3_main.c
+@@ -1222,14 +1222,9 @@ static char stats_strings[][ETH_GSTRING_LEN] = {
};
-static int get_sset_count(struct net_device *dev, int sset)
--{
++static int get_stats_count(struct net_device *dev)
+ {
- switch (sset) {
- case ETH_SS_STATS:
- return ARRAY_SIZE(stats_strings);
- default:
- return -EOPNOTSUPP;
- }
--}
--
- #define T3_REGMAP_SIZE (3 * 1024)
++ return ARRAY_SIZE(stats_strings);
+ }
- static int get_regs_len(struct net_device *dev)
-@@ -1763,7 +1753,6 @@ static const struct ethtool_ops cxgb_eth
+ #define T3_REGMAP_SIZE (3 * 1024)
+@@ -1747,7 +1742,7 @@ static const struct ethtool_ops cxgb_ethtool_ops = {
.get_strings = get_strings,
.phys_id = cxgb3_phys_id,
.nway_reset = restart_autoneg,
- .get_sset_count = get_sset_count,
++ .get_stats_count = get_stats_count,
.get_ethtool_stats = get_stats,
.get_regs_len = get_regs_len,
.get_regs = get_regs,
diff --git a/kernel_patches/backport/2.6.9_U5/cxgb3_0030_sset.patch b/kernel_patches/backport/2.6.9_U5/cxgb3_0030_sset.patch
index 1e6ea0f..14180fa 100644
--- a/kernel_patches/backport/2.6.9_U5/cxgb3_0030_sset.patch
+++ b/kernel_patches/backport/2.6.9_U5/cxgb3_0030_sset.patch
@@ -1,27 +1,30 @@
---- a/drivers/net/cxgb3/cxgb3_main.c 2008-06-12 09:48:05.000000000 -0500
-+++ b/drivers/net/cxgb3/cxgb3_main.c 2008-06-12 09:48:15.000000000 -0500
-@@ -1248,16 +1248,6 @@ static char stats_strings[][ETH_GSTRING_
+diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c
+index 5447f3e..8293fa5 100644
+--- a/drivers/net/cxgb3/cxgb3_main.c
++++ b/drivers/net/cxgb3/cxgb3_main.c
+@@ -1222,14 +1222,9 @@ static char stats_strings[][ETH_GSTRING_LEN] = {
};
-static int get_sset_count(struct net_device *dev, int sset)
--{
++static int get_stats_count(struct net_device *dev)
+ {
- switch (sset) {
- case ETH_SS_STATS:
- return ARRAY_SIZE(stats_strings);
- default:
- return -EOPNOTSUPP;
- }
--}
--
- #define T3_REGMAP_SIZE (3 * 1024)
++ return ARRAY_SIZE(stats_strings);
+ }
- static int get_regs_len(struct net_device *dev)
-@@ -1763,7 +1753,6 @@ static const struct ethtool_ops cxgb_eth
+ #define T3_REGMAP_SIZE (3 * 1024)
+@@ -1747,7 +1742,7 @@ static const struct ethtool_ops cxgb_ethtool_ops = {
.get_strings = get_strings,
.phys_id = cxgb3_phys_id,
.nway_reset = restart_autoneg,
- .get_sset_count = get_sset_count,
++ .get_stats_count = get_stats_count,
.get_ethtool_stats = get_stats,
.get_regs_len = get_regs_len,
.get_regs = get_regs,
diff --git a/kernel_patches/backport/2.6.9_U6/cxgb3_0030_sset.patch b/kernel_patches/backport/2.6.9_U6/cxgb3_0030_sset.patch
index 1e6ea0f..14180fa 100644
--- a/kernel_patches/backport/2.6.9_U6/cxgb3_0030_sset.patch
+++ b/kernel_patches/backport/2.6.9_U6/cxgb3_0030_sset.patch
@@ -1,27 +1,30 @@
---- a/drivers/net/cxgb3/cxgb3_main.c 2008-06-12 09:48:05.000000000 -0500
-+++ b/drivers/net/cxgb3/cxgb3_main.c 2008-06-12 09:48:15.000000000 -0500
-@@ -1248,16 +1248,6 @@ static char stats_strings[][ETH_GSTRING_
+diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c
+index 5447f3e..8293fa5 100644
+--- a/drivers/net/cxgb3/cxgb3_main.c
++++ b/drivers/net/cxgb3/cxgb3_main.c
+@@ -1222,14 +1222,9 @@ static char stats_strings[][ETH_GSTRING_LEN] = {
};
-static int get_sset_count(struct net_device *dev, int sset)
--{
++static int get_stats_count(struct net_device *dev)
+ {
- switch (sset) {
- case ETH_SS_STATS:
- return ARRAY_SIZE(stats_strings);
- default:
- return -EOPNOTSUPP;
- }
--}
--
- #define T3_REGMAP_SIZE (3 * 1024)
++ return ARRAY_SIZE(stats_strings);
+ }
- static int get_regs_len(struct net_device *dev)
-@@ -1763,7 +1753,6 @@ static const struct ethtool_ops cxgb_eth
+ #define T3_REGMAP_SIZE (3 * 1024)
+@@ -1747,7 +1742,7 @@ static const struct ethtool_ops cxgb_ethtool_ops = {
.get_strings = get_strings,
.phys_id = cxgb3_phys_id,
.nway_reset = restart_autoneg,
- .get_sset_count = get_sset_count,
++ .get_stats_count = get_stats_count,
.get_ethtool_stats = get_stats,
.get_regs_len = get_regs_len,
.get_regs = get_regs,
diff --git a/kernel_patches/backport/2.6.9_U7/cxgb3_0030_sset.patch b/kernel_patches/backport/2.6.9_U7/cxgb3_0030_sset.patch
index 1e6ea0f..14180fa 100644
--- a/kernel_patches/backport/2.6.9_U7/cxgb3_0030_sset.patch
+++ b/kernel_patches/backport/2.6.9_U7/cxgb3_0030_sset.patch
@@ -1,27 +1,30 @@
---- a/drivers/net/cxgb3/cxgb3_main.c 2008-06-12 09:48:05.000000000 -0500
-+++ b/drivers/net/cxgb3/cxgb3_main.c 2008-06-12 09:48:15.000000000 -0500
-@@ -1248,16 +1248,6 @@ static char stats_strings[][ETH_GSTRING_
+diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c
+index 5447f3e..8293fa5 100644
+--- a/drivers/net/cxgb3/cxgb3_main.c
++++ b/drivers/net/cxgb3/cxgb3_main.c
+@@ -1222,14 +1222,9 @@ static char stats_strings[][ETH_GSTRING_LEN] = {
};
-static int get_sset_count(struct net_device *dev, int sset)
--{
++static int get_stats_count(struct net_device *dev)
+ {
- switch (sset) {
- case ETH_SS_STATS:
- return ARRAY_SIZE(stats_strings);
- default:
- return -EOPNOTSUPP;
- }
--}
--
- #define T3_REGMAP_SIZE (3 * 1024)
++ return ARRAY_SIZE(stats_strings);
+ }
- static int get_regs_len(struct net_device *dev)
-@@ -1763,7 +1753,6 @@ static const struct ethtool_ops cxgb_eth
+ #define T3_REGMAP_SIZE (3 * 1024)
+@@ -1747,7 +1742,7 @@ static const struct ethtool_ops cxgb_ethtool_ops = {
.get_strings = get_strings,
.phys_id = cxgb3_phys_id,
.nway_reset = restart_autoneg,
- .get_sset_count = get_sset_count,
++ .get_stats_count = get_stats_count,
.get_ethtool_stats = get_stats,
.get_regs_len = get_regs_len,
.get_regs = get_regs,
More information about the ewg
mailing list