Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1728316
| From | Alex Williamson <alex.williamson@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v3 3/3] PCI: Avoid slot reset for Cavium cn8xxx root ports |
| Date | 2017-09-07 19:00 +0200 |
| Message-ID | <un8jM-2Fs-3@gated-at.bofh.it> (permalink) |
| References | (2 earlier) <ukctB-16f-43@gated-at.bofh.it> <ukAcz-7O1-35@gated-at.bofh.it> <ukAcz-7O1-33@gated-at.bofh.it> <un8jM-2Fs-5@gated-at.bofh.it> <un8jM-2Fs-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, 7 Sep 2017 09:49:04 +0200
Jan Glauber <jan.glauber@caviumnetworks.com> wrote:
> On Thu, Sep 07, 2017 at 09:40:11AM +0200, Jan Glauber wrote:
> > So what if we add an additional check like:
> >
> > diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
> > index fdf65a6..389db4b 100644
> > --- a/drivers/pci/pci.c
> > +++ b/drivers/pci/pci.c
> > @@ -4389,6 +4389,9 @@ static bool pci_slot_resetable(struct pci_slot *slot)
> > {
> > struct pci_dev *dev;
> >
> > + if (slot->bus->self & PCI_DEV_FLAGS_NO_BUS_RESET)
> > + return false;
> > +
> > list_for_each_entry(dev, &slot->bus->devices, bus_list) {
> > if (!dev->slot || dev->slot != slot)
> > continue;
>
> Obviously I meant:
> if (slot->bus->self->dev_flags & PCI_DEV_FLAGS_NO_BUS_RESET)
Much better, perhaps even incorporate the bus->self check for good
measure... is it possible to have a slot on a root bus? Taking
different approaches for bus vs slot reset should have been a giant red
flag that something is wrong. Thanks,
Alex
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH v3 3/3] PCI: Avoid slot reset for Cavium cn8xxx root ports Jan Glauber <jglauber@cavium.com> - 2017-08-30 16:30 +0200
Re: [PATCH v3 3/3] PCI: Avoid slot reset for Cavium cn8xxx root ports Alex Williamson <alex.williamson@redhat.com> - 2017-08-30 16:50 +0200
Re: [PATCH v3 3/3] PCI: Avoid slot reset for Cavium cn8xxx root ports Alex Williamson <alex.williamson@redhat.com> - 2017-08-31 18:10 +0200
Re: [PATCH v3 3/3] PCI: Avoid slot reset for Cavium cn8xxx root ports Alex Williamson <alex.williamson@redhat.com> - 2017-09-07 19:00 +0200
csiph-web