[PATCH 4.9 19/60] ibmvscsis: Add SGL limit

From: Greg Kroah-Hartman
Date: Mon Feb 13 2017 - 08:25:20 EST


4.9-stable review patch. If anyone has any objections, please let me know.

------------------

From: Bryant G. Ly <bryantly@xxxxxxxxxxxxxxxxxx>

commit b22bc27868e8c11fe3f00937a341b44f80b50364 upstream.

This patch adds internal LIO sgl limit since the driver already
sets a max transfer limit on transport layer of 1MB to the client.

Tested-by: Steven Royer <seroyer@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Bryant G. Ly <bryantly@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Nicholas Bellinger <nab@xxxxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 1 +
1 file changed, 1 insertion(+)

--- a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c
+++ b/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c
@@ -3929,6 +3929,7 @@ static struct configfs_attribute *ibmvsc
static const struct target_core_fabric_ops ibmvscsis_ops = {
.module = THIS_MODULE,
.name = "ibmvscsis",
+ .max_data_sg_nents = MAX_TXU / PAGE_SIZE,
.get_fabric_name = ibmvscsis_get_fabric_name,
.tpg_get_wwn = ibmvscsis_get_fabric_wwn,
.tpg_get_tag = ibmvscsis_get_tag,