drivers/net/ethernet/cavium/liquidio/response_manager.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/cavium/liquidio/response_manager.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/cavium/liquidio/response_manager.h- Extension
.h- Size
- 5276 bytes
- Lines
- 144
- Domain
- Driver Families
- Bucket
- drivers/net
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
struct octeon_response_list
Annotated Snippet
struct octeon_response_list {
/** List structure to add delete pending entries to */
struct list_head head;
/** A lock for this response list */
spinlock_t lock;
atomic_t pending_req_count;
};
/** The type of response list.
*/
enum {
OCTEON_ORDERED_LIST = 0,
OCTEON_UNORDERED_NONBLOCKING_LIST = 1,
OCTEON_UNORDERED_BLOCKING_LIST = 2,
OCTEON_ORDERED_SC_LIST = 3,
OCTEON_DONE_SC_LIST = 4,
OCTEON_ZOMBIE_SC_LIST = 5
};
/** Response Order values for a Octeon Request. */
enum {
OCTEON_RESP_ORDERED = 0,
OCTEON_RESP_UNORDERED = 1,
OCTEON_RESP_NORESPONSE = 2
};
/** Error codes used in Octeon Host-Core communication.
*
* 31 16 15 0
* ---------------------------------
* | | |
* ---------------------------------
* Error codes are 32-bit wide. The upper 16-bits, called Major Error Number,
* are reserved to identify the group to which the error code belongs. The
* lower 16-bits, called Minor Error Number, carry the actual code.
*
* So error codes are (MAJOR NUMBER << 16)| MINOR_NUMBER.
*/
/*------------ Error codes used by host driver -----------------*/
#define DRIVER_MAJOR_ERROR_CODE 0x0000
/*------ Error codes used by firmware (bits 15..0 set by firmware */
#define FIRMWARE_MAJOR_ERROR_CODE 0x0001
/** A value of 0x00000000 indicates no error i.e. success */
#define DRIVER_ERROR_NONE 0x00000000
#define DRIVER_ERROR_REQ_PENDING 0x00000001
#define DRIVER_ERROR_REQ_TIMEOUT 0x00000003
#define DRIVER_ERROR_REQ_EINTR 0x00000004
#define DRIVER_ERROR_REQ_ENXIO 0x00000006
#define DRIVER_ERROR_REQ_ENOMEM 0x0000000C
#define DRIVER_ERROR_REQ_EINVAL 0x00000016
#define DRIVER_ERROR_REQ_FAILED 0x000000ff
/** Status for a request.
* If a request is not queued to Octeon by the driver, the driver returns
* an error condition that's describe by one of the OCTEON_REQ_ERR_* value
* below. If the request is successfully queued, the driver will return
* a OCTEON_REQUEST_PENDING status. OCTEON_REQUEST_TIMEOUT and
* OCTEON_REQUEST_INTERRUPTED are only returned by the driver if the
* response for request failed to arrive before a time-out period or if
* the request processing * got interrupted due to a signal respectively.
*/
enum {
OCTEON_REQUEST_DONE = (DRIVER_ERROR_NONE),
OCTEON_REQUEST_PENDING = (DRIVER_ERROR_REQ_PENDING),
OCTEON_REQUEST_TIMEOUT = (DRIVER_ERROR_REQ_TIMEOUT),
OCTEON_REQUEST_INTERRUPTED = (DRIVER_ERROR_REQ_EINTR),
OCTEON_REQUEST_NO_DEVICE = (0x00000021),
OCTEON_REQUEST_NOT_RUNNING,
OCTEON_REQUEST_INVALID_IQ,
OCTEON_REQUEST_INVALID_BUFCNT,
OCTEON_REQUEST_INVALID_RESP_ORDER,
OCTEON_REQUEST_NO_MEMORY,
OCTEON_REQUEST_INVALID_BUFSIZE,
OCTEON_REQUEST_NO_PENDING_ENTRY,
OCTEON_REQUEST_NO_IQ_SPACE = (0x7FFFFFFF)
};
#define FIRMWARE_STATUS_CODE(status) \
((FIRMWARE_MAJOR_ERROR_CODE << 16) | (status))
/** Initialize the response lists. The number of response lists to create is
* given by count.
* @param octeon_dev - the octeon device structure.
*/
Annotation
- Detected declarations: `struct octeon_response_list`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.