Subject: Re: power hook and spl level
To: Lennart Augustsson <email@example.com>
From: Artur Grabowski <firstname.lastname@example.org>
Date: 09/06/2000 15:51:44
Lennart Augustsson <email@example.com> writes:
> > This was just a wild guess I made 2 minutes before I had to run from the
> > office to catch a cab.
> > You might want to read a longer explaination of (what I think was) the problem
> > I mailed to firstname.lastname@example.org. The solution is wrong, but it happened to
> > solve one problem we had.
> I'm not sure what the problem was, but there is a good reason for the power
> hooks to run at splhigh(). If they don't, interrupts may occur during the
> resume phase and the interrupt may reach the driver before the hook has
> reinitialized the hardware.
Yes, that was the problem, but it's probably more complicated than that.
(the soultion was wrong because it was only splimp, should have been splhigh).
In this particular case the powerhook reenabled interrupts on the wavelan
before the cardbus interrupt forwarding code has been reenabled. The only
problem was that the interrupt wasn't acked. But in the future if a pcmcia
device is reenabled by a powerhook before the cardbus code is reenabled,
worse things might happen, so I would suggest some mechanism to defer
powerhooks or put priorities in them (so that the bus is reenabled before the
devices on that bus).