]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] USB: storage: Fix messed-up locking
authorMatthew Dharm <mdharm-usb@one-eyed-alien.net>
Fri, 26 Aug 2005 03:03:50 +0000 (20:03 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 12 Sep 2005 19:23:50 +0000 (12:23 -0700)
commit86a330b978f7e89fb023be2664bbb7d732223ced
treef1cad01bb076253a9fbb0ef29ddb688b6743ea82
parentbeaa5b502fc2e4f5989cac195d5d822df04eeaf0
[PATCH] USB: storage: Fix messed-up locking

This is patch as550 from Alan Stern.

Apparently someone changed the SCSI core so that it no longer holds the
host lock when doing a device or bus reset.  usb-storage was updated at
the time, but the change was done carelessly.  Some of the code depends
on that lock being held.

This patch reintroduces the host lock where needed and tries to clarify
the comments explaining why the lock is necessary.  It also moves the
code that clears the TIMED_OUT and ABORTING bitflags so that it executes
as soon as the timed-out command has completed (and while the host lock
is held).

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/storage/scsiglue.c
drivers/usb/storage/usb.c