# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#	           ChangeSet	1.660.1.10 -> 1.660.1.11
#	drivers/usb/storage/transport.c	1.36    -> 1.37   
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/09/30	mdharm-usb@one-eyed-alien.net	1.660.1.11
# [PATCH] USB-storage: problem clearing halts
# 
# Greg, attached is a patch designed for diagnostic purposes.  Please apply
# to the 2.5 tree -- yes, we'll be removing this at some point in the future.
# 
# It appears that we have a problem clearing halts.  This patch causes a very
# clear message to be printed whenever a usb_stor_clear_halt() manages to
# work.  So far, I haven't seen such a thing happen.  And I've seen _lots_ of
# STALL conditions.
# 
# This problem has likely been around for a while... however, it hasn't been
# noticed before because usb-storage was difficult to use because of other
# bugs.  Heck, the most recent 'bk pull' is the first one for me in _months_
# which let me boot all the way into X11.
# 
# I'm going to hold my patch queue until this is resolved.  On my test setup,
# it's easy to see this failing.  I've tried with 4 different devices, with
# both UHCI and EHCI drivers.  I don't want to confuse this problem with
# other patches...
# 
# 'result' in this function always seems to be -32.  Which is odd, because
# control endpoints shouldn't do that.
# 
# I'm open to suggestions as to where to look for this bug, but my instincts
# are telling me that this is a core or HCD issue, not a usb-storage issue.
# 
# On a positive note, this means that the error-recovery system gets a good
# workout.
# --------------------------------------------
#
diff -Nru a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c
--- a/drivers/usb/storage/transport.c	Mon Sep 30 17:24:10 2002
+++ b/drivers/usb/storage/transport.c	Mon Sep 30 17:24:10 2002
@@ -530,6 +530,8 @@
 	if (result < 0)
 		return result;
 
+	printk(KERN_ERR "usb_stor_clear_halt() WORKED!\n");
+
 	/* reset the toggles and endpoint flags */
 	usb_endpoint_running(us->pusb_dev, usb_pipeendpoint(pipe),
 		usb_pipeout(pipe));
