Source-Changes archive

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

CVS commit: src/sys/dev/usb



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