#include <workqueue.h>
#include <block/device.h>
#include <aes.h>


Go to the source code of this file.
Functions | |
| void | aesblk_update (struct aes_block_device *aes_bdev) |
| Load block device descriptions from underlying device. | |
| void | aesblk_prepare_req (struct block_device *bdev, struct block_request *breq, uint32_t lba, uint32_t nr_blocks, enum block_operation operation) |
| Prepare an AES block request for use. | |
| struct block_request * | aesblk_alloc_req (struct block_device *bdev) |
| Allocate memory for one AES block request. | |
| void | aesblk_free_req (struct block_device *bdev, struct block_request *breq) |
| Free the memory allocated by a block request. | |
| void | aesblk_init (struct aes_block_device *aes_bdev, struct block_device *card_bdev) |
| Initialize AES block device. | |
This is the interface of the AES block device.
Definition in file aesblk.h.
| struct block_request* aesblk_alloc_req | ( | struct block_device * | bdev | ) | [read] |
Allocate memory for one AES block request.
This function will allocate all the memory needed by one AES block request and return a pointer to this request.
| bdev | Pointer to the block device interface of an AES block device. |
Definition at line 547 of file aesblk.c.
References block_alloc_request(), memset(), and unlikely.
Referenced by aesblk_init().

| void aesblk_free_req | ( | struct block_device * | bdev, | |
| struct block_request * | breq | |||
| ) |
Free the memory allocated by a block request.
| bdev | Pointer to the block device the block request was allocated for. | |
| breq | Pointer to the block request that is to be freed. |
Definition at line 576 of file aesblk.c.
References block_free_request().
Referenced by aesblk_init().

| void aesblk_init | ( | struct aes_block_device * | abdev, | |
| struct block_device * | card_bdev | |||
| ) |
Initialize AES block device.
This function will initialize the AES block device with the underlying block device (typically a SDMMC card).
| abdev | Pointer to the AES block device | |
| card_bdev | Pointer to the underlying block device |
Definition at line 73 of file aesblk.c.
References aesblk_alloc_req(), aesblk_free_req(), aesblk_prepare_req(), block_device::alloc_req, block_device::free_req, and block_device::prepare_req.

| void aesblk_prepare_req | ( | struct block_device * | bdev, | |
| struct block_request * | breq, | |||
| uint32_t | lba, | |||
| uint32_t | nr_blocks, | |||
| enum block_operation | operation | |||
| ) |
Prepare an AES block request for use.
This function will prepare an AES block request for submittion to the AES block driver.
| bdev | Pointer to the block device part of an AES block device. | |
| breq | Pointer to the block request to prepare. | |
| lba | Location of the blocks to operate on. | |
| nr_blocks | Number of blocks to read/write. | |
| operation | Which block operation to perform (read or write). |
Definition at line 486 of file aesblk.c.
References block_request::bdev, BLK_OP_READ, BLK_OP_WRITE, block_prepare_req(), block_request::buf_list_done, block_request::bytes_xfered, block_request::context, dbg_verbose, block_request::req_done, block_request::req_submit, block_request::req_submit_buf_list, slist_init(), block_request::status, STATUS_IN_PROGRESS, unhandled_case, and workqueue_init_item().
Referenced by aesblk_init().

| void aesblk_update | ( | struct aes_block_device * | abdev | ) |
Load block device descriptions from underlying device.
| aes_bdev | AES block device pointer |
Definition at line 91 of file aesblk.c.
References block_device::block_size, block_device::flags, block_device::get_dev_id, and block_device::nr_blocks.
1.5.8