lkml.org 
[lkml]   [2012]   [Jan]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 1/7] PCI: Make sriov work with hotplug remove
On Sat, Jan 21, 2012 at 1:52 AM, Yinghai Lu <yinghai@kernel.org> wrote:
>
> +       /*
> +        * pci_stop_bus_device(dev) will not remove dev from bus->devices list,
> +        *  so We don't need use _safe version for_each here.
> +        * Also _safe version has problem when pci_stop_bus_device() for PF try
> +        *  to remove VFs.
> +        */
> +       for (l = head->next; l != head;) {

That's crazy. Why would you open-code this? Why isn't it just a
"list_for_each()"?

And what are the problems with the safe version? If the safe version
doesn't work, then something is *seriously* wrong with the list.

> +               struct pci_dev *dev = pci_dev_b(l);
> +
> +               /*
> +                * VFs are removed by pci_remove_bus_device() in the
> +                *  pci_stop_bus_devices() code path for PF.
> +                *  aka, bus->devices get updated in the process.
> +                * barrier() will make sure we get right next from that list.
> +                */
> +               if (!dev->is_virtfn) {
> +                       pci_stop_bus_device(dev);
> +                       barrier();
> +               }

And this is just insanity. The "barrier()" cannot *possibly* do
anything sane. If it really makes a difference, there is again some
serious problem with the whole f*cking thing.

NAK on the patch until sanity is restored. This is just total voodoo
programming.

Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2012-01-23 17:09    [W:0.098 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site