summaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
authorSwen Schillig <swen@vnet.ibm.com>2010-01-26 17:49:19 +0100
committerJames Bottomley <James.Bottomley@suse.de>2010-02-08 13:40:17 -0600
commit7dec9cf1dfa283feca4b761160112ea4838a6a8c (patch)
treecf61e7ea19d4b34bfccf68b983b935e497a93676 /drivers/s390
parent9858ae38011d699d4c2fa7f3493a47accf43a0f5 (diff)
downloadop-kernel-dev-7dec9cf1dfa283feca4b761160112ea4838a6a8c.zip
op-kernel-dev-7dec9cf1dfa283feca4b761160112ea4838a6a8c.tar.gz
[SCSI] zfcp: Report FC BSG errors in correct field
The status FC_CTELS_STATUS_REJECT for all FC BSG errors is not appropriate. Instead, report -EIO in the result field if there was a problem in zfcp with the FC BSG request. If the request is good from our point of view, report result 0, status FC_CTELS_STATUS_OK and let userspace read the Accept or Reject from the payload (as documented in scsi_bsg_fc.h). Signed-off-by: Swen Schillig <swen@vnet.ibm.com> Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/scsi/zfcp_fc.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/s390/scsi/zfcp_fc.c b/drivers/s390/scsi/zfcp_fc.c
index 0f7b493..271399f 100644
--- a/drivers/s390/scsi/zfcp_fc.c
+++ b/drivers/s390/scsi/zfcp_fc.c
@@ -671,12 +671,11 @@ static void zfcp_fc_ct_els_job_handler(void *data)
{
struct fc_bsg_job *job = data;
struct zfcp_fsf_ct_els *zfcp_ct_els = job->dd_data;
- int status = zfcp_ct_els->status;
- int reply_status;
+ struct fc_bsg_reply *jr = job->reply;
- reply_status = status ? FC_CTELS_STATUS_REJECT : FC_CTELS_STATUS_OK;
- job->reply->reply_data.ctels_reply.status = reply_status;
- job->reply->reply_payload_rcv_len = job->reply_payload.payload_len;
+ jr->reply_payload_rcv_len = job->reply_payload.payload_len;
+ jr->reply_data.ctels_reply.status = FC_CTELS_STATUS_OK;
+ jr->result = zfcp_ct_els->status ? -EIO : 0;
job->job_done(job);
}
OpenPOWER on IntegriCloud