Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 156305
b: refs/heads/master
c: a11a52b
h: refs/heads/master
i:
  156303: ce0111c
v: v3
  • Loading branch information
Christof Schmitt authored and James Bottomley committed Jul 30, 2009
1 parent 86fd39d commit 9efa503
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 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: 27f492ccec94b6acd8440c83bfe0515ce4db0af0
refs/heads/master: a11a52be115889a5d1f738ed2e154807bceed4ee
18 changes: 10 additions & 8 deletions trunk/drivers/s390/scsi/zfcp_scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,20 +167,21 @@ static int zfcp_scsi_eh_abort_handler(struct scsi_cmnd *scpnt)
struct zfcp_unit *unit = scpnt->device->hostdata;
struct zfcp_fsf_req *old_req, *abrt_req;
unsigned long flags;
unsigned long old_req_id = (unsigned long) scpnt->host_scribble;
unsigned long old_reqid = (unsigned long) scpnt->host_scribble;
int retval = SUCCESS;
int retry = 3;
char *dbf_tag;

/* avoid race condition between late normal completion and abort */
write_lock_irqsave(&adapter->abort_lock, flags);

spin_lock(&adapter->req_list_lock);
old_req = zfcp_reqlist_find(adapter, old_req_id);
old_req = zfcp_reqlist_find(adapter, old_reqid);
spin_unlock(&adapter->req_list_lock);
if (!old_req) {
write_unlock_irqrestore(&adapter->abort_lock, flags);
zfcp_scsi_dbf_event_abort("lte1", adapter, scpnt, NULL,
old_req_id);
old_reqid);
return FAILED; /* completion could be in progress */
}
old_req->data = NULL;
Expand All @@ -189,15 +190,15 @@ static int zfcp_scsi_eh_abort_handler(struct scsi_cmnd *scpnt)
write_unlock_irqrestore(&adapter->abort_lock, flags);

while (retry--) {
abrt_req = zfcp_fsf_abort_fcp_command(old_req_id, unit);
abrt_req = zfcp_fsf_abort_fcp_command(old_reqid, unit);
if (abrt_req)
break;

zfcp_erp_wait(adapter);
if (!(atomic_read(&adapter->status) &
ZFCP_STATUS_COMMON_RUNNING)) {
zfcp_scsi_dbf_event_abort("nres", adapter, scpnt, NULL,
old_req_id);
old_reqid);
return SUCCESS;
}
}
Expand All @@ -208,13 +209,14 @@ static int zfcp_scsi_eh_abort_handler(struct scsi_cmnd *scpnt)
abrt_req->status & ZFCP_STATUS_FSFREQ_COMPLETED);

if (abrt_req->status & ZFCP_STATUS_FSFREQ_ABORTSUCCEEDED)
zfcp_scsi_dbf_event_abort("okay", adapter, scpnt, abrt_req, 0);
dbf_tag = "okay";
else if (abrt_req->status & ZFCP_STATUS_FSFREQ_ABORTNOTNEEDED)
zfcp_scsi_dbf_event_abort("lte2", adapter, scpnt, abrt_req, 0);
dbf_tag = "lte2";
else {
zfcp_scsi_dbf_event_abort("fail", adapter, scpnt, abrt_req, 0);
dbf_tag = "fail";
retval = FAILED;
}
zfcp_scsi_dbf_event_abort(dbf_tag, adapter, scpnt, abrt_req, old_reqid);
zfcp_fsf_req_free(abrt_req);
return retval;
}
Expand Down

0 comments on commit 9efa503

Please sign in to comment.