Linux Kernel
3.7.1
|
Go to the source code of this file.
Macros | |
#define | ITCW_OP_READ 0 |
#define | ITCW_OP_WRITE 1 |
Functions | |
struct tcw * | itcw_get_tcw (struct itcw *itcw) |
size_t | itcw_calc_size (int intrg, int max_tidaws, int intrg_max_tidaws) |
struct itcw * | itcw_init (void *buffer, size_t size, int op, int intrg, int max_tidaws, int intrg_max_tidaws) |
struct dcw * | itcw_add_dcw (struct itcw *itcw, u8 cmd, u8 flags, void *cd, u8 cd_count, u32 count) |
struct tidaw * | itcw_add_tidaw (struct itcw *itcw, u8 flags, void *addr, u32 count) |
void | itcw_set_data (struct itcw *itcw, void *addr, int use_tidal) |
void | itcw_finalize (struct itcw *itcw) |
|
read |
itcw_add_dcw - add a dcw to the itcw : address of the itcw : the dcw command : flags for the dcw : address of control data for this dcw or NULL if none is required : number of control data bytes for this dcw : number of data bytes for this dcw
Add a new dcw to the specified itcw by writing the dcw information specified by , , , and to the tca of the tccb. Return a pointer to the newly added dcw on success or -ENOSPC if the new dcw would exceed the available space.
Note: the tcal field of the tccb header will be updated to reflect added content.
itcw_add_tidaw - add a tidaw to the itcw : address of the itcw : flags for the new tidaw : address value for the new tidaw : count value for the new tidaw
Add a new tidaw to the input/output data tidaw-list of the specified itcw (depending on the value of the r-flag and w-flag). Return a pointer to the new tidaw on success or -ENOSPC if the new tidaw would exceed the available space.
Note: TTIC tidaws are automatically added when needed, so explicitly calling this interface with the TTIC flag is not supported. The last-tidaw flag for the last tidaw in the list will be set by itcw_finalize.
itcw_calc_size - return the size of an itcw with the given parameters : if non-zero, add an interrogate tcw : maximum number of tidaws to be used for data addressing or zero if no tida is to be used. : maximum number of tidaws to be used for data addressing by the interrogate tcw, if specified
Calculate and return the number of bytes required to hold an itcw with the given parameters and assuming tccbs with maximum size.
Note that the resulting size also contains bytes needed for alignment padding as well as padding to ensure that data structures don't cross a 4k-boundary where required.
itcw_finalize - calculate length and count fields of the itcw : address of the itcw
Calculate tcw input-/output-count and tccbl fields and add a tcat the tccb. In case input- or output-tida is used, the tidaw-list must be stored in continuous storage (no ttic). The tcal field in the tccb must be up-to-date.
|
read |
itcw_init - initialize incremental tcw data structure : address of buffer to use for data structures : number of bytes in buffer : ITCW_OP_READ for a read operation tcw, ITCW_OP_WRITE for a write operation tcw : if non-zero, add and initialize an interrogate tcw : maximum number of tidaws to be used for data addressing or zero if no tida is to be used. : maximum number of tidaws to be used for data addressing by the interrogate tcw, if specified
Prepare the specified buffer to be used as an incremental tcw, i.e. a helper data structure that can be used to construct a valid tcw by successive calls to other helper functions. Note: the buffer needs to be located below the 2G address limit. The resulting tcw has the following restrictions:
On success, return pointer to the resulting incremental tcw data structure, ERR_PTR otherwise.
itcw_set_data - set data address and tida flag of the itcw : address of the itcw : the data address : zero of the data address specifies a contiguous block of data, non-zero if it specifies a list if tidaws.
Set the input/output data address of the itcw (depending on the value of the r-flag and w-flag). If is non-zero, the corresponding tida flag is set as well.