summaryrefslogtreecommitdiff
path: root/sys/dev/ic
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2020-09-05 13:05:08 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2020-09-05 13:05:08 +0000
commit9d23d7af058196d21315bc17c148373f3f37addf (patch)
tree835d97b1baa14c8356b190c25e1586749d0489ec /sys/dev/ic
parenteffa0610c5950c5f9c7007ef4eb42c17056cac33 (diff)
Replace '32' with SID_SCSI2_ALEN (a.k.a. 31) when building emulated INQUIRY
responses. This is what the SCSI specifications say is the correct value and already used in several cases.
Diffstat (limited to 'sys/dev/ic')
-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/ic/twe.c4
6 files changed, 12 insertions, 12 deletions
diff --git a/sys/dev/ic/aac.c b/sys/dev/ic/aac.c
index 2e1b2e72c3a..6021e7c8c7a 100644
--- a/sys/dev/ic/aac.c
+++ b/sys/dev/ic/aac.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aac.c,v 1.88 2020/09/03 12:41:29 krw Exp $ */
+/* $OpenBSD: aac.c,v 1.89 2020/09/05 13:05:06 krw Exp $ */
/*-
* Copyright (c) 2000 Michael Smith
@@ -2159,7 +2159,7 @@ aac_internal_cache_cmd(struct scsi_xfer *xs)
inq.dev_qual2 = 0;
inq.version = SCSI_REV_2;
inq.response_format = SID_SCSI2_RESPONSE;
- inq.additional_length = 32;
+ inq.additional_length = SID_SCSI2_ALEN;
inq.flags |= SID_CmdQue;
strlcpy(inq.vendor, "Adaptec", sizeof inq.vendor);
snprintf(inq.product, sizeof inq.product, "Container #%02d",
diff --git a/sys/dev/ic/ami.c b/sys/dev/ic/ami.c
index 6e828ba1dd6..db85c6366c3 100644
--- a/sys/dev/ic/ami.c
+++ b/sys/dev/ic/ami.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ami.c,v 1.257 2020/09/03 12:41:29 krw Exp $ */
+/* $OpenBSD: ami.c,v 1.258 2020/09/05 13:05:06 krw Exp $ */
/*
* Copyright (c) 2001 Michael Shalayeff
@@ -1403,7 +1403,7 @@ ami_scsi_cmd(struct scsi_xfer *xs)
inq.dev_qual2 = 0;
inq.version = SCSI_REV_2;
inq.response_format = SID_SCSI2_RESPONSE;
- inq.additional_length = 32;
+ inq.additional_length = SID_SCSI2_ALEN;
inq.flags |= SID_CmdQue;
strlcpy(inq.vendor, "AMI ", sizeof(inq.vendor));
snprintf(inq.product, sizeof(inq.product),
diff --git a/sys/dev/ic/cac.c b/sys/dev/ic/cac.c
index 298bed596c0..dda32869feb 100644
--- a/sys/dev/ic/cac.c
+++ b/sys/dev/ic/cac.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cac.c,v 1.70 2020/09/03 12:41:29 krw Exp $ */
+/* $OpenBSD: cac.c,v 1.71 2020/09/05 13:05:06 krw Exp $ */
/* $NetBSD: cac.c,v 1.15 2000/11/08 19:20:35 ad Exp $ */
/*
@@ -632,7 +632,7 @@ cac_scsi_cmd(xs)
inq.dev_qual2 = 0;
inq.version = SCSI_REV_2;
inq.response_format = SID_SCSI2_RESPONSE;
- inq.additional_length = 32;
+ inq.additional_length = SID_SCSI2_ALEN;
inq.flags |= SID_CmdQue;
strlcpy(inq.vendor, "Compaq ", sizeof inq.vendor);
switch (CAC_GET1(dinfo->mirror)) {
diff --git a/sys/dev/ic/gdt_common.c b/sys/dev/ic/gdt_common.c
index ef799e41b82..d1440b57998 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.80 2020/09/03 12:41:29 krw Exp $ */
+/* $OpenBSD: gdt_common.c,v 1.81 2020/09/05 13:05:06 krw Exp $ */
/*
* Copyright (c) 1999, 2000, 2003 Niklas Hallqvist. All rights reserved.
@@ -914,7 +914,7 @@ gdt_internal_cache_cmd(struct scsi_xfer *xs)
(sc->sc_hdr[target].hd_devtype & 1) ? SID_REMOVABLE : 0;
inq.version = SCSI_REV_2;
inq.response_format = SID_SCSI2_RESPONSE;
- inq.additional_length = 32;
+ inq.additional_length = SID_SCSI2_ALEN;
inq.flags |= SID_CmdQue;
strlcpy(inq.vendor, "ICP ", sizeof inq.vendor);
snprintf(inq.product, sizeof inq.product, "Host drive #%02d",
diff --git a/sys/dev/ic/nvme.c b/sys/dev/ic/nvme.c
index ba5ff214121..01856d36a84 100644
--- a/sys/dev/ic/nvme.c
+++ b/sys/dev/ic/nvme.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nvme.c,v 1.86 2020/09/03 12:41:29 krw Exp $ */
+/* $OpenBSD: nvme.c,v 1.87 2020/09/05 13:05:06 krw Exp $ */
/*
* Copyright (c) 2014 David Gwynne <dlg@openbsd.org>
@@ -781,7 +781,7 @@ nvme_scsi_inquiry(struct scsi_xfer *xs)
inq.device = T_DIRECT;
inq.version = SCSI_REV_SPC4;
inq.response_format = SID_SCSI2_RESPONSE;
- inq.additional_length = 32;
+ inq.additional_length = SID_SCSI2_ALEN;
inq.flags |= SID_CmdQue;
memcpy(inq.vendor, "NVMe ", sizeof(inq.vendor));
memcpy(inq.product, sc->sc_identify.mn, sizeof(inq.product));
diff --git a/sys/dev/ic/twe.c b/sys/dev/ic/twe.c
index 6d4b17442ad..d42d550e07e 100644
--- a/sys/dev/ic/twe.c
+++ b/sys/dev/ic/twe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: twe.c,v 1.61 2020/09/03 12:41:29 krw Exp $ */
+/* $OpenBSD: twe.c,v 1.62 2020/09/05 13:05:06 krw Exp $ */
/*
* Copyright (c) 2000-2002 Michael Shalayeff. All rights reserved.
@@ -831,7 +831,7 @@ twe_scsi_cmd(xs)
(sc->sc_hdr[target].hd_devtype & 1) ? SID_REMOVABLE : 0;
inq.version = SCSI_REV_2;
inq.response_format = SID_SCSI2_RESPONSE;
- inq.additional_length = 32;
+ inq.additional_length = SID_SCSI2_ALEN;
strlcpy(inq.vendor, "3WARE ", sizeof inq.vendor);
snprintf(inq.product, sizeof inq.product, "Host drive #%02d",
target);