[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+FuTSc8eBgQcYTH4hzv_+BkxYLnWgogRcV-sep=kxiOrWkBFQ@mail.gmail.com>
Date: Fri, 9 Oct 2020 13:55:19 -0400
From: Willem de Bruijn <willemdebruijn.kernel@...il.com>
To: Tony Nguyen <anthony.l.nguyen@...el.com>
Cc: David Miller <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Jaroslaw Gawin <jaroslawx.gawin@...el.com>,
Network Development <netdev@...r.kernel.org>,
nhorman@...hat.com, sassmann@...hat.com,
Aleksandr Loktionov <aleksandr.loktionov@...el.com>,
Arkadiusz Kubalewski <arkadiusz.kubalewski@...el.com>,
Andrew Bowers <andrewx.bowers@...el.com>
Subject: Re: [net-next 1/3] i40e: Allow changing FEC settings on X722 if
supported by FW
On Wed, Oct 7, 2020 at 7:11 PM Tony Nguyen <anthony.l.nguyen@...el.com> wrote:
>
> From: Jaroslaw Gawin <jaroslawx.gawin@...el.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@...el.com>
> Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@...el.com>
> Signed-off-by: Arkadiusz Kubalewski <arkadiusz.kubalewski@...el.com>
> Tested-by: Andrew Bowers <andrewx.bowers@...el.com>
> Signed-off-by: Tony Nguyen <anthony.l.nguyen@...el.com>
Acked-by: Willem de Bruijn <willemb@...gle.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.
Powered by blists - more mailing lists