From: Ben Hutchings <bhutchings@solarflare.com>
To: Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] net: ehea: fix wrongly-reported supported modes
Date: Tue, 03 May 2011 21:16:15 +0100 [thread overview]
Message-ID: <1304453775.2873.17.camel@bwh-desktop> (raw)
In-Reply-To: <1304451745.6899.15.camel@dream>
On Tue, 2011-05-03 at 16:42 -0300, Kleber Sacilotto de Souza wrote:
> Currently EHEA reports to ethtool as supporting 10000baseT_Full and
> FIBRE independent of the hardware configuration. However, these
> capabilities should be reported only if the physical port and
> the medium support them, which is the case where the physical port
> is connected at 10Gb.
>
> Signed-off-by: Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com>
> ---
> drivers/net/ehea/ehea_ethtool.c | 21 ++++++++++++++-------
> 1 files changed, 14 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/net/ehea/ehea_ethtool.c b/drivers/net/ehea/ehea_ethtool.c
> index 3e2e734..04716c2 100644
> --- a/drivers/net/ehea/ehea_ethtool.c
> +++ b/drivers/net/ehea/ehea_ethtool.c
> @@ -55,15 +55,22 @@ static int ehea_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
> cmd->duplex = -1;
> }
>
> - cmd->supported = (SUPPORTED_10000baseT_Full | SUPPORTED_1000baseT_Full
> - | SUPPORTED_100baseT_Full | SUPPORTED_100baseT_Half
> - | SUPPORTED_10baseT_Full | SUPPORTED_10baseT_Half
> - | SUPPORTED_Autoneg | SUPPORTED_FIBRE);
> + cmd->supported = (SUPPORTED_1000baseT_Full | SUPPORTED_100baseT_Full
> + | SUPPORTED_100baseT_Half | SUPPORTED_10baseT_Full
> + | SUPPORTED_10baseT_Half | SUPPORTED_Autoneg);
>
> - cmd->advertising = (ADVERTISED_10000baseT_Full | ADVERTISED_Autoneg
> - | ADVERTISED_FIBRE);
> + cmd->advertising = ADVERTISED_Autoneg;
> +
> + if (cmd->speed == SPEED_10000) {
> + cmd->supported |= (SUPPORTED_10000baseT_Full | SUPPORTED_FIBRE);
> + cmd->advertising |= (ADVERTISED_10000baseT_Full | ADVERTISED_FIBRE);
> + cmd->port = PORT_FIBRE;
> + } else {
> + cmd->supported |= SUPPORTED_TP;
> + cmd->advertising |= (ADVERTISED_1000baseT_Full | ADVERTISED_TP);
> + cmd->port = PORT_TP;
> + }
This doesn't make any sense. If the current speed is 10G, then the
driver also claims to support speeds of 10M, 100M, 1G and 10G. But then
if the speed actually is <10G, the driver claims to support TP. What's
going on here?
(Also, claiming to support BASE-T modes on non-TP media is bogus, though
I understand why people are doing it.)
Ben.
> - cmd->port = PORT_FIBRE;
> cmd->autoneg = port->autoneg == 1 ? AUTONEG_ENABLE : AUTONEG_DISABLE;
>
> return 0;
--
Ben Hutchings, Senior Software Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
next prev parent reply other threads:[~2011-05-03 20:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-03 19:42 [PATCH] net: ehea: fix wrongly-reported supported modes Kleber Sacilotto de Souza
2011-05-03 20:16 ` Ben Hutchings [this message]
2011-05-03 21:34 ` Ben Hutchings
2011-05-04 21:59 ` Kleber Sacilotto de Souza
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1304453775.2873.17.camel@bwh-desktop \
--to=bhutchings@solarflare.com \
--cc=klebers@linux.vnet.ibm.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox