summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2020-09-02 22:00:26 +0000
committerkrw <krw@openbsd.org>2020-09-02 22:00:26 +0000
commit25a9dbe66bc67c8276f11127978bf551a86e57ae (patch)
treee7d92309a1912fffbdd1e1eeeed5690cb7d4beb9
parentWhen building emulated INQUIRY results use the SCSI_REV_* #define's to (diff)
downloadwireguard-openbsd-25a9dbe66bc67c8276f11127978bf551a86e57ae.tar.xz
wireguard-openbsd-25a9dbe66bc67c8276f11127978bf551a86e57ae.zip
When building emulated INQUIRY results use the SCSI_REV_* #define's to
initialize the 'version' field. Not numbers.
-rw-r--r--sys/dev/ic/twe.c4
-rw-r--r--sys/dev/pv/vioblk.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/ic/twe.c b/sys/dev/ic/twe.c
index b277a592299..497eca1d8eb 100644
--- a/sys/dev/ic/twe.c
+++ b/sys/dev/ic/twe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: twe.c,v 1.59 2020/09/01 12:17:53 krw Exp $ */
+/* $OpenBSD: twe.c,v 1.60 2020/09/02 22:00:26 krw Exp $ */
/*
* Copyright (c) 2000-2002 Michael Shalayeff. All rights reserved.
@@ -829,7 +829,7 @@ twe_scsi_cmd(xs)
(sc->sc_hdr[target].hd_devtype & 4) ? T_CDROM : T_DIRECT;
inq.dev_qual2 =
(sc->sc_hdr[target].hd_devtype & 1) ? SID_REMOVABLE : 0;
- inq.version = 2;
+ inq.version = SCSI_REV_2;
inq.response_format = 2;
inq.additional_length = 32;
strlcpy(inq.vendor, "3WARE ", sizeof inq.vendor);
diff --git a/sys/dev/pv/vioblk.c b/sys/dev/pv/vioblk.c
index dedde088838..f399474f05c 100644
--- a/sys/dev/pv/vioblk.c
+++ b/sys/dev/pv/vioblk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vioblk.c,v 1.27 2020/09/01 12:17:53 krw Exp $ */
+/* $OpenBSD: vioblk.c,v 1.28 2020/09/02 22:00:26 krw Exp $ */
/*
* Copyright (c) 2012 Stefan Fritsch.
@@ -573,7 +573,7 @@ vioblk_scsi_inq(struct scsi_xfer *xs)
bzero(&inqd, sizeof(inqd));
inqd.device = T_DIRECT;
- inqd.version = 0x05; /* SPC-3 */
+ inqd.version = SCSI_REV_SPC3;
inqd.response_format = 2;
inqd.additional_length = 32;
inqd.flags |= SID_CmdQue;