Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 May 1998 14:39:18 -0600 (MDT)
From:      "Kenneth D. Merry" <ken@plutotech.com>
To:        hans@artcom.de (Hans Huebner)
Cc:        freebsd-scsi@FreeBSD.ORG
Subject:   Re: ch.c: CHIOGSTATUS is broken - How should I fix it?
Message-ID:  <199805052039.OAA15238@panzer.plutotech.com>
In-Reply-To: <Pine.BSF.3.96.980505191042.17499A-100000@transrapid.artcom.de> from Hans Huebner at "May 5, 98 07:28:44 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
Hans Huebner wrote...
> 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?

	Well, no one else has spoken up, so I will. :)  IMO, you should
change the CHIOGSTATUS ioctl to return all the relevant information.  If
folks update their kernels, they'd better update their userland binaries 
as well.

	I just ported the NetBSD ch(4) driver to CAM a few weeks ago.  It
will be in the next CAM snapshot.  The FreeBSD changer driver (the one in
-current) is basically an older version of the same driver.  I would be
interested to see your changes to display volume tags; I think they would
be useful, and I'd like to add them to the CAM changer driver.

	If you want to implement your changes under CAM, I can give you
the CAM changer driver and the chio changes in patch form against the last
snapshot.  Or, if you want, send me private email and I can give you access
to the CAM source repository.  For information on CAM, see:

ftp://ftp.FreeBSD.org/pub/FreeBSD/cam/README
or
ftp://ftp.kdm.org/pub/FreeBSD/cam/README

	If you'd rather put your changer fixes in -current, I'm still
interested but I can't commit them for you.  (I'm not a committer.)  I'm
sure someone else would be willing to do it, though.


Ken
-- 
Kenneth Merry
ken@plutotech.com

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-scsi" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199805052039.OAA15238>