#include <dma.h>
#include <slist.h>
#include <types.h>


Go to the source code of this file.
Data Structures | |
| struct | buffer |
| A generic data buffer. More... | |
Functions | |
| static void | buffer_init_tx (struct buffer *buf, const void *data, size_t len) |
| Initialize a buffer for transmitting data. | |
| static void | buffer_init_tx_mapped (struct buffer *buf, const void *data, phys_addr_t phys, size_t len) |
| Initialize an already-DMA-mapped buffer for transmitting data. | |
| static void | buffer_init_rx (struct buffer *buf, void *data, size_t len) |
| Initialize a buffer for receiving data. | |
| static void | buffer_init_rx_mapped (struct buffer *buf, void *data, phys_addr_t phys, size_t len) |
| Initialize an already-DMA-mapped buffer for receiving data. | |
This is a generic buffer data structure used by several subsystems. Chains of buffers may be passed around between different drivers, minimizing the cost of copying and data conversion.
Definition in file buffer.h.
| static void buffer_init_rx | ( | struct buffer * | buf, | |
| void * | data, | |||
| size_t | len | |||
| ) | [inline, static] |
Initialize a buffer for receiving data.
| buf | The buffer | |
| data | Data area to associate with the buffer | |
| len | Length of the data area in bytes |
Definition at line 106 of file buffer.h.
References buffer::addr, DMA_FROM_DEVICE, dma_map_single(), buffer::len, buffer_addr_t::phys, and buffer_addr_t::ptr.
Referenced by journal_find_last_entry(), and usb_req_alloc_single_rx().

| static void buffer_init_rx_mapped | ( | struct buffer * | buf, | |
| void * | data, | |||
| phys_addr_t | phys, | |||
| size_t | len | |||
| ) | [inline, static] |
Initialize an already-DMA-mapped buffer for receiving data.
| buf | The buffer | |
| data | Virtual address of data area to associate with the buffer | |
| phys | Physical address of data area | |
| len | Length of the data area in bytes |
Definition at line 121 of file buffer.h.
References buffer::addr, buffer::len, buffer_addr_t::phys, and buffer_addr_t::ptr.
| static void buffer_init_tx | ( | struct buffer * | buf, | |
| const void * | data, | |||
| size_t | len | |||
| ) | [inline, static] |
Initialize a buffer for transmitting data.
| buf | The buffer | |
| data | Data area to associate with the buffer | |
| len | Length of the data area in bytes |
Definition at line 75 of file buffer.h.
References buffer::addr, dma_map_single(), DMA_TO_DEVICE, buffer::len, buffer_addr_t::phys, and buffer_addr_t::ptr.
Referenced by journal_commit_card(), journal_open_entry(), usb_func_get_descriptor(), and usb_req_alloc_single_tx().

| static void buffer_init_tx_mapped | ( | struct buffer * | buf, | |
| const void * | data, | |||
| phys_addr_t | phys, | |||
| size_t | len | |||
| ) | [inline, static] |
Initialize an already-DMA-mapped buffer for transmitting data.
| buf | The buffer | |
| data | Virtual address of data area to associate with the buffer | |
| phys | Physical address of data area | |
| len | Length of the data area in bytes |
Definition at line 92 of file buffer.h.
References buffer::addr, buffer::len, buffer_addr_t::phys, and buffer_addr_t::ptr.
Referenced by journal_clean_last_entry().
1.5.8