Module Name:    src
Committed By:   nat
Date:           Sun Oct  4 06:15:55 UTC 2020

Modified Files:
        src/sys/dev/cardbus: cardslot.c

Log Message:
Ensure event_thread stays in event loop upon creation.


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/sys/dev/cardbus/cardslot.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/cardbus/cardslot.c
diff -u src/sys/dev/cardbus/cardslot.c:1.56 src/sys/dev/cardbus/cardslot.c:1.57
--- src/sys/dev/cardbus/cardslot.c:1.56	Sat Sep 24 23:54:49 2016
+++ src/sys/dev/cardbus/cardslot.c	Sun Oct  4 06:15:54 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: cardslot.c,v 1.56 2016/09/24 23:54:49 mrg Exp $	*/
+/*	$NetBSD: cardslot.c,v 1.57 2020/10/04 06:15:54 nat Exp $	*/
 
 /*
  * Copyright (c) 1999 and 2000
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cardslot.c,v 1.56 2016/09/24 23:54:49 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cardslot.c,v 1.57 2020/10/04 06:15:54 nat Exp $");
 
 #include "opt_cardslot.h"
 
@@ -157,6 +157,7 @@ cardslotattach(device_t parent, device_t
 	}
 
 	if (csc != NULL || psc != NULL) {
+		sc->sc_th_enable = 1;
 		config_pending_incr(self);
 		if (kthread_create(PRI_NONE, 0, NULL, cardslot_event_thread,
 		    sc, &sc->sc_event_thread, "%s", device_xname(self))) {
@@ -164,7 +165,6 @@ cardslotattach(device_t parent, device_t
 					 "unable to create thread\n");
 			panic("cardslotattach");
 		}
-		sc->sc_th_enable = 1;
 	}
 
 	if (csc && (csc->sc_cf->cardbus_ctrl)(csc->sc_cc, CARDBUS_CD)) {

Reply via email to