From 2793cdfd828da6ee538afb20339bdcda4399f62b Mon Sep 17 00:00:00 2001 From: mpi Date: Sun, 19 Apr 2015 11:12:58 +0000 Subject: [PATCH] Do not truncate possible remaining transfer length. Reported by Takahiro HAYASHI on bugs@, thanks! --- sys/dev/usb/xhci.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/dev/usb/xhci.c b/sys/dev/usb/xhci.c index 774bd87b759..69a61595ec3 100644 --- a/sys/dev/usb/xhci.c +++ b/sys/dev/usb/xhci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xhci.c,v 1.58 2015/01/21 14:02:33 mpi Exp $ */ +/* $OpenBSD: xhci.c,v 1.59 2015/04/19 11:12:58 mpi Exp $ */ /* * Copyright (c) 2014-2015 Martin Pieuchot @@ -714,7 +714,8 @@ xhci_event_xfer(struct xhci_softc *sc, uint64_t paddr, uint32_t status, struct xhci_pipe *xp; struct usbd_xfer *xfer; struct xhci_xfer *xx; - uint8_t dci, slot, code, remain; + uint8_t dci, slot, code; + uint32_t remain; int trb_idx; slot = XHCI_TRB_GET_SLOT(flags); -- 2.20.1