Subject: kern/2953: scsi sense problem
To: None <gnats-bugs@gnats.netbsd.org>
From: None <dms@celtech.com>
List: netbsd-bugs
Date: 11/19/1996 17:22:41
>Number: 2953
>Category: kern
>Synopsis: scsi sense error
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: kern-bug-people (Kernel Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Nov 19 17:35:00 1996
>Last-Modified:
>Originator: David M. Stanhope Dms
>Organization:
CTS
>Release: 1.2_ALPHA
>Environment:
i386, netbsd
System: NetBSD bsdpc.celtech.com 1.2 NetBSD 1.2 (NETBSD) #2: Wed Nov 13 01:11:36 PST 1996 dms@netbsd.celtech.com:/usr2/src/sys/arch/i386/compile/NETBSD i386
>Description:
on older scsi drives the mode-sense-4 won't reurn an error,
and the scsi probe code will use bogus data in the scsi-sense buffer.
there used to be a bzero of the sense buffer prior to doing the
mode-sense command but this was remove in later versions of the
driver (sd.c). A test for 'bogus' values of zero now fails since the
buffer can hold arbitrary data.
>How-To-Repeat:
try to use a fairly old scsi drive
>Fix:
diff -c sd.c sd.C
*** sd.c Wed Jun 5 04:41:26 1996
--- sd.C Fri Jun 21 21:08:50 1996
***************
*** 842,847 ****
--- 842,848 ----
/*
* do a "mode sense page 4"
*/
+ bzero(&scsi_sense, sizeof(scsi_sense)); /* DMS */
bzero(&scsi_cmd, sizeof(scsi_cmd));
scsi_cmd.opcode = MODE_SENSE;
scsi_cmd.page = 4;
>Audit-Trail:
>Unformatted: