diff options
author | Yuval Mintz <Yuval.Mintz@qlogic.com> | 2016-08-22 05:03:29 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-08-22 21:11:38 -0400 |
commit | 4870e704d901602e4ae5de462c4e65732cf2ed6c (patch) | |
tree | ef6eb62e55084493c3fc61c2a12706328750fb27 | |
parent | c0451fe1f27b815b3f400df2a63b9aecf589b7b0 (diff) |
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: dacd88d6f6851 ("qed: IOV l2 functionality")
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/qlogic/qed/qed.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/net/ethernet/qlogic/qed/qed.h b/drivers/net/ethernet/qlogic/qed/qed.h index 35e53771533f..45ab74676573 100644 --- a/drivers/net/ethernet/qlogic/qed/qed.h +++ b/drivers/net/ethernet/qlogic/qed/qed.h | |||
@@ -561,9 +561,18 @@ struct qed_dev { | |||
561 | static inline u8 qed_concrete_to_sw_fid(struct qed_dev *cdev, | 561 | static inline u8 qed_concrete_to_sw_fid(struct qed_dev *cdev, |
562 | u32 concrete_fid) | 562 | u32 concrete_fid) |
563 | { | 563 | { |
564 | u8 vfid = GET_FIELD(concrete_fid, PXP_CONCRETE_FID_VFID); | ||
564 | u8 pfid = GET_FIELD(concrete_fid, PXP_CONCRETE_FID_PFID); | 565 | 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; | ||
565 | 569 | ||
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; | ||
567 | } | 576 | } |
568 | 577 | ||
569 | #define PURE_LB_TC 8 | 578 | #define PURE_LB_TC 8 |