Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 326136
b: refs/heads/master
c: ef018cc
h: refs/heads/master
v: v3
  • Loading branch information
Gerd Hoffmann authored and Greg Kroah-Hartman committed Sep 25, 2012
1 parent d8f34a7 commit 8402d75
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 03939864954cdfccf41c0a8c20e5f2ba623cc482
refs/heads/master: ef018cc9f894efcca7e785ee75f1dd546e11afee
12 changes: 6 additions & 6 deletions trunk/drivers/usb/storage/uas.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ enum {
DATA_IN_URB_INFLIGHT = (1 << 9),
DATA_OUT_URB_INFLIGHT = (1 << 10),
COMMAND_COMPLETED = (1 << 11),
COMMAND_ABORTED = (1 << 12),
};

/* Overrides scsi_pointer */
struct uas_cmd_info {
unsigned int state;
unsigned int stream;
unsigned int aborted;
struct urb *cmd_urb;
struct urb *data_in_urb;
struct urb *data_out_urb;
Expand Down Expand Up @@ -163,7 +163,7 @@ static void uas_log_cmd_state(struct scsi_cmnd *cmnd, const char *caller)
struct uas_cmd_info *ci = (void *)&cmnd->SCp;

scmd_printk(KERN_INFO, cmnd, "%s %p tag %d, inflight:"
"%s%s%s%s%s%s%s%s%s%s%s\n",
"%s%s%s%s%s%s%s%s%s%s%s%s\n",
caller, cmnd, cmnd->request->tag,
(ci->state & SUBMIT_STATUS_URB) ? " s-st" : "",
(ci->state & ALLOC_DATA_IN_URB) ? " a-in" : "",
Expand All @@ -175,7 +175,8 @@ static void uas_log_cmd_state(struct scsi_cmnd *cmnd, const char *caller)
(ci->state & COMMAND_INFLIGHT) ? " CMD" : "",
(ci->state & DATA_IN_URB_INFLIGHT) ? " IN" : "",
(ci->state & DATA_OUT_URB_INFLIGHT) ? " OUT" : "",
(ci->state & COMMAND_COMPLETED) ? " done" : "");
(ci->state & COMMAND_COMPLETED) ? " done" : "",
(ci->state & COMMAND_ABORTED) ? " abort" : "");
}

static int uas_try_complete(struct scsi_cmnd *cmnd, const char *caller)
Expand Down Expand Up @@ -302,7 +303,7 @@ static void uas_data_cmplt(struct urb *urb)
} else {
sdb->resid = sdb->length - urb->actual_length;
}
if (cmdinfo->aborted) {
if (cmdinfo->state & COMMAND_ABORTED) {
return;
}
uas_try_complete(cmnd, __func__);
Expand Down Expand Up @@ -570,7 +571,6 @@ static int uas_queuecommand_lck(struct scsi_cmnd *cmnd,

cmdinfo->state = SUBMIT_STATUS_URB |
ALLOC_CMD_URB | SUBMIT_CMD_URB;
cmdinfo->aborted = 0;

switch (cmnd->sc_data_direction) {
case DMA_FROM_DEVICE:
Expand Down Expand Up @@ -652,7 +652,7 @@ static int uas_eh_abort_handler(struct scsi_cmnd *cmnd)
int ret;

uas_log_cmd_state(cmnd, __func__);
cmdinfo->aborted = 1;
cmdinfo->state |= COMMAND_ABORTED;
ret = uas_eh_task_mgmt(cmnd, "ABORT TASK", TMF_ABORT_TASK);
if (cmdinfo->state & DATA_IN_URB_INFLIGHT)
usb_kill_urb(cmdinfo->data_in_urb);
Expand Down

0 comments on commit 8402d75

Please sign in to comment.