Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Dec 2018 14:46:35 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r342082 - stable/12/usr.sbin/bhyve
Message-ID:  <201812141446.wBEEkZtU001185@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Fri Dec 14 14:46:35 2018
New Revision: 342082
URL: https://svnweb.freebsd.org/changeset/base/342082

Log:
  MFC r341706: Make virtio-scsi pass SCSI Task Attributes to CTL.

Modified:
  stable/12/usr.sbin/bhyve/pci_virtio_scsi.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/usr.sbin/bhyve/pci_virtio_scsi.c
==============================================================================
--- stable/12/usr.sbin/bhyve/pci_virtio_scsi.c	Fri Dec 14 14:45:54 2018	(r342081)
+++ stable/12/usr.sbin/bhyve/pci_virtio_scsi.c	Fri Dec 14 14:46:35 2018	(r342082)
@@ -499,7 +499,21 @@ pci_vtscsi_request_handle(struct pci_vtscsi_queue *q, 
 
 	io->scsiio.sense_len = sc->vss_config.sense_size;
 	io->scsiio.tag_num = (uint32_t)cmd_rd->id;
-	io->scsiio.tag_type = CTL_TAG_SIMPLE;
+	switch (cmd_rd->task_attr) {
+	case VIRTIO_SCSI_S_ORDERED:
+		io->scsiio.tag_type = CTL_TAG_ORDERED;
+		break;
+	case VIRTIO_SCSI_S_HEAD:
+		io->scsiio.tag_type = CTL_TAG_HEAD_OF_QUEUE;
+		break;
+	case VIRTIO_SCSI_S_ACA:
+		io->scsiio.tag_type = CTL_TAG_ACA;
+		break;
+	case VIRTIO_SCSI_S_SIMPLE:
+	default:
+		io->scsiio.tag_type = CTL_TAG_SIMPLE;
+		break;
+	}
 	io->scsiio.ext_sg_entries = ext_sg_entries;
 	io->scsiio.ext_data_ptr = ext_data_ptr;
 	io->scsiio.ext_data_len = ext_data_len;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201812141446.wBEEkZtU001185>