Subject: CVS commit: src/sys/dev/pci
To: None <source-changes@NetBSD.org>
From: Charles M. Hannum <mycroft@netbsd.org>
List: source-changes
Date: 08/12/2004 07:15:49
Module Name: src
Committed By: mycroft
Date: Thu Aug 12 07:15:49 UTC 2004
Modified Files:
src/sys/dev/pci: pccbb.c
Log Message:
A bunch of random cleanup:
* 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.
To generate a diff of this commit:
cvs rdiff -r1.103 -r1.104 src/sys/dev/pci/pccbb.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.