Subject: Re: power hook and spl level
To: Artur Grabowski <art@stacken.kth.se>
From: Lennart Augustsson <lennart@mail.augustsson.net>
List: tech-kern
Date: 09/06/2000 09:40:04
Artur Grabowski wrote:

> Jun-ichiro itojun Hagino <itojun@iijlab.net> writes:
>
> >       do you guys think this is necessary for netbsd too?
> >       or it is drivers that need to be corrected?
> >
> > itojun
> >
> >
> > 1.13 Tue Sep 5 21:47:14 GMT 2000 by aaron
> > CVS Tags: HEAD
> > Diffs to 1.12
> > Wrap power hooks in splimp(), fixes WaveLAN suspend problem; thanks art@
> >
> > http://www.openbsd.org/cgi-bin/cvsweb/src/sys/kern/kern_subr.c?r1=1.12&r2=1.13
>
> 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 tech@openbsd.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.

    -- Lennart