usb_clr_feature man page on SunOS

Man page or keyword search:  
man Server   20652 pages
apropos Keyword Search (all sections)
Output format
SunOS logo
[printable version]

usb_clr_feature(9F)	 Kernel Functions for Drivers	   usb_clr_feature(9F)

NAME
       usb_clr_feature - Clear feature of USB device, interface or endpoint

SYNOPSIS
       #include <sys/usb/usba.h>

       int  usb_clr_feature(dev_info_t	*dip, uint_t request_type, uint_t fea‐
       ture, uint_t which, usb_flags_t flags, void (*callback)	(usb_pipe_han‐
       dle_t  pipe_handle, usb_opaque_t callback_arg, int rval, usb_cb_flags_t
       flags), usb_opaque_t callback_arg);

INTERFACE LEVEL
       Solaris DDI specific (Solaris DDI)

PARAMETERS
       dip

	   Pointer to the device's dev_info structure.

       pipe_handle

	   Pipe handle to device, device interface or endpoint.

       request_type

	   bmRequestType to be used.  One of the following:

	   USB_DEV_REQ_RCPT_DEV - Clear feature on device.

	   USB_DEV_REQ_RCPT_IF - Clear feature on interface.

	   USB_DEV_REQ_RCPT_EP - Clear feature on endpoint.

       feature

	   Feature to be cleared. Can be any  device-defined  device-,	inter‐
	   face-,  or endpoint-specific feature, including the following which
	   are defined in the USB 2.0 specification:

	   USB_EP_HALT - Clear a HALT on an endpoint.

	   USB_DEV_REMOTE_WAKEUP - Clear REMOTE_WAKEUP on a device.

	   USB_DEV_TEST_MODE - Clear TEST_MODE on a device.

       which

	   Device, interface or endpoint on which to  clear the	 feature.  One
	   of:

			Interface number, for interfaces.

			Endpoint number, for endpoints.

			0 for devices.

   flags

       USB_FLAGS_SLEEP is the only flag recognized. Wait for completion and do
       not call callback.

   callback

       Callback handler to notify of asynchronous completion.

   callback_arg

       Second argument passed to callback handler.

DESCRIPTION
       The usb_clr_feature() function clears a specific feature of  a  device,
       interface  or  endpoint.	 This  function	 always	 blocks	 and waits for
       resources if not available, regardless of the flags argument.

       This call blocks for completion if USB_FLAGS_SLEEP is set in flags.  It
       returns	 immediately   and  calls  the	callback  upon	completion  if
       USB_FLAGS_SLEEP is not set.

RETURN VALUES
       USB_SUCCESS		       Feature was successfully cleared.

       USB_INVALID_ARGS		       dip argument is NULL.

       USB_INVALID_PIPE		       pipe_handle argument is NULL

       USB_INVALID_CONTEXT	       Called  from  interrupt	context	  with
				       USB_FLAGS_SLEEP flag set.

       USB_FAILURE		       Clearing of feature was unsuccessful.

CONTEXT
       May  always  be	called from user or kernel context. May be called from
       interrupt context only if USB_FLAGS_SLEEP is not set in flags.

       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_call‐
       back_flags(9S) for more information on callbacks.

EXAMPLES
       if (usb_clr_feature(dip, pipe_handle, USB_DEV_REQ_RCPT_EP,
	      USB_EP_HALT, data_endpoint_num, 0) == USB_FAILURE) {
		  cmn_err (CE_WARN,
		      "%s%d: Error clearing halt condition on data endpoint %d.",
		      ddi_driver_name(dip), ddi_get_instance(dip),
		      data_endpoint_num);
	  }

ATTRIBUTES
       See attributes(5) for descriptions of the following attributes:

       ┌─────────────────────────────┬─────────────────────────────┐
       │      ATTRIBUTE TYPE	     │	    ATTRIBUTE VALUE	   │
       ├─────────────────────────────┼─────────────────────────────┤
       │Architecture		     │PCI-based systems		   │
       ├─────────────────────────────┼─────────────────────────────┤
       │Interface stability	     │Evolving			   │
       ├─────────────────────────────┼─────────────────────────────┤
       │Availability		     │SUNWusb			   │
       └─────────────────────────────┴─────────────────────────────┘

SEE ALSO
       attributes(5),	       usb_get_status(9F),	   usb_pipe_reset(9F),
       usb_pipe_get_state(9F), usb_callback_flags(9S)

SunOS 5.10			  Feb 9 2004		   usb_clr_feature(9F)
[top]

List of man pages available for SunOS

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net