Subject: Re: wi0 on SMC 2632W
To: None <port-i386@netbsd.org>
From: Peter Seebach <seebs@plethora.net>
List: port-i386
Date: 12/18/2000 21:04:33
In message <3A3ECF35.EEC0DD3F@mail.augustsson.net>, Lennart Augustsson writes:
>Assuming your code is not running in an interrupt context you could
>use tsleep(9).

Uhm.  This may be a dumb question, but how do I know whether my code is
running in an interrupt context?  All I know is that wi_reset is called
sometime during when we find the card, and occasionally later.  :(

Anyway, I have no objections to people fixing this "patch".  It "works" on
my systems (except for one that gets all bits 1 when trying to read card
registers), but I'm quite aware that my code is probably pretty weak.  I
mostly hope people can use these patches to get cards working well enough
that it's productive to continue debugging.

>The reason the PCMCIA cards make the system pause is because the
>code is broken.  It uses delay()...

Ah-hah.  So, most of those will eventually need to be fixed.

Is there a general mechanism for code which needs to wait for something,
but runs in an interrupt context, to do anything?  I would assume there
isn't until the kernel gets threaded, but I could be massively
misunderstanding this.

-s