summaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
authorChristof Schmitt <christof.schmitt@de.ibm.com>2010-09-10 20:50:40 +0200
committerJens Axboe <axboe@carl.home.kernel.dk>2010-09-10 20:50:40 +0200
commit175b79f0632544d62aae72e5496c14e3e3ff2ae7 (patch)
tree12966ef2e49689a646259c7d41b88c7a832bb23c /drivers/s390
parent13f05c8d8e98bbdce89158bfdb2e380940695a88 (diff)
downloadlinux-175b79f0632544d62aae72e5496c14e3e3ff2ae7.tar.bz2
zfcp: Report scatter gather limit for DIX protection information
When sending DIX integrity segments with an I/O request, the restriction for the maximum number of segments is still the same for the zfcp hardware. Report the new sg_prot_tablesize for the SCSI host, so that the number of integrity segments plus the number of data segments is not larger than the hardware limit. This results in using half of the hardware segments for integrity data and the other half for regular data. Reviewed-by: Swen Schillig <swen@vnet.ibm.com> Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com> Signed-off-by: Jens Axboe <axboe@carl.home.kernel.dk>
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/scsi/zfcp_scsi.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c
index cb000c9833bb..208256e39def 100644
--- a/drivers/s390/scsi/zfcp_scsi.c
+++ b/drivers/s390/scsi/zfcp_scsi.c
@@ -681,6 +681,7 @@ void zfcp_scsi_set_prot(struct zfcp_adapter *adapter)
adapter->adapter_features & FSF_FEATURE_DIX_PROT_TCPIP) {
mask |= SHOST_DIX_TYPE1_PROTECTION;
scsi_host_set_guard(shost, SHOST_DIX_GUARD_IP);
+ shost->sg_prot_tablesize = ZFCP_QDIO_MAX_SBALES_PER_REQ / 2;
shost->sg_tablesize = ZFCP_QDIO_MAX_SBALES_PER_REQ / 2;
shost->max_sectors = ZFCP_QDIO_MAX_SBALES_PER_REQ * 8 / 2;
}