Module Name: src Committed By: jmcneill Date: Sun Oct 10 20:14:09 UTC 2021
Modified Files: src/sys/dev/usb: usb.c Log Message: usb: usb_event_thread: remove delay at startup for USB >= 2.0 HCs The delay at the start of usb_event_thread is meant to slow down EHCI companion controllers. Skip the 500ms delay if the bus that owns this thread is USB >= 2.0 since those are never companions. To generate a diff of this commit: cvs rdiff -u -r1.197 -r1.198 src/sys/dev/usb/usb.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/usb/usb.c diff -u src/sys/dev/usb/usb.c:1.197 src/sys/dev/usb/usb.c:1.198 --- src/sys/dev/usb/usb.c:1.197 Sun Sep 26 01:16:09 2021 +++ src/sys/dev/usb/usb.c Sun Oct 10 20:14:09 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: usb.c,v 1.197 2021/09/26 01:16:09 thorpej Exp $ */ +/* $NetBSD: usb.c,v 1.198 2021/10/10 20:14:09 jmcneill Exp $ */ /* * Copyright (c) 1998, 2002, 2008, 2012 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: usb.c,v 1.197 2021/09/26 01:16:09 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: usb.c,v 1.198 2021/10/10 20:14:09 jmcneill Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -724,7 +724,9 @@ usb_event_thread(void *arg) * know how to synchronize the creation of the threads so it * will work. */ - usb_delay_ms(bus, 500); + if (bus->ub_revision < USBREV_2_0) { + usb_delay_ms(bus, 500); + } /* Make sure first discover does something. */ mutex_enter(bus->ub_lock);