Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp281448pxx; Wed, 28 Oct 2020 04:56:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQCcS97zzyIqyM2hbb+8lZc8irnx64DLaI0Xr6asA7npsb/3iZAA/k812y0Q0GCUAaVzI9 X-Received: by 2002:a17:906:abce:: with SMTP id kq14mr7472277ejb.411.1603886212637; Wed, 28 Oct 2020 04:56:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603886212; cv=none; d=google.com; s=arc-20160816; b=OPVtUqV8TlFo+XWde5xfokKXoXFLmv0XLt4POEjfYp9diBf55iZr3fBESMlx3bpoXp 8v2DwkyzU+zGktPup2Xmi7aHzOhEvKMBiRvT3BaXWmbTYcr0aUh1NNWIYTcsRqJHRYj/ W0n3k7KMg9Vmay8dp1Ex0OoHR13zlJETEJW4cQvedFMKT05M3HTYCHrCCcXI/VAHe53p Ij614BfgpTAtDaAVGyhR4OOWNa1Z7CmEnEsvfHS0g42MRZ7bEv8U78Rzj5e/bMMqQv5T IADaZ478pl8PyPwLP46TQC4qnKwUOeMhRpsKxN3tXmHgER1cJrMw21HB16N8ySMR0PzA 9Cwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=XP0CxC69SncqvVafiByUI1Gh0IC/Gj4RmmrkCkPPWLo=; b=RkG4FC40cB30O1uMtE2OReCWlCc06NjrpfutDtKzAbkK9hXC4mXDRqnCAug3G2zRrl xhnIdNO0lmt3XpFjGd/5WmkemJTTKD5WixoVecyuOpqEhwhINdBddIbv1j3JOhFUKZTY nDfMIxFUIactmVnlauv/gskYE1SwWDz7sdEFMzBVUhA7DwwXgPEKvP0xEgP7DIkhDP8Z wAJsZxkJou64fONXeEGbuaiXFvkq6Z/cPKyp4M0vMJDn59w3ul+TLeoVXyV1tHUeCIm9 n7eutEpYI1ir9XUZPWA32qMIg2SDioHnvls/+Z5KCFNgFyPewdQv4552KEOqffotBP1R ZcqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Gm++f6k4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w11si2719069ejq.533.2020.10.28.04.56.29; Wed, 28 Oct 2020 04:56:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Gm++f6k4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1794810AbgJ0PNn (ORCPT + 99 others); Tue, 27 Oct 2020 11:13:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:40512 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1793478AbgJ0PG0 (ORCPT ); Tue, 27 Oct 2020 11:06:26 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 74E7821D24; Tue, 27 Oct 2020 15:06:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603811186; bh=kT2JPWJy0qrtJaLctf2sL37HNXT0xaHssLvW4BoHukY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Gm++f6k4faNecSgpvYPaKSYVkRE7M0zP2CfMKUwVIKks7VLiQtgNnff9YVM/HL4wS svHY1wdmaQJuPbEc9CTgj1x7b/dLlqmNTDX9Ixzab7VNkdDKsEQd9LLsy7Kn0rq4oA QCBcXCcJscU7cDVfnRHjHcd6Rou/5kMoRzCn9o+Q= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Vaibhav Jain , Ira Weiny , Michael Ellerman , Sasha Levin Subject: [PATCH 5.8 403/633] powerpc/papr_scm: Add PAPR command family to pass-through command-set Date: Tue, 27 Oct 2020 14:52:26 +0100 Message-Id: <20201027135541.622795686@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135522.655719020@linuxfoundation.org> References: <20201027135522.655719020@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Vaibhav Jain [ Upstream commit 13135b461cf205941308984bd3271ec7d403dc40 ] Add NVDIMM_FAMILY_PAPR to the list of valid 'dimm_family_mask' acceptable by papr_scm. This is needed as since commit 92fe2aa859f5 ("libnvdimm: Validate command family indices") libnvdimm performs a validation of 'nd_cmd_pkg.nd_family' received as part of ND_CMD_CALL processing to ensure only known command families can use the general ND_CMD_CALL pass-through functionality. Without this change the ND_CMD_CALL pass-through targeting NVDIMM_FAMILY_PAPR error out with -EINVAL. Fixes: 92fe2aa859f5 ("libnvdimm: Validate command family indices") Signed-off-by: Vaibhav Jain Reviewed-by: Ira Weiny Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200913211904.24472-1-vaibhav@linux.ibm.com Signed-off-by: Sasha Levin --- arch/powerpc/platforms/pseries/papr_scm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/powerpc/platforms/pseries/papr_scm.c b/arch/powerpc/platforms/pseries/papr_scm.c index 9c569078a09fd..6c2c66450dac8 100644 --- a/arch/powerpc/platforms/pseries/papr_scm.c +++ b/arch/powerpc/platforms/pseries/papr_scm.c @@ -702,6 +702,9 @@ static int papr_scm_nvdimm_init(struct papr_scm_priv *p) p->bus_desc.of_node = p->pdev->dev.of_node; p->bus_desc.provider_name = kstrdup(p->pdev->name, GFP_KERNEL); + /* Set the dimm command family mask to accept PDSMs */ + set_bit(NVDIMM_FAMILY_PAPR, &p->bus_desc.dimm_family_mask); + if (!p->bus_desc.provider_name) return -ENOMEM; -- 2.25.1