Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 2 Aug 1997 11:42:33 -0400 (EDT)
From:      Peter Dufault <dufault@hda.com>
To:        root@deadline.snafu.de (Andreas S. Wetzel)
Cc:        scsi@freebsd.org
Subject:   Re: Need help on writing SCSI scanner driver
Message-ID:  <199708021542.LAA10894@hda.hda.com>
In-Reply-To: <m0wubTK-0004jwC@deadline.snafu.de> from "Andreas S. Wetzel" at "Aug 2, 97 12:31:42 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
Follow up to -scsi, so I'll include the whole mail.

> Some time ago I started to write a high level SCSI driver for my
> AGFA Studio Star scanner. Now I'm facing some minor problems in
> the overall design of the driver code. My imagination of a scanner
> driver has been to have a device that is opened by the application
> software by a open(2) call and than configured to the correct scan
> parameters using ioctls before the scan data is retrieved via one
> or more read(2) calls. The problem in this context seems to be
> that the scanner is in fact able to deliver all the scan data
> at once, but the I/O subsystem seems to split a big read call into
> several 64k segments. Another problem is that the scanner expects
> the READ_SCANNED_DATA SCSI command to have a number of scanlines
> (not bytes) attached, so I will have to convert the number of
> bytes from a read(2) call to a number of scan lines internally
> in the driver code. My question is, if it is possible to read
> in all the scan data at once from the scanner (wheter or not
> it is handed to the user process in 64k segments). In other words,
> I do want to only issue a READ_SCANNED_DATA SCSI command to the
> scanner once, but not everytime a 64k segment is read by the user
> process.

I need to know more about the scanner before I can be intelligent.
I assume Agfa makes everything from top end 4k pixel/inch scanners
to desktop systems, and what you do depends on what the device is.

Also, how the device behaves is important.  If you send down a
window size, start scan, and then start reading back data and as
long as you keep the device FIFO empty it will continue to scan at
peak performance there is little reason to try to buffer the image
in memory or transfer the image in a single SCSI call.  After all,
for most run of the mill scanners the mechanical motion will not
saturate the SCSI bus (I know this is not true for high end devices
such as this may be).

Post a little more info about what kind of scanner this is, peak
performance, whether it will disconnect/reconnect properly, and
how it appears to want to be driven based on the documentation and
I'll try again.

Peter

-- 
Peter Dufault (dufault@hda.com)   Realtime development, Machine control,
HD Associates, Inc.               Safety critical systems, Agency approval



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