summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2020-09-02 21:16:30 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2020-09-02 21:16:30 +0000
commit9c6ad5050b4e29663cd26a07838ebdaa3f9bd466 (patch)
tree8bb288bf6a66226afb6aafc5c05d8dc30d043b9f
parentdaf0537f196dfe9c78735ac5424c1f03e4a7fc4f (diff)
When building emulated INQUIRY results use the SCSI_REV_* #define's to
initialize the 'version' field. Not numbers.
-rw-r--r--sys/arch/sparc64/dev/vdsk.c4
-rw-r--r--sys/dev/ata/atascsi.c6
-rw-r--r--sys/dev/ic/aac.c4
-rw-r--r--sys/dev/ic/ami.c4
-rw-r--r--sys/dev/ic/cac.c4
-rw-r--r--sys/dev/ic/gdt_common.c4
-rw-r--r--sys/dev/ic/nvme.c4
-rw-r--r--sys/dev/pci/ips.c4
-rw-r--r--sys/dev/pv/xbf.c4
-rw-r--r--sys/dev/sdmmc/sdmmc_scsi.c4
-rw-r--r--sys/dev/softraid.c4
11 files changed, 23 insertions, 23 deletions
diff --git a/sys/arch/sparc64/dev/vdsk.c b/sys/arch/sparc64/dev/vdsk.c
index 9a816da1508..0e4852c43e0 100644
--- a/sys/arch/sparc64/dev/vdsk.c
+++ b/sys/arch/sparc64/dev/vdsk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vdsk.c,v 1.64 2020/09/01 12:17:52 krw Exp $ */
+/* $OpenBSD: vdsk.c,v 1.65 2020/09/02 21:16:29 krw Exp $ */
/*
* Copyright (c) 2009, 2011 Mark Kettenis
*
@@ -1169,7 +1169,7 @@ vdsk_scsi_inquiry(struct scsi_xfer *xs)
break;
}
- inq.version = 0x05; /* SPC-3 */
+ inq.version = SCSI_REV_SPC3;
inq.response_format = 2;
inq.additional_length = 32;
inq.flags |= SID_CmdQue;
diff --git a/sys/dev/ata/atascsi.c b/sys/dev/ata/atascsi.c
index 91857128474..defd41063b2 100644
--- a/sys/dev/ata/atascsi.c
+++ b/sys/dev/ata/atascsi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: atascsi.c,v 1.145 2020/09/01 12:17:52 krw Exp $ */
+/* $OpenBSD: atascsi.c,v 1.146 2020/09/02 21:16:29 krw Exp $ */
/*
* Copyright (c) 2007 David Gwynne <dlg@openbsd.org>
@@ -708,7 +708,7 @@ atascsi_disk_inquiry(struct scsi_xfer *xs)
bzero(&inq, sizeof(inq));
inq.device = T_DIRECT;
- inq.version = 0x05; /* SPC-3 */
+ inq.version = SCSI_REV_SPC3;
inq.response_format = 2;
inq.additional_length = 32;
inq.flags |= SID_CmdQue;
@@ -1733,7 +1733,7 @@ atascsi_pmp_inq(struct scsi_xfer *xs)
bzero(&inq, sizeof(inq));
inq.device = 0x1E; /* "well known logical unit" seems reasonable */
- inq.version = 0x05; /* SPC-3? */
+ inq.version = SCSI_REV_SPC3;
inq.response_format = 2;
inq.additional_length = 32;
inq.flags |= SID_CmdQue;
diff --git a/sys/dev/ic/aac.c b/sys/dev/ic/aac.c
index d85c5caa46b..f6964c88671 100644
--- a/sys/dev/ic/aac.c
+++ b/sys/dev/ic/aac.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aac.c,v 1.86 2020/09/01 12:17:52 krw Exp $ */
+/* $OpenBSD: aac.c,v 1.87 2020/09/02 21:16:29 krw Exp $ */
/*-
* Copyright (c) 2000 Michael Smith
@@ -2157,7 +2157,7 @@ aac_internal_cache_cmd(struct scsi_xfer *xs)
/* XXX How do we detect removable/CD-ROM devices? */
inq.device = T_DIRECT;
inq.dev_qual2 = 0;
- inq.version = 2;
+ inq.version = SCSI_REV_2;
inq.response_format = 2;
inq.additional_length = 32;
inq.flags |= SID_CmdQue;
diff --git a/sys/dev/ic/ami.c b/sys/dev/ic/ami.c
index e0325b52a3c..50dc54918ce 100644
--- a/sys/dev/ic/ami.c
+++ b/sys/dev/ic/ami.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ami.c,v 1.255 2020/09/01 12:17:52 krw Exp $ */
+/* $OpenBSD: ami.c,v 1.256 2020/09/02 21:16:29 krw Exp $ */
/*
* Copyright (c) 2001 Michael Shalayeff
@@ -1401,7 +1401,7 @@ ami_scsi_cmd(struct scsi_xfer *xs)
bzero(&inq, sizeof(inq));
inq.device = T_DIRECT;
inq.dev_qual2 = 0;
- inq.version = 2;
+ inq.version = SCSI_REV_2;
inq.response_format = 2;
inq.additional_length = 32;
inq.flags |= SID_CmdQue;
diff --git a/sys/dev/ic/cac.c b/sys/dev/ic/cac.c
index 15fb6744353..a2ca08cadd5 100644
--- a/sys/dev/ic/cac.c
+++ b/sys/dev/ic/cac.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cac.c,v 1.68 2020/09/01 12:17:53 krw Exp $ */
+/* $OpenBSD: cac.c,v 1.69 2020/09/02 21:16:29 krw Exp $ */
/* $NetBSD: cac.c,v 1.15 2000/11/08 19:20:35 ad Exp $ */
/*
@@ -630,7 +630,7 @@ cac_scsi_cmd(xs)
bzero(&inq, sizeof inq);
inq.device = T_DIRECT;
inq.dev_qual2 = 0;
- inq.version = 2;
+ inq.version = SCSI_REV_2;
inq.response_format = 2;
inq.additional_length = 32;
inq.flags |= SID_CmdQue;
diff --git a/sys/dev/ic/gdt_common.c b/sys/dev/ic/gdt_common.c
index d9be6d70cf2..58f56a5af3f 100644
--- a/sys/dev/ic/gdt_common.c
+++ b/sys/dev/ic/gdt_common.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gdt_common.c,v 1.78 2020/09/01 12:17:53 krw Exp $ */
+/* $OpenBSD: gdt_common.c,v 1.79 2020/09/02 21:16:29 krw Exp $ */
/*
* Copyright (c) 1999, 2000, 2003 Niklas Hallqvist. All rights reserved.
@@ -912,7 +912,7 @@ gdt_internal_cache_cmd(struct scsi_xfer *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;
inq.flags |= SID_CmdQue;
diff --git a/sys/dev/ic/nvme.c b/sys/dev/ic/nvme.c
index 6aba615ed1f..75e1f31731f 100644
--- a/sys/dev/ic/nvme.c
+++ b/sys/dev/ic/nvme.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nvme.c,v 1.84 2020/09/01 12:17:53 krw Exp $ */
+/* $OpenBSD: nvme.c,v 1.85 2020/09/02 21:16:29 krw Exp $ */
/*
* Copyright (c) 2014 David Gwynne <dlg@openbsd.org>
@@ -779,7 +779,7 @@ nvme_scsi_inquiry(struct scsi_xfer *xs)
memset(&inq, 0, sizeof(inq));
inq.device = T_DIRECT;
- inq.version = 0x06; /* SPC-4 */
+ inq.version = SCSI_REV_SPC4;
inq.response_format = 2;
inq.additional_length = 32;
inq.flags |= SID_CmdQue;
diff --git a/sys/dev/pci/ips.c b/sys/dev/pci/ips.c
index c8a8ce3908c..cda5513639d 100644
--- a/sys/dev/pci/ips.c
+++ b/sys/dev/pci/ips.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ips.c,v 1.128 2020/09/01 12:17:53 krw Exp $ */
+/* $OpenBSD: ips.c,v 1.129 2020/09/02 21:16:29 krw Exp $ */
/*
* Copyright (c) 2006, 2007, 2009 Alexander Yurchenko <grange@openbsd.org>
@@ -914,7 +914,7 @@ ips_scsi_cmd(struct scsi_xfer *xs)
case INQUIRY:
bzero(&inq, sizeof(inq));
inq.device = T_DIRECT;
- inq.version = 2;
+ inq.version = SCSI_REV_2;
inq.response_format = 2;
inq.additional_length = 32;
inq.flags |= SID_CmdQue;
diff --git a/sys/dev/pv/xbf.c b/sys/dev/pv/xbf.c
index 343be681cfb..87d49cfe962 100644
--- a/sys/dev/pv/xbf.c
+++ b/sys/dev/pv/xbf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xbf.c,v 1.45 2020/09/01 12:17:53 krw Exp $ */
+/* $OpenBSD: xbf.c,v 1.46 2020/09/02 21:16:29 krw Exp $ */
/*
* Copyright (c) 2016, 2017 Mike Belopuhov
@@ -835,7 +835,7 @@ xbf_scsi_inquiry(struct scsi_xfer *xs)
break;
}
- inq.version = 0x05; /* SPC-3 */
+ inq.version = SCSI_REV_SPC3;
inq.response_format = 2;
inq.additional_length = 32;
inq.flags |= SID_CmdQue;
diff --git a/sys/dev/sdmmc/sdmmc_scsi.c b/sys/dev/sdmmc/sdmmc_scsi.c
index 537dcf9755f..4a5594d437d 100644
--- a/sys/dev/sdmmc/sdmmc_scsi.c
+++ b/sys/dev/sdmmc/sdmmc_scsi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sdmmc_scsi.c,v 1.54 2020/09/01 12:17:53 krw Exp $ */
+/* $OpenBSD: sdmmc_scsi.c,v 1.55 2020/09/02 21:16:29 krw Exp $ */
/*
* Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org>
@@ -436,7 +436,7 @@ sdmmc_inquiry(struct scsi_xfer *xs)
memset(&inq, 0, sizeof inq);
inq.device = T_DIRECT;
inq.dev_qual2 = SID_REMOVABLE;
- inq.version = 2;
+ inq.version = SCSI_REV_2;
inq.response_format = 2;
inq.additional_length = 32;
memcpy(inq.vendor, vendor, sizeof(inq.vendor));
diff --git a/sys/dev/softraid.c b/sys/dev/softraid.c
index 68f87650421..f734d51326e 100644
--- a/sys/dev/softraid.c
+++ b/sys/dev/softraid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid.c,v 1.411 2020/09/01 12:17:52 krw Exp $ */
+/* $OpenBSD: softraid.c,v 1.412 2020/09/02 21:16:29 krw Exp $ */
/*
* Copyright (c) 2007, 2008, 2009 Marco Peereboom <marco@peereboom.us>
* Copyright (c) 2008 Chris Kuethe <ckuethe@openbsd.org>
@@ -4025,7 +4025,7 @@ sr_raid_inquiry(struct sr_workunit *wu)
bzero(&inq, sizeof(inq));
inq.device = T_DIRECT;
inq.dev_qual2 = 0;
- inq.version = 2;
+ inq.version = SCSI_REV_2;
inq.response_format = 2;
inq.additional_length = 32;
inq.flags |= SID_CmdQue;