From owner-freebsd-scsi Tue Mar 16 10:11:33 1999 Delivered-To: freebsd-scsi@freebsd.org Received: from relay2.mail.uk.psi.net (relay2.mail.uk.psi.net [154.32.107.6]) by hub.freebsd.org (Postfix) with ESMTP id B3940153FB for ; Tue, 16 Mar 1999 10:11:31 -0800 (PST) (envelope-from amobbs@allstor-sw.co.uk) Received: from mail.plasmon.co.uk ([193.115.5.217]) by relay2.mail.uk.psi.net with smtp (Exim 2.02 #3) id 10MyJ6-0002Ui-00 for freebsd-scsi@freebsd.org; Tue, 16 Mar 1999 18:11:12 +0000 Received: by mail.plasmon.co.uk(Lotus SMTP MTA v4.6.2 (693.3 8-11-1998)) id 80256736.0063A37F ; Tue, 16 Mar 1999 18:08:19 +0000 X-Lotus-FromDomain: PLASNOTES From: amobbs@allstor-sw.co.uk To: freebsd-scsi@freebsd.org Message-ID: <80256736.0063A310.00@mail.plasmon.co.uk> Date: Tue, 16 Mar 1999 18:08:17 +0000 Subject: Userland CAM drivers Mime-Version: 1.0 Content-type: text/plain; charset=us-ascii Content-Disposition: inline Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org I'm trying to write a userland driver using camlib to do fairly straightforward device control and I/O on a passthrough driver. So far, I've had no problem with control type commands (test unit ready, mode sense/select etc.) but read and write are giving me problems. Just using read(2)/write(2) on the fd in the cam_device seemed to cause serious problems, and I'm not sure that even using scsi_read_write followed by a cam_send_ccb is working. (I'm getting constent Device in Reset Sequence with that, but I'm willing to believe that that's a bug in my code.) So my questions: Do I have to use scsi_read_write followed by cam_send_ccb rather than read/write on the fd? In general, how should I do I/O through a passthrough device? Is there an documentation on this sort of thing, even that written in C? I used camcontrol.c to get the control side working, but the I/O side seems to only be done by kernel drivers, which use scsi_read_write followed by xpt_action which doesn't appear to be available to me. Andrew. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message