From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v2] bus/pci: fix unexpected resource mapping override Date: Wed, 31 Oct 2018 19:24:21 +0100 Message-ID: <2723053.kYWEf3LriZ@xps> References: <20181027032045.7564-1-qi.z.zhang@intel.com> <4370007.3MeJCCFLt4@xps> <039ED4275CED7440929022BC67E70611532DD668@SHSMSX103.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, "Burakov, Anatoly" , "Yigit, Ferruh" , "geoffrey.lv@gmail.com" , "ajit.khaparde@broadcom.com" , "stable@dpdk.org" , "gaetan.rivet@6wind.com" , "arybchenko@solarflare.com" To: "Zhang, Qi Z" Return-path: In-Reply-To: <039ED4275CED7440929022BC67E70611532DD668@SHSMSX103.ccr.corp.intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 30/10/2018 16:19, Zhang, Qi Z: > From: Thomas Monjalon [mailto:thomas@monjalon.net] > > 27/10/2018 05:20, Qi Zhang: > > > When scanning an already plugged device, the virtual address of mapped > > > PCI resource in rte_pci_device will be overridden with 0, that may > > > cause driver does not work correctly. > > > The fix is not to update any rte_pci_device's field if the being > > > scanned device's driver is already probed. > > > > > > Bugzilla ID: 85 > > > Fixes: c752998b5e2e ("pci: introduce library and driver") > > > Cc: stable@dpdk.org > > > > > > Reported-by: Lv Geoffrey > > > Signed-off-by: Qi Zhang > > > > I still think something must be fixed in PCI scan. > > We are fixing something in PCI scan, right? Yes :) I was thinking about not scanning an already scanned device. If the device has been unplugged, it should be removed, and re-added when plugged, instead of trying to update it. I understand this is another kind of change and deserves more time to think about the right design. That's why I will accept the v3 of this patch. Anyway the road to get hotplug handled right is long :)