Subject: Re: ca_activate et al
To: Jason Thorpe <thorpej@shagadelic.org>
From: Jachym Holecek <freza@dspfpga.com>
List: tech-kern
Date: 06/27/2006 23:00:25
# Jason Thorpe 2006-06-27:
> On Jun 26, 2006, at 7:12 PM, Jachym Holecek wrote:
> >Unless I'm missing something, "activate" entry points are dead code.
> >If so, this would be an opportunity to make kernel images somewhat
> >smaller by removing ca_activate and all related logic.
> 
> No, they're not dead code.  That entry point can be called from  
> interrupt context when a device status change is noted on e.g. a  
> PCMCIA slot.  It is important to mark the device as "dead" so that  
> e.g. an interrupt handler for the device won't try to access its  
> registers before the detach entry point can be called (from a kernel  
> thread).

Ah, I misunderstood that, thanks for the explanation. I suppose
DVACT_ACTIVATE is intented for cases where deactivation reason was
temporary?

Still, it doesn't seem right that devices need to handle tree
recursion themselves. What about moving this to config_[de]activate?
Similar logic would be useful for powerhooks rework, too.

	-- Jachym