svn commit: r341704 - head/usr.sbin/bhyve
Alexander Motin
mav at FreeBSD.org
Fri Dec 7 19:10:52 UTC 2018
Author: mav
Date: Fri Dec 7 19:10:51 2018
New Revision: 341704
URL: https://svnweb.freebsd.org/changeset/base/341704
Log:
Fill initid explicitly on requests.
Unfortunately ctl_scsi_zero_io() wipes that field, so it was always zero.
While there, targ_port is set by kernel, so user-space should not fill it.
MFC after: 1 week
Modified:
head/usr.sbin/bhyve/pci_virtio_scsi.c
Modified: head/usr.sbin/bhyve/pci_virtio_scsi.c
==============================================================================
--- head/usr.sbin/bhyve/pci_virtio_scsi.c Fri Dec 7 16:52:52 2018 (r341703)
+++ head/usr.sbin/bhyve/pci_virtio_scsi.c Fri Dec 7 19:10:51 2018 (r341704)
@@ -389,7 +389,7 @@ pci_vtscsi_tmf_handle(struct pci_vtscsi_softc *sc,
ctl_scsi_zero_io(io);
io->io_hdr.io_type = CTL_IO_TASK;
- io->io_hdr.nexus.targ_port = tmf->lun[1];
+ io->io_hdr.nexus.initid = sc->vss_iid;
io->io_hdr.nexus.targ_lun = pci_vtscsi_get_lun(tmf->lun);
io->taskio.tag_type = CTL_TAG_SIMPLE;
io->taskio.tag_num = (uint32_t)tmf->id;
@@ -480,7 +480,7 @@ pci_vtscsi_request_handle(struct pci_vtscsi_queue *q,
io = ctl_scsi_alloc_io(sc->vss_iid);
ctl_scsi_zero_io(io);
- io->io_hdr.nexus.targ_port = cmd_rd->lun[1];
+ io->io_hdr.nexus.initid = sc->vss_iid;
io->io_hdr.nexus.targ_lun = pci_vtscsi_get_lun(cmd_rd->lun);
io->io_hdr.io_type = CTL_IO_SCSI;
More information about the svn-src-head
mailing list