Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/next68k/stand/boot Request only 36 bytes for a resp...



details:   https://anonhg.NetBSD.org/src/rev/2e0d3b58e028
branches:  trunk
changeset: 373435:2e0d3b58e028
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Thu Feb 09 15:00:56 2023 +0000

description:
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:

 sys/arch/next68k/stand/boot/sd.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (20 lines):

diff -r b994212af8ef -r 2e0d3b58e028 sys/arch/next68k/stand/boot/sd.c
--- a/sys/arch/next68k/stand/boot/sd.c  Thu Feb 09 14:41:54 2023 +0000
+++ b/sys/arch/next68k/stand/boot/sd.c  Thu Feb 09 15:00:56 2023 +0000
@@ -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 @@
 
     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)



Home | Main Index | Thread Index | Old Index