aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/scsi
diff options
context:
space:
mode:
authorChristof Schmitt <christof.schmitt@de.ibm.com>2009-07-13 09:06:07 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2009-07-30 09:49:56 -0400
commit9072df4dc6e8fd569d583815edb0198af4b688b8 (patch)
treea7c3efef5f7872b19859d7b3872c3b0f84233898 /drivers/s390/scsi
parent426f6059b0eb66cec139f4b9066168ab72b85774 (diff)
[SCSI] zfcp: Use -EIO for SBAL allocation failures
-ENOMEM is for memory allocation problems, -EIO for queue/SBAL allocation problems. 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/scsi')
-rw-r--r--drivers/s390/scsi/zfcp_fsf.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c
index bec912547fb8..0c24695a53cb 100644
--- a/drivers/s390/scsi/zfcp_fsf.c
+++ b/drivers/s390/scsi/zfcp_fsf.c
@@ -1053,14 +1053,14 @@ static int zfcp_fsf_setup_ct_els_sbals(struct zfcp_fsf_req *req,
1053 bytes = zfcp_qdio_sbals_from_sg(req, SBAL_FLAGS0_TYPE_WRITE_READ, 1053 bytes = zfcp_qdio_sbals_from_sg(req, SBAL_FLAGS0_TYPE_WRITE_READ,
1054 sg_req, max_sbals); 1054 sg_req, max_sbals);
1055 if (bytes <= 0) 1055 if (bytes <= 0)
1056 return -ENOMEM; 1056 return -EIO;
1057 req->qtcb->bottom.support.req_buf_length = bytes; 1057 req->qtcb->bottom.support.req_buf_length = bytes;
1058 req->sbale_curr = ZFCP_LAST_SBALE_PER_SBAL; 1058 req->sbale_curr = ZFCP_LAST_SBALE_PER_SBAL;
1059 1059
1060 bytes = zfcp_qdio_sbals_from_sg(req, SBAL_FLAGS0_TYPE_WRITE_READ, 1060 bytes = zfcp_qdio_sbals_from_sg(req, SBAL_FLAGS0_TYPE_WRITE_READ,
1061 sg_resp, max_sbals); 1061 sg_resp, max_sbals);
1062 if (bytes <= 0) 1062 if (bytes <= 0)
1063 return -ENOMEM; 1063 return -EIO;
1064 req->qtcb->bottom.support.resp_buf_length = bytes; 1064 req->qtcb->bottom.support.resp_buf_length = bytes;
1065 1065
1066 return 0; 1066 return 0;
@@ -2559,7 +2559,6 @@ struct zfcp_fsf_req *zfcp_fsf_control_file(struct zfcp_adapter *adapter,
2559 bytes = zfcp_qdio_sbals_from_sg(req, direction, fsf_cfdc->sg, 2559 bytes = zfcp_qdio_sbals_from_sg(req, direction, fsf_cfdc->sg,
2560 FSF_MAX_SBALS_PER_REQ); 2560 FSF_MAX_SBALS_PER_REQ);
2561 if (bytes != ZFCP_CFDC_MAX_SIZE) { 2561 if (bytes != ZFCP_CFDC_MAX_SIZE) {
2562 retval = -ENOMEM;
2563 zfcp_fsf_req_free(req); 2562 zfcp_fsf_req_free(req);
2564 goto out; 2563 goto out;
2565 } 2564 }