diff options
author | Christof Schmitt <christof.schmitt@de.ibm.com> | 2009-05-15 07:18:22 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-06-12 15:20:06 -0400 |
commit | dc577d554a274b79a6ad05e9e1ac20c320200599 (patch) | |
tree | be017b749065c419aee2bddfb4147eadccdf88fe /drivers/s390 | |
parent | 9d544f2b9bd4a0f7ba2784cc47e3591667a7b8d4 (diff) |
[SCSI] zfcp: Update FC pass-through support
Don't access the block layer request, get the payload length instead
from the FC job. Simplify access to the zfcp_port, only the d_id is
required, if the port is no longer accessed later. This is possible
when the els_handler does not access the port pointer from the ELS
request.
Reviewed-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/scsi/zfcp_fc.c | 9 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_fsf.c | 3 |
2 files changed, 5 insertions, 7 deletions
diff --git a/drivers/s390/scsi/zfcp_fc.c b/drivers/s390/scsi/zfcp_fc.c index da10e0df6879..538c68dc7bb8 100644 --- a/drivers/s390/scsi/zfcp_fc.c +++ b/drivers/s390/scsi/zfcp_fc.c | |||
@@ -704,7 +704,7 @@ static void zfcp_fc_generic_els_handler(unsigned long data) | |||
704 | } | 704 | } |
705 | 705 | ||
706 | reply->reply_data.ctels_reply.status = FC_CTELS_STATUS_OK; | 706 | reply->reply_data.ctels_reply.status = FC_CTELS_STATUS_OK; |
707 | reply->reply_payload_rcv_len = blk_rq_bytes(job->req->next_rq); | 707 | reply->reply_payload_rcv_len = job->reply_payload.payload_len; |
708 | 708 | ||
709 | out: | 709 | out: |
710 | job->state_flags = FC_RQST_STATE_DONE; | 710 | job->state_flags = FC_RQST_STATE_DONE; |
@@ -736,15 +736,12 @@ int zfcp_fc_execute_els_fc_job(struct fc_bsg_job *job) | |||
736 | read_lock_irq(&zfcp_data.config_lock); | 736 | read_lock_irq(&zfcp_data.config_lock); |
737 | port = rport->dd_data; | 737 | port = rport->dd_data; |
738 | if (port) | 738 | if (port) |
739 | zfcp_port_get(port); | 739 | els_fc_job->els.d_id = port->d_id; |
740 | read_unlock_irq(&zfcp_data.config_lock); | 740 | read_unlock_irq(&zfcp_data.config_lock); |
741 | if (!port) { | 741 | if (!port) { |
742 | kfree(els_fc_job); | 742 | kfree(els_fc_job); |
743 | return -EINVAL; | 743 | return -EINVAL; |
744 | } | 744 | } |
745 | els_fc_job->els.port = port; | ||
746 | els_fc_job->els.d_id = port->d_id; | ||
747 | zfcp_port_put(port); | ||
748 | } else { | 745 | } else { |
749 | port_did = job->request->rqst_data.h_els.port_id; | 746 | port_did = job->request->rqst_data.h_els.port_id; |
750 | els_fc_job->els.d_id = (port_did[0] << 16) + | 747 | els_fc_job->els.d_id = (port_did[0] << 16) + |
@@ -772,8 +769,8 @@ static void zfcp_fc_generic_ct_handler(unsigned long data) | |||
772 | 769 | ||
773 | job->reply->reply_data.ctels_reply.status = ct_fc_job->ct.status ? | 770 | job->reply->reply_data.ctels_reply.status = ct_fc_job->ct.status ? |
774 | FC_CTELS_STATUS_REJECT : FC_CTELS_STATUS_OK; | 771 | FC_CTELS_STATUS_REJECT : FC_CTELS_STATUS_OK; |
772 | job->reply->reply_payload_rcv_len = job->reply_payload.payload_len; | ||
775 | job->state_flags = FC_RQST_STATE_DONE; | 773 | job->state_flags = FC_RQST_STATE_DONE; |
776 | job->reply->reply_payload_rcv_len = blk_rq_bytes(job->req->next_rq); | ||
777 | job->job_done(job); | 774 | job->job_done(job); |
778 | 775 | ||
779 | zfcp_wka_port_put(ct_fc_job->ct.wka_port); | 776 | zfcp_wka_port_put(ct_fc_job->ct.wka_port); |
diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c index e6dae3744e79..c57658f3d34f 100644 --- a/drivers/s390/scsi/zfcp_fsf.c +++ b/drivers/s390/scsi/zfcp_fsf.c | |||
@@ -1146,7 +1146,8 @@ static void zfcp_fsf_send_els_handler(struct zfcp_fsf_req *req) | |||
1146 | case FSF_RESPONSE_SIZE_TOO_LARGE: | 1146 | case FSF_RESPONSE_SIZE_TOO_LARGE: |
1147 | break; | 1147 | break; |
1148 | case FSF_ACCESS_DENIED: | 1148 | case FSF_ACCESS_DENIED: |
1149 | zfcp_fsf_access_denied_port(req, port); | 1149 | if (port) |
1150 | zfcp_fsf_access_denied_port(req, port); | ||
1150 | break; | 1151 | break; |
1151 | case FSF_SBAL_MISMATCH: | 1152 | case FSF_SBAL_MISMATCH: |
1152 | /* should never occure, avoided in zfcp_fsf_send_els */ | 1153 | /* should never occure, avoided in zfcp_fsf_send_els */ |