# 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.618   -> 1.619  
#	drivers/usb/storage/transport.c	1.28    -> 1.29   
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/09/09	stern@rowland.harvard.edu	1.619
# [PATCH] USB storage: abort bug fix
# 
# Also, have you sent in the one-line fix I found for the abort bug?
# Andries found that it cured his BUG_ON problem.  In case you didn't save a
# copy of it, I've included it below.
# --------------------------------------------
#
diff -Nru a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c
--- a/drivers/usb/storage/transport.c	Mon Sep  9 15:15:18 2002
+++ b/drivers/usb/storage/transport.c	Mon Sep  9 15:15:18 2002
@@ -883,6 +883,9 @@
 		usb_stor_CBI_irq(us->irq_urb);
 	}
 
+	/* Wait for the aborted command to finish */
+	wait_for_completion(&us->notify);
+
 	/* Reacquire the lock */
 	scsi_lock(us->srb->host);
 }