struct qed_eth_pf_params { /* The following parameters are used during HW-init * and these parameters need to be passed as arguments * to update_pf_params routine invoked before slowpath start
*/
u16 num_cons;
/* per-VF number of CIDs */
u8 num_vf_cons; #define ETH_PF_PARAMS_VF_CONS_DEFAULT (32)
/* To enable arfs, previous to HW-init a positive number needs to be * set [as filters require allocated searcher ILT memory]. * This will set the maximal number of configured steering-filters.
*/
u32 num_arfs_filters;
};
struct qed_fcoe_pf_params { /* The following parameters are used during protocol-init */
u64 glbl_q_params_addr;
u64 bdq_pbl_base_addr[2];
/* The following parameters are used during HW-init * and these parameters need to be passed as arguments * to update_pf_params routine invoked before slowpath start
*/
u16 num_cons;
u16 num_tasks;
/* The following parameters are used during protocol-init */
u16 sq_num_pbl_pages;
/* Most of the parameters below are described in the FW iSCSI / TCP HSI */ struct qed_iscsi_pf_params {
u64 glbl_q_params_addr;
u64 bdq_pbl_base_addr[3];
u16 cq_num_entries;
u16 cmdq_num_entries;
u32 two_msl_timer;
u16 tx_sws_timer;
/* The following parameters are used during HW-init * and these parameters need to be passed as arguments * to update_pf_params routine invoked before slowpath start
*/
u16 num_cons;
u16 num_tasks;
/* The following parameters are used during protocol-init */
u16 half_way_close_timeout;
u16 bdq_xoff_threshold[3];
u16 bdq_xon_threshold[3];
u16 cmdq_xoff_threshold;
u16 cmdq_xon_threshold;
u16 rq_buffer_size;
struct qed_rdma_pf_params { /* Supplied to QED during resource allocation (may affect the ILT and * the doorbell BAR).
*/
u32 min_dpis; /* number of requested DPIs */
u32 num_qps; /* number of requested Queue Pairs */
u32 num_srqs; /* number of requested SRQ */
u8 roce_edpm_mode; /* see QED_ROCE_EDPM_MODE_ENABLE */
u8 gl_pi; /* protocol index */
/* Will allocate rate limiters to be used with QPs */
u8 enable_dcqcn;
};
/* Client drivers need to make this call before slowpath_start. * PF params required for the call before slowpath_start is * documented within the qed_pf_params structure definition.
*/ void (*update_pf_params)(struct qed_dev *cdev, struct qed_pf_params *params);
int (*slowpath_start)(struct qed_dev *cdev, struct qed_slowpath_params *params);
int (*slowpath_stop)(struct qed_dev *cdev);
/* Requests to use `cnt' interrupts for fastpath. * upon success, returns number of interrupts allocated for fastpath.
*/ int (*set_fp_int)(struct qed_dev *cdev, u16 cnt);
/* Fills `info' with pointers required for utilizing interrupts */ int (*get_fp_int)(struct qed_dev *cdev, struct qed_int_info *info);
void (*simd_handler_clean)(struct qed_dev *cdev, int index);
int (*dbg_grc)(struct qed_dev *cdev, void *buffer, u32 *num_dumped_bytes);
int (*dbg_grc_size)(struct qed_dev *cdev);
int (*dbg_all_data)(struct qed_dev *cdev, void *buffer);
int (*dbg_all_data_size)(struct qed_dev *cdev);
int (*report_fatal_error)(struct devlink *devlink, enum qed_hw_err_type err_type);
/** * can_link_change(): can the instance change the link or not. * * @cdev: Qed dev pointer. * * Return: true if link-change is allowed, false otherwise.
*/ bool (*can_link_change)(struct qed_dev *cdev);
/** * set_link(): set links according to params. * * @cdev: Qed dev pointer. * @params: values used to override the default link configuration. * * Return: 0 on success, error otherwise.
*/ int (*set_link)(struct qed_dev *cdev, struct qed_link_params *params);
/** * get_link(): returns the current link state. * * @cdev: Qed dev pointer. * @if_link: structure to be filled with current link configuration. * * Return: Void.
*/ void (*get_link)(struct qed_dev *cdev, struct qed_link_output *if_link);
/** * drain(): drains chip in case Tx completions fail to arrive due to pause. * * @cdev: Qed dev pointer. * * Return: Int.
*/ int (*drain)(struct qed_dev *cdev);
/** * nvm_flash(): Flash nvm data. * * @cdev: Qed dev pointer. * @name: file containing the data. * * Return: 0 on success, error otherwise.
*/ int (*nvm_flash)(struct qed_dev *cdev, constchar *name);
/** * nvm_get_image(): reads an entire image from nvram. * * @cdev: Qed dev pointer. * @type: type of the request nvram image. * @buf: preallocated buffer to fill with the image. * @len: length of the allocated buffer. * * Return: 0 on success, error otherwise.
*/ int (*nvm_get_image)(struct qed_dev *cdev, enum qed_nvm_images type, u8 *buf, u16 len);
/** * set_coalesce(): Configure Rx coalesce value in usec. * * @cdev: Qed dev pointer. * @rx_coal: Rx coalesce value in usec. * @tx_coal: Tx coalesce value in usec. * @handle: Handle. * * Return: 0 on success, error otherwise.
*/ int (*set_coalesce)(struct qed_dev *cdev,
u16 rx_coal, u16 tx_coal, void *handle);
/** * set_led() - Configure LED mode. * * @cdev: Qed dev pointer. * @mode: LED mode. * * Return: 0 on success, error otherwise.
*/ int (*set_led)(struct qed_dev *cdev, enum qed_led_mode mode);
/** * attn_clr_enable(): Prevent attentions from being reasserted. * * @cdev: Qed dev pointer. * @clr_enable: Clear enable. * * Return: Void.
*/ void (*attn_clr_enable)(struct qed_dev *cdev, bool clr_enable);
/** * db_recovery_add(): add doorbell information to the doorbell * recovery mechanism. * * @cdev: Qed dev pointer. * @db_addr: Doorbell address. * @db_data: Dddress of where db_data is stored. * @db_width: Doorbell is 32b or 64b. * @db_space: Doorbell recovery addresses are user or kernel space. * * Return: Int.
*/ int (*db_recovery_add)(struct qed_dev *cdev, void __iomem *db_addr, void *db_data, enum qed_db_rec_width db_width, enum qed_db_rec_space db_space);
/** * db_recovery_del(): remove doorbell information from the doorbell * recovery mechanism. db_data serves as key (db_addr is not unique). * * @cdev: Qed dev pointer. * @db_addr: Doorbell address. * @db_data: Address where db_data is stored. Serves as key for the * entry to delete. * * Return: Int.
*/ int (*db_recovery_del)(struct qed_dev *cdev, void __iomem *db_addr, void *db_data);
/** * recovery_process(): Trigger a recovery process. * * @cdev: Qed dev pointer. * * Return: 0 on success, error otherwise.
*/ int (*recovery_process)(struct qed_dev *cdev);
/** * recovery_prolog(): Execute the prolog operations of a recovery process. * * @cdev: Qed dev pointer. * * Return: 0 on success, error otherwise.
*/ int (*recovery_prolog)(struct qed_dev *cdev);
/** * update_drv_state(): API to inform the change in the driver state. * * @cdev: Qed dev pointer. * @active: Active * * Return: Int.
*/ int (*update_drv_state)(struct qed_dev *cdev, bool active);
/** * update_mac(): API to inform the change in the mac address. * * @cdev: Qed dev pointer. * @mac: MAC. * * Return: Int.
*/ int (*update_mac)(struct qed_dev *cdev, const u8 *mac);
/** * update_mtu(): API to inform the change in the mtu. * * @cdev: Qed dev pointer. * @mtu: MTU. * * Return: Int.
*/ int (*update_mtu)(struct qed_dev *cdev, u16 mtu);
/** * update_wol(): Update of changes in the WoL configuration. * * @cdev: Qed dev pointer. * @enabled: true iff WoL should be enabled. * * Return: Int.
*/ int (*update_wol) (struct qed_dev *cdev, bool enabled);
/** * read_module_eeprom(): Read EEPROM. * * @cdev: Qed dev pointer. * @buf: buffer. * @dev_addr: PHY device memory region. * @offset: offset into eeprom contents to be read. * @len: buffer length, i.e., max bytes to be read. * * Return: Int.
*/ int (*read_module_eeprom)(struct qed_dev *cdev, char *buf, u8 dev_addr, u32 offset, u32 len);
/** * get_affin_hwfn_idx(): Get affine HW function. * * @cdev: Qed dev pointer. * * Return: u8.
*/
u8 (*get_affin_hwfn_idx)(struct qed_dev *cdev);
/** * read_nvm_cfg(): Read NVM config attribute value. * * @cdev: Qed dev pointer. * @buf: Buffer. * @cmd: NVM CFG command id. * @entity_id: Entity id. * * Return: Int.
*/ int (*read_nvm_cfg)(struct qed_dev *cdev, u8 **buf, u32 cmd,
u32 entity_id); /** * read_nvm_cfg_len(): Read NVM config attribute value. * * @cdev: Qed dev pointer. * @cmd: NVM CFG command id. * * Return: config id length, 0 on error.
*/ int (*read_nvm_cfg_len)(struct qed_dev *cdev, u32 cmd);
/** * set_grc_config(): Configure value for grc config id. * * @cdev: Qed dev pointer. * @cfg_id: grc config id * @val: grc config value * * Return: Int.
*/ int (*set_grc_config)(struct qed_dev *cdev, u32 cfg_id, u32 val);
/** * qed_sb_ack(): This function creates an update command for interrupts * that is written to the IGU. * * @sb_info: This is the structure allocated and * initialized per status block. Assumption is * that it was initialized using qed_sb_init * @int_cmd: Enable/Disable/Nop * @upd_flg: Whether igu consumer should be updated. * * Return: inline void.
*/ staticinlinevoid qed_sb_ack(struct qed_sb_info *sb_info, enum igu_int_cmd int_cmd,
u8 upd_flg)
{
u32 igu_ack;
/* Both segments (interrupts & acks) are written to same place address; * Need to guarantee all commands will be received (in-order) by HW.
*/
barrier();
}
staticinlinevoid __internal_ram_wr(void *p_hwfn, void __iomem *addr, int size,
u32 *data)
{ unsignedint i;
for (i = 0; i < size / sizeof(*data); i++)
DIRECT_REG_WR(&((u32 __iomem *)addr)[i], data[i]);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.