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)
scsi_get_device_type_scsi_options(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)
- Abort queued requests from a USB pipe and reset the pipe
#include <sys/usb/usba.h> void usb_pipe_reset(dev_info_t *dip, usb_pipe_handle_t pipe_handle, usb_flags_t usb_flags, void (*callback)(usb_pipe_handle_t cb_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 the pipe to reset. Cannot be the handle to the default control pipe.
USB_FLAGS_SLEEP is the only flag recognized. Wait for completion.
Function called on completion if the USB_FLAGS_SLEEP flag is not specified. If NULL, no notification of completion is provided.
Second argument to callback function.
Call usb_pipe_reset() to reset a pipe which is in an error state, or to abort a current request and clear the pipe. The usb_pipe_reset() function can be called on any pipe other than the default control pipe.
A pipe can be reset automatically when requests sent to the pipe have the USB_ATTRS_AUTOCLEARING attribute specified. Client drivers see an exception callback with the USB_CB_STALL_CLEARED callback flag set in such cases.
Stalls on pipes executing requests without the USB_ATTRS_AUTOCLEARING attribute set must be cleared by the client driver. The client driver is notified of the stall via an exception callback. The client driver must then call usb_pipe_reset() to clear the stall.
The usb_pipe_reset() function resets a pipe as follows:
|
Requests to reset the default control pipe are not allowed. No action is taken on a pipe which is closing.
If USB_FLAGS_SLEEP is specified in flags, this function waits for the action to complete before calling the callback handler and returning. If not specified, this function queues the request and returns immediately, and the specified callback is called upon completion.
callback is the callback handler. It takes the following arguments:
Handle of the pipe to reset.
Callback_arg specified to usb_pipe_reset().
Return value of the reset call.
Status of the queueing operation. Can be:
USB_CB_NO_INFO — Callback was uneventful.
USB_CB_ASYNC_REQ_FAILED — 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 successfully reset.
pipe_handle specifies a pipe which is closed or closing.
dip or pipe_handle arguments are NULL. USB_FLAGS_SLEEP is clear and callback is NULL.
Called from interrupt context with the USB_FLAGS_SLEEP flag set.
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 callback handlers of interrupt-IN and isochronous-IN requests which are terminated by these commands are called with a completion reason of USB_CR_STOPPED_POLLING.
Exception handlers of incomplete bulk requests are called with a completion reason of USB_CR_FLUSHED.
Exception handlers of unstarted requests are called with USB_CR_PIPE_RESET.
Note that messages mirroring the above errors are logged to the console logfile on error. This provides status for calls which could not otherwise provide status.
May be called from user or kernel context regardless of arguments. May be called from any callback with the USB_FLAGS_SLEEP clear. May not be called from a callback executing in interrupt context if the USB_FLAGS_SLEEP flag is set.
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.
void post_reset_handler( usb_pipe_handle_t, usb_opaque_t, int, usb_cb_flags_t); /* * Do an asynchronous reset on bulk_pipe. * Execute post_reset_handler when done. */ usb_pipe_reset(dip, bulk_pipe, 0, post_reset_handler, arg); /* Do a synchronous reset on bulk_pipe. */ usb_pipe_reset(dip, bulk_pipe, USB_FLAGS_SLEEP, NULL, NULL);
See attributes(5) for descriptions of the following attributes:
|
attributes(5), usb_get_cfg(9F), usb_pipe_bulk_xfer(9F), usb_pipe_close(9F), usb_get_status(9F), usb_pipe_ctrl_xfer(9F), usb_pipe_drain_reqs(9F), usb_pipe_get_state(9F), usb_pipe_intr_xfer(9F), usb_pipe_isoc_xfer(9F), usb_pipe_open(9F), usb_pipe_stop_intr_polling(9F), usb_pipe_stop_isoc_polling(9F), usb_callback_flags(9S)