[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20100807190814.GZ9031@bicker>
Date: Sat, 7 Aug 2010 21:08:14 +0200
From: Dan Carpenter <error27@...il.com>
To: Vasiliy Kulikov <segooon@...il.com>
Cc: kernel-janitors@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...e.de>,
Alan Cox <alan@...ux.intel.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Rakib Mullick <rakib.mullick@...il.com>,
Ben Hutchings <ben@...adent.org.uk>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 01/18] char: moxa: call disable_pci_device() if
pci_probe() failed
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 linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists