summaryrefslogtreecommitdiff
path: root/sys/arch/next68k
diff options
context:
space:
mode:
authortsutsui <tsutsui@NetBSD.org>2023-02-09 15:00:56 +0000
committertsutsui <tsutsui@NetBSD.org>2023-02-09 15:00:56 +0000
commit77214cbcc5f2d017b94de5307806a72dee3268e9 (patch)
treecbd8383b46aa2116627638fa54a70e4e13559ade /sys/arch/next68k
parent9c31ae14ba7f829e84c85409ce56887e1ac6fccc (diff)
Request only 36 bytes for a response of INQUIRY command for legacy drives.
Some drives don't respond larger requested size for newer SCSI3 devices and not all drivers can handle short xfers. We should fix drivers to handle such short xfers properly, but we need only SCSI device type here (and the 36 bytes are enough even if we want vendor and product names on a bootloader). The problem is reported from Andreas Grabher (a maintainer of NeXT Computer Emulator)a on port-next68k@: https://mail-index.netbsd.org/port-next68k/2023/02/thread1.html
Diffstat (limited to 'sys/arch/next68k')
-rw-r--r--sys/arch/next68k/stand/boot/sd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/next68k/stand/boot/sd.c b/sys/arch/next68k/stand/boot/sd.c
index 54e69eb1a33..dc13d706b54 100644
--- a/sys/arch/next68k/stand/boot/sd.c
+++ b/sys/arch/next68k/stand/boot/sd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: sd.c,v 1.14 2023/02/09 14:41:54 tsutsui Exp $ */
+/* $NetBSD: sd.c,v 1.15 2023/02/09 15:00:56 tsutsui Exp $ */
/*
* Copyright (c) 1994 Rolf Grossmann
* All rights reserved.
@@ -98,8 +98,8 @@ sdprobe(char target, char lun)
memset(&cdb2, 0, sizeof(cdb2));
cdb2.opcode = INQUIRY;
- cdb2.length = sizeof(inq);
- count = sizeof (inq);
+ cdb2.length = SCSIPI_INQUIRY_LENGTH_SCSI2;
+ count = SCSIPI_INQUIRY_LENGTH_SCSI2;
error = scsiicmd(target, lun, (u_char *)&cdb2, sizeof(cdb2),
(char *)&inq, &count);
if (error != 0)