aboutsummaryrefslogtreecommitdiff
path: root/drivers/s390/scsi/zfcp_fc.h
diff options
context:
space:
mode:
authorFelix Beck <felix.beck@de.ibm.com>2010-07-16 15:37:42 +0200
committerJames Bottomley <James.Bottomley@suse.de>2010-07-28 09:48:56 -0500
commitef3eb71d8ba4fd9d48c5f9310bc9d90ca00323b4 (patch)
tree9903cbae6c03184687c51b4be926572913cda93f /drivers/s390/scsi/zfcp_fc.h
parentdcc18f48a2f1a44c5e8848f30d0cf53a8066c62a (diff)
[SCSI] zfcp: Introduce experimental support for DIF/DIX
Introduce support for DIF/DIX in zfcp: Report the capabilities for the Scsi_host, map the protection data when issuing I/O requests and handle the new error codes. Also add the fsf data_direction field to the hba trace, it is useful information for debugging in that area. This is an EXPERIMENTAL feature for now. Signed-off-by: Felix Beck <felix.beck@de.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/scsi/zfcp_fc.h')
-rw-r--r--drivers/s390/scsi/zfcp_fc.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/s390/scsi/zfcp_fc.h b/drivers/s390/scsi/zfcp_fc.h
index 85c37d2b82c..938d5036016 100644
--- a/drivers/s390/scsi/zfcp_fc.h
+++ b/drivers/s390/scsi/zfcp_fc.h
@@ -220,6 +220,9 @@ void zfcp_fc_scsi_to_fcp(struct fcp_cmnd *fcp, struct scsi_cmnd *scsi)
memcpy(fcp->fc_cdb, scsi->cmnd, scsi->cmd_len);
fcp->fc_dl = scsi_bufflen(scsi);
+
+ if (scsi_get_prot_type(scsi) == SCSI_PROT_DIF_TYPE1)
+ fcp->fc_dl += fcp->fc_dl / scsi->device->sector_size * 8;
}
/**