netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
To: Tony Nguyen <anthony.l.nguyen@intel.com>
Cc: David Miller <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Jaroslaw Gawin <jaroslawx.gawin@intel.com>,
	Network Development <netdev@vger.kernel.org>,
	nhorman@redhat.com, sassmann@redhat.com,
	Aleksandr Loktionov <aleksandr.loktionov@intel.com>,
	Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>,
	Andrew Bowers <andrewx.bowers@intel.com>
Subject: Re: [net-next 1/3] i40e: Allow changing FEC settings on X722 if supported by FW
Date: Fri, 9 Oct 2020 13:55:19 -0400	[thread overview]
Message-ID: <CA+FuTSc8eBgQcYTH4hzv_+BkxYLnWgogRcV-sep=kxiOrWkBFQ@mail.gmail.com> (raw)
In-Reply-To: <20201007231050.1438704-2-anthony.l.nguyen@intel.com>

On Wed, Oct 7, 2020 at 7:11 PM Tony Nguyen <anthony.l.nguyen@intel.com> wrote:
>
> From: Jaroslaw Gawin <jaroslawx.gawin@intel.com>
>
> Starting with API version 1.10 firmware for X722 devices has ability
> to change FEC settings in PHY. Code added in this patch allows
> changing FEC settings if the capability flag indicates the device
> supports this feature.
>
> Signed-off-by: Jaroslaw Gawin <jaroslawx.gawin@intel.com>
> Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
> Signed-off-by: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
> Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>

Acked-by: Willem de Bruijn <willemb@google.com>

(for netdrv)

> @@ -1484,11 +1485,18 @@ static int i40e_set_fec_param(struct net_device *netdev,
>         int err = 0;
>
>         if (hw->device_id != I40E_DEV_ID_25G_SFP28 &&
> -           hw->device_id != I40E_DEV_ID_25G_B) {
> +           hw->device_id != I40E_DEV_ID_25G_B &&
> +           hw->device_id != I40E_DEV_ID_KX_X722) {
>                 err = -EPERM;
>                 goto done;
>         }
>
> +       if (hw->mac.type == I40E_MAC_X722 &&
> +           !(hw->flags & I40E_HW_FLAG_X722_FEC_REQUEST_CAPABLE)) {
> +               netdev_err(netdev, "Setting FEC encoding not supported by firmware. Please update the NVM image.\n");
> +               return -EINVAL;
> +       }
> +

no need to respin for this, but this early return is inconsistent with
other error paths in the function. Label done is not needed at all,
could convert them all.

  reply	other threads:[~2020-10-09 17:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-07 23:10 [net-next 0/3][pull request] 40GbE Intel Wired LAN Driver Updates 2020-10-07 Tony Nguyen
2020-10-07 23:10 ` [net-next 1/3] i40e: Allow changing FEC settings on X722 if supported by FW Tony Nguyen
2020-10-09 17:55   ` Willem de Bruijn [this message]
2020-10-09 23:36   ` Jakub Kicinski
2020-10-12 16:31     ` Nguyen, Anthony L
2020-10-07 23:10 ` [net-next 2/3] i40e: Fix MAC address setting for a VF via Host/VM Tony Nguyen
2020-10-09 17:46   ` Willem de Bruijn
2020-10-12 16:27     ` Nguyen, Anthony L
2020-10-16 10:46     ` Loktionov, Aleksandr
2020-10-16 16:23       ` Willem de Bruijn
2020-10-07 23:10 ` [net-next 3/3] e1000: remove unused and incorrect code Tony Nguyen
2020-10-09 17:44   ` Willem de Bruijn

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='CA+FuTSc8eBgQcYTH4hzv_+BkxYLnWgogRcV-sep=kxiOrWkBFQ@mail.gmail.com' \
    --to=willemdebruijn.kernel@gmail.com \
    --cc=aleksandr.loktionov@intel.com \
    --cc=andrewx.bowers@intel.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=arkadiusz.kubalewski@intel.com \
    --cc=davem@davemloft.net \
    --cc=jaroslawx.gawin@intel.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@redhat.com \
    --cc=sassmann@redhat.com \
    /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;
as well as URLs for NNTP newsgroup(s).