Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Mar 1999 18:08:17 +0000
From:      amobbs@allstor-sw.co.uk
To:        freebsd-scsi@freebsd.org
Subject:   Userland CAM drivers
Message-ID:  <80256736.0063A310.00@mail.plasmon.co.uk>

next in thread | raw e-mail | index | archive | help

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




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