]> xenbits.xensource.com Git - seabios.git/commitdiff
usb-ehci: Clear pipe token on pipe reallocate
authorKevin O'Connor <kevin@koconnor.net>
Tue, 5 Feb 2019 02:22:15 +0000 (21:22 -0500)
committerKevin O'Connor <kevin@koconnor.net>
Tue, 5 Feb 2019 02:22:15 +0000 (21:22 -0500)
Make sure to clear the token before reuse as it may otherwise have an
incorrect toggle setting.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
src/hw/usb-ehci.c

index 7eca55bddd9110d2883291ba21a99bf4e64c23a1..d01fa853ef36f9f4bf5eddd3c354ff08d6edb4e5 100644 (file)
@@ -467,6 +467,7 @@ ehci_realloc_pipe(struct usbdevice_s *usbdev, struct usb_pipe *upipe
         // Use previously allocated pipe.
         struct ehci_pipe *pipe = container_of(usbpipe, struct ehci_pipe, pipe);
         ehci_desc2pipe(pipe, usbdev, epdesc);
+        pipe->qh.token = 0;
         return usbpipe;
     }