Subject: kern/1482: scsi disk dump routine doesn't set SCSI_DATA_OUT
To: None <gnats-bugs@gnats.netbsd.org>
From: John Kohl <jtk@kolvir.arlington.ma.us>
List: netbsd-bugs
Date: 09/19/1995 21:28:16
>Number:         1482
>Category:       kern
>Synopsis:       scsi disk dump routine doesn't set SCSI_DATA_OUT
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Sep 19 21:50:03 1995
>Last-Modified:
>Originator:     John Kohl
>Organization:
NetBSD Kernel Hackers `R` Us
>Release:        NetBSD-current, 1995/09/19
>Environment:
	
System: NetBSD pattern 1.0A NetBSD 1.0A (PATTERN) #114: Tue Sep 19 21:07:54 EDT 1995 jtk@pattern:/u1/NetBSD-current/src/sys/arch/i386/compile/PATTERN i386


>Description:

The SCSI disk dump routine does not set SCSI_DATA_OUT on its dump
requests, which makes some SCSI drivers barf.

>How-To-Repeat:

Try to take a crashdump on an NCR53c810 on an i386.

>Fix:

===================================================================
RCS file: RCS/sd.c,v
retrieving revision 1.1
diff -c -r1.1 sd.c
*** sd.c	1995/09/06 03:40:38	1.1
--- sd.c	1995/09/20 01:07:16
***************
*** 948,954 ****
  		 * to wait for an xs.
  		 */
  		bzero(xs, sizeof(sx));
! 		xs->flags |= SCSI_AUTOCONF | INUSE;
  		xs->sc_link = sd->sc_link;
  		xs->retries = SDRETRIES;
  		xs->timeout = 10000;	/* 10000 millisecs for a disk ! */
--- 948,954 ----
  		 * to wait for an xs.
  		 */
  		bzero(xs, sizeof(sx));
! 		xs->flags |= SCSI_AUTOCONF | INUSE | SCSI_DATA_OUT;
  		xs->sc_link = sd->sc_link;
  		xs->retries = SDRETRIES;
  		xs->timeout = 10000;	/* 10000 millisecs for a disk ! */

>Audit-Trail:
>Unformatted: