From: Alexander Duyck <alexander.h.duyck@intel.com>
To: Yinghai Lu <yinghai@kernel.org>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
Gu Zheng <guz.fnst@cn.fujitsu.com>,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org
Subject: Re: [PATCH 6/7] PCI: Make sure VF's driver get attached after PF's
Date: Tue, 14 May 2013 09:00:48 -0700 [thread overview]
Message-ID: <51925FB0.4080504@intel.com> (raw)
In-Reply-To: <1368498506-25857-7-git-send-email-yinghai@kernel.org>
On 05/13/2013 07:28 PM, Yinghai Lu wrote:
> Found kernel try to load mlx4 drivers for VFs before
> PF's is really loaded when the drivers are built-in, and kernel
> command line include probe_vfs=63, num_vfs=63.
>
> It turns that it also happen for hotadd path even drivers are
> compiled as modules and if they loaded. Esp some VF share the
> same driver with PF.
>
> calling path:
> device driver probe
> ==> pci_enable_sriov
> ==> virtfn_add
> ==> pci_dev_add
> ==> pci_bus_device_add
> when pci_bus_device_add is called, the VF's driver will be attached.
> and at that time PF's driver does not finish yet.
>
> Need to move out pci_bus_device_add from virtfn_add and call it
> later. Fix the problem for two path,
> 1. hotadd path: use device_schedule_callback.
> 2. for booting path, use initcall to call that for all VF's.
>
> Signed-off-by: Yinghai Lu <yinghai@kernel.org>
> Cc: netdev@vger.kernel.org
>
I'm sorry, but what is the point of this patch? With device assignment
it is always possible to have VFs loaded and the PF driver unloaded
since you cannot remove the VFs if they are assigned to a VM.
If there is a driver that has to have the PF driver fully loaded before
it instantiates the VFs then it sounds like a buggy driver to me. The
VF driver should be able to be loaded when the PF driver is not
present. We handle it in igb and ixgbe last I checked, and I don't see
any reason why it cannot be handled in all other VF drivers. I'm not
saying the VF has to be able to fully functional, but it should be able
to detect the PF becoming enabled and then bring itself to a fully
functional state. To not handle that case is a bug.
Thanks,
Alex
next prev parent reply other threads:[~2013-05-14 16:00 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1368498506-25857-1-git-send-email-yinghai@kernel.org>
2013-05-14 2:28 ` [PATCH 6/7] PCI: Make sure VF's driver get attached after PF's Yinghai Lu
2013-05-14 8:58 ` Yan Burman
2013-05-14 15:43 ` Yinghai Lu
2013-05-16 4:00 ` Or Gerlitz
2013-05-16 4:39 ` Yinghai Lu
2013-05-16 4:56 ` Or Gerlitz
2013-05-16 17:53 ` Tejun Heo
2013-05-16 18:36 ` Yinghai Lu
2013-05-20 12:23 ` Or Gerlitz
2013-05-14 9:46 ` Perla, Sathya
2013-05-14 15:19 ` Yinghai Lu
2013-05-14 16:00 ` Alexander Duyck [this message]
2013-05-14 18:44 ` Yinghai Lu
2013-05-14 19:45 ` Alexander Duyck
2013-05-14 19:59 ` Yinghai Lu
2013-05-14 21:39 ` Alexander Duyck
2013-05-21 21:30 ` Don Dutile
2013-05-21 21:31 ` Don Dutile
2013-05-21 21:58 ` Alexander Duyck
2013-05-21 22:09 ` Don Dutile
2013-05-21 22:12 ` Alexander Duyck
2013-05-21 21:49 ` Michael S. Tsirkin
2013-05-21 22:01 ` Alexander Duyck
2013-05-21 22:11 ` Michael S. Tsirkin
2013-05-21 22:30 ` Alexander Duyck
2013-05-22 20:16 ` Or Gerlitz
2013-05-22 21:40 ` Don Dutile
2013-05-23 6:43 ` Or Gerlitz
2013-05-22 23:45 ` Ben Hutchings
2013-05-23 6:32 ` Or Gerlitz
2013-05-16 6:39 ` Michael S. Tsirkin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51925FB0.4080504@intel.com \
--to=alexander.h.duyck@intel.com \
--cc=bhelgaas@google.com \
--cc=guz.fnst@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=yinghai@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).