aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/storage
diff options
context:
space:
mode:
authorMatthew Wilcox <matthew@wil.cx>2010-12-15 15:44:04 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2010-12-15 18:26:44 -0500
commit92a3f767f5cd079351ae04a337c40266e9c6048f (patch)
tree62a34471663f52d27e1388983f6fcab42846261a /drivers/usb/storage
parentac563cfd528033ee6e3bb4801b5c73468d0145c8 (diff)
USB: uas: Rename sense pipe and sense urb to status pipe and status urb
The spec calls this the status pipe. While it is used to receive sense IUs, it is also used to receive other IUs, so this can be confusing. Reported-by: Luben Tuikov <ltuikov@yahoo.com> Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/storage')
-rw-r--r--drivers/usb/storage/uas.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
index 721fe376be18..06409a6ca2f4 100644
--- a/drivers/usb/storage/uas.c
+++ b/drivers/usb/storage/uas.c
@@ -100,8 +100,8 @@ struct uas_dev_info {
100}; 100};
101 101
102enum { 102enum {
103 ALLOC_SENSE_URB = (1 << 0), 103 ALLOC_STATUS_URB = (1 << 0),
104 SUBMIT_SENSE_URB = (1 << 1), 104 SUBMIT_STATUS_URB = (1 << 1),
105 ALLOC_DATA_IN_URB = (1 << 2), 105 ALLOC_DATA_IN_URB = (1 << 2),
106 SUBMIT_DATA_IN_URB = (1 << 3), 106 SUBMIT_DATA_IN_URB = (1 << 3),
107 ALLOC_DATA_OUT_URB = (1 << 4), 107 ALLOC_DATA_OUT_URB = (1 << 4),
@@ -115,7 +115,7 @@ struct uas_cmd_info {
115 unsigned int state; 115 unsigned int state;
116 unsigned int stream; 116 unsigned int stream;
117 struct urb *cmd_urb; 117 struct urb *cmd_urb;
118 struct urb *sense_urb; 118 struct urb *status_urb;
119 struct urb *data_in_urb; 119 struct urb *data_in_urb;
120 struct urb *data_out_urb; 120 struct urb *data_out_urb;
121 struct list_head list; 121 struct list_head list;
@@ -207,7 +207,7 @@ static void uas_xfer_data(struct urb *urb, struct scsi_cmnd *cmnd,
207 struct uas_cmd_info *cmdinfo = (void *)&cmnd->SCp; 207 struct uas_cmd_info *cmdinfo = (void *)&cmnd->SCp;
208 int err; 208 int err;
209 209
210 cmdinfo->state = direction | SUBMIT_SENSE_URB; 210 cmdinfo->state = direction | SUBMIT_STATUS_URB;
211 err = uas_submit_urbs(cmnd, cmnd->device->hostdata, GFP_ATOMIC); 211 err = uas_submit_urbs(cmnd, cmnd->device->hostdata, GFP_ATOMIC);
212 if (err) { 212 if (err) {
213 spin_lock(&uas_work_lock); 213 spin_lock(&uas_work_lock);
@@ -363,21 +363,21 @@ static int uas_submit_urbs(struct scsi_cmnd *cmnd,
363{ 363{
364 struct uas_cmd_info *cmdinfo = (void *)&cmnd->SCp; 364 struct uas_cmd_info *cmdinfo = (void *)&cmnd->SCp;
365 365
366 if (cmdinfo->state & ALLOC_SENSE_URB) { 366 if (cmdinfo->state & ALLOC_STATUS_URB) {
367 cmdinfo->sense_urb = uas_alloc_sense_urb(devinfo, gfp, cmnd, 367 cmdinfo->status_urb = uas_alloc_sense_urb(devinfo, gfp, cmnd,
368 cmdinfo->stream); 368 cmdinfo->stream);
369 if (!cmdinfo->sense_urb) 369 if (!cmdinfo->status_urb)
370 return SCSI_MLQUEUE_DEVICE_BUSY; 370 return SCSI_MLQUEUE_DEVICE_BUSY;
371 cmdinfo->state &= ~ALLOC_SENSE_URB; 371 cmdinfo->state &= ~ALLOC_STATUS_URB;
372 } 372 }
373 373
374 if (cmdinfo->state & SUBMIT_SENSE_URB) { 374 if (cmdinfo->state & SUBMIT_STATUS_URB) {
375 if (usb_submit_urb(cmdinfo->sense_urb, gfp)) { 375 if (usb_submit_urb(cmdinfo->status_urb, gfp)) {
376 scmd_printk(KERN_INFO, cmnd, 376 scmd_printk(KERN_INFO, cmnd,
377 "sense urb submission failure\n"); 377 "sense urb submission failure\n");
378 return SCSI_MLQUEUE_DEVICE_BUSY; 378 return SCSI_MLQUEUE_DEVICE_BUSY;
379 } 379 }
380 cmdinfo->state &= ~SUBMIT_SENSE_URB; 380 cmdinfo->state &= ~SUBMIT_STATUS_URB;
381 } 381 }
382 382
383 if (cmdinfo->state & ALLOC_DATA_IN_URB) { 383 if (cmdinfo->state & ALLOC_DATA_IN_URB) {
@@ -446,7 +446,7 @@ static int uas_queuecommand(struct scsi_cmnd *cmnd,
446 446
447 BUILD_BUG_ON(sizeof(struct uas_cmd_info) > sizeof(struct scsi_pointer)); 447 BUILD_BUG_ON(sizeof(struct uas_cmd_info) > sizeof(struct scsi_pointer));
448 448
449 if (!cmdinfo->sense_urb && sdev->current_cmnd) 449 if (!cmdinfo->status_urb && sdev->current_cmnd)
450 return SCSI_MLQUEUE_DEVICE_BUSY; 450 return SCSI_MLQUEUE_DEVICE_BUSY;
451 451
452 if (blk_rq_tagged(cmnd->request)) { 452 if (blk_rq_tagged(cmnd->request)) {
@@ -458,7 +458,7 @@ static int uas_queuecommand(struct scsi_cmnd *cmnd,
458 458
459 cmnd->scsi_done = done; 459 cmnd->scsi_done = done;
460 460
461 cmdinfo->state = ALLOC_SENSE_URB | SUBMIT_SENSE_URB | 461 cmdinfo->state = ALLOC_STATUS_URB | SUBMIT_STATUS_URB |
462 ALLOC_CMD_URB | SUBMIT_CMD_URB; 462 ALLOC_CMD_URB | SUBMIT_CMD_URB;
463 463
464 switch (cmnd->sc_data_direction) { 464 switch (cmnd->sc_data_direction) {
@@ -481,8 +481,8 @@ static int uas_queuecommand(struct scsi_cmnd *cmnd,
481 err = uas_submit_urbs(cmnd, devinfo, GFP_ATOMIC); 481 err = uas_submit_urbs(cmnd, devinfo, GFP_ATOMIC);
482 if (err) { 482 if (err) {
483 /* If we did nothing, give up now */ 483 /* If we did nothing, give up now */
484 if (cmdinfo->state & SUBMIT_SENSE_URB) { 484 if (cmdinfo->state & SUBMIT_STATUS_URB) {
485 usb_free_urb(cmdinfo->sense_urb); 485 usb_free_urb(cmdinfo->status_urb);
486 return SCSI_MLQUEUE_DEVICE_BUSY; 486 return SCSI_MLQUEUE_DEVICE_BUSY;
487 } 487 }
488 spin_lock(&uas_work_lock); 488 spin_lock(&uas_work_lock);