From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from e23smtp01.au.ibm.com ([202.81.31.143]:47353 "EHLO e23smtp01.au.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751098AbbCBHfk (ORCPT ); Mon, 2 Mar 2015 02:35:40 -0500 Received: from /spool/local by e23smtp01.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 2 Mar 2015 17:35:38 +1000 Received: from d23relay09.au.ibm.com (d23relay09.au.ibm.com [9.185.63.181]) by d23dlp01.au.ibm.com (Postfix) with ESMTP id 0C1692CE804E for ; Mon, 2 Mar 2015 18:35:36 +1100 (EST) Received: from d23av01.au.ibm.com (d23av01.au.ibm.com [9.190.234.96]) by d23relay09.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t227ZRe946858244 for ; Mon, 2 Mar 2015 18:35:35 +1100 Received: from d23av01.au.ibm.com (localhost [127.0.0.1]) by d23av01.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t227Z1kk004624 for ; Mon, 2 Mar 2015 18:35:02 +1100 Date: Mon, 2 Mar 2015 15:34:45 +0800 From: Wei Yang To: Bjorn Helgaas Cc: Wei Yang , benh@au1.ibm.com, gwshan@linux.vnet.ibm.com, linux-pci@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH v12 11/21] powerpc/pci: Don't unset PCI resources for VFs Message-ID: <20150302073445.GF21571@richard> Reply-To: Wei Yang References: <20150224082939.32124.45744.stgit@bhelgaas-glaptop2.roam.corp.google.com> <20150224083413.32124.11968.stgit@bhelgaas-glaptop2.roam.corp.google.com> <20150224084450.GH6220@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <20150224084450.GH6220@google.com> Sender: linux-pci-owner@vger.kernel.org List-ID: On Tue, Feb 24, 2015 at 02:44:50AM -0600, Bjorn Helgaas wrote: >On Tue, Feb 24, 2015 at 02:34:13AM -0600, Bjorn Helgaas wrote: >> From: Wei Yang >> >> If we're going to reassign resources with flag PCI_REASSIGN_ALL_RSRC, all >> resources will be cleaned out during device header fixup time and then get >> reassigned by PCI core. However, the VF resources won't be reassigned and >> thus, we shouldn't clean them out. >> >> If the pci_dev is a VF, skip the resource unset process. > >I think this patch is correct, but we should include a little more detail >in the changelog to answer questions like mine and Ben's >(http://lkml.kernel.org/r/1423528584.4924.70.camel@au1.ibm.com). > Ok, I will add more change log to explain this. >> Signed-off-by: Wei Yang >> Signed-off-by: Bjorn Helgaas >> --- >> arch/powerpc/kernel/pci-common.c | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c >> index 2a525c938158..82031011522f 100644 >> --- a/arch/powerpc/kernel/pci-common.c >> +++ b/arch/powerpc/kernel/pci-common.c >> @@ -788,6 +788,10 @@ static void pcibios_fixup_resources(struct pci_dev *dev) >> pci_name(dev)); >> return; >> } >> + >> + if (dev->is_virtfn) >> + return; >> + >> for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) { >> struct resource *res = dev->resource + i; >> struct pci_bus_region reg; >> -- Richard Yang Help you, Help me From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from e23smtp02.au.ibm.com (e23smtp02.au.ibm.com [202.81.31.144]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 8E8101A0196 for ; Mon, 2 Mar 2015 18:35:39 +1100 (AEDT) Received: from /spool/local by e23smtp02.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 2 Mar 2015 17:35:38 +1000 Received: from d23relay06.au.ibm.com (d23relay06.au.ibm.com [9.185.63.219]) by d23dlp01.au.ibm.com (Postfix) with ESMTP id C4FDD2CE8040 for ; Mon, 2 Mar 2015 18:35:35 +1100 (EST) Received: from d23av01.au.ibm.com (d23av01.au.ibm.com [9.190.234.96]) by d23relay06.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t227ZRMJ51904764 for ; Mon, 2 Mar 2015 18:35:35 +1100 Received: from d23av01.au.ibm.com (localhost [127.0.0.1]) by d23av01.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t227Z1ki004624 for ; Mon, 2 Mar 2015 18:35:01 +1100 Date: Mon, 2 Mar 2015 15:34:45 +0800 From: Wei Yang To: Bjorn Helgaas Subject: Re: [PATCH v12 11/21] powerpc/pci: Don't unset PCI resources for VFs Message-ID: <20150302073445.GF21571@richard> Reply-To: Wei Yang References: <20150224082939.32124.45744.stgit@bhelgaas-glaptop2.roam.corp.google.com> <20150224083413.32124.11968.stgit@bhelgaas-glaptop2.roam.corp.google.com> <20150224084450.GH6220@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <20150224084450.GH6220@google.com> Cc: linux-pci@vger.kernel.org, Wei Yang , benh@au1.ibm.com, linuxppc-dev@lists.ozlabs.org, gwshan@linux.vnet.ibm.com List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Tue, Feb 24, 2015 at 02:44:50AM -0600, Bjorn Helgaas wrote: >On Tue, Feb 24, 2015 at 02:34:13AM -0600, Bjorn Helgaas wrote: >> From: Wei Yang >> >> If we're going to reassign resources with flag PCI_REASSIGN_ALL_RSRC, all >> resources will be cleaned out during device header fixup time and then get >> reassigned by PCI core. However, the VF resources won't be reassigned and >> thus, we shouldn't clean them out. >> >> If the pci_dev is a VF, skip the resource unset process. > >I think this patch is correct, but we should include a little more detail >in the changelog to answer questions like mine and Ben's >(http://lkml.kernel.org/r/1423528584.4924.70.camel@au1.ibm.com). > Ok, I will add more change log to explain this. >> Signed-off-by: Wei Yang >> Signed-off-by: Bjorn Helgaas >> --- >> arch/powerpc/kernel/pci-common.c | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c >> index 2a525c938158..82031011522f 100644 >> --- a/arch/powerpc/kernel/pci-common.c >> +++ b/arch/powerpc/kernel/pci-common.c >> @@ -788,6 +788,10 @@ static void pcibios_fixup_resources(struct pci_dev *dev) >> pci_name(dev)); >> return; >> } >> + >> + if (dev->is_virtfn) >> + return; >> + >> for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) { >> struct resource *res = dev->resource + i; >> struct pci_bus_region reg; >> -- Richard Yang Help you, Help me