]> git.karo-electronics.de Git - karo-tx-linux.git/commit
USB: fix toggle mismatch in disable_endpoint paths
authorAlan Stern <stern@rowland.harvard.edu>
Thu, 15 Jan 2009 22:03:33 +0000 (17:03 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 2 Feb 2009 17:53:20 +0000 (09:53 -0800)
commitb7055fa7953a23512ea7d4f97cc5ac209e14a64a
tree10c7861ff826813d294859cc254a803b442366e9
parent2ba861c907726fc65bcefa0a90933ead714f2241
USB: fix toggle mismatch in disable_endpoint paths

commit ddeac4e75f2527a340f9dc655bde49bb2429b39b upstream.

This patch (as1200) finishes some fixes that were left incomplete by
an earlier patch.

Although nobody has addressed this issue in the past, it turns out
that we need to distinguish between two different modes of disabling
and enabling endpoints.  In one mode only the data structures in
usbcore are affected, and in the other mode the host controller and
device hardware states are affected as well.

The earlier patch added an extra argument to the routines in the
enable_endpoint pathways to reflect this difference.  This patch adds
corresponding arguments to the disable_endpoint pathways.  Without
this change, the endpoint toggle state can get out of sync between
the host and the device.  The exact mechanism depends on the details
of the host controller (whether or not it stores its own copy of the
toggle values).

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Reported-by: Dan Streetman <ddstreet@ieee.org>
Tested-by: Dan Streetman <ddstreet@ieee.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/driver.c
drivers/usb/core/hub.c
drivers/usb/core/message.c
drivers/usb/core/usb.h