From: Ben Hutchings <bhutchings@solarflare.com>
To: Somnath Kotur <Somnath.Kotur@emulex.com>
Cc: <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next 3/5] be2net: Fix to apply duplex value as unknown when link is down.
Date: Thu, 26 Apr 2012 18:24:36 +0100 [thread overview]
Message-ID: <1335461076.2712.20.camel@bwh-desktop.uk.solarflarecom.com> (raw)
In-Reply-To: <cf78444f-636f-44c5-beb7-5626b8a3df17@exht1.ad.emulex.com>
On Thu, 2012-04-26 at 19:58 +0530, Somnath Kotur wrote:
> From: Somnath Kotur <somnath.kotur@emulex.com>
>
>
> Signed-off-by: Somnath Kotur <somnath.kotur@emulex.com>
> ---
> drivers/net/ethernet/emulex/benet/be_ethtool.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/ethernet/emulex/benet/be_ethtool.c b/drivers/net/ethernet/emulex/benet/be_ethtool.c
> index 5296df5..bb2add7 100644
> --- a/drivers/net/ethernet/emulex/benet/be_ethtool.c
> +++ b/drivers/net/ethernet/emulex/benet/be_ethtool.c
> @@ -618,7 +618,7 @@ static int be_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)
> ecmd->supported = adapter->phy.supported;
> }
>
> - ecmd->duplex = DUPLEX_FULL;
> + ecmd->duplex = netif_carrier_ok(netdev) ? DUPLEX_FULL : -1;
> ecmd->phy_address = adapter->port_num;
>
> return 0;
I don't see any problem with reporting full-duplex all the time if you
don't support any half-duplex link modes. But we don't yet have
consistency between drivers in speed/duplex reporting while the link is
down, so I won't insist that that is the right thing to do.
However you should use DUPLEX_UNKNOWN rather than -1.
Ben.
--
Ben Hutchings, Staff 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:[~2012-04-26 17:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-26 14:28 [PATCH net-next 3/5] be2net: Fix to apply duplex value as unknown when link is down Somnath Kotur
2012-04-26 17:24 ` Ben Hutchings [this message]
2012-04-27 6:42 ` Somnath.Kotur
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=1335461076.2712.20.camel@bwh-desktop.uk.solarflarecom.com \
--to=bhutchings@solarflare.com \
--cc=Somnath.Kotur@emulex.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