i40e: Prevent setting link speed on I40E_DEV_ID_25G_B
authorPatryk Małek <patryk.malek@intel.com>
Mon, 19 Mar 2018 16:28:04 +0000 (09:28 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Mon, 19 Mar 2018 16:55:00 +0000 (09:55 -0700)
Setting link settings on backplane devices shouldn't be allowed.
This patch adds one more device id to the list which we check
that against.

Signed-off-by: Patryk Małek <patryk.malek@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_ethtool.c

index d3d299ab9de3db246ecd8178fa719eb2354f1e21..0c7e7de595d38199f0921de8968fe3c0e12b2a75 100644 (file)
@@ -860,6 +860,7 @@ static int i40e_set_link_ksettings(struct net_device *netdev,
            hw->device_id == I40E_DEV_ID_KX_C ||
            hw->device_id == I40E_DEV_ID_20G_KR2 ||
            hw->device_id == I40E_DEV_ID_20G_KR2_A ||
+           hw->device_id == I40E_DEV_ID_25G_B ||
            hw->device_id == I40E_DEV_ID_KX_X722) {
                netdev_info(netdev, "Changing settings is not supported on backplane.\n");
                return -EOPNOTSUPP;