drivers/net/ethernet/qlogic/qed/qed_dev_api.h

Source file repositories/reference/linux-study-clean/drivers/net/ethernet/qlogic/qed/qed_dev_api.h

File Facts

System
Linux kernel
Corpus path
drivers/net/ethernet/qlogic/qed/qed_dev_api.h
Extension
.h
Size
13304 bytes
Lines
530
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 qed_drv_load_params {
	/* Indicates whether the driver is running over a crash kernel.
	 * As part of the load request, this will be used for providing the
	 * driver role to the MFW.
	 * In case of a crash kernel over PDA - this should be set to false.
	 */
	bool is_crash_kernel;

	/* The timeout value that the MFW should use when locking the engine for
	 * the driver load process.
	 * A value of '0' means the default value, and '255' means no timeout.
	 */
	u8 mfw_timeout_val;
#define QED_LOAD_REQ_LOCK_TO_DEFAULT    0
#define QED_LOAD_REQ_LOCK_TO_NONE       255

	/* Avoid engine reset when first PF loads on it */
	bool avoid_eng_reset;

	/* Allow overriding the default force load behavior */
	enum qed_override_force_load override_force_load;
};

struct qed_hw_init_params {
	/* Tunneling parameters */
	struct qed_tunnel_info *p_tunn;

	bool b_hw_start;

	/* Interrupt mode [msix, inta, etc.] to use */
	enum qed_int_mode int_mode;

	/* NPAR tx switching to be used for vports for tx-switching */
	bool allow_npar_tx_switch;

	/* Binary fw data pointer in binary fw file */
	const u8 *bin_fw_data;

	/* Driver load parameters */
	struct qed_drv_load_params *p_drv_load_params;
};

/**
 * qed_hw_init(): Init Qed hardware.
 *
 * @cdev: Qed dev pointer.
 * @p_params: Pointers to params.
 *
 * Return: Int.
 */
int qed_hw_init(struct qed_dev *cdev, struct qed_hw_init_params *p_params);

/**
 * qed_hw_timers_stop_all(): Stop the timers HW block.
 *
 * @cdev: Qed dev pointer.
 *
 * Return: void.
 */
void qed_hw_timers_stop_all(struct qed_dev *cdev);

/**
 * qed_hw_stop(): Stop Qed hardware.
 *
 * @cdev: Qed dev pointer.
 *
 * Return: int.
 */
int qed_hw_stop(struct qed_dev *cdev);

/**
 * qed_hw_stop_fastpath(): Should be called incase
 *		           slowpath is still required for the device,
 *		           but fastpath is not.
 *
 * @cdev: Qed dev pointer.
 *
 * Return: Int.
 */
int qed_hw_stop_fastpath(struct qed_dev *cdev);

/**
 * qed_hw_start_fastpath(): Restart fastpath traffic,
 *		            only if hw_stop_fastpath was called.
 *
 * @p_hwfn: HW device data.
 *
 * Return: Int.
 */
int qed_hw_start_fastpath(struct qed_hwfn *p_hwfn);

Annotation

Implementation Notes