tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: [patch] PCI memory & i/o enables

On Fri, 8 Apr 2011, David Young wrote:

> On Fri, Apr 08, 2011 at 08:47:59PM +0200, Matthias Drochner wrote:
> > 
> > said:
> > > If the flag isn't set, the driver has no business setting it.  Also,
> > > if the flag isn't set, there's not much use in the driver setting the
> > > corresponding bit in the PCI CSR.
> > 
> > I don't think this goes into the right direction. The driver shouldn't
> > have a business setting flags in the attach args, except in rare,
> > mostly historical cases like indirect configuration.
> The patch stops drivers from setting flags in the attach args, which I
> think that you will agree is a step in the right direction.

I disagree on both counts.  All this patch does is fix a couple of buggy 
drivers and create a ton of unnecessary code churn.  

If you really want to prevent drivers from tweaking the attach_args you 
should check them in pci_probe_device and panic if the driver changed 
them.  I don't see how renaming constants solves the problem.  


Home | Main Index | Thread Index | Old Index