Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
xhci-mem.c File Reference
#include <linux/usb.h>
#include <linux/pci.h>
#include <linux/slab.h>
#include <linux/dmapool.h>
#include "xhci.h"

Go to the source code of this file.

Macros

#define CTX_SIZE(_hcc)   (HCC_64BYTE_CONTEXT(_hcc) ? 64 : 32)
 

Functions

void xhci_ring_free (struct xhci_hcd *xhci, struct xhci_ring *ring)
 
void xhci_free_or_cache_endpoint_ring (struct xhci_hcd *xhci, struct xhci_virt_device *virt_dev, unsigned int ep_index)
 
int xhci_ring_expansion (struct xhci_hcd *xhci, struct xhci_ring *ring, unsigned int num_trbs, gfp_t flags)
 
struct xhci_input_control_ctxxhci_get_input_control_ctx (struct xhci_hcd *xhci, struct xhci_container_ctx *ctx)
 
struct xhci_slot_ctxxhci_get_slot_ctx (struct xhci_hcd *xhci, struct xhci_container_ctx *ctx)
 
struct xhci_ep_ctxxhci_get_ep_ctx (struct xhci_hcd *xhci, struct xhci_container_ctx *ctx, unsigned int ep_index)
 
struct xhci_ringxhci_dma_to_transfer_ring (struct xhci_virt_ep *ep, u64 address)
 
struct xhci_ringxhci_stream_id_to_ring (struct xhci_virt_device *dev, unsigned int ep_index, unsigned int stream_id)
 
struct xhci_stream_infoxhci_alloc_stream_info (struct xhci_hcd *xhci, unsigned int num_stream_ctxs, unsigned int num_streams, gfp_t mem_flags)
 
void xhci_setup_streams_ep_input_ctx (struct xhci_hcd *xhci, struct xhci_ep_ctx *ep_ctx, struct xhci_stream_info *stream_info)
 
void xhci_setup_no_streams_ep_input_ctx (struct xhci_hcd *xhci, struct xhci_ep_ctx *ep_ctx, struct xhci_virt_ep *ep)
 
void xhci_free_stream_info (struct xhci_hcd *xhci, struct xhci_stream_info *stream_info)
 
int xhci_alloc_tt_info (struct xhci_hcd *xhci, struct xhci_virt_device *virt_dev, struct usb_device *hdev, struct usb_tt *tt, gfp_t mem_flags)
 
void xhci_free_virt_device (struct xhci_hcd *xhci, int slot_id)
 
int xhci_alloc_virt_device (struct xhci_hcd *xhci, int slot_id, struct usb_device *udev, gfp_t flags)
 
void xhci_copy_ep0_dequeue_into_input_ctx (struct xhci_hcd *xhci, struct usb_device *udev)
 
int xhci_setup_addressable_virt_dev (struct xhci_hcd *xhci, struct usb_device *udev)
 
int xhci_endpoint_init (struct xhci_hcd *xhci, struct xhci_virt_device *virt_dev, struct usb_device *udev, struct usb_host_endpoint *ep, gfp_t mem_flags)
 
void xhci_endpoint_zero (struct xhci_hcd *xhci, struct xhci_virt_device *virt_dev, struct usb_host_endpoint *ep)
 
void xhci_clear_endpoint_bw_info (struct xhci_bw_info *bw_info)
 
void xhci_update_bw_info (struct xhci_hcd *xhci, struct xhci_container_ctx *in_ctx, struct xhci_input_control_ctx *ctrl_ctx, struct xhci_virt_device *virt_dev)
 
void xhci_endpoint_copy (struct xhci_hcd *xhci, struct xhci_container_ctx *in_ctx, struct xhci_container_ctx *out_ctx, unsigned int ep_index)
 
void xhci_slot_copy (struct xhci_hcd *xhci, struct xhci_container_ctx *in_ctx, struct xhci_container_ctx *out_ctx)
 
struct xhci_commandxhci_alloc_command (struct xhci_hcd *xhci, bool allocate_in_ctx, bool allocate_completion, gfp_t mem_flags)
 
void xhci_urb_free_priv (struct xhci_hcd *xhci, struct urb_priv *urb_priv)
 
void xhci_free_command (struct xhci_hcd *xhci, struct xhci_command *command)
 
void xhci_mem_cleanup (struct xhci_hcd *xhci)
 
int xhci_mem_init (struct xhci_hcd *xhci, gfp_t flags)
 

Macro Definition Documentation

#define CTX_SIZE (   _hcc)    (HCC_64BYTE_CONTEXT(_hcc) ? 64 : 32)

Definition at line 351 of file xhci-mem.c.

Function Documentation

struct xhci_command* xhci_alloc_command ( struct xhci_hcd xhci,
bool  allocate_in_ctx,
bool  allocate_completion,
gfp_t  mem_flags 
)
read

Definition at line 1718 of file xhci-mem.c.

struct xhci_stream_info* xhci_alloc_stream_info ( struct xhci_hcd xhci,
unsigned int  num_stream_ctxs,
unsigned int  num_streams,
gfp_t  mem_flags 
)
read

Definition at line 588 of file xhci-mem.c.

int xhci_alloc_tt_info ( struct xhci_hcd xhci,
struct xhci_virt_device virt_dev,
struct usb_device *  hdev,
struct usb_tt *  tt,
gfp_t  mem_flags 
)

Definition at line 822 of file xhci-mem.c.

int xhci_alloc_virt_device ( struct xhci_hcd xhci,
int  slot_id,
struct usb_device *  udev,
gfp_t  flags 
)

Definition at line 919 of file xhci-mem.c.

void xhci_clear_endpoint_bw_info ( struct xhci_bw_info bw_info)

Definition at line 1516 of file xhci-mem.c.

void xhci_copy_ep0_dequeue_into_input_ctx ( struct xhci_hcd xhci,
struct usb_device *  udev 
)

Definition at line 989 of file xhci-mem.c.

struct xhci_ring* xhci_dma_to_transfer_ring ( struct xhci_virt_ep ep,
u64  address 
)
read

Definition at line 459 of file xhci-mem.c.

void xhci_endpoint_copy ( struct xhci_hcd xhci,
struct xhci_container_ctx in_ctx,
struct xhci_container_ctx out_ctx,
unsigned int  ep_index 
)

Definition at line 1584 of file xhci-mem.c.

int xhci_endpoint_init ( struct xhci_hcd xhci,
struct xhci_virt_device virt_dev,
struct usb_device *  udev,
struct usb_host_endpoint *  ep,
gfp_t  mem_flags 
)

Definition at line 1387 of file xhci-mem.c.

void xhci_endpoint_zero ( struct xhci_hcd xhci,
struct xhci_virt_device virt_dev,
struct usb_host_endpoint *  ep 
)

Definition at line 1497 of file xhci-mem.c.

void xhci_free_command ( struct xhci_hcd xhci,
struct xhci_command command 
)

Definition at line 1762 of file xhci-mem.c.

void xhci_free_or_cache_endpoint_ring ( struct xhci_hcd xhci,
struct xhci_virt_device virt_dev,
unsigned int  ep_index 
)

Definition at line 265 of file xhci-mem.c.

void xhci_free_stream_info ( struct xhci_hcd xhci,
struct xhci_stream_info stream_info 
)

Definition at line 746 of file xhci-mem.c.

void xhci_free_virt_device ( struct xhci_hcd xhci,
int  slot_id 
)

Definition at line 865 of file xhci-mem.c.

struct xhci_ep_ctx* xhci_get_ep_ctx ( struct xhci_hcd xhci,
struct xhci_container_ctx ctx,
unsigned int  ep_index 
)
read

Definition at line 397 of file xhci-mem.c.

struct xhci_input_control_ctx* xhci_get_input_control_ctx ( struct xhci_hcd xhci,
struct xhci_container_ctx ctx 
)
read

Definition at line 380 of file xhci-mem.c.

struct xhci_slot_ctx* xhci_get_slot_ctx ( struct xhci_hcd xhci,
struct xhci_container_ctx ctx 
)
read

Definition at line 387 of file xhci-mem.c.

void xhci_mem_cleanup ( struct xhci_hcd xhci)

Definition at line 1771 of file xhci-mem.c.

int xhci_mem_init ( struct xhci_hcd xhci,
gfp_t  flags 
)

Definition at line 2261 of file xhci-mem.c.

int xhci_ring_expansion ( struct xhci_hcd xhci,
struct xhci_ring ring,
unsigned int  num_trbs,
gfp_t  flags 
)

Definition at line 323 of file xhci-mem.c.

void xhci_ring_free ( struct xhci_hcd xhci,
struct xhci_ring ring 
)

Definition at line 151 of file xhci-mem.c.

int xhci_setup_addressable_virt_dev ( struct xhci_hcd xhci,
struct usb_device *  udev 
)

Definition at line 1061 of file xhci-mem.c.

void xhci_setup_no_streams_ep_input_ctx ( struct xhci_hcd xhci,
struct xhci_ep_ctx ep_ctx,
struct xhci_virt_ep ep 
)

Definition at line 732 of file xhci-mem.c.

void xhci_setup_streams_ep_input_ctx ( struct xhci_hcd xhci,
struct xhci_ep_ctx ep_ctx,
struct xhci_stream_info stream_info 
)

Definition at line 709 of file xhci-mem.c.

void xhci_slot_copy ( struct xhci_hcd xhci,
struct xhci_container_ctx in_ctx,
struct xhci_container_ctx out_ctx 
)

Definition at line 1606 of file xhci-mem.c.

struct xhci_ring* xhci_stream_id_to_ring ( struct xhci_virt_device dev,
unsigned int  ep_index,
unsigned int  stream_id 
)
read

Definition at line 480 of file xhci-mem.c.

void xhci_update_bw_info ( struct xhci_hcd xhci,
struct xhci_container_ctx in_ctx,
struct xhci_input_control_ctx ctrl_ctx,
struct xhci_virt_device virt_dev 
)

Definition at line 1526 of file xhci-mem.c.

void xhci_urb_free_priv ( struct xhci_hcd xhci,
struct urb_priv urb_priv 
)

Definition at line 1754 of file xhci-mem.c.