Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8764522e authored by Dean Luick's avatar Dean Luick Committed by Greg Kroah-Hartman
Browse files

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: default avatarArthur Kepner <arthur.kepner@intel.com>
Signed-off-by: default avatarDean Luick <dean.luick@intel.com>
Signed-off-by: default avatarJubin John <jubin.john@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e8597eb0
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -6716,9 +6716,9 @@ 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",
	/* 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);