From owner-freebsd-hackers Sat Aug 2 03:32:04 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id DAA16735 for hackers-outgoing; Sat, 2 Aug 1997 03:32:04 -0700 (PDT) Received: from cenotaph.snafu.de (gw-deadnet.snafu.de [194.121.229.33]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id DAA16717 for ; Sat, 2 Aug 1997 03:31:56 -0700 (PDT) Received: by cenotaph.snafu.de from deadline.snafu.de using smtp id m0wubTL-000K93C; Sat, 2 Aug 1997 12:31:43 +0200 (CEST) (Smail-3.2 1996-Jul-4 #1) Received: by deadline.snafu.de id m0wubTK-0004jwC; Sat, 2 Aug 1997 12:31:42 +0200 (CEST) (Smail-3.2 1996-Jul-4 #1) Message-Id: From: root@deadline.snafu.de (Andreas S. Wetzel) Subject: Need help on writing SCSI scanner driver To: hackers@freebsd.org Date: Sat, 2 Aug 1997 12:31:42 +0200 (CEST) Organization: A world stranger than you have ever imagined. X-Mailer: ELM [version 2.4ME+ PL13] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Hi! --- 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. Thankful for any advice. Rergards, Mickey -- (__) (@@) Andreas S. Wetzel Mail: mickey@deadline.snafu.de /-------\/ Utrechter Strasse 41 Web: http://cenotaph.snafu.de/ / | || 13347 Berlin Fon: <+4930> 456 066 90 * ||----|| Germany Fax: <+4930> 456 066 91/92 ~~ ~~