diff options
author | Andreas Herrmann <aherrman@de.ibm.com> | 2005-09-13 21:48:33 +0200 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2005-09-19 20:01:53 +0200 |
commit | 77eb1699c76177af2f3d65c8ae7934cf304e0254 (patch) | |
tree | ac3f780aa91d63be314feee54f306d48d996b09c /drivers/s390/scsi/zfcp_scsi.c | |
parent | [SCSI] zfcp: remove union zfcp_req_data, use unit refcount for FCP commands (diff) | |
download | linux-77eb1699c76177af2f3d65c8ae7934cf304e0254.tar.xz linux-77eb1699c76177af2f3d65c8ae7934cf304e0254.zip |
[SCSI] zfcp: remove function zfcp_fsf_req_wait_and_cleanup
Signed-off-by: Andreas Herrmann <aherrman@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/s390/scsi/zfcp_scsi.c')
-rw-r--r-- | drivers/s390/scsi/zfcp_scsi.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c index fffd12399010..3b5d48c61534 100644 --- a/drivers/s390/scsi/zfcp_scsi.c +++ b/drivers/s390/scsi/zfcp_scsi.c @@ -558,9 +558,8 @@ static int zfcp_task_management_function(struct zfcp_unit *unit, u8 tm_flags) { struct zfcp_adapter *adapter = unit->port->adapter; - int retval; - int status; struct zfcp_fsf_req *fsf_req; + int retval = 0; /* issue task management function */ fsf_req = zfcp_fsf_send_fcp_command_task_management @@ -574,18 +573,16 @@ zfcp_task_management_function(struct zfcp_unit *unit, u8 tm_flags) goto out; } - retval = zfcp_fsf_req_wait_and_cleanup(fsf_req, - ZFCP_UNINTERRUPTIBLE, &status); - /* - * check completion status of task management function - * (status should always be valid since no signals permitted) - */ - if (status & ZFCP_STATUS_FSFREQ_TMFUNCFAILED) + __wait_event(fsf_req->completion_wq, + fsf_req->status & ZFCP_STATUS_FSFREQ_COMPLETED); + + /* check completion status of task management function */ + if (fsf_req->status & ZFCP_STATUS_FSFREQ_TMFUNCFAILED) retval = -EIO; - else if (status & ZFCP_STATUS_FSFREQ_TMFUNCNOTSUPP) + else if (fsf_req->status & ZFCP_STATUS_FSFREQ_TMFUNCNOTSUPP) retval = -ENOTSUPP; - else - retval = 0; + + zfcp_fsf_req_free(fsf_req); out: return retval; } |