Skip Navigation Links | |
Exit Print View | |
man pages section 9: DDI and DKI Kernel Functions Oracle Solaris 11 Information Library |
csx_AccessConfigurationRegister(9F)
csx_Parse_CISTPL_BYTEORDER(9F)
csx_Parse_CISTPL_CFTABLE_ENTRY(9F)
csx_Parse_CISTPL_DEVICEGEO(9F)
csx_Parse_CISTPL_DEVICEGEO_A(9F)
csx_Parse_CISTPL_DEVICE_OA(9F)
csx_Parse_CISTPL_DEVICE_OC(9F)
csx_Parse_CISTPL_LINKTARGET(9F)
csx_Parse_CISTPL_LONGLINK_A(9F)
csx_Parse_CISTPL_LONGLINK_C(9F)
csx_Parse_CISTPL_LONGLINK_MFC(9F)
ddi_get_soft_iblock_cookie(9F)
ddi_intr_get_supported_types(9F)
ddi_prop_lookup_byte_array(9F)
ddi_prop_lookup_int64_array(9F)
ddi_prop_lookup_string_array(9F)
ddi_prop_update_byte_array(9F)
ddi_prop_update_int64_array(9F)
ddi_prop_update_string_array(9F)
ldi_prop_lookup_byte_array(9F)
ldi_prop_lookup_int64_array(9F)
ldi_prop_lookup_string_array(9F)
mac_prop_info_set_default_link_flowctrl(9F)
mac_prop_info_set_default_str(9F)
mac_prop_info_set_default_uint8(9F)
mac_prop_info_set_range_uint32(9F)
net_event_notify_unregister(9F)
net_instance_notify_register(9F)
net_instance_notify_unregister(9F)
net_instance_protocol_unregister(9F)
net_protocol_notify_register(9F)
nvlist_lookup_boolean_array(9F)
nvlist_lookup_boolean_value(9F)
nvlist_lookup_nvlist_array(9F)
nvlist_lookup_string_array(9F)
nvlist_lookup_uint16_array(9F)
nvlist_lookup_uint32_array(9F)
nvlist_lookup_uint64_array(9F)
nvpair_value_boolean_array(9F)
pci_plist_lookup_int16_array(9F)
pci_plist_lookup_int32_array(9F)
pci_plist_lookup_int64_array(9F)
pci_plist_lookup_int8_array(9F)
pci_plist_lookup_string_array(9F)
pci_plist_lookup_uint16_array(9F)
pci_plist_lookup_uint32_array(9F)
pci_plist_lookup_uint64_array(9F)
pci_plist_lookup_uint8_array(9F)
scsi_get_device_type_scsi_options(9F)
scsi_get_device_type_string(9F)
scsi_sense_cmdspecific_uint64(9F)
usb_get_current_frame_number(9F)
usb_get_max_pkts_per_isoc_request(9F)
usb_pipe_get_max_bulk_transfer_size(9F)
usb_pipe_stop_intr_polling(9F)
usb_pipe_stop_isoc_polling(9F)
- Close and cleanup a USB device pipe
#include <sys/usb/usba.h> void usb_pipe_close(dev_info_t *dip, usb_pipe_handle_t pipe_handle, usb_flags_t flags, void (*callback)(usb_pipe_handle_t pipe_handle, usb_opaque_t arg, int rval, usb_cb_flags_t flags), usb_opaque_t callback_arg);
Solaris DDI specific (Solaris DDI)
Pointer to the device's dev_info structure.
Handle of pipe to close. Cannot be a handle to the default control pipe.
USB_FLAGS_SLEEP is the only flag recognized. Set it to wait for resources, for pipe to become free, and for all pending request callbacks to complete.
This function is called on completion if the USB_FLAGS_SLEEP flag is not specified. Mandatory if the USB_FLAGS_SLEEP flag has not been specified.
Second argument to callback function.
The usb_pipe_close() function closes the pipe pointed to by pipe_handle, releases all related resources and then frees the pipe handle. This function stops polling if the pipe to be closed is an interrupt-IN or isochronous-IN pipe. The default control pipe cannot be closed.
Pipe cleanup includes waiting for the all pending requests in the pipe to finish, and then flushing residual requests remaining after waiting for several seconds. Exception handlers of flushed requests are called with a completion reason of USB_CR_FLUSHED.
If USB_FLAGS_SLEEP is specified in flags, wait for all cleanup operations to complete before calling the callback handler and returning.
If USB_FLAGS_SLEEP is not specified in flags, an asynchronous close (to be done in a separate thread) is requested. Return immediately. The callback handler is called after all pending operations are completed.
The callback parameter is the callback handler and takes the following arguments:
Handle of the pipe to close.
Callback_arg specified to usb_pipe_close().
Return value of close operation
Status of queueing operation. Can be:
Callback was uneventful.
Error starting asynchronous request.
Status is returned to the caller via the callback handler's rval argument. Possible callback hander rval argument values are:
Pipe handle specifies a pipe which is closed or closing.
dip or pipe_handle arguments are NULL.
Called from interrupt context.
Pipe handle specifies the default control pipe.
Asynchronous resources are unavailable. In this case, USB_CB_ASYNC_REQ_FAILED is passed in as the callback_flags arg to the callback hander.
Exception handlers of any queued requests which were flushed are called with a completion reason of USB_CR_FLUSHED. Exception handlers of periodic pipe requests which were terminated are called with USB_CR_PIPE_CLOSING.
Note that messages mirroring the above errors are logged to the console logfile on error. (This provides status for calls which otherwise could provide status).
May be called from user or kernel context regardless of arguments. May not be called from a callback executing in interrupt context. Please see usb_callback_flags(9S) for more information on callbacks.
If the USB_CB_ASYNC_REQ_FAILED bit is clear in usb_cb_flags_t, the callback, if supplied, can block because it is executing in kernel context. Otherwise the callback cannot block. Please see usb_callback_flags(9S) for more information on callbacks.
/* Synchronous close of pipe. */ usb_pipe_close(dip, pipe, USB_FLAGS_SLEEP, NULL, NULL); -------- /* Template callback. */ void close_callback(usb_pipe_handle_t, usb_opaque_t, usb_cb_flags_t); /* Asynchronous close of pipe. */ usb_pipe_close(dip, pipe, 0, close_callback, callback_arg);
See attributes(5) for descriptions of the following attributes:
|
attributes(5), usb_get_status(9F), usb_pipe_drain_reqs(9F), usb_pipe_get_state(9F), usb_pipe_open(9F), usb_pipe_reset(9F), usb_callback_flags(9S)