From patchwork Tue Jun 10 01:56:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yang X-Patchwork-Id: 357668 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id E014F1400B2 for ; Tue, 10 Jun 2014 11:57:22 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933793AbaFJB5B (ORCPT ); Mon, 9 Jun 2014 21:57:01 -0400 Received: from e28smtp09.in.ibm.com ([122.248.162.9]:50040 "EHLO e28smtp09.in.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932895AbaFJB47 (ORCPT ); Mon, 9 Jun 2014 21:56:59 -0400 Received: from /spool/local by e28smtp09.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 10 Jun 2014 07:26:57 +0530 Received: from d28dlp03.in.ibm.com (9.184.220.128) by e28smtp09.in.ibm.com (192.168.1.139) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 10 Jun 2014 07:26:55 +0530 Received: from d28relay01.in.ibm.com (d28relay01.in.ibm.com [9.184.220.58]) by d28dlp03.in.ibm.com (Postfix) with ESMTP id A0D48125804D for ; Tue, 10 Jun 2014 07:26:16 +0530 (IST) Received: from d28av04.in.ibm.com (d28av04.in.ibm.com [9.184.220.66]) by d28relay01.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s5A1vkmE57344208 for ; Tue, 10 Jun 2014 07:27:46 +0530 Received: from d28av04.in.ibm.com (localhost [127.0.0.1]) by d28av04.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s5A1usVq012948 for ; Tue, 10 Jun 2014 07:26:54 +0530 Received: from localhost (richard.cn.ibm.com [9.111.17.78]) by d28av04.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id s5A1urTg012935; Tue, 10 Jun 2014 07:26:54 +0530 From: Wei Yang To: benh@au1.ibm.com Cc: linuxppc-dev@lists.ozlabs.org, bhelgaas@google.com, linux-pci@vger.kernel.org, gwshan@linux.vnet.ibm.com, yan@linux.vnet.ibm.com, qiudayu@linux.vnet.ibm.com, Wei Yang Subject: [RFC PATCH V3 02/17] pci/of: Match PCI VFs to dev-tree nodes dynamically Date: Tue, 10 Jun 2014 09:56:24 +0800 Message-Id: <1402365399-5121-3-git-send-email-weiyang@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1402365399-5121-1-git-send-email-weiyang@linux.vnet.ibm.com> References: <1402365399-5121-1-git-send-email-weiyang@linux.vnet.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14061001-2674-0000-0000-0000004FD34F Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org As introduced by commit 98d9f30c82 ("pci/of: Match PCI devices to dev-tree nodes dynamically"), we need to match PCI devices to their corresponding dev-tree nodes. While for VFs, this step was missed. This patch matches VFs' PCI devices to dev-tree nodes dynamically. Signed-off-by: Wei Yang --- drivers/pci/iov.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c index 589ef7d..1d21f43 100644 --- a/drivers/pci/iov.c +++ b/drivers/pci/iov.c @@ -67,6 +67,7 @@ static int virtfn_add(struct pci_dev *dev, int id, int reset) virtfn->devfn = pci_iov_virtfn_devfn(dev, id); virtfn->vendor = dev->vendor; + pci_set_of_node(virtfn); pci_read_config_word(dev, iov->pos + PCI_SRIOV_VF_DID, &virtfn->device); pci_setup_device(virtfn); virtfn->dev.parent = dev->dev.parent;