summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2019-08-30 17:41:18 +0000
committerkrw <krw@openbsd.org>2019-08-30 17:41:18 +0000
commit0b90b277a9c70de1d4ef7a24e95fd172c1f329b0 (patch)
tree52d1f6de1a5ba1eb7f1261e4dc298eebdee75b3f
parentthere is no function called uuid(3), so this should be installed as (diff)
downloadwireguard-openbsd-0b90b277a9c70de1d4ef7a24e95fd172c1f329b0.tar.xz
wireguard-openbsd-0b90b277a9c70de1d4ef7a24e95fd172c1f329b0.zip
Don't use misleadingly named SCSISPC() which returns SCSI version not
SPC version. Use raw data in version field to check the SPC level until SCSISPC() is straightened out. Actually a bit clearer to read as the raw data is what is manipulated in adjacent code.
-rw-r--r--sys/dev/pv/hvs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/pv/hvs.c b/sys/dev/pv/hvs.c
index bd13d068bce..feb47573446 100644
--- a/sys/dev/pv/hvs.c
+++ b/sys/dev/pv/hvs.c
@@ -610,7 +610,7 @@ fixup_inquiry(struct scsi_xfer *xs, struct hvs_srb *srb)
scsi_strvis(vendor, inq->vendor, sizeof(vendor));
if ((sc->sc_proto == HVS_PROTO_VERSION_WIN8_1 ||
sc->sc_proto == HVS_PROTO_VERSION_WIN8) &&
- SCSISPC(inq->version) == 2 &&
+ ((inq->version & SID_ANSII) == 0x04) &&
!strncmp(vendor, "Msft", 4))
inq->version = 0x05; /* SPC-3 */
}