Open SCSI Integrator's Manual for NonStop S-Series Servers

The Open SCSI I/O Process (IOP)
Open SCSI Integrator’s Manual for NonStop Servers422988-002
4-4
Using the WRITEREAD[X] Procedures
filenum
When an application or driver successfully opens a SCSI device, a file-number
value is returned. This value should be passed to the filenum parameter when
calling WRITEREAD to send SCSI commands to the device.
buffer
This parameter specifies the buffer that contains control information as well as any
data the application or driver sends to or receives from the device.
On return, the buffer contains updated control information and sense information
that was requested and needed, and any data that was read from the device because
of the request.
The buffer is made up of the following basic components:
A header block.
A control field whose structure corresponds to that of the CAM control block
(CCB).
A sense-buffer field. This field is optional. Sense information is normally
returned when a check condition occurs on the device.
A data-buffer field. This field is optional. It must appear when the specified
operation sends data to or receives data from the device.
The buffer is described in detail in Structure of the WRITEREAD Buffer
on page
4-5.
write-count
This parameter specifies the number of bytes that are to be transferred from the
buffer to the IOP. WRITEREAD allows a value in the range 0 through 57344; in
reality, the lower limit is at least the size of the control information.
read-count
This parameter specifies the maximum number of bytes that the application or driver
wants to read back from the IOP. WRITEREAD allows a value in the range 0
through 57344; in reality, the lower limit is at least the size of the control
information.
count-read
This optional parameter is used for waited I/O. It returns the number of bytes
actually read.
tag
The value of this optional parameter uniquely identifies a request when using nowait
I/O. The system stores the tag value until the I/O operation finishes, at which time
the system returns the tag value to the program in the tag parameter of the
AWAITIO[X] procedure call.