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
612 * @param mfw_ver - media type value
614 * @return enum _ecore_status_t -
615 * ECORE_SUCCESS - Operation was successful.
616 * ECORE_BUSY - Operation failed
618 enum _ecore_status_t ecore_mcp_get_media_type(struct ecore_hwfn *p_hwfn,
619 struct ecore_ptt *p_ptt,
623 * @brief - Sends a command to the MCP mailbox.
625 * @param p_hwfn - hw function
626 * @param p_ptt - PTT required for register access
627 * @param cmd - command to be sent to the MCP
628 * @param param - optional param
629 * @param o_mcp_resp - the MCP response code (exclude sequence)
630 * @param o_mcp_param - optional parameter provided by the MCP response
632 * @return enum _ecore_status_t -
633 * ECORE_SUCCESS - operation was successful
634 * ECORE_BUSY - operation failed
636 enum _ecore_status_t ecore_mcp_cmd(struct ecore_hwfn *p_hwfn,
637 struct ecore_ptt *p_ptt, u32 cmd, u32 param,
638 u32 *o_mcp_resp, u32 *o_mcp_param);
641 * @brief - drains the nig, allowing completion to pass in case of pauses.
642 * (Should be called only from sleepable context)
647 enum _ecore_status_t ecore_mcp_drain(struct ecore_hwfn *p_hwfn,
648 struct ecore_ptt *p_ptt);
652 * @brief - return the mcp function info of the hw function
656 * @returns pointer to mcp function info
658 const struct ecore_mcp_function_info
659 *ecore_mcp_get_function_info(struct ecore_hwfn *p_hwfn);
663 * @brief - Function for reading/manipulating the nvram. Following are supported
665 * 1. Read: Read the specified nvram offset.
667 * type - ECORE_MCP_NVM_RD
668 * cmd - command code (e.g. DRV_MSG_CODE_NVM_READ_NVRAM)
669 * offset - nvm offset
673 * buf_size - buffer size
675 * 2. Write: Write the data at the specified nvram offset
677 * type - ECORE_MCP_NVM_WR
678 * cmd - command code (e.g. DRV_MSG_CODE_NVM_WRITE_NVRAM)
679 * offset - nvm offset
681 * buf_size - buffer size
683 * 3. Command: Send the NVM command to MCP.
685 * type - ECORE_MCP_CMD
686 * cmd - command code (e.g. DRV_MSG_CODE_NVM_DEL_FILE)
687 * offset - nvm offset
694 * @return ECORE_SUCCESS - operation was successful.
696 enum _ecore_status_t ecore_mcp_nvm_command(struct ecore_hwfn *p_hwfn,
697 struct ecore_ptt *p_ptt,
698 struct ecore_mcp_nvm_params *params);
702 * @brief - count number of function with a matching personality on engine.
706 * @param personalities - a bitmask of ecore_pci_personality values
708 * @returns the count of all devices on engine whose personality match one of
711 int ecore_mcp_get_personality_cnt(struct ecore_hwfn *p_hwfn,
712 struct ecore_ptt *p_ptt,
717 * @brief Get the flash size value
721 * @param p_flash_size - flash size in bytes to be filled.
723 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
725 enum _ecore_status_t ecore_mcp_get_flash_size(struct ecore_hwfn *p_hwfn,
726 struct ecore_ptt *p_ptt,
730 * @brief Send driver version to MFW
734 * @param version - Version value
735 * @param name - Protocol driver name
737 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
740 ecore_mcp_send_drv_version(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
741 struct ecore_mcp_drv_version *p_ver);
744 * @brief Read the MFW process kill counter
751 u32 ecore_get_process_kill_counter(struct ecore_hwfn *p_hwfn,
752 struct ecore_ptt *p_ptt);
755 * @brief Trigger a recovery process
760 * @return enum _ecore_status_t
762 enum _ecore_status_t ecore_start_recovery_process(struct ecore_hwfn *p_hwfn,
763 struct ecore_ptt *p_ptt);
766 * @brief A recovery handler must call this function as its first step.
767 * It is assumed that the handler is not run from an interrupt context.
772 * @return enum _ecore_status_t
774 enum _ecore_status_t ecore_recovery_prolog(struct ecore_dev *p_dev);
777 * @brief Notify MFW about the change in base device properties
781 * @param client - ecore client type
783 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
786 ecore_mcp_ov_update_current_config(struct ecore_hwfn *p_hwfn,
787 struct ecore_ptt *p_ptt,
788 enum ecore_ov_client client);
791 * @brief Notify MFW about the driver state
795 * @param drv_state - Driver state
797 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
800 ecore_mcp_ov_update_driver_state(struct ecore_hwfn *p_hwfn,
801 struct ecore_ptt *p_ptt,
802 enum ecore_ov_driver_state drv_state);
805 * @brief Read NPIV settings form the MFW
809 * @param p_table - Array to hold the FC NPIV data. Client need allocate the
810 * required buffer. The field 'count' specifies number of NPIV
811 * entries. A value of 0 means the table was not populated.
813 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
816 ecore_mcp_ov_get_fc_npiv(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
817 struct ecore_fc_npiv_tbl *p_table);
820 * @brief Send MTU size to MFW
824 * @param mtu - MTU size
826 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
828 enum _ecore_status_t ecore_mcp_ov_update_mtu(struct ecore_hwfn *p_hwfn,
829 struct ecore_ptt *p_ptt, u16 mtu);
832 * @brief Set LED status
836 * @param mode - LED mode
838 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
840 enum _ecore_status_t ecore_mcp_set_led(struct ecore_hwfn *p_hwfn,
841 struct ecore_ptt *p_ptt,
842 enum ecore_led_mode mode);
845 * @brief Set secure mode
848 * @param addr - nvm offset
850 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
852 enum _ecore_status_t ecore_mcp_nvm_set_secure_mode(struct ecore_dev *p_dev,
856 * @brief Write to phy
859 * @param addr - nvm offset
860 * @param cmd - nvm command
861 * @param p_buf - nvm write buffer
862 * @param len - buffer len
864 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
866 enum _ecore_status_t ecore_mcp_phy_write(struct ecore_dev *p_dev, u32 cmd,
867 u32 addr, u8 *p_buf, u32 len);
870 * @brief Write to nvm
873 * @param addr - nvm offset
874 * @param cmd - nvm command
875 * @param p_buf - nvm write buffer
876 * @param len - buffer len
878 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
880 enum _ecore_status_t ecore_mcp_nvm_write(struct ecore_dev *p_dev, u32 cmd,
881 u32 addr, u8 *p_buf, u32 len);
884 * @brief Put file begin
887 * @param addr - nvm offset
889 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
891 enum _ecore_status_t ecore_mcp_nvm_put_file_begin(struct ecore_dev *p_dev,
898 * @param addr - nvm offset
900 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
902 enum _ecore_status_t ecore_mcp_nvm_del_file(struct ecore_dev *p_dev,
906 * @brief Check latest response
909 * @param p_buf - nvm write buffer
911 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
913 enum _ecore_status_t ecore_mcp_nvm_resp(struct ecore_dev *p_dev, u8 *p_buf);
916 * @brief Read from phy
919 * @param addr - nvm offset
920 * @param cmd - nvm command
921 * @param p_buf - nvm write buffer
922 * @param len - buffer len
924 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
926 enum _ecore_status_t ecore_mcp_phy_read(struct ecore_dev *p_dev, u32 cmd,
927 u32 addr, u8 *p_buf, u32 len);
930 * @brief Read from nvm
933 * @param addr - nvm offset
934 * @param p_buf - nvm write buffer
935 * @param len - buffer len
937 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
939 enum _ecore_status_t ecore_mcp_nvm_read(struct ecore_dev *p_dev, u32 addr,
943 * @brief Read from sfp
945 * @param p_hwfn - hw function
946 * @param p_ptt - PTT required for register access
947 * @param port - transceiver port
948 * @param addr - I2C address
949 * @param offset - offset in sfp
950 * @param len - buffer length
951 * @param p_buf - buffer to read into
953 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
955 enum _ecore_status_t ecore_mcp_phy_sfp_read(struct ecore_hwfn *p_hwfn,
956 struct ecore_ptt *p_ptt,
957 u32 port, u32 addr, u32 offset,
961 * @brief Write to sfp
963 * @param p_hwfn - hw function
964 * @param p_ptt - PTT required for register access
965 * @param port - transceiver port
966 * @param addr - I2C address
967 * @param offset - offset in sfp
968 * @param len - buffer length
969 * @param p_buf - buffer to write from
971 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
973 enum _ecore_status_t ecore_mcp_phy_sfp_write(struct ecore_hwfn *p_hwfn,
974 struct ecore_ptt *p_ptt,
975 u32 port, u32 addr, u32 offset,
981 * @param p_hwfn - hw function
982 * @param p_ptt - PTT required for register access
983 * @param gpio - gpio number
984 * @param gpio_val - value read from gpio
986 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
988 enum _ecore_status_t ecore_mcp_gpio_read(struct ecore_hwfn *p_hwfn,
989 struct ecore_ptt *p_ptt,
990 u16 gpio, u32 *gpio_val);
995 * @param p_hwfn - hw function
996 * @param p_ptt - PTT required for register access
997 * @param gpio - gpio number
998 * @param gpio_val - value to write to gpio
1000 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
1002 enum _ecore_status_t ecore_mcp_gpio_write(struct ecore_hwfn *p_hwfn,
1003 struct ecore_ptt *p_ptt,
1004 u16 gpio, u16 gpio_val);
1007 * @brief Gpio get information
1009 * @param p_hwfn - hw function
1010 * @param p_ptt - PTT required for register access
1011 * @param gpio - gpio number
1012 * @param gpio_direction - gpio is output (0) or input (1)
1013 * @param gpio_ctrl - gpio control is uninitialized (0),
1014 * path 0 (1), path 1 (2) or shared(3)
1016 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
1018 enum _ecore_status_t ecore_mcp_gpio_info(struct ecore_hwfn *p_hwfn,
1019 struct ecore_ptt *p_ptt,
1020 u16 gpio, u32 *gpio_direction,
1024 * @brief Bist register test
1026 * @param p_hwfn - hw function
1027 * @param p_ptt - PTT required for register access
1029 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
1031 enum _ecore_status_t ecore_mcp_bist_register_test(struct ecore_hwfn *p_hwfn,
1032 struct ecore_ptt *p_ptt);
1035 * @brief Bist clock test
1037 * @param p_hwfn - hw function
1038 * @param p_ptt - PTT required for register access
1040 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
1042 enum _ecore_status_t ecore_mcp_bist_clock_test(struct ecore_hwfn *p_hwfn,
1043 struct ecore_ptt *p_ptt);
1046 * @brief Bist nvm test - get number of images
1048 * @param p_hwfn - hw function
1049 * @param p_ptt - PTT required for register access
1050 * @param num_images - number of images if operation was
1051 * successful. 0 if not.
1053 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
1055 enum _ecore_status_t ecore_mcp_bist_nvm_test_get_num_images(
1056 struct ecore_hwfn *p_hwfn,
1057 struct ecore_ptt *p_ptt,
1061 * @brief Bist nvm test - get image attributes by index
1063 * @param p_hwfn - hw function
1064 * @param p_ptt - PTT required for register access
1065 * @param p_image_att - Attributes of image
1066 * @param image_index - Index of image to get information for
1068 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
1070 enum _ecore_status_t ecore_mcp_bist_nvm_test_get_image_att(
1071 struct ecore_hwfn *p_hwfn,
1072 struct ecore_ptt *p_ptt,
1073 struct bist_nvm_image_att *p_image_att,
1077 * @brief ecore_mcp_get_temperature_info - get the status of the temperature
1080 * @param p_hwfn - hw function
1081 * @param p_ptt - PTT required for register access
1082 * @param p_temp_status - A pointer to an ecore_temperature_info structure to
1083 * be filled with the temperature data
1085 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
1087 enum _ecore_status_t
1088 ecore_mcp_get_temperature_info(struct ecore_hwfn *p_hwfn,
1089 struct ecore_ptt *p_ptt,
1090 struct ecore_temperature_info *p_temp_info);
1093 * @brief Get MBA versions - get MBA sub images versions
1095 * @param p_hwfn - hw function
1096 * @param p_ptt - PTT required for register access
1097 * @param p_mba_vers - MBA versions array to fill
1099 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
1101 enum _ecore_status_t ecore_mcp_get_mba_versions(
1102 struct ecore_hwfn *p_hwfn,
1103 struct ecore_ptt *p_ptt,
1104 struct ecore_mba_vers *p_mba_vers);
1107 * @brief Count memory ecc events
1109 * @param p_hwfn - hw function
1110 * @param p_ptt - PTT required for register access
1111 * @param num_events - number of memory ecc events
1113 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
1115 enum _ecore_status_t ecore_mcp_mem_ecc_events(struct ecore_hwfn *p_hwfn,
1116 struct ecore_ptt *p_ptt,
1119 struct ecore_mdump_info {
1129 * @brief - Gets the MFW crash dump configuration and logs info.
1133 * @param p_mdump_info
1135 * @param return ECORE_SUCCESS upon success.
1137 enum _ecore_status_t
1138 ecore_mcp_mdump_get_info(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
1139 struct ecore_mdump_info *p_mdump_info);
1142 * @brief - Clears the MFW crash dump logs.
1147 * @param return ECORE_SUCCESS upon success.
1149 enum _ecore_status_t ecore_mcp_mdump_clear_logs(struct ecore_hwfn *p_hwfn,
1150 struct ecore_ptt *p_ptt);
1153 * @brief - Clear the mdump retained data.
1158 * @param return ECORE_SUCCESS upon success.
1160 enum _ecore_status_t ecore_mcp_mdump_clr_retain(struct ecore_hwfn *p_hwfn,
1161 struct ecore_ptt *p_ptt);
1164 * @brief - Processes the TLV request from MFW i.e., get the required TLV info
1165 * from the ecore client and send it to the MFW.
1170 * @param return ECORE_SUCCESS upon success.
1172 enum _ecore_status_t ecore_mfw_process_tlv_req(struct ecore_hwfn *p_hwfn,
1173 struct ecore_ptt *p_ptt);
1177 * @brief - Return whether management firmware support smart AN
1181 * @return bool - true iff feature is supported.
1183 bool ecore_mcp_is_smart_an_supported(struct ecore_hwfn *p_hwfn);