Received: by 2002:a17:90a:9103:0:0:0:0 with SMTP id k3csp11791540pjo; Thu, 2 Jan 2020 14:20:58 -0800 (PST) X-Google-Smtp-Source: APXvYqyXxErp0eQEH4FEXeDv1nuP9ZmkSIw9Ykl22Z1PHE9aPvnWFavUNytyeGDIZryhc13NuyFJ X-Received: by 2002:a9d:6857:: with SMTP id c23mr78526796oto.351.1578003658029; Thu, 02 Jan 2020 14:20:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578003658; cv=none; d=google.com; s=arc-20160816; b=Fl8ohtzQZPbWnDto4WUio0fNRfEols3NYi+bKazpCW19kNrfPcJhz/lDagBpIfRh03 nVZXnBVN/HcbN6AkzZJ7bnrYYv65h1K4QSlUY1RAAkVOVNAdFaS2eG9B6jP6sPcgtJwD KB4M6F50gr1FXPdpa9FOw47FcRco+Gw8LZFLQZSU7BHgmAadZNDX47qbS8+WBZ7CRbGa 4a8PHtiHIvBTPY5bMUu8v8L2UgcEcaTFTqvqTedzHSgSxWTZQohyRXWLARnB4oKgDJX5 +tTwcYoyEi1ta9Cr5H0W/p0Mw81pfRHlWtbh1N2z8QxjBRJqmHT1b8xeWnsfJFB7ZNGq sVeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=wsnypaO/kpCWhaIeoaS0TwMJarGWjBJaccSThTCiNiI=; b=KhIY6u1sIVnuSyeSZZmZzWVhKc+6q2L9fgfXBUwlAuqtp1tAYeA6DuA4XGio6IuZac nKN4Z/yFnrygf2iPa9ps8+L7txDOOSRMO/Basq8+cMz8r8nf++j9alZT2ntsqM2Io3a2 VRtidNhYX+uUAUtyIQaAuHAOAlff/BP0j3gsOyHApVhpmXKg+eS6Wy885Nkcgm+RA7uF Tz/23namY+gDqWrxZyIju+1EJCp+rtlASN9xD62wsYMImYYcOnuCXo8YwEOf2WJJo0aY HSWStlFsfmaMxfXPNBeTLlB53dYTuVzOcBUyNgz+5wvRydHsgFeCT90zBbtP9ilOkGt0 /u4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=WJfu6Bx3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g26si28981263otj.32.2020.01.02.14.20.46; Thu, 02 Jan 2020 14:20:58 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=WJfu6Bx3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728745AbgABWUH (ORCPT + 99 others); Thu, 2 Jan 2020 17:20:07 -0500 Received: from mail.kernel.org ([198.145.29.99]:37086 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728739AbgABWUG (ORCPT ); Thu, 2 Jan 2020 17:20:06 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 668EE22314; Thu, 2 Jan 2020 22:20:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578003605; bh=QPCm10LrKqG/VbtnG/1nLj1bgWlcfYg9TRarwON8HmU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WJfu6Bx3+Wb+hg96ABLmA/Pr29dgkgDfgBZ++MrvBB9ETnqMkd8QGYYNGBF1LPjQY 6cFl38fLFasAwJIF2tJu32blibOmabBzehgz3DNv2LjKErRMsd4Z705ofaQBv0br+p 11dLG1BgGnTSNKVP/0TwYUwD6pZ8ausoMaHkQSp8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tyrel Datwyler , Bjorn Helgaas , Michael Ellerman , Sasha Levin Subject: [PATCH 4.19 038/114] PCI: rpaphp: Dont rely on firmware feature to imply drc-info support Date: Thu, 2 Jan 2020 23:06:50 +0100 Message-Id: <20200102220032.949915815@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200102220029.183913184@linuxfoundation.org> References: <20200102220029.183913184@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tyrel Datwyler [ Upstream commit 52e2b0f16574afd082cff0f0e8567b2d9f68c033 ] In the event that the partition is migrated to a platform with older firmware that doesn't support the ibm,drc-info property the device tree is modified to remove the ibm,drc-info property and replace it with the older style ibm,drc-* properties for types, names, indexes, and power-domains. One of the requirements of the drc-info firmware feature is that the client is able to handle both the new property, and old style properties at runtime. Therefore we can't rely on the firmware feature alone to dictate which property is currently present in the device tree. Fix this short coming by checking explicitly for the ibm,drc-info property, and falling back to the older ibm,drc-* properties if it doesn't exist. Signed-off-by: Tyrel Datwyler Acked-by: Bjorn Helgaas Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1573449697-5448-6-git-send-email-tyreld@linux.ibm.com Signed-off-by: Sasha Levin --- drivers/pci/hotplug/rpaphp_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/hotplug/rpaphp_core.c b/drivers/pci/hotplug/rpaphp_core.c index f56004243591..ccc6deeb9ccf 100644 --- a/drivers/pci/hotplug/rpaphp_core.c +++ b/drivers/pci/hotplug/rpaphp_core.c @@ -275,7 +275,7 @@ int rpaphp_check_drc_props(struct device_node *dn, char *drc_name, return -EINVAL; } - if (firmware_has_feature(FW_FEATURE_DRC_INFO)) + if (of_find_property(dn->parent, "ibm,drc-info", NULL)) return rpaphp_check_drc_props_v2(dn, drc_name, drc_type, *my_index); else -- 2.20.1