All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Michael Chan <michael.chan@broadcom.com>, davem@davemloft.net
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net-next 3/8] bnxt_en: Use common function to get ethtool supported flags.
Date: Sun, 6 Mar 2016 16:36:00 +0300	[thread overview]
Message-ID: <56DC3240.5040409@cogentembedded.com> (raw)
In-Reply-To: <1457247684-2403-4-git-send-email-michael.chan@broadcom.com>

Hello.

On 3/6/2016 10:01 AM, Michael Chan wrote:

> The supported bits and advertising bits in ethtool have the same
> definitions.  The same is true for the firmware bits.  So use the
> common function to handle the conversion for both supported and
> advertising bits.
>
> Signed-off-by: Michael Chan <mchan@broadcom.com>
> ---
>   drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 29 +++++++----------------
>   1 file changed, 9 insertions(+), 20 deletions(-)
>
> diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
> index 591c290..e2fe967 100644
> --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
> +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
[...]
> @@ -564,6 +545,15 @@ static u32 bnxt_fw_to_ethtool_lp_adv(struct bnxt_link_info *link_info)
>   	return _bnxt_fw_to_ethtool_adv_spds(fw_speeds, fw_pause);
>   }
>
> +static u32 bnxt_fw_to_ethtool_support_spds(struct bnxt_link_info *link_info)
> +{
> +	u16 fw_speeds = link_info->support_speeds;
> +	u32 supported;
> +
> +	supported = _bnxt_fw_to_ethtool_adv_spds(fw_speeds, 0);
> +	return (supported | SUPPORTED_Pause | SUPPORTED_Asym_Pause);

    Parens not needed here.

[...]

MBR, Sergei

  reply	other threads:[~2016-03-06 13:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-06  7:01 [PATCH net-next 0/8] bnxt_en: Updates for net-next Michael Chan
2016-03-06  7:01 ` [PATCH net-next 1/8] bnxt_en: Refactor bnxt_fw_to_ethtool_advertised_spds() Michael Chan
2016-03-06  7:01 ` [PATCH net-next 2/8] bnxt_en: Add reporting of link partner advertisement Michael Chan
2016-03-06  7:01 ` [PATCH net-next 3/8] bnxt_en: Use common function to get ethtool supported flags Michael Chan
2016-03-06 13:36   ` Sergei Shtylyov [this message]
2016-03-06  7:01 ` [PATCH net-next 4/8] bnxt_en: Extend autoneg to all speeds Michael Chan
2016-03-06  7:01 ` [PATCH net-next 5/8] bnxt_en: Add port statistics support Michael Chan
2016-03-06  7:01 ` [PATCH net-next 6/8] bnxt_en: Include some hardware port statistics in ndo_get_stats64() Michael Chan
2016-03-06  7:01 ` [PATCH net-next 7/8] bnxt_en: Include hardware port statistics in ethtool -S Michael Chan
2016-03-06  7:01 ` [PATCH net-next 8/8] bnxt_en: Enable AER support Michael Chan

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=56DC3240.5040409@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=davem@davemloft.net \
    --cc=michael.chan@broadcom.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.