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: David S. Miller <davem@davemloft.net>
This commit is contained in:
David S. Miller 2019-05-30 12:30:47 -07:00
commit 62851d71e7
2 changed files with 9 additions and 6 deletions

View file

@ -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);

View file

@ -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)];