[PATCH 14/14] scsi: iscsi_tcp: enable LUN-based and target-based error handlers

JiangJianJun posted 14 patches 1 month, 2 weeks ago
There is a newer version of this series
[PATCH 14/14] scsi: iscsi_tcp: enable LUN-based and target-based error handlers
Posted by JiangJianJun 1 month, 2 weeks ago
From: JiangJianJun <jiangjianjun3@h-partners.com>

The iSCSI TCP driver now supports resetting LUNs or targets,
allowing us to enable LUN-based error handlers and enable them
to fall back to target-based error handlers.

Signed-off-by: JiangJianJun <jiangjianjun3@h-partners.com>
---
 drivers/scsi/iscsi_tcp.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c
index 7b4fe0e6afb2..328e76219b1c 100644
--- a/drivers/scsi/iscsi_tcp.c
+++ b/drivers/scsi/iscsi_tcp.c
@@ -33,6 +33,7 @@
 #include <scsi/scsi_device.h>
 #include <scsi/scsi_host.h>
 #include <scsi/scsi.h>
+#include <scsi/scsi_eh.h>
 #include <scsi/scsi_transport_iscsi.h>
 #include <trace/events/iscsi.h>
 #include <trace/events/sock.h>
@@ -1040,6 +1041,9 @@ static const struct scsi_host_template iscsi_sw_tcp_sht = {
 	.eh_target_reset_handler = iscsi_eh_recover_target,
 	.dma_boundary		= PAGE_SIZE - 1,
 	.sdev_configure		= iscsi_sw_tcp_sdev_configure,
+	.sdev_setup_eh		= scsi_device_setup_eh,
+	.sdev_clear_eh		= scsi_device_clear_eh,
+	.sdev_eh_fallback	= 1,
 	.proc_name		= "iscsi_tcp",
 	.this_id		= -1,
 	.track_queue_depth	= 1,
-- 
2.33.0