Re: [PATCH 3/3] EDAC: amd64_edac: decide if driver can load successfully early.

Dmitry Torokhov
2015-03-19T15:53:01Z

On Thu, Mar 19, 2015 at 04:35:06PM +0100, Borislav Petkov wrote:
> On Thu, Mar 19, 2015 at 11:29:57AM -0400, Tejun Heo wrote:
> > This is a gloss layering violation. Please don't do things like this.
> > I'm all for ripping out the hack even w/o considering the async probe
> > issue.
>
> And I don't want to leave the driver loaded when there's nothing to
> be loaded for. One instance in this driver's specific case is one
> northbridge and there are numascale boxes with hundreds of northbridges.

Why does the number of bridges matter? Yo can have bazillion bridges, it
doe snot mean you'll have more than one copy of driver code. Note that
even with the changes we do not leave the driver bound to the devices if
there is no ECC.

>
> If you have a better idea about how to unload the driver, asynchronously
> or not, after all probe() calls have failed, I'm all ears.

Given that PCI is hot pluggable you can never know when PCI done
enumerating (in a broad sense).

Thanks.

--
Dmitry