Module Name: src Committed By: tsutsui Date: Thu Feb 9 15:00:56 UTC 2023
Modified Files: src/sys/arch/next68k/stand/boot: sd.c Log Message: 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 To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/arch/next68k/stand/boot/sd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/next68k/stand/boot/sd.c diff -u src/sys/arch/next68k/stand/boot/sd.c:1.14 src/sys/arch/next68k/stand/boot/sd.c:1.15 --- src/sys/arch/next68k/stand/boot/sd.c:1.14 Thu Feb 9 14:41:54 2023 +++ src/sys/arch/next68k/stand/boot/sd.c Thu Feb 9 15:00:56 2023 @@ -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)