*BSD News Article 31402


Return to BSD News archive

Newsgroups: comp.os.386bsd.bugs
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!msuinfo!agate!tfs.com!julian
From: julian@tfs.com (Julian Elischer)
Subject: Re: User SCSI
Message-ID: <Cqvn56.AHo@tfs.com>
Organization: TRW Financial Systems, Oakland, CA
References: <Cqon5K.JFC@cogsci.ed.ac.uk>
Date: Sat, 4 Jun 1994 14:34:18 GMT
Lines: 52

In article <Cqon5K.JFC@cogsci.ed.ac.uk> richard@cogsci.ed.ac.uk (Richard Tobin) writes:
>I'm trying to write a driver for a HP ScanJet, using the "unknown"
>SCSI device (ie I'm trying to do it all in user mode).  I'm trying to
>do this under FreeBSD 1.1, but NetBSD looks similar.
YEY! someone's going to use it!
yes the new NetBSD code is based on the same release of the scsi code as the 
FreeBSD code.

>
>Various things don't seem to work quite right, but the most serious
>is that I can't tell how much data came from the scanner.  The
>datalen_used field of the SCSI request does not appear to be filled
>in correctly.
The problem is known and it is really a philasophical one rather than a technical
one.
The AHA driver doesn't use the commands that return DMA counts, becasue some
of the early models won't work with those commands.
The other adapters may or may not do this , but I never didn't want to provide a
facility that would only work on some adapters and not others.. (failing silently)
I don't have the set-up at the momment to provide a fix,
but suggest you talk to hd@world.std.com (last known address) who has done some
work on this.

The tape drive derives it's residual counts from information sent by the drive itself
innthe request-sense data, and can therefore get by without this information from
the adapter, however I'm willing to believe that the HP scanjet doesn't supply
such sense information.

>
>The lines in scsi_ioctl.c that sets datalen_used has the comment
>"probably rubbish" and this seems to be true.  The adaptor code
>appears to always set xs->resid to 0.  Is it possible to make this
>work?

really it's only 7/8 done and I ran out of free time about there.

What adapter are you using?
I think I should allow those adapters than can derive residuals to do so,
but I'm just a bit out of it at the moment.
>
>Alternatively, does anyone have a better user-mode scsi driver?
as I said.. peter Dufault (HD@world.std.com) has been doing some on this.

>
>-- Richard
>-- 
>Richard Tobin, HCRC, Edinburgh University                 R.Tobin@ed.ac.uk
>
>"Your monkey has got it right, sir."  - HHGTTG


julian