Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 09 Feb 2001 09:45:28 -0600
From:      "Randall R. Stewart" <randall@stewart.chicago.il.us>
To:        freebsd-questions@FreeBSD.org
Subject:   Question about spl() and friends AND disable/enable interupts
Message-ID:  <3A841098.61D7BDC9@stewart.chicago.il.us>

next in thread | raw e-mail | index | archive | help
Hello:

It has been years since I have poked around in kernel
lands... and now I find myself doing so again :)

Now I have a very basic and probably dumb question..

I am busy hacking/fixing the an driver.. attempting
to get it to align to the 4800 specification I have...

And I notice no use of the splx() and friends. Further
I hunted a bit and find that all of the spl...() ilk
have been macro'd to 'return(0);'

Now here is my question(s):

A) When a driver needs to disable interupts how does it do so?
     - For now I am only disabling the Airo card from interupting
       but I think this is a real problem since there is a race
       in the command register access.

B) Is the mtx_enter() mtx_exit() supposed be the new replacement
   for interupt. I glanced at this code, and I do note a disable_intr()
   when it is from a lowerlayer type driver... but I am not sure
   this helps protect the user making a query... Worse, if a user
   side process does say a ancontrol command and thus has a lock, a
   interupt hits, does the interupt handler have to wait, since it
   too does a mtx_enter? This all seems strange in my old grey cells.

Pointers or comments would be most welcome.. thanks

R



-- 
Randall R. Stewart
randall@stewart.chicago.il.us or rrs@cisco.com
815-342-5222 (cell) 815-477-2127 (work)


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3A841098.61D7BDC9>