aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/storage/transport.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/storage/transport.c')
-rw-r--r--drivers/usb/storage/transport.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c
index 2f88bb958bad..94138df557b9 100644
--- a/drivers/usb/storage/transport.c
+++ b/drivers/usb/storage/transport.c
@@ -127,8 +127,8 @@ static int usb_stor_msg_common(struct us_data *us, int timeout)
127 long timeleft; 127 long timeleft;
128 int status; 128 int status;
129 129
130 /* don't submit URBs during abort/disconnect processing */ 130 /* don't submit URBs during abort processing */
131 if (us->dflags & ABORTING_OR_DISCONNECTING) 131 if (test_bit(US_FLIDX_ABORTING, &us->dflags))
132 return -EIO; 132 return -EIO;
133 133
134 /* set up data structures for the wakeup system */ 134 /* set up data structures for the wakeup system */
@@ -161,8 +161,8 @@ static int usb_stor_msg_common(struct us_data *us, int timeout)
161 * to cancel it */ 161 * to cancel it */
162 set_bit(US_FLIDX_URB_ACTIVE, &us->dflags); 162 set_bit(US_FLIDX_URB_ACTIVE, &us->dflags);
163 163
164 /* did an abort/disconnect occur during the submission? */ 164 /* did an abort occur during the submission? */
165 if (us->dflags & ABORTING_OR_DISCONNECTING) { 165 if (test_bit(US_FLIDX_ABORTING, &us->dflags)) {
166 166
167 /* cancel the URB, if it hasn't been cancelled already */ 167 /* cancel the URB, if it hasn't been cancelled already */
168 if (test_and_clear_bit(US_FLIDX_URB_ACTIVE, &us->dflags)) { 168 if (test_and_clear_bit(US_FLIDX_URB_ACTIVE, &us->dflags)) {
@@ -419,8 +419,8 @@ static int usb_stor_bulk_transfer_sglist(struct us_data *us, unsigned int pipe,
419{ 419{
420 int result; 420 int result;
421 421
422 /* don't submit s-g requests during abort/disconnect processing */ 422 /* don't submit s-g requests during abort processing */
423 if (us->dflags & ABORTING_OR_DISCONNECTING) 423 if (test_bit(US_FLIDX_ABORTING, &us->dflags))
424 return USB_STOR_XFER_ERROR; 424 return USB_STOR_XFER_ERROR;
425 425
426 /* initialize the scatter-gather request block */ 426 /* initialize the scatter-gather request block */
@@ -437,8 +437,8 @@ static int usb_stor_bulk_transfer_sglist(struct us_data *us, unsigned int pipe,
437 * okay to cancel it */ 437 * okay to cancel it */
438 set_bit(US_FLIDX_SG_ACTIVE, &us->dflags); 438 set_bit(US_FLIDX_SG_ACTIVE, &us->dflags);
439 439
440 /* did an abort/disconnect occur during the submission? */ 440 /* did an abort occur during the submission? */
441 if (us->dflags & ABORTING_OR_DISCONNECTING) { 441 if (test_bit(US_FLIDX_ABORTING, &us->dflags)) {
442 442
443 /* cancel the request, if it hasn't been cancelled already */ 443 /* cancel the request, if it hasn't been cancelled already */
444 if (test_and_clear_bit(US_FLIDX_SG_ACTIVE, &us->dflags)) { 444 if (test_and_clear_bit(US_FLIDX_SG_ACTIVE, &us->dflags)) {