Linux Kernel
3.7.1
|
#include <firewire-cdev.h>
Data Fields | |
__u64 | offset |
__u64 | closure |
__u32 | length |
__u32 | handle |
__u64 | region_end |
struct fw_cdev_allocate - Allocate a CSR in an address range : Start offset of the address range : To be passed back to userspace in request events : Length of the CSR, in bytes : Handle to the allocation, written by the kernel : First address above the address range (added in ABI v4, 2.6.36)
Allocate an address range in the 48-bit address space on the local node (the controller). This allows userspace to listen for requests with an offset within that address range. Every time when the kernel receives a request within the range, an &fw_cdev_event_request2 event will be emitted. (If the kernel or the client implements ABI version <= 3, an &fw_cdev_event_request will be generated instead.)
The field is passed back to userspace in these request events. The field is an out parameter, returning a handle to the allocated range to be used for later deallocation of the range.
The address range is allocated on all local nodes. The address allocation is exclusive except for the FCP command and response registers. If an exclusive address region is already in use, the ioctl fails with errno set to EBUSY.
If kernel and client implement ABI version >= 4, the kernel looks up a free spot of size inside [..) and, if found, writes the start address of the new CSR back in . I.e. is an in and out parameter. If this automatic placement of a CSR in a bigger address range is not desired, the client simply needs to set = + .
If the kernel or the client implements ABI version <= 3, is ignored and effectively assumed to be + .
is only present in a kernel header >= 2.6.36. If necessary, this can for example be tested by #ifdef FW_CDEV_EVENT_REQUEST2.
Definition at line 571 of file firewire-cdev.h.
__u64 closure |
Definition at line 573 of file firewire-cdev.h.
Definition at line 575 of file firewire-cdev.h.
__u32 length |
Definition at line 574 of file firewire-cdev.h.
Definition at line 572 of file firewire-cdev.h.
__u64 region_end |
Definition at line 576 of file firewire-cdev.h.