Skip to content

Commit 4870e70

Browse files
Yuval Mintzdavem330
authored andcommitted
qed: FLR of active VFs might lead to FW assert
Driver never bothered marking the VF's vport with the VF's sw_fid. As a result, FLR flows are not going to clean those vports. If the vport was active when FLRed, re-activating it would lead to a FW assertion. Fixes: dacd88d ("qed: IOV l2 functionality") Signed-off-by: Yuval Mintz <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent c0451fe commit 4870e70

File tree

1 file changed

+10
-1
lines changed
  • drivers/net/ethernet/qlogic/qed

1 file changed

+10
-1
lines changed

drivers/net/ethernet/qlogic/qed/qed.h

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,9 +561,18 @@ struct qed_dev {
561561
static inline u8 qed_concrete_to_sw_fid(struct qed_dev *cdev,
562562
u32 concrete_fid)
563563
{
564+
u8 vfid = GET_FIELD(concrete_fid, PXP_CONCRETE_FID_VFID);
564565
u8 pfid = GET_FIELD(concrete_fid, PXP_CONCRETE_FID_PFID);
566+
u8 vf_valid = GET_FIELD(concrete_fid,
567+
PXP_CONCRETE_FID_VFVALID);
568+
u8 sw_fid;
565569

566-
return pfid;
570+
if (vf_valid)
571+
sw_fid = vfid + MAX_NUM_PFS;
572+
else
573+
sw_fid = pfid;
574+
575+
return sw_fid;
567576
}
568577

569578
#define PURE_LB_TC 8

0 commit comments

Comments
 (0)