lkml.org 
[lkml]   [2021]   [Mar]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] PCI: Remove pci_try_set_mwi
On Fri, Mar 26, 2021 at 04:26:55PM -0500, Bjorn Helgaas wrote:
> [+cc Randy, Andrew (though I'm sure you have zero interest in this
> ancient question :))]
>
> On Wed, Dec 09, 2020 at 09:31:21AM +0100, Heiner Kallweit wrote:
> > pci_set_mwi() and pci_try_set_mwi() do exactly the same, just that the
> > former one is declared as __must_check. However also some callers of
> > pci_set_mwi() have a comment that it's an optional feature. I don't
> > think there's much sense in this separation and the use of
> > __must_check. Therefore remove pci_try_set_mwi() and remove the
> > __must_check attribute from pci_set_mwi().
> > I don't expect either function to be used in new code anyway.
>
> There's not much I like better than removing things. But some
> significant thought went into adding pci_try_set_mwi() in the first
> place, so I need a little more convincing about why it's safe to
> remove it.
>
> The argument should cite the discussion about adding it. I think one
> of the earliest conversations is here:
> https://lore.kernel.org/linux-ide/20070404213704.224128ec.randy.dunlap@oracle.com/

It's solely PCI feature which is absent on PCIe.

So, if there is a guarantee that the driver never services a device connected
to old PCI bus, it's okay to remove the call (it's no-op on PCIe anyway).

OTOH, PCI core may try MWI itself for every device (but this is an opposite,
what should we do on broken devices that do change their state based on that
bit while violating specification).

In any case

Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

for DesignWare DMA case. I have added that and I never saw that IP connected
to the old PCI.

--
With Best Regards,
Andy Shevchenko


\
 
 \ /
  Last update: 2021-03-26 22:45    [W:0.251 / U:0.540 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site