aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2009-06-29 14:34:59 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-07-12 18:16:40 -0400
commitec6d67e39f5638c792eb7490bf32586ccb9d8005 (patch)
treec65d267dc4979edfd7695d6a2e55d44ab13a8d7e
parentf092c240494f2d807401d93f95f683909b90af96 (diff)
USB: EHCI: report actual_length for iso transfers
This patch (as1259b) makes ehci-hcd return the total number of bytes transferred in urb->actual_length for Isochronous transfers. Until now, the actual_length value was unaccountably left at 0. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/usb/host/ehci-sched.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c
index 9d1babc7ff65..74f7f83b29ad 100644
--- a/drivers/usb/host/ehci-sched.c
+++ b/drivers/usb/host/ehci-sched.c
@@ -1619,11 +1619,14 @@ itd_complete (
1619 desc->status = -EPROTO; 1619 desc->status = -EPROTO;
1620 1620
1621 /* HC need not update length with this error */ 1621 /* HC need not update length with this error */
1622 if (!(t & EHCI_ISOC_BABBLE)) 1622 if (!(t & EHCI_ISOC_BABBLE)) {
1623 desc->actual_length = EHCI_ITD_LENGTH (t); 1623 desc->actual_length = EHCI_ITD_LENGTH(t);
1624 urb->actual_length += desc->actual_length;
1625 }
1624 } else if (likely ((t & EHCI_ISOC_ACTIVE) == 0)) { 1626 } else if (likely ((t & EHCI_ISOC_ACTIVE) == 0)) {
1625 desc->status = 0; 1627 desc->status = 0;
1626 desc->actual_length = EHCI_ITD_LENGTH (t); 1628 desc->actual_length = EHCI_ITD_LENGTH(t);
1629 urb->actual_length += desc->actual_length;
1627 } else { 1630 } else {
1628 /* URB was too late */ 1631 /* URB was too late */
1629 desc->status = -EXDEV; 1632 desc->status = -EXDEV;
@@ -2014,7 +2017,8 @@ sitd_complete (
2014 desc->status = -EPROTO; 2017 desc->status = -EPROTO;
2015 } else { 2018 } else {
2016 desc->status = 0; 2019 desc->status = 0;
2017 desc->actual_length = desc->length - SITD_LENGTH (t); 2020 desc->actual_length = desc->length - SITD_LENGTH(t);
2021 urb->actual_length += desc->actual_length;
2018 } 2022 }
2019 stream->depth -= stream->interval << 3; 2023 stream->depth -= stream->interval << 3;
2020 2024