drivers/net/ethernet/huawei/hinic3/hinic3_hwdev.h

Source file repositories/reference/linux-study-clean/drivers/net/ethernet/huawei/hinic3/hinic3_hwdev.h

File Facts

System
Linux kernel
Corpus path
drivers/net/ethernet/huawei/hinic3/hinic3_hwdev.h
Extension
.h
Size
2735 bytes
Lines
104
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 hinic3_pcidev {
	struct pci_dev       *pdev;
	struct hinic3_hwdev  *hwdev;
	/* Auxiliary devices */
	struct hinic3_adev   *hadev[HINIC3_SERVICE_T_MAX];

	void __iomem         *cfg_reg_base;
	void __iomem         *intr_reg_base;
	void __iomem         *mgmt_reg_base;
	void __iomem         *db_base;
	u64                  db_dwqe_len;
	u64                  db_base_phy;

	/* lock for attach/detach uld */
	struct mutex         pdev_mutex;
	unsigned long        state;
};

struct hinic3_hwdev {
	struct hinic3_pcidev        *adapter;
	struct pci_dev              *pdev;
	struct device               *dev;
	int                         dev_id;
	struct hinic3_hwif          *hwif;
	struct hinic3_cfg_mgmt_info *cfg_mgmt;
	struct hinic3_aeqs          *aeqs;
	struct hinic3_ceqs          *ceqs;
	struct hinic3_mbox          *mbox;
	struct hinic3_cmdqs         *cmdqs;
	struct delayed_work         sync_time_task;
	struct workqueue_struct     *workq;
	struct hinic3_msg_pf_to_mgmt *pf_to_mgmt;
	/* protect channel init and uninit */
	spinlock_t                  channel_lock;
	u64                         features[COMM_MAX_FEATURE_QWORD];
	u32                         wq_page_size;
	u8                          max_cmdq;
	ulong                       func_state;
	int                         chip_present_flag;
};

struct hinic3_event_info {
	/* enum hinic3_event_service_type */
	u16 service;
	u16 type;
	u8  event_data[104];
};

struct hinic3_adev {
	struct auxiliary_device  adev;
	struct hinic3_hwdev      *hwdev;
	enum hinic3_service_type svc_type;

	void (*event)(struct auxiliary_device *adev,
		      struct hinic3_event_info *event);
};

int hinic3_init_hwdev(struct pci_dev *pdev);
void hinic3_free_hwdev(struct hinic3_hwdev *hwdev);

void hinic3_set_api_stop(struct hinic3_hwdev *hwdev);

#endif

Annotation

Implementation Notes