[PATCH] iscsi_iser: Re-enable 'iser_pi_guard' module parameter

Hannes Reinecke
2018-01-10T09:07:36Z

The module parameter 'iser_pi_guard' has been disabled by commit
5bb6e543d2a7d58 ("IB/iser: DIX update"), but the functionality
to select the guard algorithm is still required.

Fixes: 5bb6e543d2a7d58 ("IB/iser: DIX update")
Signed-off-by: Hannes Reinecke <hare-IBi9RG/b67k@public.gmane.org>
Cc: Steve Schremmer <sschremm-HgOvQuBEEgTQT0dZR+AlfA@public.gmane.org>
---
drivers/infiniband/ulp/iser/iscsi_iser.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c b/drivers/infiniband/ulp/iser/iscsi_iser.c
index 19624e0..34c4d0a 100644
--- a/drivers/infiniband/ulp/iser/iscsi_iser.c
+++ b/drivers/infiniband/ulp/iser/iscsi_iser.c
@@ -649,8 +649,10 @@ static void iscsi_iser_cleanup_task(struct iscsi_task *task)
u32 sig_caps = ib_conn->device->ib_device->attrs.sig_prot_cap;

scsi_host_set_prot(shost, iser_dif_prot_caps(sig_caps));
- scsi_host_set_guard(shost, SHOST_DIX_GUARD_IP |
- SHOST_DIX_GUARD_CRC);
+ if (iser_pi_guard)
+ scsi_host_set_guard(shost, SHOST_DIX_GUARD_IP);
+ else
+ scsi_host_set_guard(shost, SHOST_DIX_GUARD_CRC);
}

if (iscsi_host_add(shost,
--
1.8.5.6