aboutsummaryrefslogtreecommitdiff
path: root/drivers/s390
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-08-06 17:48:34 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-08-06 17:48:34 -0700
commitbced13738405b62c8203df9c103d4ba63d747872 (patch)
tree566795dc7493591182668a94855487dff034a2b3 /drivers/s390
parent21f16289270447673a7263ccc0b22d562fb01ecb (diff)
parent2b053729a84b6aac197df51b8729bc9fec743bff (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6: (32 commits) [SCSI] aacraid: prevent panic on adapter resource failure [SCSI] aha152x: use data accessors and !use_sg cleanup [SCSI] aha152x: Fix check_condition code-path [SCSI] aha152x: Clean Reset path [SCSI] aha152x: preliminary fixes and some comments [SCSI] aha152x: use bounce buffer [SCSI] aha152x: fix debug mode symbol conflict [SCSI] sd: disentangle barriers in SCSI [SCSI] lpfc : scsi command accessor fix for 8.2.2 [SCSI] qlogicpti: Some cosmetic changes [SCSI] lpfc 8.2.2 : Change version number to 8.2.2 [SCSI] lpfc 8.2.2 : Style cleanups [SCSI] lpfc 8.2.2 : Miscellaneous Bug Fixes [SCSI] lpfc 8.2.2 : Miscellaneous management and logging mods [SCSI] lpfc 8.2.2 : Rework the lpfc_printf_log() macro [SCSI] lpfc 8.2.2 : Attribute and Parameter splits for vport and physical port [SCSI] lpfc 8.2.2 : Fix locking around HBA's port_list [SCSI] lpfc 8.2.2 : Error messages and debugfs updates [SCSI] initialize shost_data to zero [SCSI] mptsas: add SMP passthrough support via bsg ...
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/scsi/zfcp_fsf.c5
-rw-r--r--drivers/s390/scsi/zfcp_qdio.c41
2 files changed, 9 insertions, 37 deletions
diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c
index b240800b78d..99299976e89 100644
--- a/drivers/s390/scsi/zfcp_fsf.c
+++ b/drivers/s390/scsi/zfcp_fsf.c
@@ -4154,8 +4154,9 @@ zfcp_fsf_send_fcp_command_task_handler(struct zfcp_fsf_req *fsf_req)
fcp_rsp_iu->fcp_resid,
(int) zfcp_get_fcp_dl(fcp_cmnd_iu));
- scpnt->resid = fcp_rsp_iu->fcp_resid;
- if (scpnt->request_bufflen - scpnt->resid < scpnt->underflow)
+ scsi_set_resid(scpnt, fcp_rsp_iu->fcp_resid);
+ if (scsi_bufflen(scpnt) - scsi_get_resid(scpnt) <
+ scpnt->underflow)
set_host_byte(&scpnt->result, DID_ERROR);
}
diff --git a/drivers/s390/scsi/zfcp_qdio.c b/drivers/s390/scsi/zfcp_qdio.c
index c408badd2ae..81daa8204bf 100644
--- a/drivers/s390/scsi/zfcp_qdio.c
+++ b/drivers/s390/scsi/zfcp_qdio.c
@@ -36,8 +36,6 @@ static void zfcp_qdio_sbale_fill
(struct zfcp_fsf_req *, unsigned long, void *, int);
static int zfcp_qdio_sbals_from_segment
(struct zfcp_fsf_req *, unsigned long, void *, unsigned long);
-static int zfcp_qdio_sbals_from_buffer
- (struct zfcp_fsf_req *, unsigned long, void *, unsigned long, int);
static qdio_handler_t zfcp_qdio_request_handler;
static qdio_handler_t zfcp_qdio_response_handler;
@@ -632,28 +630,6 @@ out:
/**
- * zfcp_qdio_sbals_from_buffer - fill SBALs from buffer
- * @fsf_req: request to be processed
- * @sbtype: SBALE flags
- * @buffer: data buffer
- * @length: length of buffer
- * @max_sbals: upper bound for number of SBALs to be used
- */
-static int
-zfcp_qdio_sbals_from_buffer(struct zfcp_fsf_req *fsf_req, unsigned long sbtype,
- void *buffer, unsigned long length, int max_sbals)
-{
- struct scatterlist sg_segment;
-
- zfcp_address_to_sg(buffer, &sg_segment);
- sg_segment.length = length;
-
- return zfcp_qdio_sbals_from_sg(fsf_req, sbtype, &sg_segment, 1,
- max_sbals);
-}
-
-
-/**
* zfcp_qdio_sbals_from_scsicmnd - fill SBALs from scsi command
* @fsf_req: request to be processed
* @sbtype: SBALE flags
@@ -664,18 +640,13 @@ int
zfcp_qdio_sbals_from_scsicmnd(struct zfcp_fsf_req *fsf_req,
unsigned long sbtype, struct scsi_cmnd *scsi_cmnd)
{
- if (scsi_cmnd->use_sg) {
+ if (scsi_sg_count(scsi_cmnd))
return zfcp_qdio_sbals_from_sg(fsf_req, sbtype,
- (struct scatterlist *)
- scsi_cmnd->request_buffer,
- scsi_cmnd->use_sg,
- ZFCP_MAX_SBALS_PER_REQ);
- } else {
- return zfcp_qdio_sbals_from_buffer(fsf_req, sbtype,
- scsi_cmnd->request_buffer,
- scsi_cmnd->request_bufflen,
- ZFCP_MAX_SBALS_PER_REQ);
- }
+ scsi_sglist(scsi_cmnd),
+ scsi_sg_count(scsi_cmnd),
+ ZFCP_MAX_SBALS_PER_REQ);
+ else
+ return 0;
}
/**