Subject: Re: [PATCH 03/33] sfc: Do not use pci_disable_device() to disable bus mastering

From: Ben Hutchings <[email-masked]>
Date: Sat, 13 Dec 2008 06:27:10 +0000

David Miller wrote:
> From: Ben Hutchings <[email-masked]>
> Date: Fri, 12 Dec 2008 12:49:14 +0000
> 
> > pci_disable_device() disables many features, like MSI-X, which we
> > never reenable in efx_reset().  Further, calls to pci_enable_device()
> > and pci_disable_device() must be matched since the nesting count was
> > introduced.
> > 
> > Signed-off-by: Ben Hutchings <[email-masked]>
> 
> Since the PCI layer provides interfaces which do manage
> this setting, there is no way you should be doing this
> behind it's back.
> 
> You know why?
> 
> Because someone is going to change some of the internals
> of this stuff in the PIC layer and it will break your
> driver.
> 
> Please instead submit an interface to the PCI layer
> maintainers that does what you want, then use it.

I did ask on #linux-pci why this didn't exist; apparently it wasn't
considered to be worth providing.  So obviously I can submit a patch to
the PCI layer but I'm not sure it would be accepted.

Ben.

> Patch not applied.

-- 
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.