Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp17929155ybl; Thu, 2 Jan 2020 15:01:33 -0800 (PST) X-Google-Smtp-Source: APXvYqz/t6FIK93PkzNKzmD10ZKoC8HvfV2M4B8cFAjPFgCQxmFNTAi+4tJnZgoFOU2kw4vjIybB X-Received: by 2002:a05:6830:1f95:: with SMTP id v21mr88199892otr.325.1578006093855; Thu, 02 Jan 2020 15:01:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578006093; cv=none; d=google.com; s=arc-20160816; b=Pzgwr75MFWSVdSWpyhuvZxA9IHN4n7EyADIlW4IYwDaNOyWwAKQN55fcXT2c9402XE XSjnAW61IzLw2nMayJ+i8EP0QMIA+Xa1W54ngRPoVzY1MVeeUJNSC8DZ/YLB3R7wUoeb ER1yHBC3Y+3NAh9POtdE9c1iKJKyfQ2D1Kok/NCpbgJI/CuZUPDZ90ZWSDGZAAJNXcWC UsAfbw1oSoChU3P8zeGl0Sz1K6q3/OXbYNxEJT6evFvi+C57Tgad3pb7JxU9aiyiUGsc 4+SsE991lTLUGslWFZjelhASoMlKGvJmR8KMwCK1iUAMD3ERIsmDJxbjtQq8mcVTax99 Iznw== 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=CeqYl8VUhHRtF4sJxKVia4NQjIUTKjPEd7KMAAWzdWE=; b=l/brE8yfuWruPcvFQ3wMdZIS+sRRfjVZ8mD4k53zd5omf35ZrBn7GKeegmQd5Jhqui K50DPjhH1fdWk2wZ6E2PuWQ/GVFiAAD1fIgJ/FkjV0Sspu6gVqD0NdZHfZ6fKKpMagQG 1KE8cKXncBxAOiCT134xg3KD+IhD1BFKMCxCTOUe5A7UBvZ8WWGzaEjyOd0GTReVOC4p Hja1z6LStoxh1mA3jUHAkkvlnvYNUCbW907QZGIaQC1XPmS33JwpnIarc90hmhIZ3Y6n V6goOdGACwaDaD9HseFWAJtN7/ujGYIany2us1Y3FS6nMmoEAgwSfB4vtbnGw9I72tZf z5XQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=nblZCclK; 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 i10si30452508otk.195.2020.01.02.15.01.22; Thu, 02 Jan 2020 15:01:33 -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=nblZCclK; 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 S1726702AbgABWOf (ORCPT + 99 others); Thu, 2 Jan 2020 17:14:35 -0500 Received: from mail.kernel.org ([198.145.29.99]:54860 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727924AbgABWOd (ORCPT ); Thu, 2 Jan 2020 17:14:33 -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 91460227BF; Thu, 2 Jan 2020 22:14:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578003273; bh=xlO0hW8HwwmBoIWU7FFfajmYwX2EVeIdAt9PO8IObF4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nblZCclKZs5C+NvbXJMCcIBndr5NcSNbww6Fx8E0JLa/y6+HFlKlWYCIItNLQKev/ 4Ns54uwt6/CYI157dQOW5zj/vmAWsCDIwqYvM7/FfrpOHyF2U6JCUGaGu5Jkg6/6Cs ABy573F3FZm9/5+iqywauntLkvk1RVdsNhRoabOE= 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 5.4 066/191] PCI: rpaphp: Dont rely on firmware feature to imply drc-info support Date: Thu, 2 Jan 2020 23:05:48 +0100 Message-Id: <20200102215837.052359330@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200102215829.911231638@linuxfoundation.org> References: <20200102215829.911231638@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 e3502644a45c..e18e9a0e959c 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