summaryrefslogtreecommitdiffstats
path: root/sys/pccard
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2001-10-23 07:04:03 +0000
committerimp <imp@FreeBSD.org>2001-10-23 07:04:03 +0000
commita47ec252d78949df2a1aa4abec8e4963d540cf15 (patch)
tree293dea4b8ee77e01577c0f91b316ca9f4f050bd6 /sys/pccard
parentaf77ecc6756f2a8a3deefa094081fdd84bcd4009 (diff)
downloadFreeBSD-src-a47ec252d78949df2a1aa4abec8e4963d540cf15.zip
FreeBSD-src-a47ec252d78949df2a1aa4abec8e4963d540cf15.tar.gz
Add a tunable (hw.pcic.boot_deactivated) which will boot the system
with the pccards deactivated. This can work around some problems in pccard system, but is also for people that want to explicitly turn on cards after boot rather that at boot. MFC after: 7 days Submitted by: iwasaki-san Reviewed by: ume-san, shiba-san
Diffstat (limited to 'sys/pccard')
-rw-r--r--sys/pccard/pcic.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/sys/pccard/pcic.c b/sys/pccard/pcic.c
index 14ab1db..f801e11 100644
--- a/sys/pccard/pcic.c
+++ b/sys/pccard/pcic.c
@@ -88,6 +88,12 @@ SYSCTL_INT(_hw_pcic, OID_AUTO, irq, CTLFLAG_RD,
&pcic_override_irq, 0,
"Override the IRQ configured by the config system for all pcic devices");
+int pcic_boot_deactivated = 0;
+TUNABLE_INT("hw.pcic.boot_deactivated", &pcic_boot_deactivated);
+SYSCTL_INT(_hw_pcic, OID_AUTO, boot_deactivated, CTLFLAG_RD,
+ &pcic_boot_deactivated, 0,
+ "Override the automatic powering up of pccards at boot.");
+
/*
* Read a register from the PCIC.
*/
@@ -383,7 +389,14 @@ pcic_attach(device_t dev)
/* Check for changes */
pcic_setb(sp, PCIC_POWER, PCIC_PCPWRE | PCIC_DISRST);
sp->slt->laststate = sp->slt->state = empty;
- pcic_do_stat_delta(sp);
+ if (pcic_boot_deactivated) {
+ if ((sp->getb(sp, PCIC_STATUS) & PCIC_CD) == PCIC_CD) {
+ sp->slt->state = inactive;
+ pccard_event(sp->slt, card_deactivated);
+ }
+ } else {
+ pcic_do_stat_delta(sp);
+ }
}
return (bus_generic_attach(dev));
OpenPOWER on IntegriCloud