NetBSD-Bugs archive

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

PR/57662 CVS commit: src/sys/dev/usb



The following reply was made to PR port-i386/57662; it has been noted by GNATS.

From: "Taylor R Campbell" <riastradh%netbsd.org@localhost>
To: gnats-bugs%gnats.NetBSD.org@localhost
Cc: 
Subject: PR/57662 CVS commit: src/sys/dev/usb
Date: Sat, 28 Oct 2023 21:18:15 +0000

 Module Name:	src
 Committed By:	riastradh
 Date:		Sat Oct 28 21:18:15 UTC 2023
 
 Modified Files:
 	src/sys/dev/usb: ehci.c
 
 Log Message:
 ehci(4): Fix cv_timedwait loop in ehci_sync_hc.
 
 Stop when
 
 	now - starttime >= delta,
 
 i.e., when at least delta ticks have elapsed since the start, not
 when
 
 	endtime - now > delta,
 
 i.e., more than delta ticks _remain_ to sleep, which is never going
 to happen (except on arithmetic overflow).
 
 As is, what will happen in the case that should time out is that we
 wake up after delta ticks, and find now = getticks() is exactly
 endtime, so we retry cv_timedwait with timo=(endtime - now)=0 which
 means sleep indefinitely with no timeout as if with cv_wait.
 
 PR port-i386/57662
 
 XXX pullup-10
 
 
 To generate a diff of this commit:
 cvs rdiff -u -r1.317 -r1.318 src/sys/dev/usb/ehci.c
 
 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.
 


Home | Main Index | Thread Index | Old Index