Subject: kern/4964: user SCSI bug?
To: None <gnats-bugs@gnats.netbsd.org>
From: Chris Jones <cjones@caesar.honors.montana.edu>
List: netbsd-bugs
Date: 02/09/1998 16:41:29
>Number:         4964
>Category:       kern
>Synopsis:       user SCSI bug?
>Confidential:   no
>Severity:       critical
>Priority:       low
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Feb  9 15:50:01 1998
>Last-Modified:
>Originator:     Chris Jones
>Organization:
-------------------------------------------------------------------------------
Chris Jones                                      cjones@rupert.oscs.montana.edu
           Mad scientist in training...
"Is this going to be a stand-up programming session, sir, or another bug hunt?"
>Release:        <NetBSD-current source date>1.3
>Environment:
	
System: NetBSD caesar.honors.montana.edu 1.3 NetBSD 1.3 (CAESAR) #1: Thu Jan 22 14:08:23 MST 1998 cjones@caesar.honors.montana.edu:/usr/src/sys/arch/i386/compile/CAESAR i386


>Description:
I'm trying to get cdrecord-1.5 to work, and it's having trouble.  I asked the
author of the program for help, and he replied that there appears to be a
bug in the user SCSI driver.  Can somebody make more sense out of all this
than I can?



>From schilling@fokus.gmd.de Mon Feb  9 16:34:31 1998
Date: Mon, 9 Feb 1998 23:40:20 +0100
From: Joerg Schilling <schilling@fokus.gmd.de>
To: cjones@honors.montana.edu
Subject: Re: cdrecord-1.5 and NetBSD-1.3

>How-To-Repeat:
"cdrecord -dummy dev=2,0 cdimage.iso" does it on my system.
	
>Fix:
unknown
	
>Audit-Trail:
>Unformatted:
>From cjones@honors.montana.edu Mon Feb  9 23:25:28 1998

>I'm having plenty of trouble getting cdrecord to work with my setup, and I
>can't think of anything else to try.  I've got an HP 4020i on a NetBSD-1.3
>system, and I'm using cdrecord-1.5.  /dev/scgx is linked to /dev/cd0d,
>which is the device the CD-R attaches to.  I can use the device as a
>CD-ROM without trouble, and cdrecord will successfully run as "cdrecord
>-inq".  But I can't actually record anything on it, because it times out.
>I've talked to other people using the same version of NetBSD and the same
>version of cdrecord, and they say it works for them.  I also know that my
>filesystem image is good, because I can mount the image using NetBSD's vnd
>driver.

>Here's a script:

>Script started on Mon Feb  9 14:56:36 1998
># uname -a
>NetBSD caesar.honors.montana.edu 1.3 NetBSD 1.3 (CAESAR) #1: Thu Jan 22 14:=
>08:23 MST 1998     cjones@caesar.honors.montana.edu:/usr/src/sys/arch/i386/=
>compile/CAESAR i386
># ls -l /dev/scgx
>lrwxr-xr-x  1 root  wheel  9 Feb  9 14:35 /dev/scgx -> /dev/cd0d
># cdrecord -v dev=3D2,0 -inq
>Cdrecord release 1.5 Copyright (C) 1995-1997 J=F6rg Schilling
>TOC Type: 1 =3D CD-ROM
>scsidev: '2,0'
>scsibus: 0 target: 2 lun: 0
>Device type    : Removable CD-ROM
>Version        : 2
>Response Format: 2
>Capabilities   :=20
>Vendor_info    : 'HP      '
>Identifikation : 'C4324/C4325     '
>Revision       : '1.27'
>Device seems to be: Philips CDD2000.
># cdrecord -v -dummy dev=3D2,0 /scratch/cdimage.iso
>Cdrecord release 1.5 Copyright (C) 1995-1997 J=F6rg Schilling
>TOC Type: 1 =3D CD-ROM
>scsidev: '2,0'
>scsibus: 0 target: 2 lun: 0
>Device type    : Removable CD-ROM
>Version        : 2
>Response Format: 2
>Capabilities   :=20
>Vendor_info    : 'HP      '
>Identifikation : 'C4324/C4325     '
>Revision       : '1.27'
>Device seems to be: Philips CDD2000.
>Using driver for Philips CDD-522 (philips_cdd522).
>Driver flags   :=20
>Track 01: data  137 Mb       =20
>Total size:     158 Mb (15:40.41) =3D 70531 sectors
>cdrecord: Undefined error: 0. test unit ready: scsi sendcmd: no error
>status: 0x2 (CHECK CONDITION)
>Sense Bytes:
>Sense Key: 0xFFFFFFFF [], Segment 0
>Sense Code: 0x00 Qual 0x00 (no additional sense information) Fru 0x0
>Sense flags: Blk 0 (not valid)=20
>cdrecord: CD-Recorder not ready.
># exit

This seems to be the same bug as I found half a year ago:

	The driver in the kernel does not clear an internal
	copy of the SCSI status byte that is returned from
	the SCSI transport ioctl().

Try to talk to the author of the driver.

Joerg

http://www.fokus.gmd.de/usr/schilling	ftp://ftp.fokus.gmd.de/pub/unix
	<precise description of the problem (multiple lines)>