Hello,
In ehci_alloc_itd_chain(), no need to compute uframes if nframes
is zero and function would return early.
- Michael
Index: src/sys/dev/usb/ehci.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/ehci.c,v
retrieving revision 1.200
diff -u -p -u -r1.200 ehci.c
--- src/sys/dev/usb/ehci.c 15 May 2017 10:52:08 -0000 1.200
+++ src/sys/dev/usb/ehci.c 22 Nov 2017 07:08:43 -0000
@@ -3385,9 +3385,9 @@ ehci_alloc_itd_chain(struct ehci_softc *
break;
}
nframes = (xfer->nframes + (ufrperframe - 1)) / ufrperframe;
- uframes = 8 / ufrperframe;
if (nframes == 0)
return (1);
+ uframes = 8 / ufrperframe;
for (i = 0; i < nframes; i++) {
uint32_t froffs = offs;