]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
USB: EHCI: don't lose events during a scan
authorAlan Stern <stern@rowland.harvard.edu>
Wed, 11 Jul 2012 15:22:57 +0000 (11:22 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 16 Jul 2012 23:56:47 +0000 (16:56 -0700)
commit361aabf395e4a23cf554cf4ec0c0c6963b8beb01
tree607f8e039f47905713b7634a663dccd6998d8135
parent32830f207691176234b4c4dd17f0d7ab6d87d94b
USB: EHCI: don't lose events during a scan

This patch (as1584) fixes a minor bug that has been present in
ehci-hcd since the beginning.

Scanning the schedules for URB completions is single-threaded.  If a
completion interrupt occurs while an URB is being given back, the
interrupt handler realizes that a scan is in progress on another CPU
and avoids starting a new one.

This means that completion events can be lost.  If an URB completes
after it has been scanned but while a scan is still in progress, the
driver won't notice and won't rescan the completed URB.

The patch fixes the problem by adding a new flag to indicate that
another scan is needed after the current scan is done.  The flag gets
set whenever a completion interrupt occurs while a scan is in
progress.  The rescan will see the completion, thus preventing it from
getting lost.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/ehci-hcd.c
drivers/usb/host/ehci.h