Control various driver settings.
More...
Detailed Description
Control various driver settings.
Define Documentation
#define L4BLK_CTRL_NUM_DISKS 0x00000001 |
Return number of disks
Definition at line 204 of file types.h.
#define L4BLK_CTRL_DISK_SIZE 0x00000002 |
Return size of disk
Definition at line 207 of file types.h.
#define L4BLK_CTRL_DISK_GEOM 0x00000003 |
Return disk geometry
Definition at line 210 of file types.h.
#define L4BLK_CTRL_RREAD_PART 0x00000004 |
Reread partition table
Definition at line 213 of file types.h.
#define L4BLK_CTRL_MAX_SG_LEN 0x00000005 |
Return max. length of scatter gather list
Definition at line 216 of file types.h.
#define L4BLK_CTRL_STREAM_PERIOD 0x00000006 |
Return disk timings for stream requests
Definition at line 220 of file types.h.
#define L4BLK_CTRL_DRV_IRQ 0x00008000 |
Return IRQ of block driver
Definition at line 225 of file types.h.
Typedef Documentation
Disk geometry structure (CHS), returned by L4BLK_CTRL_DISK_GEOM ctrl
Disk timings structure, used by L4BLK_CTRL_DISK_TIMING ctrl
Function Documentation
L4_CV int l4blk_ctrl |
( |
l4blk_driver_t |
driver, |
|
|
l4_uint32_t |
cmd, |
|
|
void * |
in, |
|
|
int |
in_size, |
|
|
void * |
out, |
|
|
int |
out_size | |
|
) |
| | |
Generic driver control.
- Parameters:
-
| driver | Driver handle |
| cmd | Control command |
| in | Input buffer |
| in_size | Size of input buffer |
| out | Output buffer |
| out_size | Size of output buffer |
- Returns:
- result of ctrl-call to driver, -L4_EIPC if call failed.
This function is the 'swiss army knife' to manipulate various driver parameters. The possible commands depend on the used driver.
Return number of disks.
- Parameters:
-
- Returns:
- Number of disks connected to the driver, error code (< 0) if failed
L4_CV int l4blk_ctrl_get_disk_size |
( |
l4blk_driver_t |
driver, |
|
|
l4_uint32_t |
dev | |
|
) |
| | |
Return disk size.
- Parameters:
-
| driver | Driver handle |
| dev | Device id |
- Returns:
- Disk size in blocks (1KB), error code (< 0) if failed
L4_CV int l4blk_ctrl_get_stream_period |
( |
l4blk_driver_t |
driver, |
|
|
l4blk_stream_t |
stream, |
|
|
l4_uint32_t * |
period_len, |
|
|
l4_uint32_t * |
period_offs | |
|
) |
| | |
Return period for stream requests.
- Parameters:
-
| driver | Driver handle |
| stream | Stream handle |
- Return values:
-
| period_len | Period length (microseconds) |
| period_offs | Period offset (relative to kernel klock, i.e. period0 % period_len) |
- Returns:
- 0 on success, error code if failed