diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2020-09-05 13:05:08 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2020-09-05 13:05:08 +0000 |
commit | 9d23d7af058196d21315bc17c148373f3f37addf (patch) | |
tree | 835d97b1baa14c8356b190c25e1586749d0489ec /sys | |
parent | effa0610c5950c5f9c7007ef4eb42c17056cac33 (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')
-rw-r--r-- | sys/arch/sparc64/dev/vdsk.c | 4 | ||||
-rw-r--r-- | sys/dev/ata/atascsi.c | 6 | ||||
-rw-r--r-- | sys/dev/ic/aac.c | 4 | ||||
-rw-r--r-- | sys/dev/ic/ami.c | 4 | ||||
-rw-r--r-- | sys/dev/ic/cac.c | 4 | ||||
-rw-r--r-- | sys/dev/ic/gdt_common.c | 4 | ||||
-rw-r--r-- | sys/dev/ic/nvme.c | 4 | ||||
-rw-r--r-- | sys/dev/ic/twe.c | 4 | ||||
-rw-r--r-- | sys/dev/pci/ips.c | 4 | ||||
-rw-r--r-- | sys/dev/pv/vioblk.c | 4 | ||||
-rw-r--r-- | sys/dev/pv/xbf.c | 4 | ||||
-rw-r--r-- | sys/dev/sdmmc/sdmmc_scsi.c | 4 | ||||
-rw-r--r-- | sys/dev/softraid.c | 4 |
13 files changed, 27 insertions, 27 deletions
diff --git a/sys/arch/sparc64/dev/vdsk.c b/sys/arch/sparc64/dev/vdsk.c index 4f811f4c9e9..501b19c8277 100644 --- a/sys/arch/sparc64/dev/vdsk.c +++ b/sys/arch/sparc64/dev/vdsk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vdsk.c,v 1.66 2020/09/03 12:41:28 krw Exp $ */ +/* $OpenBSD: vdsk.c,v 1.67 2020/09/05 13:05:06 krw Exp $ */ /* * Copyright (c) 2009, 2011 Mark Kettenis * @@ -1171,7 +1171,7 @@ vdsk_scsi_inquiry(struct scsi_xfer *xs) inq.version = SCSI_REV_SPC3; inq.response_format = SID_SCSI2_RESPONSE; - inq.additional_length = 32; + inq.additional_length = SID_SCSI2_ALEN; inq.flags |= SID_CmdQue; bcopy("SUN ", inq.vendor, sizeof(inq.vendor)); bcopy("Virtual Disk ", inq.product, sizeof(inq.product)); diff --git a/sys/dev/ata/atascsi.c b/sys/dev/ata/atascsi.c index ec1e371d329..219593bdb1c 100644 --- a/sys/dev/ata/atascsi.c +++ b/sys/dev/ata/atascsi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: atascsi.c,v 1.147 2020/09/03 12:41:29 krw Exp $ */ +/* $OpenBSD: atascsi.c,v 1.148 2020/09/05 13:05:06 krw Exp $ */ /* * Copyright (c) 2007 David Gwynne <dlg@openbsd.org> @@ -710,7 +710,7 @@ atascsi_disk_inquiry(struct scsi_xfer *xs) inq.device = T_DIRECT; inq.version = SCSI_REV_SPC3; inq.response_format = SID_SCSI2_RESPONSE; - inq.additional_length = 32; + inq.additional_length = SID_SCSI2_ALEN; inq.flags |= SID_CmdQue; bcopy("ATA ", inq.vendor, sizeof(inq.vendor)); ata_swapcopy(ap->ap_identify.model, inq.product, @@ -1735,7 +1735,7 @@ atascsi_pmp_inq(struct scsi_xfer *xs) inq.device = 0x1E; /* "well known logical unit" seems reasonable */ inq.version = SCSI_REV_SPC3; inq.response_format = SID_SCSI2_RESPONSE; - inq.additional_length = 32; + inq.additional_length = SID_SCSI2_ALEN; inq.flags |= SID_CmdQue; bcopy("ATA ", inq.vendor, sizeof(inq.vendor)); 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); diff --git a/sys/dev/pci/ips.c b/sys/dev/pci/ips.c index 363fc98db8f..090bf0f30b5 100644 --- a/sys/dev/pci/ips.c +++ b/sys/dev/pci/ips.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ips.c,v 1.130 2020/09/03 12:41:29 krw Exp $ */ +/* $OpenBSD: ips.c,v 1.131 2020/09/05 13:05:06 krw Exp $ */ /* * Copyright (c) 2006, 2007, 2009 Alexander Yurchenko <grange@openbsd.org> @@ -916,7 +916,7 @@ ips_scsi_cmd(struct scsi_xfer *xs) inq.device = T_DIRECT; 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, "IBM", sizeof(inq.vendor)); snprintf(inq.product, sizeof(inq.product), diff --git a/sys/dev/pv/vioblk.c b/sys/dev/pv/vioblk.c index dc68145ea50..c5a62c0feb4 100644 --- a/sys/dev/pv/vioblk.c +++ b/sys/dev/pv/vioblk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vioblk.c,v 1.29 2020/09/03 12:41:29 krw Exp $ */ +/* $OpenBSD: vioblk.c,v 1.30 2020/09/05 13:05:07 krw Exp $ */ /* * Copyright (c) 2012 Stefan Fritsch. @@ -575,7 +575,7 @@ vioblk_scsi_inq(struct scsi_xfer *xs) inqd.device = T_DIRECT; inqd.version = SCSI_REV_SPC3; inqd.response_format = SID_SCSI2_RESPONSE; - inqd.additional_length = 32; + inqd.additional_length = SID_SCSI2_ALEN; inqd.flags |= SID_CmdQue; bcopy("VirtIO ", inqd.vendor, sizeof(inqd.vendor)); bcopy("Block Device ", inqd.product, sizeof(inqd.product)); diff --git a/sys/dev/pv/xbf.c b/sys/dev/pv/xbf.c index b2f5a760b55..9ad437687d4 100644 --- a/sys/dev/pv/xbf.c +++ b/sys/dev/pv/xbf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xbf.c,v 1.47 2020/09/03 12:41:29 krw Exp $ */ +/* $OpenBSD: xbf.c,v 1.48 2020/09/05 13:05:07 krw Exp $ */ /* * Copyright (c) 2016, 2017 Mike Belopuhov @@ -837,7 +837,7 @@ xbf_scsi_inquiry(struct scsi_xfer *xs) inq.version = SCSI_REV_SPC3; inq.response_format = SID_SCSI2_RESPONSE; - inq.additional_length = 32; + inq.additional_length = SID_SCSI2_ALEN; inq.flags |= SID_CmdQue; bcopy("Xen ", inq.vendor, sizeof(inq.vendor)); bcopy(sc->sc_prod, inq.product, sizeof(inq.product)); diff --git a/sys/dev/sdmmc/sdmmc_scsi.c b/sys/dev/sdmmc/sdmmc_scsi.c index 38609ec53fc..b5f45672563 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.56 2020/09/03 12:41:29 krw Exp $ */ +/* $OpenBSD: sdmmc_scsi.c,v 1.57 2020/09/05 13:05:07 krw Exp $ */ /* * Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org> @@ -438,7 +438,7 @@ sdmmc_inquiry(struct scsi_xfer *xs) inq.dev_qual2 = SID_REMOVABLE; inq.version = SCSI_REV_2; inq.response_format = SID_SCSI2_RESPONSE; - inq.additional_length = 32; + inq.additional_length = SID_SCSI2_ALEN; memcpy(inq.vendor, vendor, sizeof(inq.vendor)); memcpy(inq.product, product, sizeof(inq.product)); memcpy(inq.revision, revision, sizeof(inq.revision)); diff --git a/sys/dev/softraid.c b/sys/dev/softraid.c index 0fc0003a768..78e06f86c3c 100644 --- a/sys/dev/softraid.c +++ b/sys/dev/softraid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid.c,v 1.413 2020/09/03 12:41:28 krw Exp $ */ +/* $OpenBSD: softraid.c,v 1.414 2020/09/05 13:05:06 krw Exp $ */ /* * Copyright (c) 2007, 2008, 2009 Marco Peereboom <marco@peereboom.us> * Copyright (c) 2008 Chris Kuethe <ckuethe@openbsd.org> @@ -4027,7 +4027,7 @@ sr_raid_inquiry(struct sr_workunit *wu) 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, sd->sd_meta->ssdi.ssd_vendor, sizeof(inq.vendor)); |