Commit 62851d71 authored by David S. Miller's avatar David S. Miller

Merge branch 'mlxsw-Two-small-fixes'

Ido Schimmel says:

====================
mlxsw: Two small fixes

Patch #1 from Jiri fixes an issue specific to Spectrum-2 where the
insertion of two identical flower filters with different priorities
would trigger a warning.

Patch #2 from Amit prevents the driver from trying to configure a port
with a speed of 56Gb/s and autoneg off as this is not supported and
results in error messages from firmware.

Please consider patch #1 for stable.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 84b3fd1f 275e928f
......@@ -3128,6 +3128,10 @@ mlxsw_sp_port_set_link_ksettings(struct net_device *dev,
ops->reg_ptys_eth_unpack(mlxsw_sp, ptys_pl, &eth_proto_cap, NULL, NULL);
autoneg = cmd->base.autoneg == AUTONEG_ENABLE;
if (!autoneg && cmd->base.speed == SPEED_56000) {
netdev_err(dev, "56G not supported with autoneg off\n");
return -EINVAL;
}
eth_proto_new = autoneg ?
ops->to_ptys_advert_link(mlxsw_sp, cmd) :
ops->to_ptys_speed(mlxsw_sp, cmd->base.speed);
......
......@@ -1171,13 +1171,12 @@ mlxsw_sp_acl_erp_delta_fill(const struct mlxsw_sp_acl_erp_key *parent_key,
return -EINVAL;
}
if (si == -1) {
/* The masks are the same, this cannot happen.
* That means the caller is broken.
/* The masks are the same, this can happen in case eRPs with
* the same mask were created in both A-TCAM and C-TCAM.
* The only possible condition under which this can happen
* is identical rule insertion. Delta is not possible here.
*/
WARN_ON(1);
*delta_start = 0;
*delta_mask = 0;
return 0;
return -EINVAL;
}
pmask = (unsigned char) parent_key->mask[__MASK_IDX(si)];
mask = (unsigned char) key->mask[__MASK_IDX(si)];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment