X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fqede%2Fbase%2Fecore_mcp.h;h=185cc23394dc79a57cd0dc8ee1f9b2aa7f3c6ab9;hb=1e8d75d8059701fd15876416be06064735ec5e87;hp=875b205ff7a6d7ae67e40e2af589a6746c2c04b6;hpb=f5940e7d0f47ff7bbc49c484ffc6c2845ac4857c;p=dpdk.git diff --git a/drivers/net/qede/base/ecore_mcp.h b/drivers/net/qede/base/ecore_mcp.h index 875b205ff7..185cc23394 100644 --- a/drivers/net/qede/base/ecore_mcp.h +++ b/drivers/net/qede/base/ecore_mcp.h @@ -1,9 +1,7 @@ -/* - * Copyright (c) 2016 QLogic Corporation. +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright (c) 2016 - 2018 Cavium Inc. * All rights reserved. - * www.qlogic.com - * - * See LICENSE.qede_pmd for copyright and licensing details. + * www.cavium.com */ #ifndef __ECORE_MCP_H__ @@ -27,9 +25,6 @@ rel_pfid) #define MCP_PF_ID(p_hwfn) MCP_PF_ID_BY_REL(p_hwfn, (p_hwfn)->rel_pf_id) -#define MFW_PORT(_p_hwfn) ((_p_hwfn)->abs_pf_id % \ - ecore_device_num_ports((_p_hwfn)->p_dev)) - struct ecore_mcp_info { /* List for mailbox commands which were sent and wait for a response */ osal_list_t cmd_list; @@ -80,11 +75,16 @@ struct ecore_mcp_mb_params { u32 cmd; u32 param; void *p_data_src; - u8 data_src_size; void *p_data_dst; - u8 data_dst_size; u32 mcp_resp; u32 mcp_param; + u8 data_src_size; + u8 data_dst_size; + u32 flags; +#define ECORE_MB_FLAG_CAN_SLEEP (0x1 << 0) +#define ECORE_MB_FLAG_AVOID_BLOCK (0x1 << 1) +#define ECORE_MB_FLAGS_IS_SET(params, flag) \ + ((params) != OSAL_NULL && ((params)->flags & ECORE_MB_FLAG_##flag)) }; struct ecore_drv_tlv_hdr { @@ -565,4 +565,25 @@ ecore_mcp_drv_attribute(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt, void ecore_mcp_read_ufp_config(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt); +void ecore_mcp_wol_wr(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt, + u32 offset, u32 val); + +/** + * @brief Get the engine affinity configuration. + * + * @param p_hwfn + * @param p_ptt + */ +enum _ecore_status_t ecore_mcp_get_engine_config(struct ecore_hwfn *p_hwfn, + struct ecore_ptt *p_ptt); + +/** + * @brief Get the PPFID bitmap. + * + * @param p_hwfn + * @param p_ptt + */ +enum _ecore_status_t ecore_mcp_get_ppfid_bitmap(struct ecore_hwfn *p_hwfn, + struct ecore_ptt *p_ptt); + #endif /* __ECORE_MCP_H__ */