]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r357040: virtio_scsi: use max target ID plus one as the initiator ID
authorAndriy Gapon <avg@FreeBSD.org>
Thu, 27 Feb 2020 14:52:55 +0000 (14:52 +0000)
committerAndriy Gapon <avg@FreeBSD.org>
Thu, 27 Feb 2020 14:52:55 +0000 (14:52 +0000)
commit4f6e8eeebe3020a3ec366e8f86c79a1e7b650799
tree079dce72f387eb97b1df8e8a7c29e1c03a526986
parentc22dba44c8f5e40fdac4c7022121e79cde57dca5
MFC r357040: virtio_scsi: use max target ID plus one as the initiator ID

This bus does not really have a concept of the initiator ID, so use
a guaranteed dummy one that won't conflict with any real target.

This change fixes a problem with virtio_scsi on GCE where disks get
sequential target IDs starting from one.  If there are seven or more
disks, then a disk with the target ID of seven would not be discovered
by FreeBSD as that ID was reserved as the initiator ID -- see
scsi_scan_bus().

Sponsored by: Panzura
sys/dev/virtio/scsi/virtio_scsi.c
sys/dev/virtio/scsi/virtio_scsivar.h