Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1515701 > unrolled thread
| Started by | Philippe Reynes <tremyfr@gmail.com> |
|---|---|
| First post | 2016-11-06 15:10 +0100 |
| Last post | 2016-11-09 19:30 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH v2] net: 3com: typhoon: fix typhoon_get_link_ksettings Philippe Reynes <tremyfr@gmail.com> - 2016-11-06 15:10 +0100
Re: [PATCH v2] net: 3com: typhoon: fix typhoon_get_link_ksettings David Miller <davem@davemloft.net> - 2016-11-09 19:30 +0100
| From | Philippe Reynes <tremyfr@gmail.com> |
|---|---|
| Date | 2016-11-06 15:10 +0100 |
| Subject | [PATCH v2] net: 3com: typhoon: fix typhoon_get_link_ksettings |
| Message-ID | <sAwiZ-6tb-1@gated-at.bofh.it> |
When moving from typhoon_get_settings to typhoon_getlink_ksettings
in the commit f7a5537cd2a5 ("net: 3com: typhoon: use new api
ethtool_{get|set}_link_ksettings"), we use a local variable supported
but we forgot to update the struct ethtool_link_ksettings with
this value.
We also initialize advertising to zero, because otherwise it may
be uninitialized if no case of the switch (tp->xcvr_select) is used.
Signed-off-by: Philippe Reynes <tremyfr@gmail.com>
---
Changelog:
v2:
- remove a duplicate "commit" in the commit log
drivers/net/ethernet/3com/typhoon.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/3com/typhoon.c b/drivers/net/ethernet/3com/typhoon.c
index dbdf06f..a0cacbe 100644
--- a/drivers/net/ethernet/3com/typhoon.c
+++ b/drivers/net/ethernet/3com/typhoon.c
@@ -1000,7 +1000,7 @@ enum state_values {
struct ethtool_link_ksettings *cmd)
{
struct typhoon *tp = netdev_priv(dev);
- u32 supported, advertising;
+ u32 supported, advertising = 0;
supported = SUPPORTED_100baseT_Half | SUPPORTED_100baseT_Full |
SUPPORTED_Autoneg;
@@ -1049,6 +1049,11 @@ enum state_values {
else
cmd->base.autoneg = AUTONEG_DISABLE;
+ ethtool_convert_legacy_u32_to_link_mode(cmd->link_modes.supported,
+ supported);
+ ethtool_convert_legacy_u32_to_link_mode(cmd->link_modes.advertising,
+ advertising);
+
return 0;
}
--
1.7.4.4
[toc] | [next] | [standalone]
| From | David Miller <davem@davemloft.net> |
|---|---|
| Date | 2016-11-09 19:30 +0100 |
| Message-ID | <sBFNh-2u3-47@gated-at.bofh.it> |
| In reply to | #1515701 |
From: Philippe Reynes <tremyfr@gmail.com>
Date: Sun, 6 Nov 2016 15:02:32 +0100
> When moving from typhoon_get_settings to typhoon_getlink_ksettings
> in the commit f7a5537cd2a5 ("net: 3com: typhoon: use new api
> ethtool_{get|set}_link_ksettings"), we use a local variable supported
> but we forgot to update the struct ethtool_link_ksettings with
> this value.
>
> We also initialize advertising to zero, because otherwise it may
> be uninitialized if no case of the switch (tp->xcvr_select) is used.
>
> Signed-off-by: Philippe Reynes <tremyfr@gmail.com>
> ---
> Changelog:
> v2:
> - remove a duplicate "commit" in the commit log
Applied.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web