libnvme_read_regs-libnvme32
Read the controller registers of a pcie controller
Usage
int libnvme_read_regs (struct libnvme_transport_handle *hdl , __u32 offset , void *buf , __u32 len );
Arguments
hdl
|
Transport handle |
|---|---|
offset
|
Offset of the first register in bytes |
buf
|
Buffer to store the register values |
len
|
Number of bytes to read |
Overview
Copies the register range [offset, offset + len) of the controller into buf, using 32-bit MMIO reads. The register values are stored in little-endian byte order, as they appear in the register map. offset and len must be multiples of 4 and the range must be within the first 4 KiB of the register map.
This should only be sent to controller handles, not to namespaces.
Return
0 on success or a negative error code otherwise. -ENOTSUP indicates that the transport has no memory-mapped registers.