Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
buffer.c File Reference
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/device.h>
#include <linux/mm.h>
#include <linux/io.h>
#include <linux/dma-mapping.h>
#include <linux/dmapool.h>
#include <linux/usb.h>
#include <linux/usb/hcd.h>

Go to the source code of this file.

Functions

int hcd_buffer_create (struct usb_hcd *hcd)
 
void hcd_buffer_destroy (struct usb_hcd *hcd)
 
voidhcd_buffer_alloc (struct usb_bus *bus, size_t size, gfp_t mem_flags, dma_addr_t *dma)
 
void hcd_buffer_free (struct usb_bus *bus, size_t size, void *addr, dma_addr_t dma)
 

Function Documentation

void* hcd_buffer_alloc ( struct usb_bus *  bus,
size_t  size,
gfp_t  mem_flags,
dma_addr_t dma 
)

Definition at line 101 of file buffer.c.

int hcd_buffer_create ( struct usb_hcd *  hcd)

hcd_buffer_create - initialize buffer pools : the bus whose buffer pools are to be initialized Context: !in_interrupt()

Call this as part of initializing a host controller that uses the dma memory allocators. It initializes some pools of dma-coherent memory that will be shared by all drivers using that controller, or returns a negative errno value on error.

Call hcd_buffer_destroy() to clean up after using those pools.

Definition at line 51 of file buffer.c.

void hcd_buffer_destroy ( struct usb_hcd *  hcd)

hcd_buffer_destroy - deallocate buffer pools : the bus whose buffer pools are to be destroyed Context: !in_interrupt()

This frees the buffer pools created by hcd_buffer_create().

Definition at line 83 of file buffer.c.

void hcd_buffer_free ( struct usb_bus *  bus,
size_t  size,
void addr,
dma_addr_t  dma 
)

Definition at line 125 of file buffer.c.