Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1575835
| From | Haiyang Zhang <haiyangz@microsoft.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | RE: [PATCH] PCI: hv: fix wslot_to_devfn() |
| Date | 2017-02-07 17:20 +0100 |
| Message-ID | <t8gEN-5ar-1@gated-at.bofh.it> (permalink) |
| References | <t89WF-Sa-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
> -----Original Message----- > From: Dexuan Cui > Sent: Tuesday, February 7, 2017 4:00 AM > To: Bjorn Helgaas <bhelgaas@google.com>; linux-pci@vger.kernel.org; > devel@linuxdriverproject.org; Jake Oshins <jakeo@microsoft.com> > Cc: KY Srinivasan <kys@microsoft.com>; Stephen Hemminger > <sthemmin@microsoft.com>; Haiyang Zhang <haiyangz@microsoft.com>; > olaf@aepfle.de; gregkh@linuxfoundation.org; linux-kernel@vger.kernel.org; > apw@canonical.com; jasowang@redhat.com; Vitaly Kuznetsov > <vkuznets@redhat.com> > Subject: [PATCH] PCI: hv: fix wslot_to_devfn() > > The devfn of 00:02.0 is 0x10. > devfn_to_wslot(0x10) == 0x2, and wslot_to_devfn(0x2) should be 0x10, > while it's 0x2 in the current code. > > Due to this, hv_eject_device_work() -> pci_get_domain_bus_and_slot() > returns NULL and pci_stop_and_remove_bus_device() is not called. > > Later when the real device driver's .remove() is invoked by > hv_pci_remove() -> pci_stop_root_bus(), some warnings can be noticed > because the VM has lost the access to the underlying device at that time. > > Signed-off-by: Jake Oshins <jakeo@microsoft.com> > Signed-off-by: Dexuan Cui <decui@microsoft.com> > Cc: stable@vger.kernel.org > Cc: K. Y. Srinivasan <kys@microsoft.com> > CC: Haiyang Zhang <haiyangz@microsoft.com> > Cc: Stephen Hemminger <sthemmin@microsoft.com> > --- > drivers/pci/host/pci-hyperv.c | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > The patch is co-made by Jake and me. I think this line should be put together with other comments. Thanks. Acked-by: Haiyang Zhang <haiyangz@microsoft.com>
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] PCI: hv: fix wslot_to_devfn() Dexuan Cui <decui@microsoft.com> - 2017-02-07 10:10 +0100 RE: [PATCH] PCI: hv: fix wslot_to_devfn() Haiyang Zhang <haiyangz@microsoft.com> - 2017-02-07 17:20 +0100 Re: [PATCH] PCI: hv: fix wslot_to_devfn() Bjorn Helgaas <helgaas@kernel.org> - 2017-02-10 22:30 +0100
csiph-web