aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/pccbb/pccbb_pci.c
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2005-07-14 20:46:59 +0000
committerWarner Losh <imp@FreeBSD.org>2005-07-14 20:46:59 +0000
commitfd4e4752332628d9dadd27532e7b081d2b4b98f1 (patch)
tree4b31ed3df186cedbbcb41d6b8fa70a4f02d332dd /sys/dev/pccbb/pccbb_pci.c
parent2bb5d7f9aceb3107c7722aaad6ce7fcd4d6c8288 (diff)
downloadsrc-fd4e4752332628d9dadd27532e7b081d2b4b98f1.tar.gz
src-fd4e4752332628d9dadd27532e7b081d2b4b98f1.zip
Omnibus power and interrupt fixes:
o Don't busy wait on powerup. Instead, use the power up interrupt to wait for the card to power up. Don't wait when we're turning the card off, since no interrupt happens in that case. o Convert many of the long DELAYs to tsleeps. We do not run before the timer have stared, so DELAY isn't necessary. More DELAYs can likely be eliminated in the future. o When powering up the card, don't do anything if the card is already powered up (before we'd power cycle it). This means that for most cards we power them up once and then never change the power. o On card eject, mask (by clearing) the CD bit. Before we set it, which was wrong. We don't want to see any CD events past the first one since they need to be debounced. With these changes, I can insert/eject 16bit cards without glitching xmms' sound output. Something very important to the development of better pccard drivers :-)
Notes
Notes: svn path=/head/; revision=148013
Diffstat (limited to 'sys/dev/pccbb/pccbb_pci.c')
-rw-r--r--sys/dev/pccbb/pccbb_pci.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/dev/pccbb/pccbb_pci.c b/sys/dev/pccbb/pccbb_pci.c
index ab3bc889df51..51034caa85bb 100644
--- a/sys/dev/pccbb/pccbb_pci.c
+++ b/sys/dev/pccbb/pccbb_pci.c
@@ -292,6 +292,7 @@ cbb_pci_attach(device_t brdev)
parent = device_get_parent(brdev);
mtx_init(&sc->mtx, device_get_nameunit(brdev), "cbb", MTX_DEF);
cv_init(&sc->cv, "cbb cv");
+ cv_init(&sc->powercv, "cbb cv");
sc->chipset = cbb_chipset(pci_get_devid(brdev), NULL);
sc->dev = brdev;
sc->cbdev = NULL;