Subject: kern/6214: ch(4) and block mode descriptors
To: None <gnats-bugs@gnats.netbsd.org>
From: Chris Jones <cjones@hideo.nervana.montana.edu>
List: netbsd-bugs
Date: 09/29/1998 16:29:24
>Number:         6214
>Category:       kern
>Synopsis:       ch(4) and block mode descriptors
>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 29 15:35:00 1998
>Last-Modified:
>Originator:     Chris Jones
>Organization:
Center for Computational Biology, Montana State University
>Release:        Sep 28, 1998
>Environment:
	
System: NetBSD hideo 1.3H NetBSD 1.3H (HIDEO) #19: Tue Sep 29 15:07:29 MDT 1998 root@hideo:/usr/src/sys/arch/i386/compile/HIDEO i386


>Description:
I've got a CDL-1100, which is a Sony CD-ROM jukebox.  Using a normal
kernel, it doesn't work.  This appears to be a result of block
descriptors being disabled in the ch(4) driver.
>How-To-Repeat:
See above, and message posted to current-users.
>Fix:
This patch makes the device work with my setup.  However, it's
obviously a hack.  There should be a better way to do this, but I
don't know how.

*** ch.c-old	Tue Sep 29 16:14:17 1998
--- ch.c-new	Tue Sep 29 16:13:59 1998
***************
*** 678,684 ****
  	bzero(&cmd, sizeof(cmd));
  	bzero(&sense_data, sizeof(sense_data));
  	cmd.opcode = SCSI_MODE_SENSE;
- 	cmd.byte2 |= 0x08;	/* disable block descriptors */
  	cmd.page = 0x1d;
  	cmd.length = (sizeof(sense_data) & 0xff);
  	error = scsipi_command(sc->sc_link,
--- 678,683 ----
***************
*** 711,717 ****
  	/*
  	 * XXX: Note: not all changers can deal with disabled block descriptors
  	 */
- 	cmd.byte2 = 0x08;	/* disable block descriptors */
  	cmd.page = 0x1f;
  	cmd.length = (sizeof(sense_data) & 0xff);
  	error = scsipi_command(sc->sc_link,
--- 710,715 ----
>Audit-Trail:
>Unformatted: