From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg KH Subject: Re: [PATCH v10 4/7] PCI: add SR-IOV API for Physical Function driver Date: Mon, 9 Mar 2009 12:39:01 -0700 Message-ID: <20090309193901.GA15011@kroah.com> References: <1235112888-9524-1-git-send-email-yu.zhao@intel.com> <1235112888-9524-5-git-send-email-yu.zhao@intel.com> <20090306203717.GG25995@parisc-linux.org> <20090309082505.GC4638@yzhao-otc.sh.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Matthew Wilcox , "jbarnes@virtuousgeek.org" , "linux-pci@vger.kernel.org" , "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "Randy.Dunlap" To: Yu Zhao Return-path: Content-Disposition: inline In-Reply-To: <20090309082505.GC4638@yzhao-otc.sh.intel.com> Sender: linux-pci-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On Mon, Mar 09, 2009 at 04:25:05PM +0800, Yu Zhao wrote: > > > + pci_device_add(virtfn, virtfn->bus); > > > > Greg is probably going to ding you here for adding the device, then > > creating the symlinks. I believe it's now best practice to create the > > symlinks first, so there's no window where userspace can get confused. > > Yes, but unfortunately we can't create links before adding a device. > I double checked device_add(), there is no place for those links to be > created before it sends uevent. So for now, we have to trigger another > uevent for those links. What exactly are you trying to do with a symlink here that you need to do it this way? I vaguely remember you mentioning this in the past, but I thought you had dropped the symlinks after our conversation about this very problem. thanks, greg k-h