Skip to content

Commit b06cf78

Browse files
committed
Merge branch 'bnxt_en-fixes'
Michael Chan says: ==================== bnxt_en: Bug fixes This series includes 3 fixes. The first one fixes a race condition between devlink reload and SR-IOV configuration. The second one fixes a type mismatch warning in devlink fw live patching. The last one fixes unwanted OVS TC dmesg error logs when tc-hw-offload is disabled on bnxt_en. ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents e97b21e + b075749 commit b06cf78

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ bnxt_dl_livepatch_report_err(struct bnxt *bp, struct netlink_ext_ack *extack,
360360
NL_SET_ERR_MSG_MOD(extack, "Live patch already applied");
361361
break;
362362
default:
363-
netdev_err(bp->dev, "Unexpected live patch error: %hhd\n", err);
363+
netdev_err(bp->dev, "Unexpected live patch error: %d\n", err);
364364
NL_SET_ERR_MSG_MOD(extack, "Failed to activate live patch");
365365
break;
366366
}
@@ -441,12 +441,13 @@ static int bnxt_dl_reload_down(struct devlink *dl, bool netns_change,
441441

442442
switch (action) {
443443
case DEVLINK_RELOAD_ACTION_DRIVER_REINIT: {
444-
if (BNXT_PF(bp) && bp->pf.active_vfs) {
444+
rtnl_lock();
445+
if (BNXT_PF(bp) && (bp->pf.active_vfs || bp->sriov_cfg)) {
445446
NL_SET_ERR_MSG_MOD(extack,
446-
"reload is unsupported when VFs are allocated");
447+
"reload is unsupported while VFs are allocated or being configured");
448+
rtnl_unlock();
447449
return -EOPNOTSUPP;
448450
}
449-
rtnl_lock();
450451
if (bp->dev->reg_state == NETREG_UNREGISTERED) {
451452
rtnl_unlock();
452453
return -ENODEV;

drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1868,7 +1868,7 @@ static int bnxt_tc_setup_indr_block_cb(enum tc_setup_type type,
18681868
struct flow_cls_offload *flower = type_data;
18691869
struct bnxt *bp = priv->bp;
18701870

1871-
if (flower->common.chain_index)
1871+
if (!tc_cls_can_offload_and_chain0(bp->dev, type_data))
18721872
return -EOPNOTSUPP;
18731873

18741874
switch (type) {

0 commit comments

Comments
 (0)