Linux Kernel
3.7.1
|
#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) |
void * | hcd_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) |
void* hcd_buffer_alloc | ( | struct usb_bus * | bus, |
size_t | size, | ||
gfp_t | mem_flags, | ||
dma_addr_t * | dma | ||
) |
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.
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().