Bug 7237 - NCR SCSI driver ch0 troubles
Summary: NCR SCSI driver ch0 troubles
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 1998-07-10 21:00 UTC by mkb
Modified: 2001-05-28 01:19 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mkb 1998-07-10 21:00:01 UTC
The HP C1557 changer is correctly identified, but several commands
using the chio interface fail:

# chio status
chio: /dev/ch0: CHIOGSTATUS: Input/output error

The kernel logs the following:
Jul 10 21:40:10 backbus /kernel: ch0(ncr0:3:1): extraneous data discarded.
Jul 10 21:40:10 backbus /kernel: ch0(ncr0:3:1): COMMAND FAILED (9 0) @f0475400.

According to the taper's manual, the changer does understand the
READ ELEMENT STATUS scsi command (0xb8), as defined in scsi_changer.h,
so the error could be within the driver software.

Some other chio commands work (move for example), but status does not.
However, the Amanda network backup suite which we intend to run on the
system makes heavy use of CHIOGSTATUS in it's chio changer method, so
it doesn't work with the current setup.  Tape is inserted, etc., and
the streamer part of the HP taper seems to work properly.

I have found an obviously related entry in the mailing lists archive,
but not found a problem report in the database.
The mailing list entry can be found at the following URL:

http://www.freebsd.org/cgi/getmsg.cgi?fetch=1220314+1222457+/usr/local/www/db/text/1997/freebsd-questions/19971012.freebsd-questions

Fix: 

No fix is known.
How-To-Repeat: 
Configure 2.2-STABLE kernel for ch0 and ncr:
device          ch0     #SCSI media changers
controller      ncr0
options         SCSI_NCR_DEBUG
(The SCSI_NCR_DEBUG flag has no effect on the problem status)

Try a couple of chio commands, some work, the "status" command
does not work:

# chio status
[error as shown above]
Comment 1 Poul-Henning Kamp freebsd_committer freebsd_triage 1998-07-11 09:08:56 UTC
State Changed
From-To: open->suspended

awaiting fix & committer 

I would think that if the hardware lacks support for the "status" command, it will 
be hard to fix this problem. 


Comment 2 mkb 1998-07-12 01:11:59 UTC
Hans Huebner <hans@artcom.de> has pointed me out, that
there is a SCSI_DATA_IN missing when calling scsi_scsi_cmd
in ch.c:ch_getelemstatus.  This only seems to affect the
NCR controller.  I changed it and it seems to work fine.
Here's a patch for that particular problem on 2.2-STABLE:

--- scsi/ch.c   Sun Jul 12 02:08:15 1998
+++ scsi/ch.c.NEW       Sun Jul 12 02:08:08 1998
@@ -603,7 +603,8 @@
         * 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));
+           sizeof(cmd), (u_char *)data, datalen, CHRETRIES, 100000,
NULL,
+           SCSI_DATA_IN));
 }
Comment 3 Jesper Skriver freebsd_committer freebsd_triage 2001-05-28 01:18:55 UTC
State Changed
From-To: suspended->closed

No response to phk's request in '98