diff options
author | sudarsana.kalluru@cavium.com <sudarsana.kalluru@cavium.com> | 2017-04-19 13:19:53 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-04-20 23:29:39 +0300 |
commit | 6cf75f1cebb048cfc1424b4b8ac9bbc08d5f9f66 (patch) | |
tree | 3cbf797865c9e4f37e6642a7a8a6389e5002f81e | |
parent | 66367dab30c7040e638e5496a47184cfc8ba39a4 (diff) | |
download | linux-6cf75f1cebb048cfc1424b4b8ac9bbc08d5f9f66.tar.xz |
qed: Fix sending an invalid PFC error mask to MFW.
PFC error-mask value is not supported by MFW, but this bit could be
set in the pfc bit-map of the operational parameters if remote device
supports it. These operational parameters are used as basis for
populating the dcbx config parameters. User provided configs will be
applied on top of these parameters and then send them to MFW when
requested. Driver need to clear the error-mask bit before sending the
config parameters to MFW.
Signed-off-by: Sudarsana Reddy Kalluru <Sudarsana.Kalluru@cavium.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/qlogic/qed/qed_dcbx.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/qlogic/qed/qed_dcbx.c b/drivers/net/ethernet/qlogic/qed/qed_dcbx.c index c24436c911f3..ff058a380003 100644 --- a/drivers/net/ethernet/qlogic/qed/qed_dcbx.c +++ b/drivers/net/ethernet/qlogic/qed/qed_dcbx.c @@ -1008,6 +1008,8 @@ qed_dcbx_set_pfc_data(struct qed_hwfn *p_hwfn, u8 pfc_map = 0; int i; + *pfc &= ~DCBX_PFC_ERROR_MASK; + if (p_params->pfc.willing) *pfc |= DCBX_PFC_WILLING_MASK; else |