Re: [PATCH 01/18] char: moxa: call disable_pci_device() if pci_probe() failed

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

 



On Sat, Aug 07, 2010 at 10:02:52PM +0400, Vasiliy Kulikov wrote:
> 
> The thing is not in that pci_enable_device() is nestable, but in that
> some buggy non-mainline drivers may not use PCI api, but use
> request_*(). In this case PCI bus doesn't see this driver and tries to
> call mainline driver probe(). It sees that resources are already
> grabbed. The only reason can be another driver that rules this device
> (or our kernel is crazy). As we are robust driver we don't want to break
> this buggy third party driver :-)
> 

What Jeff Garzik was saying in those days if two people called
pci_enable_device() it wasn't a problem, but if one person then called
pci_disable_device() the other person who still wanted it enabled was
screwed.  That model was "*first* person out of the building lock the
door."

That was half a decade ago though.  The fix that Jeff proposed wasn't
really a good one because there is no way people would get that right.
None of that applies any more.  These days we just call enable when we 
want it enabled and disable when we are done.  All the dependencies are
handled for us.

In fact, if we try to use the old hacks and work arounds, that will cause
bugs in the new code...

regards,
dan carpenter

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux