which just gets it from the config entry for the function it's enabling.
Multifunction cards are defined to be of type I/O on every function, so there
is no possibility of accidentally switching.
Use tsleep() rather than delay(). XXX Most of these are probably unnecessary
anyway. In particular, I believe that what xi_full_reset() does is totally
gratuitous after power-cycling the socket; it should only be necessary if we
want to use power-saving mode.
implement the hackish/stupid test for the AX88190 by just checking whether
the IOBASE is available in the CCR.
This is unspeakably wrong, but it leaves the code doing ~the same thing it
did before.
can't really rely on multifunction devices having a CIS that reflects this --
e.g. some cards use a combined Ethernet+modem chip, but only actually serve
one of the functions. (We have to assume the configuration index reflects the
bits needed to enable the function.)
* Clean up the socket state earlier in the attach process -- not relying on
the socket attachment to do it.
* Get rid of PCIC_LASTSTATE_HALF. It's pointless.
* In pcic_wait_ready(), also check for the card vanishing, like in pccbb.
* Assert #RESET before powering up the card, not after. (I think it was
actually okay because the value was left as 0 from a previous disable or
the initial socket attach, but...
* If the card fails to come ready, don't bother reinstating windows or
anything -- just power it down.
namely, put the thread to deadqueue rather than just leaking it.
- fix a race between pthread_detach/join and pthread_exit,
which also causes dead thread leaks.
* Like the i82365 code, add a "delay" function that uses tsleep() to wait, and
use this in the socket enable/disable paths. This gets rid of the annoying
system pauses during card insertion and removal. (There are still some
issues related to this in various drivers -- notably big delay()s in wi and
xi.)
* Move the power-change delay out of pccbb_power() and into the PCMCIA backend
code -- specifically, once in the disable path and once in the enable path.
We were being pretty schizo about this before. Make these use tsleep().
(Note: This should be safe because card insertion/removal is handled by a
kernel process, not in an interrupt handler. It works for me with
DIAGNOSTIC.)
* If we get a "bad Vcc" error, attempt to force the socket to power off, and
return an error. If we don't do this, we will get "bad Vcc" errors forever
and never be able to use another card without rebooting, which is dumb.
XXX I haven't been able to test this very well, because it doesn't fail for
me in the first place. :-)
* Clean up the socket mappings earlier in the enable path.
* Try to be consistent about clearing PWRCTL (which contains OE) before turning
off power.