drivers/net/ethernet/meta/fbnic/fbnic_fw_log.h

Source file repositories/reference/linux-study-clean/drivers/net/ethernet/meta/fbnic/fbnic_fw_log.h

File Facts

System
Linux kernel
Corpus path
drivers/net/ethernet/meta/fbnic/fbnic_fw_log.h
Extension
.h
Size
1257 bytes
Lines
46
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.

Dependency Surface

Detected Declarations

Annotated Snippet

struct fbnic_fw_log_entry {
	struct list_head	list;
	u64			index;
	u32			timestamp;
	u16			len;
	char			msg[] __counted_by(len);
};

struct fbnic_fw_log {
	void			*data_start;
	void			*data_end;
	size_t			size;
	struct list_head	entries;
	/* Spin lock for accessing or modifying entries */
	spinlock_t		lock;
};

#define fbnic_fw_log_ready(_fbd)	(!!(_fbd)->fw_log.data_start)

void fbnic_fw_log_enable(struct fbnic_dev *fbd, bool send_hist);
void fbnic_fw_log_disable(struct fbnic_dev *fbd);
int fbnic_fw_log_init(struct fbnic_dev *fbd);
void fbnic_fw_log_free(struct fbnic_dev *fbd);
int fbnic_fw_log_write(struct fbnic_dev *fbd, u64 index, u32 timestamp,
		       const char *msg);
#endif /* _FBNIC_FW_LOG_H_ */

Annotation

Implementation Notes