|
@@ -795,6 +795,16 @@ static int virtscsi_map_queues(struct Scsi_Host *shost)
|
|
|
return blk_mq_virtio_map_queues(&shost->tag_set, vscsi->vdev, 2);
|
|
|
}
|
|
|
|
|
|
+/*
|
|
|
+ * The host guarantees to respond to each command, although I/O
|
|
|
+ * latencies might be higher than on bare metal. Reset the timer
|
|
|
+ * unconditionally to give the host a chance to perform EH.
|
|
|
+ */
|
|
|
+static enum blk_eh_timer_return virtscsi_eh_timed_out(struct scsi_cmnd *scmnd)
|
|
|
+{
|
|
|
+ return BLK_EH_RESET_TIMER;
|
|
|
+}
|
|
|
+
|
|
|
static struct scsi_host_template virtscsi_host_template_single = {
|
|
|
.module = THIS_MODULE,
|
|
|
.name = "Virtio SCSI HBA",
|
|
@@ -805,6 +815,7 @@ static struct scsi_host_template virtscsi_host_template_single = {
|
|
|
.change_queue_depth = virtscsi_change_queue_depth,
|
|
|
.eh_abort_handler = virtscsi_abort,
|
|
|
.eh_device_reset_handler = virtscsi_device_reset,
|
|
|
+ .eh_timed_out = virtscsi_eh_timed_out,
|
|
|
.slave_alloc = virtscsi_device_alloc,
|
|
|
|
|
|
.can_queue = 1024,
|
|
@@ -825,6 +836,7 @@ static struct scsi_host_template virtscsi_host_template_multi = {
|
|
|
.change_queue_depth = virtscsi_change_queue_depth,
|
|
|
.eh_abort_handler = virtscsi_abort,
|
|
|
.eh_device_reset_handler = virtscsi_device_reset,
|
|
|
+ .eh_timed_out = virtscsi_eh_timed_out,
|
|
|
|
|
|
.can_queue = 1024,
|
|
|
.dma_boundary = UINT_MAX,
|