From hans@artcom.de  Tue May  5 10:41:22 1998
Received: from mail.artcom.de ([192.76.129.2])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id KAA01620
          for <FreeBSD-gnats-submit@freebsd.org>; Tue, 5 May 1998 10:41:16 -0700 (PDT)
          (envelope-from hans@artcom.de)
Received: by mail.artcom.de 
	id m0yWli1-00000nC; Tue, 5 May 1998 19:40:53 +0200 (MEST)
Message-Id: <m0yWli1-00000nC@mail.artcom.de>
Date: Tue, 5 May 1998 19:40:53 +0200 (MEST)
From: hans@artcom.de
Reply-To: hans@artcom.de
To: FreeBSD-gnats-submit@freebsd.org
Subject: sys/scsi/ch.c CHIOGSTATUS is broken
X-Send-Pr-Version: 3.2

>Number:         6528
>Category:       kern
>Synopsis:       sys/scsi/ch.c CHIOGSTATUS is broken
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue May  5 10:40:01 PDT 1998
>Closed-Date:    Wed May 6 02:11:31 PDT 1998
>Last-Modified:  Wed May  6 02:11:42 PDT 1998
>Originator:     Hans Huebner
>Release:        FreeBSD 2.2.6-RELEASE i386
>Organization:
Art+Com GmbH, Berlin, Germany
>Environment:

2.2.6-RELEASE, Pentium/PCI-based system with Symbios Logic SYM22802 SCSI
controller and Transitional Technologies Q47 DLT robot.

>Description:

The CHIOGSTATUS ioctl of the SCSI media changer driver (sys/scsi/ch.c)
is broken.  It omits the SCSI_DATA_IN flag in the SCSI READ ELEMENT
STATUS command, which makes the 'chio status' command fail.

>How-To-Repeat:

chio status

>Fix:
	
*** ch.c        1997/03/07 09:34:26     1.34
--- ch.c        1998/05/05 17:37:30
***************
*** 603,609 ****
         * Send command to changer.
         */
        return (scsi_scsi_cmd(sc->sc_link, (struct scsi_generic *)&cmd,
!           sizeof(cmd), (u_char *)data, datalen, CHRETRIES, 100000, NULL, 0));
  }
  
  
--- 603,609 ----
         * Send command to changer.
         */
        return (scsi_scsi_cmd(sc->sc_link, (struct scsi_generic *)&cmd,
!           sizeof(cmd), (u_char *)data, datalen, CHRETRIES, 100000, NULL, SCSI_DATA_IN));
  }
  
  

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: phk 
State-Changed-When: Wed May 6 02:11:31 PDT 1998 
State-Changed-Why:  
committed, thanks! 
>Unformatted:
Hans Huebner
