summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rdma/hfi1/chip.c
diff options
context:
space:
mode:
authorDean Luick2015-12-01 21:38:21 +0100
committerGreg Kroah-Hartman2015-12-21 22:51:55 +0100
commit8764522e5251b76666aa39e207069c43f742801d (patch)
treec46f7085b83789e8018fcb89a3f2e334d9acab60 /drivers/staging/rdma/hfi1/chip.c
parentstaging/rdma/hfi1: Destroy workqueues if hfi1_register_ib_device() call retur... (diff)
downloadkernel-qcow2-linux-8764522e5251b76666aa39e207069c43f742801d.tar.gz
kernel-qcow2-linux-8764522e5251b76666aa39e207069c43f742801d.tar.xz
kernel-qcow2-linux-8764522e5251b76666aa39e207069c43f742801d.zip
staging/rdma/hfi1: Unexpected link up pkey values are not an error
Only warn when link up pkeys are not what we expect. Also, allow for the pkey to already be initialized. Reviewed-by: Arthur Kepner <arthur.kepner@intel.com> Signed-off-by: Dean Luick <dean.luick@intel.com> Signed-off-by: Jubin John <jubin.john@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rdma/hfi1/chip.c')
-rw-r--r--drivers/staging/rdma/hfi1/chip.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/staging/rdma/hfi1/chip.c b/drivers/staging/rdma/hfi1/chip.c
index 3cf6fea0bf35..e201c80c7644 100644
--- a/drivers/staging/rdma/hfi1/chip.c
+++ b/drivers/staging/rdma/hfi1/chip.c
@@ -6716,10 +6716,10 @@ static void add_full_mgmt_pkey(struct hfi1_pportdata *ppd)
{
struct hfi1_devdata *dd = ppd->dd;
- /* Sanity check - ppd->pkeys[2] should be 0 */
- if (ppd->pkeys[2] != 0)
- dd_dev_err(dd, "%s pkey[2] already set to 0x%x, resetting it to 0x%x\n",
- __func__, ppd->pkeys[2], FULL_MGMT_P_KEY);
+ /* Sanity check - ppd->pkeys[2] should be 0, or already initalized */
+ if (!((ppd->pkeys[2] == 0) || (ppd->pkeys[2] == FULL_MGMT_P_KEY)))
+ dd_dev_warn(dd, "%s pkey[2] already set to 0x%x, resetting it to 0x%x\n",
+ __func__, ppd->pkeys[2], FULL_MGMT_P_KEY);
ppd->pkeys[2] = FULL_MGMT_P_KEY;
(void)hfi1_set_ib_cfg(ppd, HFI1_IB_CFG_PKEYS, 0);
}