This section describes the $QIO function codes that the generic
driver supports.
IO$_READxBLK
The driver treats read virtual, logical, and physical in the
same way. Note that normal $QIO processing rules for logical and physical
block I/O still apply and are enforced by the $QIO dispatching code.
When a read is queued to a pipe, the driver checks to see if there
is an outstanding I/O for that pipe. If one is found, the request
is placed in the I/O queue of the pipe. If no I/O is outstanding,
the driver starts the I/O queue for that pipe.
The driver treats parameters from the $QIO P1-P6 as follows:
Status return codes are the usual OpenVMS ones for I/O devices.
Because USB device status codes are a longword in length, after first
checking the status word of the I/O status block, the application
must check the second longword of the I/O status block. The second
longword contains the USB status code for the request. The status
word in the IOSB can indicate success but have a USB error in the
second longword, shown as follows:
IO$_WRITExBLK
The driver treats virtual, logical, and physical writes in the
same way. Note that normal $QIO processing rules for logical and physical
block I/O still apply and are enforced by the $QIO dispatching code.
When a write is queued to a pipe, the driver checks to see if
there is an outstanding I/O for that pipe. If one is found, the request
is placed in the I/O queue of the pipe. If no I/O is outstanding,
the driver starts an I/O queue for that pipe.
The driver treats parameters from the $QIO P1-P6 as follows:
Status return codes are the usual OpenVMS ones for I/O devices.
Because USB device status codes are a longword in length, after first
checking the status word of the I/O status block, the application
must check the second longword of the I/O status block. The second
longword contains the USB status code for the request. (The status
word in the IOSB can indicate success but have a USB error in the
second longword.)
IO$_SETMODE/CHAR
Enable Unplug notification AST: This item allows an application to associate an AST that is delivered
if a device is unplugged. You can use any channel to enable this AST.
HP recommends that you use the control channel for this AST. To cancel
the AST, do not supply an AST routine address and parameter.
The driver treats parameters from the $QIO P1-P6 as follows:
Associate channel: Use this
command to associate an OpenVMS channel to a pipe and to break the
association of a channel to a pipe.
The driver treats parameters from the $QIO P1-P6 as follows:
Set pipe state: Use this command
to set the state of a pipe.
The driver treats parameters from the $QIO P1-P6 as follows:
Send a control request:Use
this command to send a device request to the device control pipe.
For more details about device requests, see section 9.3 USB 1.1 or
2.0 specifications at http://www.usb.org/developers/docs/.
The driver treats parameters from the $QIO P1-P6 as follows:
The following table shows the P1 buffer:
IO$_SENSEMODE/CHAR
Get number of pipes
Use this command to obtain the number of pipes. Make this the
first operation that an application performs using the driver. Use
the channel for the control connection for this operation.
The driver treats parameters from the $QIO P1-P6 as follows:
Get pipe handles
Use this command to obtain all the pipe handles. The buffer
must have one quadword for each pipe of the device.
The driver treats parameters from the $QIO P1-P6 as follows:
Get pipe direction
Use this command to obtain the direction of a pipe associated
with its handle.
The driver treats parameters from the $QIO P1-P6 as follows:
Get pipe type
Use this command to obtain the type of pipe associated with
its handle.
The driver treats parameters from the $QIO P1-P6 as follows:
Get pipe state
Use this command to obtain the state of the pipe.
The driver treats parameters from the $QIO P1-P6 as follows:
Get pipe size
Use this command to obtain the size of the largest transfer
on the pipe. (This is really the largest size that is sent on the
bus in one transfer.) Actual requests can be larger. The driver takes
care of splitting the transfer up into appropriately sized bus transfers.
The driver treats parameters from the $QIO P1-P6 as follows:
Get pipe descriptor
Use this routine is used to obtain the device descriptor from
the device.
The driver treats parameters from the $QIO P1-P6 as follows:
Table E-1 Format of the Device Descriptor
unsigned char | ug$b_blength | Descriptor length in bytes |
unsigned char | ug$b_bdescriptortype | Descriptor type constant 0X01 |
unsigned short int | ug$w_bcdusb | BCD-encoded specification release number |
unsigned char | ug$b_bdeviceclass | Device class code |
unsigned char | ug$b_bdevicesubclass | Device sub class code |
unsigned char | ug$b_bdeviceprotocol | Device protocol |
unsigned char | ug$b_bmaxpacket | Maximum packet size for control pipe; 8, 16, 32, 64 are valid. |
unsigned short int | ug$w_idvendor | Vendor ID |
unsigned short int | ug$w_idproduct | Product ID |
unsigned short int | ug$w_bcddevice | BCD encoded device release number. |
unsigned char | ug$b_imanufacturer | Index of string descriptor that describes the manufacturer. |
unsigned char | ug$b_iproduct | Index of string descriptor that describes the product. |
unsigned char | ug$b_iserailnumber | ndex of string descriptor of device serial number. |
unsigned char | ug$b_bnumconfigurations | Number of possible device configurations. |
Get interface descriptor
Use this command to obtain the interface descriptor from the
device.
The driver treats parameters from the $QIO P1-P6 as follows:
Table E-2 Format of the Interface Descriptor
unsigned char | ug$b_blength | Descriptor length in bytes |
unsigned char | ug$b_bdescriptortype | Descriptor type constant 0X04 |
unsigned char | ug$b_binterfacenumber | Zero-based count of this interface |
unsigned char | ug$b_balternatesetting | Used to select alternate setting for the interface |
unsigned char | ug$b_bnumendpoints | Number of endpoints for the interface |
unsigned char | ug$b_binterfaceclass | Interface class code |
unsigned char | ug$b_binterfacesubclass | Interface subclass code |
unsigned char | ug$b_binterfaceprotocol | Interface protocol |
unsigned char | ug$b_iinterface | Index of string descriptor that describes this interface |