summaryrefslogtreecommitdiffstats
path: root/sys/pccard/pccard.c
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2000-02-21 06:52:20 +0000
committerimp <imp@FreeBSD.org>2000-02-21 06:52:20 +0000
commit9ed91a0fa5b0949079e616ed4e74598919e2131a (patch)
tree72097b447d58dd9b7a83d38242c981dab0447c47 /sys/pccard/pccard.c
parentacfee30552914b1fc92f65d06fd0b5f151bb3302 (diff)
downloadFreeBSD-src-9ed91a0fa5b0949079e616ed4e74598919e2131a.zip
FreeBSD-src-9ed91a0fa5b0949079e616ed4e74598919e2131a.tar.gz
/tmp/msg
Diffstat (limited to 'sys/pccard/pccard.c')
-rw-r--r--sys/pccard/pccard.c29
1 files changed, 5 insertions, 24 deletions
diff --git a/sys/pccard/pccard.c b/sys/pccard/pccard.c
index abc1195..a06f266 100644
--- a/sys/pccard/pccard.c
+++ b/sys/pccard/pccard.c
@@ -71,12 +71,7 @@
SYSCTL_NODE(_machdep, OID_AUTO, pccard, CTLFLAG_RW, 0, "pccard");
-static int pcic_resume_reset =
-#ifdef PCIC_RESUME_RESET /* opt_pcic.h */
- 1;
-#else
- 0;
-#endif
+static int pcic_resume_reset = 1;
SYSCTL_INT(_machdep_pccard, OID_AUTO, pcic_resume_reset, CTLFLAG_RW,
&pcic_resume_reset, 0, "");
@@ -88,8 +83,7 @@ SYSCTL_INT(_machdep_pccard, OID_AUTO, pcic_resume_reset, CTLFLAG_RW,
static int allocate_driver(struct slot *, struct dev_desc *);
static void inserted(void *);
static void disable_slot(struct slot *);
-static void disable_slot_spl0(struct slot *);
-static void disable_slot_to(void *);
+static void disable_slot_to(struct slot *);
static int invalid_io_memory(unsigned long, int);
static void power_off_slot(void *);
@@ -185,10 +179,8 @@ disable_slot(struct slot *slt)
}
static void
-disable_slot_to(void *argp)
+disable_slot_to(struct slot *slt)
{
- struct slot *slt = (struct slot *) argp;
-
slt->state = empty;
disable_slot(slt);
printf("pccard: card removed, slot %d\n", slt->slotnum);
@@ -197,15 +189,6 @@ disable_slot_to(void *argp)
}
/*
- * Disables the slot later when we drop to spl0 via a timeout.
- */
-static void
-disable_slot_spl0(struct slot *slt)
-{
- slt->disable_ch = timeout(disable_slot_to, (caddr_t) slt, 0);
-}
-
-/*
* pccard_alloc_slot - Called from controller probe
* routine, this function allocates a new PC-CARD slot
* and initialises the data structures using the data provided.
@@ -232,7 +215,6 @@ pccard_alloc_slot(struct slot_ctrl *ctrl)
pccard_slots[slotno] = slt;
callout_handle_init(&slt->insert_ch);
callout_handle_init(&slt->poff_ch);
- callout_handle_init(&slt->disable_ch);
return(slt);
}
@@ -301,12 +283,12 @@ inserted(void *arg)
*/
slt->pwr.vcc = 50;
slt->pwr.vpp = 0;
+
/*
* Disable any pending timeouts for this slot, and explicitly
* power it off right now. Then, re-enable the power using
* the (possibly new) power settings.
*/
- untimeout(power_off_slot, (caddr_t)slt, slt->disable_ch);
untimeout(power_off_slot, (caddr_t)slt, slt->poff_ch);
power_off_slot(slt);
slt->ctrl->power(slt);
@@ -338,7 +320,7 @@ pccard_event(struct slot *slt, enum card_event event)
*/
if (slt->state == filled) {
slt->state = empty;
- disable_slot_spl0(slt);
+ disable_slot_to(slt);
}
break;
case card_inserted:
@@ -705,7 +687,6 @@ pccard_suspend(device_t dev)
* Disable any pending timeouts for this slot since we're
* powering it down/disabling now.
*/
- untimeout(power_off_slot, (caddr_t)slt, slt->disable_ch);
untimeout(power_off_slot, (caddr_t)slt, slt->poff_ch);
slt->ctrl->disable(slt);
return (0);
OpenPOWER on IntegriCloud