Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/usb Ensure the device is fully initialized before st...



details:   https://anonhg.NetBSD.org/src/rev/542b37a0a3fe
branches:  trunk
changeset: 369883:542b37a0a3fe
user:      nat <nat%NetBSD.org@localhost>
date:      Tue Sep 06 02:26:11 2022 +0000

description:
Ensure the device is fully initialized before starting the update thread.

diffstat:

 sys/dev/usb/udl.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r e75a797860d5 -r 542b37a0a3fe sys/dev/usb/udl.c
--- a/sys/dev/usb/udl.c Tue Sep 06 02:23:50 2022 +0000
+++ b/sys/dev/usb/udl.c Tue Sep 06 02:26:11 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: udl.c,v 1.30 2022/09/06 02:23:50 nat Exp $     */
+/*     $NetBSD: udl.c,v 1.31 2022/09/06 02:26:11 nat Exp $     */
 
 /*-
  * Copyright (c) 2009 FUKAUMI Naoki.
@@ -53,7 +53,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: udl.c,v 1.30 2022/09/06 02:23:50 nat Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udl.c,v 1.31 2022/09/06 02:26:11 nat Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -1833,7 +1833,8 @@
                        kthread_exit(0);
                }
 
-               if (sc->sc_thread_stop == true || sc->sc_fbmem == NULL)
+               if (sc->sc_thread_stop == true || sc->sc_fbmem == NULL ||
+                   sc->sc_fbmem_prev == NULL || sc->sc_width <= 0)
                        goto thread_wait;
 
                if (sc->sc_clear == true)



Home | Main Index | Thread Index | Old Index