2 * Copyright (c) 2016 QLogic Corporation.
6 * See LICENSE.qede_pmd for copyright and licensing details.
9 #ifndef __ECORE_MCP_API_H__
10 #define __ECORE_MCP_API_H__
12 #include "ecore_status.h"
14 struct ecore_mcp_link_speed_params {
16 u32 advertised_speeds; /* bitmask of DRV_SPEED_CAPABILITY */
17 u32 forced_speed; /* In Mb/s */
20 struct ecore_mcp_link_pause_params {
26 enum ecore_mcp_eee_mode {
27 ECORE_MCP_EEE_DISABLED,
28 ECORE_MCP_EEE_ENABLED,
29 ECORE_MCP_EEE_UNSUPPORTED
32 struct ecore_link_eee_params {
34 #define ECORE_EEE_1G_ADV (1 << 0)
35 #define ECORE_EEE_10G_ADV (1 << 1)
36 /* Capabilities are represented using ECORE_EEE_*_ADV values */
43 struct ecore_mcp_link_params {
44 struct ecore_mcp_link_speed_params speed;
45 struct ecore_mcp_link_pause_params pause;
46 u32 loopback_mode; /* in PMM_LOOPBACK values */
47 struct ecore_link_eee_params eee;
50 struct ecore_mcp_link_capabilities {
51 u32 speed_capabilities;
52 bool default_speed_autoneg; /* In Mb/s */
53 u32 default_speed; /* In Mb/s */
54 enum ecore_mcp_eee_mode default_eee;
59 struct ecore_mcp_link_state {
62 u32 line_speed; /* In Mb/s */
63 u32 min_pf_rate; /* In Mb/s */
64 u32 speed; /* In Mb/s */
69 bool parallel_detection;
72 #define ECORE_LINK_PARTNER_SPEED_1G_HD (1 << 0)
73 #define ECORE_LINK_PARTNER_SPEED_1G_FD (1 << 1)
74 #define ECORE_LINK_PARTNER_SPEED_10G (1 << 2)
75 #define ECORE_LINK_PARTNER_SPEED_20G (1 << 3)
76 #define ECORE_LINK_PARTNER_SPEED_25G (1 << 4)
77 #define ECORE_LINK_PARTNER_SPEED_40G (1 << 5)
78 #define ECORE_LINK_PARTNER_SPEED_50G (1 << 6)
79 #define ECORE_LINK_PARTNER_SPEED_100G (1 << 7)
80 u32 partner_adv_speed;
82 bool partner_tx_flow_ctrl_en;
83 bool partner_rx_flow_ctrl_en;
85 #define ECORE_LINK_PARTNER_SYMMETRIC_PAUSE (1)
86 #define ECORE_LINK_PARTNER_ASYMMETRIC_PAUSE (2)
87 #define ECORE_LINK_PARTNER_BOTH_PAUSE (3)
97 struct ecore_mcp_function_info {
100 enum ecore_pci_personality protocol;
110 #define ECORE_MCP_VLAN_UNSET (0xffff)
116 struct ecore_mcp_nvm_common {
123 struct ecore_mcp_nvm_rd {
128 struct ecore_mcp_nvm_wr {
133 struct ecore_mcp_nvm_params {
134 #define ECORE_MCP_CMD (1 << 0)
135 #define ECORE_MCP_NVM_RD (1 << 1)
136 #define ECORE_MCP_NVM_WR (1 << 2)
139 struct ecore_mcp_nvm_common nvm_common;
142 struct ecore_mcp_nvm_rd nvm_rd;
143 struct ecore_mcp_nvm_wr nvm_wr;
147 #ifndef __EXTRACT__LINUX__
148 enum ecore_nvm_images {
149 ECORE_NVM_IMAGE_ISCSI_CFG,
150 ECORE_NVM_IMAGE_FCOE_CFG,
154 struct ecore_mcp_drv_version {
156 u8 name[MCP_DRV_VER_STR_SIZE - 4];
159 struct ecore_mcp_lan_stats {
165 #ifndef ECORE_PROTO_STATS
166 #define ECORE_PROTO_STATS
167 struct ecore_mcp_fcoe_stats {
174 struct ecore_mcp_iscsi_stats {
181 struct ecore_mcp_rdma_stats {
188 enum ecore_mcp_protocol_type {
190 ECORE_MCP_FCOE_STATS,
191 ECORE_MCP_ISCSI_STATS,
195 union ecore_mcp_protocol_stats {
196 struct ecore_mcp_lan_stats lan_stats;
197 struct ecore_mcp_fcoe_stats fcoe_stats;
198 struct ecore_mcp_iscsi_stats iscsi_stats;
199 struct ecore_mcp_rdma_stats rdma_stats;
203 enum ecore_ov_client {
205 ECORE_OV_CLIENT_USER,
206 ECORE_OV_CLIENT_VENDOR_SPEC
209 enum ecore_ov_driver_state {
210 ECORE_OV_DRIVER_STATE_NOT_LOADED,
211 ECORE_OV_DRIVER_STATE_DISABLED,
212 ECORE_OV_DRIVER_STATE_ACTIVE
215 #define ECORE_MAX_NPIV_ENTRIES 128
216 #define ECORE_WWN_SIZE 8
217 struct ecore_fc_npiv_tbl {
219 u8 wwpn[ECORE_MAX_NPIV_ENTRIES][ECORE_WWN_SIZE];
220 u8 wwnn[ECORE_MAX_NPIV_ENTRIES][ECORE_WWN_SIZE];
223 #ifndef __EXTRACT__LINUX__
224 enum ecore_led_mode {
227 ECORE_LED_MODE_RESTORE
231 struct ecore_temperature_sensor {
238 #define ECORE_MAX_NUM_OF_SENSORS 7
239 struct ecore_temperature_info {
241 struct ecore_temperature_sensor sensors[ECORE_MAX_NUM_OF_SENSORS];
244 enum ecore_mba_img_idx {
245 ECORE_MBA_LEGACY_IDX,
246 ECORE_MBA_PCI3CLP_IDX,
253 ECORE_MAX_NUM_OF_ROMIMG
256 struct ecore_mba_vers {
257 u32 mba_vers[ECORE_MAX_NUM_OF_ROMIMG];
260 enum ecore_mfw_tlv_type {
261 ECORE_MFW_TLV_GENERIC = 0x1, /* Core driver TLVs */
262 ECORE_MFW_TLV_ETH = 0x2, /* L2 driver TLVs */
263 ECORE_MFW_TLV_FCOE = 0x4, /* FCoE protocol TLVs */
264 ECORE_MFW_TLV_ISCSI = 0x8, /* SCSI protocol TLVs */
265 ECORE_MFW_TLV_MAX = 0x16,
268 struct ecore_mfw_tlv_generic {
274 bool additional_mac1_set;
276 bool additional_mac2_set;
280 bool pxe_progress_set;
291 struct ecore_mfw_tlv_eth {
293 bool lso_maxoff_size_set;
295 bool lso_minseg_size_set;
299 bool tx_descr_size_set;
301 bool rx_descr_size_set;
305 bool tcp4_offloads_set;
307 bool tcp6_offloads_set;
309 bool tx_descr_qdepth_set;
311 bool rx_descr_qdepth_set;
313 bool iov_offload_set;
319 bool num_txqs_full_set;
321 bool num_rxqs_full_set;
324 struct ecore_mfw_tlv_fcoe {
326 bool scsi_timeout_set;
340 bool num_npiv_ids_set;
342 bool switch_name_set;
344 bool switch_portnum_set;
346 bool switch_portid_set;
348 bool vendor_name_set;
350 bool switch_model_set;
351 u8 switch_fw_version[8];
352 bool switch_fw_version_set;
359 u16 fip_tx_descr_size;
360 bool fip_tx_descr_size_set;
361 u16 fip_rx_descr_size;
362 bool fip_rx_descr_size_set;
364 bool link_failures_set;
365 u8 fcoe_boot_progress;
366 bool fcoe_boot_progress_set;
372 bool fcoe_txq_depth_set;
374 bool fcoe_rxq_depth_set;
376 bool fcoe_rx_frames_set;
378 bool fcoe_rx_bytes_set;
380 bool fcoe_tx_frames_set;
382 bool fcoe_tx_bytes_set;
385 u32 crc_err_src_fcid[5];
386 bool crc_err_src_fcid_set[5];
387 u8 crc_err_tstamp[5][14];
388 bool crc_err_tstamp_set[5];
394 bool primtive_err_set;
396 bool disparity_err_set;
397 u16 code_violation_err;
398 bool code_violation_err_set;
400 bool flogi_param_set[4];
402 bool flogi_tstamp_set;
403 u32 flogi_acc_param[4];
404 bool flogi_acc_param_set[4];
405 u8 flogi_acc_tstamp[14];
406 bool flogi_acc_tstamp_set;
409 u8 flogi_rjt_tstamp[14];
410 bool flogi_rjt_tstamp_set;
423 u32 plogi_dst_fcid[5];
424 bool plogi_dst_fcid_set[5];
425 u8 plogi_tstamp[5][14];
426 bool plogi_tstamp_set[5];
427 u32 plogi_acc_src_fcid[5];
428 bool plogi_acc_src_fcid_set[5];
429 u8 plogi_acc_tstamp[5][14];
430 bool plogi_acc_tstamp_set[5];
437 u32 plogo_src_fcid[5];
438 bool plogo_src_fcid_set[5];
439 u8 plogo_tstamp[5][14];
440 bool plogo_tstamp_set[5];
452 bool rx_abts_acc_set;
454 bool rx_abts_rjt_set;
455 u32 abts_dst_fcid[5];
456 bool abts_dst_fcid_set[5];
457 u8 abts_tstamp[5][14];
458 bool abts_tstamp_set[5];
461 u32 rx_rscn_nport[4];
462 bool rx_rscn_nport_set[4];
466 bool abort_task_sets_set;
490 bool scsi_cond_met_set;
495 u8 scsi_inter_cond_met;
496 bool scsi_inter_cond_met_set;
497 u8 scsi_rsv_conflicts;
498 bool scsi_rsv_conflicts_set;
500 bool scsi_tsk_full_set;
502 bool scsi_aca_active_set;
504 bool scsi_tsk_abort_set;
506 bool scsi_rx_chk_set[5];
507 u8 scsi_chk_tstamp[5][14];
508 bool scsi_chk_tstamp_set[5];
511 struct ecore_mfw_tlv_iscsi {
513 bool target_llmnr_set;
515 bool header_digest_set;
517 bool data_digest_set;
519 bool auth_method_set;
520 u16 boot_taget_portal;
521 bool boot_taget_portal_set;
525 bool tx_desc_size_set;
527 bool rx_desc_size_set;
529 bool boot_progress_set;
531 bool tx_desc_qdepth_set;
533 bool rx_desc_qdepth_set;
544 union ecore_mfw_tlv_data {
545 struct ecore_mfw_tlv_generic generic;
546 struct ecore_mfw_tlv_eth eth;
547 struct ecore_mfw_tlv_fcoe fcoe;
548 struct ecore_mfw_tlv_iscsi iscsi;
552 * @brief - returns the link params of the hw function
556 * @returns pointer to link params
558 struct ecore_mcp_link_params *ecore_mcp_get_link_params(struct ecore_hwfn *);
561 * @brief - return the link state of the hw function
565 * @returns pointer to link state
567 struct ecore_mcp_link_state *ecore_mcp_get_link_state(struct ecore_hwfn *);
570 * @brief - return the link capabilities of the hw function
574 * @returns pointer to link capabilities
576 struct ecore_mcp_link_capabilities
577 *ecore_mcp_get_link_capabilities(struct ecore_hwfn *p_hwfn);
580 * @brief Request the MFW to set the the link according to 'link_input'.
584 * @param b_up - raise link if `true'. Reset link if `false'.
586 * @return enum _ecore_status_t
588 enum _ecore_status_t ecore_mcp_set_link(struct ecore_hwfn *p_hwfn,
589 struct ecore_ptt *p_ptt,
593 * @brief Get the management firmware version value
597 * @param p_mfw_ver - mfw version value
598 * @param p_running_bundle_id - image id in nvram; Optional.
600 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
602 enum _ecore_status_t ecore_mcp_get_mfw_ver(struct ecore_hwfn *p_hwfn,
603 struct ecore_ptt *p_ptt,
605 u32 *p_running_bundle_id);
608 * @brief Get media type value of the port.
610 * @param p_dev - ecore dev pointer
611 * @param mfw_ver - media type value
613 * @return enum _ecore_status_t -
614 * ECORE_SUCCESS - Operation was successful.
615 * ECORE_BUSY - Operation failed
617 enum _ecore_status_t ecore_mcp_get_media_type(struct ecore_dev *p_dev,
621 * @brief - Sends a command to the MCP mailbox.
623 * @param p_hwfn - hw function
624 * @param p_ptt - PTT required for register access
625 * @param cmd - command to be sent to the MCP
626 * @param param - optional param
627 * @param o_mcp_resp - the MCP response code (exclude sequence)
628 * @param o_mcp_param - optional parameter provided by the MCP response
630 * @return enum _ecore_status_t -
631 * ECORE_SUCCESS - operation was successful
632 * ECORE_BUSY - operation failed
634 enum _ecore_status_t ecore_mcp_cmd(struct ecore_hwfn *p_hwfn,
635 struct ecore_ptt *p_ptt, u32 cmd, u32 param,
636 u32 *o_mcp_resp, u32 *o_mcp_param);
639 * @brief - drains the nig, allowing completion to pass in case of pauses.
640 * (Should be called only from sleepable context)
645 enum _ecore_status_t ecore_mcp_drain(struct ecore_hwfn *p_hwfn,
646 struct ecore_ptt *p_ptt);
650 * @brief - return the mcp function info of the hw function
654 * @returns pointer to mcp function info
656 const struct ecore_mcp_function_info
657 *ecore_mcp_get_function_info(struct ecore_hwfn *p_hwfn);
661 * @brief - Function for reading/manipulating the nvram. Following are supported
663 * 1. Read: Read the specified nvram offset.
665 * type - ECORE_MCP_NVM_RD
666 * cmd - command code (e.g. DRV_MSG_CODE_NVM_READ_NVRAM)
667 * offset - nvm offset
671 * buf_size - buffer size
673 * 2. Write: Write the data at the specified nvram offset
675 * type - ECORE_MCP_NVM_WR
676 * cmd - command code (e.g. DRV_MSG_CODE_NVM_WRITE_NVRAM)
677 * offset - nvm offset
679 * buf_size - buffer size
681 * 3. Command: Send the NVM command to MCP.
683 * type - ECORE_MCP_CMD
684 * cmd - command code (e.g. DRV_MSG_CODE_NVM_DEL_FILE)
685 * offset - nvm offset
692 * @return ECORE_SUCCESS - operation was successful.
694 enum _ecore_status_t ecore_mcp_nvm_command(struct ecore_hwfn *p_hwfn,
695 struct ecore_ptt *p_ptt,
696 struct ecore_mcp_nvm_params *params);
700 * @brief - count number of function with a matching personality on engine.
704 * @param personalities - a bitmask of ecore_pci_personality values
706 * @returns the count of all devices on engine whose personality match one of
709 int ecore_mcp_get_personality_cnt(struct ecore_hwfn *p_hwfn,
710 struct ecore_ptt *p_ptt,
715 * @brief Get the flash size value
719 * @param p_flash_size - flash size in bytes to be filled.
721 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
723 enum _ecore_status_t ecore_mcp_get_flash_size(struct ecore_hwfn *p_hwfn,
724 struct ecore_ptt *p_ptt,
728 * @brief Send driver version to MFW
732 * @param version - Version value
733 * @param name - Protocol driver name
735 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
738 ecore_mcp_send_drv_version(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
739 struct ecore_mcp_drv_version *p_ver);
742 * @brief Read the MFW process kill counter
749 u32 ecore_get_process_kill_counter(struct ecore_hwfn *p_hwfn,
750 struct ecore_ptt *p_ptt);
753 * @brief Trigger a recovery process
758 * @return enum _ecore_status_t
760 enum _ecore_status_t ecore_start_recovery_process(struct ecore_hwfn *p_hwfn,
761 struct ecore_ptt *p_ptt);
764 * @brief A recovery handler must call this function as its first step.
765 * It is assumed that the handler is not run from an interrupt context.
770 * @return enum _ecore_status_t
772 enum _ecore_status_t ecore_recovery_prolog(struct ecore_dev *p_dev);
775 * @brief Notify MFW about the change in base device properties
779 * @param client - ecore client type
781 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
784 ecore_mcp_ov_update_current_config(struct ecore_hwfn *p_hwfn,
785 struct ecore_ptt *p_ptt,
786 enum ecore_ov_client client);
789 * @brief Notify MFW about the driver state
793 * @param drv_state - Driver state
795 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
798 ecore_mcp_ov_update_driver_state(struct ecore_hwfn *p_hwfn,
799 struct ecore_ptt *p_ptt,
800 enum ecore_ov_driver_state drv_state);
803 * @brief Read NPIV settings form the MFW
807 * @param p_table - Array to hold the FC NPIV data. Client need allocate the
808 * required buffer. The field 'count' specifies number of NPIV
809 * entries. A value of 0 means the table was not populated.
811 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
814 ecore_mcp_ov_get_fc_npiv(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
815 struct ecore_fc_npiv_tbl *p_table);
818 * @brief Send MTU size to MFW
822 * @param mtu - MTU size
824 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
826 enum _ecore_status_t ecore_mcp_ov_update_mtu(struct ecore_hwfn *p_hwfn,
827 struct ecore_ptt *p_ptt, u16 mtu);
830 * @brief Set LED status
834 * @param mode - LED mode
836 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
838 enum _ecore_status_t ecore_mcp_set_led(struct ecore_hwfn *p_hwfn,
839 struct ecore_ptt *p_ptt,
840 enum ecore_led_mode mode);
843 * @brief Set secure mode
846 * @param addr - nvm offset
848 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
850 enum _ecore_status_t ecore_mcp_nvm_set_secure_mode(struct ecore_dev *p_dev,
854 * @brief Write to phy
857 * @param addr - nvm offset
858 * @param cmd - nvm command
859 * @param p_buf - nvm write buffer
860 * @param len - buffer len
862 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
864 enum _ecore_status_t ecore_mcp_phy_write(struct ecore_dev *p_dev, u32 cmd,
865 u32 addr, u8 *p_buf, u32 len);
868 * @brief Write to nvm
871 * @param addr - nvm offset
872 * @param cmd - nvm command
873 * @param p_buf - nvm write buffer
874 * @param len - buffer len
876 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
878 enum _ecore_status_t ecore_mcp_nvm_write(struct ecore_dev *p_dev, u32 cmd,
879 u32 addr, u8 *p_buf, u32 len);
882 * @brief Put file begin
885 * @param addr - nvm offset
887 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
889 enum _ecore_status_t ecore_mcp_nvm_put_file_begin(struct ecore_dev *p_dev,
896 * @param addr - nvm offset
898 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
900 enum _ecore_status_t ecore_mcp_nvm_del_file(struct ecore_dev *p_dev,
904 * @brief Check latest response
907 * @param p_buf - nvm write buffer
909 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
911 enum _ecore_status_t ecore_mcp_nvm_resp(struct ecore_dev *p_dev, u8 *p_buf);
914 * @brief Read from phy
917 * @param addr - nvm offset
918 * @param cmd - nvm command
919 * @param p_buf - nvm write buffer
920 * @param len - buffer len
922 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
924 enum _ecore_status_t ecore_mcp_phy_read(struct ecore_dev *p_dev, u32 cmd,
925 u32 addr, u8 *p_buf, u32 len);
928 * @brief Read from nvm
931 * @param addr - nvm offset
932 * @param p_buf - nvm write buffer
933 * @param len - buffer len
935 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
937 enum _ecore_status_t ecore_mcp_nvm_read(struct ecore_dev *p_dev, u32 addr,
941 * @brief Read from sfp
943 * @param p_hwfn - hw function
944 * @param p_ptt - PTT required for register access
945 * @param port - transceiver port
946 * @param addr - I2C address
947 * @param offset - offset in sfp
948 * @param len - buffer length
949 * @param p_buf - buffer to read into
951 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
953 enum _ecore_status_t ecore_mcp_phy_sfp_read(struct ecore_hwfn *p_hwfn,
954 struct ecore_ptt *p_ptt,
955 u32 port, u32 addr, u32 offset,
959 * @brief Write to sfp
961 * @param p_hwfn - hw function
962 * @param p_ptt - PTT required for register access
963 * @param port - transceiver port
964 * @param addr - I2C address
965 * @param offset - offset in sfp
966 * @param len - buffer length
967 * @param p_buf - buffer to write from
969 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
971 enum _ecore_status_t ecore_mcp_phy_sfp_write(struct ecore_hwfn *p_hwfn,
972 struct ecore_ptt *p_ptt,
973 u32 port, u32 addr, u32 offset,
979 * @param p_hwfn - hw function
980 * @param p_ptt - PTT required for register access
981 * @param gpio - gpio number
982 * @param gpio_val - value read from gpio
984 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
986 enum _ecore_status_t ecore_mcp_gpio_read(struct ecore_hwfn *p_hwfn,
987 struct ecore_ptt *p_ptt,
988 u16 gpio, u32 *gpio_val);
993 * @param p_hwfn - hw function
994 * @param p_ptt - PTT required for register access
995 * @param gpio - gpio number
996 * @param gpio_val - value to write to gpio
998 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
1000 enum _ecore_status_t ecore_mcp_gpio_write(struct ecore_hwfn *p_hwfn,
1001 struct ecore_ptt *p_ptt,
1002 u16 gpio, u16 gpio_val);
1005 * @brief Gpio get information
1007 * @param p_hwfn - hw function
1008 * @param p_ptt - PTT required for register access
1009 * @param gpio - gpio number
1010 * @param gpio_direction - gpio is output (0) or input (1)
1011 * @param gpio_ctrl - gpio control is uninitialized (0),
1012 * path 0 (1), path 1 (2) or shared(3)
1014 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
1016 enum _ecore_status_t ecore_mcp_gpio_info(struct ecore_hwfn *p_hwfn,
1017 struct ecore_ptt *p_ptt,
1018 u16 gpio, u32 *gpio_direction,
1022 * @brief Bist register test
1024 * @param p_hwfn - hw function
1025 * @param p_ptt - PTT required for register access
1027 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
1029 enum _ecore_status_t ecore_mcp_bist_register_test(struct ecore_hwfn *p_hwfn,
1030 struct ecore_ptt *p_ptt);
1033 * @brief Bist clock test
1035 * @param p_hwfn - hw function
1036 * @param p_ptt - PTT required for register access
1038 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
1040 enum _ecore_status_t ecore_mcp_bist_clock_test(struct ecore_hwfn *p_hwfn,
1041 struct ecore_ptt *p_ptt);
1044 * @brief Bist nvm test - get number of images
1046 * @param p_hwfn - hw function
1047 * @param p_ptt - PTT required for register access
1048 * @param num_images - number of images if operation was
1049 * successful. 0 if not.
1051 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
1053 enum _ecore_status_t ecore_mcp_bist_nvm_test_get_num_images(
1054 struct ecore_hwfn *p_hwfn,
1055 struct ecore_ptt *p_ptt,
1059 * @brief Bist nvm test - get image attributes by index
1061 * @param p_hwfn - hw function
1062 * @param p_ptt - PTT required for register access
1063 * @param p_image_att - Attributes of image
1064 * @param image_index - Index of image to get information for
1066 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
1068 enum _ecore_status_t ecore_mcp_bist_nvm_test_get_image_att(
1069 struct ecore_hwfn *p_hwfn,
1070 struct ecore_ptt *p_ptt,
1071 struct bist_nvm_image_att *p_image_att,
1075 * @brief ecore_mcp_get_temperature_info - get the status of the temperature
1078 * @param p_hwfn - hw function
1079 * @param p_ptt - PTT required for register access
1080 * @param p_temp_status - A pointer to an ecore_temperature_info structure to
1081 * be filled with the temperature data
1083 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
1085 enum _ecore_status_t
1086 ecore_mcp_get_temperature_info(struct ecore_hwfn *p_hwfn,
1087 struct ecore_ptt *p_ptt,
1088 struct ecore_temperature_info *p_temp_info);
1091 * @brief Get MBA versions - get MBA sub images versions
1093 * @param p_hwfn - hw function
1094 * @param p_ptt - PTT required for register access
1095 * @param p_mba_vers - MBA versions array to fill
1097 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
1099 enum _ecore_status_t ecore_mcp_get_mba_versions(
1100 struct ecore_hwfn *p_hwfn,
1101 struct ecore_ptt *p_ptt,
1102 struct ecore_mba_vers *p_mba_vers);
1105 * @brief Count memory ecc events
1107 * @param p_hwfn - hw function
1108 * @param p_ptt - PTT required for register access
1109 * @param num_events - number of memory ecc events
1111 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
1113 enum _ecore_status_t ecore_mcp_mem_ecc_events(struct ecore_hwfn *p_hwfn,
1114 struct ecore_ptt *p_ptt,
1117 struct ecore_mdump_info {
1127 * @brief - Gets the MFW crash dump configuration and logs info.
1131 * @param p_mdump_info
1133 * @param return ECORE_SUCCESS upon success.
1135 enum _ecore_status_t
1136 ecore_mcp_mdump_get_info(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
1137 struct ecore_mdump_info *p_mdump_info);
1140 * @brief - Clears the MFW crash dump logs.
1145 * @param return ECORE_SUCCESS upon success.
1147 enum _ecore_status_t ecore_mcp_mdump_clear_logs(struct ecore_hwfn *p_hwfn,
1148 struct ecore_ptt *p_ptt);
1151 * @brief - Clear the mdump retained data.
1156 * @param return ECORE_SUCCESS upon success.
1158 enum _ecore_status_t ecore_mcp_mdump_clr_retain(struct ecore_hwfn *p_hwfn,
1159 struct ecore_ptt *p_ptt);
1162 * @brief - Processes the TLV request from MFW i.e., get the required TLV info
1163 * from the ecore client and send it to the MFW.
1168 * @param return ECORE_SUCCESS upon success.
1170 enum _ecore_status_t ecore_mfw_process_tlv_req(struct ecore_hwfn *p_hwfn,
1171 struct ecore_ptt *p_ptt);
1175 * @brief - Return whether management firmware support smart AN
1179 * @return bool - true iff feature is supported.
1181 bool ecore_mcp_is_smart_an_supported(struct ecore_hwfn *p_hwfn);