From 5323d94f5056a1cff6da3a58669e5415800777c0 Mon Sep 17 00:00:00 2001 From: imp Date: Fri, 27 Jul 2001 07:21:42 +0000 Subject: Attempt to fix and document interactions between suspend/resume and pccardc power x 0. pccardc power x 0 used to disable the slot. But a suspend/resume would reactivate the pccard. It no longer does that. Now the disabling of the slot is sticy until it is reset with power x 1 or the card is ejected. This seems closer to correct behavior to me. o Process all card state changes the same using pccard_do_stat_change(). o Cleanup disabling the card so that we can preserve the state after the change. Basically, don't set it to empty as often as we do. o On suspend, the new state is "empty" and the laststate is "suspend" o Document state machine with a diagram of states and edges. The edges are labeld to tell the reader what event causes the external state changes. o "machdep.pccard.pcic_resume_reset" may be obsolete now. We always call the bridge driver's resume method on resume now. Otherwise cards won't automatically show up. If it needs to stay, I'll add it back. --- sys/pccard/slot.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/pccard/slot.h') diff --git a/sys/pccard/slot.h b/sys/pccard/slot.h index 886110e..779fdbc 100644 --- a/sys/pccard/slot.h +++ b/sys/pccard/slot.h @@ -121,7 +121,7 @@ struct slot { #define PCCARD_DEVICE2SOFTC(d) ((struct slot *) device_get_softc(d)) #define PCCARD_DEV2SOFTC(d) ((struct slot *) (d)->si_drv1) -enum card_event { card_removed, card_inserted }; +enum card_event { card_removed, card_inserted, card_deactivated }; struct slot *pccard_init_slot(device_t, struct slot_ctrl *); void pccard_event(struct slot *, enum card_event); -- cgit v1.1