From cf0ee54fecf050e95dd810f80c7dbbdfdd589289 Mon Sep 17 00:00:00 2001 From: Nate Williams Date: Thu, 24 Sep 1998 17:56:31 +0000 Subject: [PATCH] - Fix a bug where a "power_off_slot' timeout was not cancelled when the computer 'suspended', although the slot was powered off. There was a race where the slow could be powered off *after* it was assigned a new driver when the computer was 'resumed'. Noticed by: Brian Somers --- sys/pccard/pccard.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sys/pccard/pccard.c b/sys/pccard/pccard.c index 1f0f6741d27..333b04e8143 100644 --- a/sys/pccard/pccard.c +++ b/sys/pccard/pccard.c @@ -28,7 +28,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: pccard.c,v 1.64 1998/08/26 07:09:58 imp Exp $ + * $Id: pccard.c,v 1.65 1998/09/08 18:09:51 brian Exp $ */ #include "opt_devfs.h" @@ -387,6 +387,11 @@ slot_suspend(void *arg) splx(s); printf("Card disabled, slot %d\n", slt->slotnum); } + /* + * Disable any pending timeouts for this slot since we're + * powering it down/disabling now. + */ + untimeout(power_off_slot, (caddr_t)slt, slt->poff_ch); slt->ctrl->disable(slt); return (0); }