From 77214cbcc5f2d017b94de5307806a72dee3268e9 Mon Sep 17 00:00:00 2001 From: tsutsui Date: Thu, 9 Feb 2023 15:00:56 +0000 Subject: 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 --- sys/arch/next68k/stand/boot/sd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys/arch') 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) -- cgit