diff options
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/scsi/zfcp_ext.h | 1 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_fsf.c | 46 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_scsi.c | 21 |
3 files changed, 9 insertions, 59 deletions
diff --git a/drivers/s390/scsi/zfcp_ext.h b/drivers/s390/scsi/zfcp_ext.h index cd98a2de9f8f..c400e3b9de97 100644 --- a/drivers/s390/scsi/zfcp_ext.h +++ b/drivers/s390/scsi/zfcp_ext.h | |||
@@ -109,7 +109,6 @@ extern int zfcp_fsf_req_create(struct zfcp_adapter *, u32, int, mempool_t *, | |||
109 | extern int zfcp_fsf_send_ct(struct zfcp_send_ct *, mempool_t *, | 109 | extern int zfcp_fsf_send_ct(struct zfcp_send_ct *, mempool_t *, |
110 | struct zfcp_erp_action *); | 110 | struct zfcp_erp_action *); |
111 | extern int zfcp_fsf_send_els(struct zfcp_send_els *); | 111 | extern int zfcp_fsf_send_els(struct zfcp_send_els *); |
112 | extern int zfcp_fsf_req_wait_and_cleanup(struct zfcp_fsf_req *, int, u32 *); | ||
113 | extern int zfcp_fsf_send_fcp_command_task(struct zfcp_adapter *, | 112 | extern int zfcp_fsf_send_fcp_command_task(struct zfcp_adapter *, |
114 | struct zfcp_unit *, | 113 | struct zfcp_unit *, |
115 | struct scsi_cmnd *, | 114 | struct scsi_cmnd *, |
diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c index 64e2c3480189..929f6c9cad39 100644 --- a/drivers/s390/scsi/zfcp_fsf.c +++ b/drivers/s390/scsi/zfcp_fsf.c | |||
@@ -4548,52 +4548,6 @@ skip_fsfstatus: | |||
4548 | return retval; | 4548 | return retval; |
4549 | } | 4549 | } |
4550 | 4550 | ||
4551 | |||
4552 | /* | ||
4553 | * function: zfcp_fsf_req_wait_and_cleanup | ||
4554 | * | ||
4555 | * purpose: | ||
4556 | * | ||
4557 | * FIXME(design): signal seems to be <0 !!! | ||
4558 | * returns: 0 - request completed (*status is valid), cleanup succ. | ||
4559 | * <0 - request completed (*status is valid), cleanup failed | ||
4560 | * >0 - signal which interrupted waiting (*status invalid), | ||
4561 | * request not completed, no cleanup | ||
4562 | * | ||
4563 | * *status is a copy of status of completed fsf_req | ||
4564 | */ | ||
4565 | int | ||
4566 | zfcp_fsf_req_wait_and_cleanup(struct zfcp_fsf_req *fsf_req, | ||
4567 | int interruptible, u32 * status) | ||
4568 | { | ||
4569 | int retval = 0; | ||
4570 | int signal = 0; | ||
4571 | |||
4572 | if (interruptible) { | ||
4573 | __wait_event_interruptible(fsf_req->completion_wq, | ||
4574 | fsf_req->status & | ||
4575 | ZFCP_STATUS_FSFREQ_COMPLETED, | ||
4576 | signal); | ||
4577 | if (signal) { | ||
4578 | ZFCP_LOG_DEBUG("Caught signal %i while waiting for the " | ||
4579 | "completion of the request at %p\n", | ||
4580 | signal, fsf_req); | ||
4581 | retval = signal; | ||
4582 | goto out; | ||
4583 | } | ||
4584 | } else { | ||
4585 | __wait_event(fsf_req->completion_wq, | ||
4586 | fsf_req->status & ZFCP_STATUS_FSFREQ_COMPLETED); | ||
4587 | } | ||
4588 | |||
4589 | *status = fsf_req->status; | ||
4590 | |||
4591 | /* cleanup request */ | ||
4592 | zfcp_fsf_req_free(fsf_req); | ||
4593 | out: | ||
4594 | return retval; | ||
4595 | } | ||
4596 | |||
4597 | static inline int | 4551 | static inline int |
4598 | zfcp_fsf_req_sbal_check(unsigned long *flags, | 4552 | zfcp_fsf_req_sbal_check(unsigned long *flags, |
4599 | struct zfcp_qdio_queue *queue, int needed) | 4553 | struct zfcp_qdio_queue *queue, int needed) |
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 | |||
558 | zfcp_task_management_function(struct zfcp_unit *unit, u8 tm_flags) | 558 | zfcp_task_management_function(struct zfcp_unit *unit, u8 tm_flags) |
559 | { | 559 | { |
560 | struct zfcp_adapter *adapter = unit->port->adapter; | 560 | struct zfcp_adapter *adapter = unit->port->adapter; |
561 | int retval; | ||
562 | int status; | ||
563 | struct zfcp_fsf_req *fsf_req; | 561 | struct zfcp_fsf_req *fsf_req; |
562 | int retval = 0; | ||
564 | 563 | ||
565 | /* issue task management function */ | 564 | /* issue task management function */ |
566 | fsf_req = zfcp_fsf_send_fcp_command_task_management | 565 | fsf_req = zfcp_fsf_send_fcp_command_task_management |
@@ -574,18 +573,16 @@ zfcp_task_management_function(struct zfcp_unit *unit, u8 tm_flags) | |||
574 | goto out; | 573 | goto out; |
575 | } | 574 | } |
576 | 575 | ||
577 | retval = zfcp_fsf_req_wait_and_cleanup(fsf_req, | 576 | __wait_event(fsf_req->completion_wq, |
578 | ZFCP_UNINTERRUPTIBLE, &status); | 577 | fsf_req->status & ZFCP_STATUS_FSFREQ_COMPLETED); |
579 | /* | 578 | |
580 | * check completion status of task management function | 579 | /* check completion status of task management function */ |
581 | * (status should always be valid since no signals permitted) | 580 | if (fsf_req->status & ZFCP_STATUS_FSFREQ_TMFUNCFAILED) |
582 | */ | ||
583 | if (status & ZFCP_STATUS_FSFREQ_TMFUNCFAILED) | ||
584 | retval = -EIO; | 581 | retval = -EIO; |
585 | else if (status & ZFCP_STATUS_FSFREQ_TMFUNCNOTSUPP) | 582 | else if (fsf_req->status & ZFCP_STATUS_FSFREQ_TMFUNCNOTSUPP) |
586 | retval = -ENOTSUPP; | 583 | retval = -ENOTSUPP; |
587 | else | 584 | |
588 | retval = 0; | 585 | zfcp_fsf_req_free(fsf_req); |
589 | out: | 586 | out: |
590 | return retval; | 587 | return retval; |
591 | } | 588 | } |