From owner-freebsd-scsi Tue May 5 10:29:15 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA28192 for freebsd-scsi-outgoing; Tue, 5 May 1998 10:29:15 -0700 (PDT) (envelope-from owner-freebsd-scsi@FreeBSD.ORG) Received: from mail.artcom.de ([192.76.129.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id KAA28179 for ; Tue, 5 May 1998 10:29:10 -0700 (PDT) (envelope-from hans@artcom.de) Received: from transrapid.artcom.de by mail.artcom.de with smtp id m0yWlWG-00000nC; Tue, 5 May 1998 19:28:44 +0200 (MEST) Date: Tue, 5 May 1998 19:28:44 +0200 (MEST) From: Hans Huebner To: freebsd-scsi@FreeBSD.ORG Subject: ch.c: CHIOGSTATUS is broken - How should I fix it? Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hello there, today I moved our Q47 DLT robot from an SGI to a FreeBSD we intend to dedicate to backups. The Q47 talks SCSI-2, thus I assumed that the ch driver included with FreeBSD should do fine to control the thing. Unfortunatly, the 'chio status' command did not work. I tracked the problem down to a bug in the driver - The SCSI_DATA_IN flag in the scsi_scsi_cmd call is missing, and as such the driver is unable to transfer the status information from the robot. This was easy to fix, of course. As our DLT robot has a barcode reader, I now intend to add a way to read the complete status information including the barcode label information from the robot. Currently, only a restricted set of flags can be read through the ch driver into the user mode application. This raises the question whether I should actually add a new ioctl (say CHIOGSTATUSEXT) to the ch driver or change the current meaning of the CHIOGSTATUS call to return complete status information to the calling application. The first option would be transparent to binaries making use of the current ch interface, but it would add another ioctl which does behave similar to CHIOGSTATUS, only better. The second option could be implemented with source-level compatibility, requiring a recompile for applications which use the current interface, but it would also keep the ch driver free from redundancy. Given that most FreeBSD users use only software they have the source for, I'd rather change CHIOSTATUS to be smarter. This will only affect a few, if any, users of the ch driver since CHIOCSTATUS is currently broken anyhow. By the way: If anyone volunteers to commit the updated ch driver, I'd promise a manual page update for ch(4) as well ;) Opinions, anyone? -Hans To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message