[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250816112417.3581253-14-jiangjianjun3@huawei.com>
Date: Sat, 16 Aug 2025 19:24:16 +0800
From: JiangJianJun <jiangjianjun3@...wei.com>
To: <James.Bottomley@...senPartnership.com>, <martin.petersen@...cle.com>,
<linux-scsi@...r.kernel.org>
CC: <linux-kernel@...r.kernel.org>, <hare@...e.de>, <bvanassche@....org>,
<michael.christie@...cle.com>, <hch@...radead.org>, <haowenchao22@...il.com>,
<john.g.garry@...cle.com>, <hewenliang4@...wei.com>, <yangyun50@...wei.com>,
<wuyifeng10@...wei.com>, <wubo40@...wei.com>, <yangxingui@...artners.com>
Subject: [PATCH 13/14] scsi: virtio_scsi: enable LUN based error handlers
From: JiangJianJun <jiangjianjun3@...artners.com>
Enable the virtio_scsi driver to support LUN-based error handlers.
Since virtio_scsi does not define any further reset callbacks,
there is no need to fallback for further recover, so we have
disabled the fallback functionality.
Signed-off-by: JiangJianJun <jiangjianjun3@...artners.com>
---
drivers/scsi/virtio_scsi.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c
index 96a69edddbe5..3c525521351c 100644
--- a/drivers/scsi/virtio_scsi.c
+++ b/drivers/scsi/virtio_scsi.c
@@ -28,6 +28,7 @@
#include <scsi/scsi_cmnd.h>
#include <scsi/scsi_tcq.h>
#include <scsi/scsi_devinfo.h>
+#include <scsi/scsi_eh.h>
#include <linux/seqlock.h>
#include "sd.h"
@@ -801,6 +802,8 @@ static const struct scsi_host_template virtscsi_host_template = {
.eh_device_reset_handler = virtscsi_device_reset,
.eh_timed_out = virtscsi_eh_timed_out,
.sdev_init = virtscsi_device_alloc,
+ .sdev_setup_eh = scsi_device_setup_eh,
+ .sdev_clear_eh = scsi_device_clear_eh,
.dma_boundary = UINT_MAX,
.map_queues = virtscsi_map_queues,
--
2.33.0
Powered by blists - more mailing lists