From: Dmitri Epshtein Date: Mon, 14 Dec 2009 15:17:34 +0000 (+0200) Subject: USB: ehci: fix audio record functionality for some Full speed sound blaster devices X-Git-Tag: v2.6.34-rc1~215^2~189 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=22e186948a262c9cd377fb43aa50bb3c3f01c468;p=karo-tx-linux.git USB: ehci: fix audio record functionality for some Full speed sound blaster devices This patch fix audio record functionality for some Full speed sound blaster devices. Issue: Sometimes transaction complete indication is coming from HW one frame later. Solution: If scan_periodic process now frame or previous frame now-1 and sitd transaction is not finished yet, exit scan_periodic function and check the same transaction in the next frame. Signed-off-by: Dimitry Epshtein Signed-off-by: Saeed Bishara Cc: David Brownell Cc: Alan Stern Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c index e7a3b087083f..39340ae00ac4 100644 --- a/drivers/usb/host/ehci-sched.c +++ b/drivers/usb/host/ehci-sched.c @@ -2324,9 +2324,13 @@ restart: * No need to check for activity unless the * frame is current. */ - if (frame == clock_frame && live && - (q.sitd->hw_results & - SITD_ACTIVE(ehci))) { + if (((frame == clock_frame) || + (((frame + 1) % ehci->periodic_size) + == clock_frame)) + && live + && (q.sitd->hw_results & + SITD_ACTIVE(ehci))) { + incomplete = true; q_p = &q.sitd->sitd_next; hw_p = &q.sitd->hw_next;