aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/storage/scsiglue.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c
index 22e48a2b0bd1..1035b248eff4 100644
--- a/drivers/usb/storage/scsiglue.c
+++ b/drivers/usb/storage/scsiglue.c
@@ -233,13 +233,11 @@ static int command_abort(struct scsi_cmnd *srb)
233 set_bit(US_FLIDX_ABORTING, &us->flags); 233 set_bit(US_FLIDX_ABORTING, &us->flags);
234 usb_stor_stop_transport(us); 234 usb_stor_stop_transport(us);
235 } 235 }
236 scsi_unlock(us_to_host(us));
237 236
238 /* Wait for the aborted command to finish */ 237 /* Wait for the aborted command to finish */
239 wait_for_completion(&us->notify); 238 wait_for_completion(&us->notify);
240 239
241 /* Reacquire the lock and allow USB transfers to resume */ 240 /* Reacquire the lock and allow USB transfers to resume */
242 scsi_lock(us_to_host(us));
243 clear_bit(US_FLIDX_ABORTING, &us->flags); 241 clear_bit(US_FLIDX_ABORTING, &us->flags);
244 clear_bit(US_FLIDX_TIMED_OUT, &us->flags); 242 clear_bit(US_FLIDX_TIMED_OUT, &us->flags);
245 return SUCCESS; 243 return SUCCESS;
@@ -255,8 +253,6 @@ static int device_reset(struct scsi_cmnd *srb)
255 253
256 US_DEBUGP("%s called\n", __FUNCTION__); 254 US_DEBUGP("%s called\n", __FUNCTION__);
257 255
258 scsi_unlock(us_to_host(us));
259
260 /* lock the device pointers and do the reset */ 256 /* lock the device pointers and do the reset */
261 down(&(us->dev_semaphore)); 257 down(&(us->dev_semaphore));
262 if (test_bit(US_FLIDX_DISCONNECTING, &us->flags)) { 258 if (test_bit(US_FLIDX_DISCONNECTING, &us->flags)) {
@@ -266,8 +262,6 @@ static int device_reset(struct scsi_cmnd *srb)
266 result = us->transport_reset(us); 262 result = us->transport_reset(us);
267 up(&(us->dev_semaphore)); 263 up(&(us->dev_semaphore));
268 264
269 /* lock the host for the return */
270 scsi_lock(us_to_host(us));
271 return result; 265 return result;
272} 266}
273 267
@@ -282,8 +276,6 @@ static int bus_reset(struct scsi_cmnd *srb)
282 276
283 US_DEBUGP("%s called\n", __FUNCTION__); 277 US_DEBUGP("%s called\n", __FUNCTION__);
284 278
285 scsi_unlock(us_to_host(us));
286
287 /* The USB subsystem doesn't handle synchronisation between 279 /* The USB subsystem doesn't handle synchronisation between
288 * a device's several drivers. Therefore we reset only devices 280 * a device's several drivers. Therefore we reset only devices
289 * with just one interface, which we of course own. */ 281 * with just one interface, which we of course own. */
@@ -310,7 +302,6 @@ static int bus_reset(struct scsi_cmnd *srb)
310 up(&(us->dev_semaphore)); 302 up(&(us->dev_semaphore));
311 303
312 /* lock the host for the return */ 304 /* lock the host for the return */
313 scsi_lock(us_to_host(us));
314 return result < 0 ? FAILED : SUCCESS; 305 return result < 0 ? FAILED : SUCCESS;
315} 306}
316 307