usb_buffer_dmasync (9) Linux Manual Page
usb_buffer_dmasync – synchronize DMA and CPU view of buffer(s) Synopsis void usb_buffer_dmasync(struct urb *urb); Arguments urb urb whose transfer_buffer/setup_packet will be synchronized Copyright
usb_buffer_dmasync – synchronize DMA and CPU view of buffer(s) Synopsis void usb_buffer_dmasync(struct urb *urb); Arguments urb urb whose transfer_buffer/setup_packet will be synchronized Copyright
usb_block_urb – reliably prevent further use of an URB Synopsis void usb_block_urb(struct urb *urb); Arguments urb pointer to URB to be blocked, may be NULL Description After the routine has run, attempts to resubmit the URB will fail with error -EPERM. Thus even if the URB’s completion handler always tries to resubmit, it will not…
usb_autopm_put_interface_no_suspend – decrement a USB interface’s PM-usage counter Synopsis void usb_autopm_put_interface_no_suspend(struct usb_interface *intf); Arguments intf the usb_interface whose counter should be decremented Description This routine decrements intf‘s usage counter but does not carry out an autosuspend. This routine can run in atomic context. Copyright
usb_autopm_put_interface_async – decrement a USB interface’s PM-usage counter Synopsis void usb_autopm_put_interface_async(struct usb_interface *intf); Arguments intf the usb_interface whose counter should be decremented Description This routine does much the same thing as usb_autopm_put_interface: It decrements intf‘s usage counter and schedules a delayed autosuspend request if the counter is <= 0. The difference is that it does…
usb_autopm_put_interface – decrement a USB interface’s PM-usage counter Synopsis void usb_autopm_put_interface(struct usb_interface *intf); Arguments intf the usb_interface whose counter should be decremented Description This routine should be called by an interface driver when it is finished using intf and wants to allow it to autosuspend. A typical example would be a character-device driver when its…
usb_autopm_get_interface_no_resume – increment a USB interface’s PM-usage counter Synopsis void usb_autopm_get_interface_no_resume(struct usb_interface *intf); Arguments intf the usb_interface whose counter should be incremented Description This routine increments intf‘s usage counter but does not carry out an autoresume. This routine can run in atomic context. Copyright
usb_autopm_get_interface_async – increment a USB interface’s PM-usage counter Synopsis int usb_autopm_get_interface_async(struct usb_interface *intf); Arguments intf the usb_interface whose counter should be incremented Description This routine does much the same thing as usb_autopm_get_interface: It increments intf‘s usage counter and queues an autoresume request if the device is suspended. The differences are that it does not perform…
usb_autopm_get_interface – increment a USB interface’s PM-usage counter Synopsis int usb_autopm_get_interface(struct usb_interface *intf); Arguments intf the usb_interface whose counter should be incremented Description This routine should be called by an interface driver when it wants to use intf and needs to guarantee that it is not suspended. In addition, the routine prevents intf from being…
usb_anchor_urb – anchors an URB while it is processed Synopsis void usb_anchor_urb(struct urb *urb, struct usb_anchor *anchor); Arguments urb pointer to the urb to anchor anchor pointer to the anchor Description This can be called to have access to URBs which are to be executed without bothering to track them Copyright
usb_anchor_suspend_wakeups – Synopsis void usb_anchor_suspend_wakeups(struct usb_anchor *anchor); Arguments anchor the anchor you want to suspend wakeups on Description Call this to stop the last urb being unanchored from waking up any usb_wait_anchor_empty_timeout waiters. This is used in the hcd urb give- back path to delay waking up until after the completion handler has run. Copyright
usb_anchor_resume_wakeups – Synopsis void usb_anchor_resume_wakeups(struct usb_anchor *anchor); Arguments anchor the anchor you want to resume wakeups on Description Allow usb_wait_anchor_empty_timeout waiters to be woken up again, and wake up any current waiters if the anchor is empty. Copyright
usb_anchor_empty – is an anchor empty Synopsis int usb_anchor_empty(struct usb_anchor *anchor); Arguments anchor the anchor you want to query Return 1 if the anchor has no urbs associated with it. Copyright
usb_altnum_to_altsetting – get the altsetting structure with a given alternate setting number. Synopsis struct usb_host_interface *usb_altnum_to_altsetting(const struct usb_interface *intf, unsigned int altnum); Arguments intf the interface containing the altsetting in question altnum the desired alternate setting number Description This searches the altsetting array of the specified interface for an entry with the correct bAlternateSetting value….
usb_alloc_urb – creates a new urb for a USB driver to use Synopsis struct urb *usb_alloc_urb(int iso_packets, gfp_t mem_flags); Arguments iso_packets number of iso packets for this urb mem_flags the type of memory to allocate, see kmalloc for a list of valid options for this. Description Creates an urb for the USB driver to use,…
usb_alloc_streams – allocate bulk endpoint stream IDs. Synopsis int usb_alloc_streams(struct usb_interface *interface, struct usb_host_endpoint **eps, unsigned int num_eps, unsigned int num_streams, gfp_t mem_flags); Arguments interface alternate setting that includes all endpoints. eps array of endpoints that need streams. num_eps number of endpoints in the array. num_streams number of streams to allocate. mem_flags flags hcd should…
usb_alloc_dev – usb device constructor (usbcore-internal) Synopsis struct usb_device *usb_alloc_dev(struct usb_device *parent, struct usb_bus *bus, unsigned port1); Arguments parent hub to which device is connected; null to allocate a root hub bus bus used to access the device port1 one-based index of port; ignored for root hubs Context !in_interrupt Description Only hub drivers (including virtual…
usb_alloc_coherent – allocate dma-consistent buffer for URB_NO_xxx_DMA_MAP Synopsis void *usb_alloc_coherent(struct usb_device *dev, size_t size, gfp_t mem_flags, dma_addr_t *dma); Arguments dev device the buffer will be used with size requested buffer size mem_flags affect whether allocation may block dma used to return DMA address of buffer Return Either null (indicating no buffer could be allocated), or…
usb_add_hcd – finish generic HCD structure initialization and register Synopsis int usb_add_hcd(struct usb_hcd *hcd, unsigned int irqnum, unsigned long irqflags); Arguments hcd the usb_hcd structure to initialize irqnum Interrupt line to allocate irqflags Interrupt type flags Description Finish the remaining parts of generic HCD initialization: allocate the buffers of consistent memory, register the bus, request…
usb_add_function – add a function to a configuration Synopsis int usb_add_function(struct usb_configuration *config, struct usb_function *function); Arguments config the configuration function the function being added Context single threaded during gadget setup Description After initialization, each configuration must have one or more functions added to it. Adding a function involves calling its bind() method to allocate…
usb_add_config – add a configuration to a device. Synopsis int usb_add_config(struct usb_composite_dev *cdev, struct usb_configuration *config, int (*bind)(struct usb_configuration *)); Arguments cdev wraps the USB gadget config the configuration, with bConfigurationValue assigned bind the configuration’s bind function Context single threaded during gadget setup Description One of the main tasks of a composite bind() routine is…