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 min_pf_rate; /* In Mb/s */
64 /* Actual link speed in Mb/s */
67 /* PF max speed in MB/s, deduced from line_speed
68 * according to PF max bandwidth configuration.
75 bool parallel_detection;
78 #define ECORE_LINK_PARTNER_SPEED_1G_HD (1 << 0)
79 #define ECORE_LINK_PARTNER_SPEED_1G_FD (1 << 1)
80 #define ECORE_LINK_PARTNER_SPEED_10G (1 << 2)
81 #define ECORE_LINK_PARTNER_SPEED_20G (1 << 3)
82 #define ECORE_LINK_PARTNER_SPEED_25G (1 << 4)
83 #define ECORE_LINK_PARTNER_SPEED_40G (1 << 5)
84 #define ECORE_LINK_PARTNER_SPEED_50G (1 << 6)
85 #define ECORE_LINK_PARTNER_SPEED_100G (1 << 7)
86 u32 partner_adv_speed;
88 bool partner_tx_flow_ctrl_en;
89 bool partner_rx_flow_ctrl_en;
91 #define ECORE_LINK_PARTNER_SYMMETRIC_PAUSE (1)
92 #define ECORE_LINK_PARTNER_ASYMMETRIC_PAUSE (2)
93 #define ECORE_LINK_PARTNER_BOTH_PAUSE (3)
103 struct ecore_mcp_function_info {
106 enum ecore_pci_personality protocol;
116 #define ECORE_MCP_VLAN_UNSET (0xffff)
122 #ifndef __EXTRACT__LINUX__
123 enum ecore_nvm_images {
124 ECORE_NVM_IMAGE_ISCSI_CFG,
125 ECORE_NVM_IMAGE_FCOE_CFG,
129 struct ecore_mcp_drv_version {
131 u8 name[MCP_DRV_VER_STR_SIZE - 4];
134 struct ecore_mcp_lan_stats {
140 #ifndef ECORE_PROTO_STATS
141 #define ECORE_PROTO_STATS
142 struct ecore_mcp_fcoe_stats {
149 struct ecore_mcp_iscsi_stats {
156 struct ecore_mcp_rdma_stats {
163 enum ecore_mcp_protocol_type {
165 ECORE_MCP_FCOE_STATS,
166 ECORE_MCP_ISCSI_STATS,
170 union ecore_mcp_protocol_stats {
171 struct ecore_mcp_lan_stats lan_stats;
172 struct ecore_mcp_fcoe_stats fcoe_stats;
173 struct ecore_mcp_iscsi_stats iscsi_stats;
174 struct ecore_mcp_rdma_stats rdma_stats;
178 enum ecore_ov_client {
180 ECORE_OV_CLIENT_USER,
181 ECORE_OV_CLIENT_VENDOR_SPEC
184 enum ecore_ov_driver_state {
185 ECORE_OV_DRIVER_STATE_NOT_LOADED,
186 ECORE_OV_DRIVER_STATE_DISABLED,
187 ECORE_OV_DRIVER_STATE_ACTIVE
190 #define ECORE_MAX_NPIV_ENTRIES 128
191 #define ECORE_WWN_SIZE 8
192 struct ecore_fc_npiv_tbl {
194 u8 wwpn[ECORE_MAX_NPIV_ENTRIES][ECORE_WWN_SIZE];
195 u8 wwnn[ECORE_MAX_NPIV_ENTRIES][ECORE_WWN_SIZE];
198 #ifndef __EXTRACT__LINUX__
199 enum ecore_led_mode {
202 ECORE_LED_MODE_RESTORE
206 struct ecore_temperature_sensor {
213 #define ECORE_MAX_NUM_OF_SENSORS 7
214 struct ecore_temperature_info {
216 struct ecore_temperature_sensor sensors[ECORE_MAX_NUM_OF_SENSORS];
219 enum ecore_mba_img_idx {
220 ECORE_MBA_LEGACY_IDX,
221 ECORE_MBA_PCI3CLP_IDX,
228 ECORE_MAX_NUM_OF_ROMIMG
231 struct ecore_mba_vers {
232 u32 mba_vers[ECORE_MAX_NUM_OF_ROMIMG];
235 enum ecore_mfw_tlv_type {
236 ECORE_MFW_TLV_GENERIC = 0x1, /* Core driver TLVs */
237 ECORE_MFW_TLV_ETH = 0x2, /* L2 driver TLVs */
238 ECORE_MFW_TLV_FCOE = 0x4, /* FCoE protocol TLVs */
239 ECORE_MFW_TLV_ISCSI = 0x8, /* SCSI protocol TLVs */
240 ECORE_MFW_TLV_MAX = 0x16,
243 struct ecore_mfw_tlv_generic {
249 bool additional_mac1_set;
251 bool additional_mac2_set;
255 bool pxe_progress_set;
266 struct ecore_mfw_tlv_eth {
268 bool lso_maxoff_size_set;
270 bool lso_minseg_size_set;
274 bool tx_descr_size_set;
276 bool rx_descr_size_set;
280 bool tcp4_offloads_set;
282 bool tcp6_offloads_set;
284 bool tx_descr_qdepth_set;
286 bool rx_descr_qdepth_set;
288 bool iov_offload_set;
294 bool num_txqs_full_set;
296 bool num_rxqs_full_set;
299 struct ecore_mfw_tlv_fcoe {
301 bool scsi_timeout_set;
315 bool num_npiv_ids_set;
317 bool switch_name_set;
319 bool switch_portnum_set;
321 bool switch_portid_set;
323 bool vendor_name_set;
325 bool switch_model_set;
326 u8 switch_fw_version[8];
327 bool switch_fw_version_set;
334 u16 fip_tx_descr_size;
335 bool fip_tx_descr_size_set;
336 u16 fip_rx_descr_size;
337 bool fip_rx_descr_size_set;
339 bool link_failures_set;
340 u8 fcoe_boot_progress;
341 bool fcoe_boot_progress_set;
347 bool fcoe_txq_depth_set;
349 bool fcoe_rxq_depth_set;
351 bool fcoe_rx_frames_set;
353 bool fcoe_rx_bytes_set;
355 bool fcoe_tx_frames_set;
357 bool fcoe_tx_bytes_set;
360 u32 crc_err_src_fcid[5];
361 bool crc_err_src_fcid_set[5];
362 u8 crc_err_tstamp[5][14];
363 bool crc_err_tstamp_set[5];
369 bool primtive_err_set;
371 bool disparity_err_set;
372 u16 code_violation_err;
373 bool code_violation_err_set;
375 bool flogi_param_set[4];
377 bool flogi_tstamp_set;
378 u32 flogi_acc_param[4];
379 bool flogi_acc_param_set[4];
380 u8 flogi_acc_tstamp[14];
381 bool flogi_acc_tstamp_set;
384 u8 flogi_rjt_tstamp[14];
385 bool flogi_rjt_tstamp_set;
398 u32 plogi_dst_fcid[5];
399 bool plogi_dst_fcid_set[5];
400 u8 plogi_tstamp[5][14];
401 bool plogi_tstamp_set[5];
402 u32 plogi_acc_src_fcid[5];
403 bool plogi_acc_src_fcid_set[5];
404 u8 plogi_acc_tstamp[5][14];
405 bool plogi_acc_tstamp_set[5];
412 u32 plogo_src_fcid[5];
413 bool plogo_src_fcid_set[5];
414 u8 plogo_tstamp[5][14];
415 bool plogo_tstamp_set[5];
427 bool rx_abts_acc_set;
429 bool rx_abts_rjt_set;
430 u32 abts_dst_fcid[5];
431 bool abts_dst_fcid_set[5];
432 u8 abts_tstamp[5][14];
433 bool abts_tstamp_set[5];
436 u32 rx_rscn_nport[4];
437 bool rx_rscn_nport_set[4];
441 bool abort_task_sets_set;
465 bool scsi_cond_met_set;
470 u8 scsi_inter_cond_met;
471 bool scsi_inter_cond_met_set;
472 u8 scsi_rsv_conflicts;
473 bool scsi_rsv_conflicts_set;
475 bool scsi_tsk_full_set;
477 bool scsi_aca_active_set;
479 bool scsi_tsk_abort_set;
481 bool scsi_rx_chk_set[5];
482 u8 scsi_chk_tstamp[5][14];
483 bool scsi_chk_tstamp_set[5];
486 struct ecore_mfw_tlv_iscsi {
488 bool target_llmnr_set;
490 bool header_digest_set;
492 bool data_digest_set;
494 bool auth_method_set;
495 u16 boot_taget_portal;
496 bool boot_taget_portal_set;
500 bool tx_desc_size_set;
502 bool rx_desc_size_set;
504 bool boot_progress_set;
506 bool tx_desc_qdepth_set;
508 bool rx_desc_qdepth_set;
519 union ecore_mfw_tlv_data {
520 struct ecore_mfw_tlv_generic generic;
521 struct ecore_mfw_tlv_eth eth;
522 struct ecore_mfw_tlv_fcoe fcoe;
523 struct ecore_mfw_tlv_iscsi iscsi;
526 enum ecore_hw_info_change {
527 ECORE_HW_INFO_CHANGE_OVLAN,
531 * @brief - returns the link params of the hw function
535 * @returns pointer to link params
537 struct ecore_mcp_link_params *ecore_mcp_get_link_params(struct ecore_hwfn *);
540 * @brief - return the link state of the hw function
544 * @returns pointer to link state
546 struct ecore_mcp_link_state *ecore_mcp_get_link_state(struct ecore_hwfn *);
549 * @brief - return the link capabilities of the hw function
553 * @returns pointer to link capabilities
555 struct ecore_mcp_link_capabilities
556 *ecore_mcp_get_link_capabilities(struct ecore_hwfn *p_hwfn);
559 * @brief Request the MFW to set the the link according to 'link_input'.
563 * @param b_up - raise link if `true'. Reset link if `false'.
565 * @return enum _ecore_status_t
567 enum _ecore_status_t ecore_mcp_set_link(struct ecore_hwfn *p_hwfn,
568 struct ecore_ptt *p_ptt,
572 * @brief Get the management firmware version value
576 * @param p_mfw_ver - mfw version value
577 * @param p_running_bundle_id - image id in nvram; Optional.
579 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
581 enum _ecore_status_t ecore_mcp_get_mfw_ver(struct ecore_hwfn *p_hwfn,
582 struct ecore_ptt *p_ptt,
584 u32 *p_running_bundle_id);
587 * @brief Get media type value of the port.
589 * @param p_dev - ecore dev pointer
591 * @param mfw_ver - media type value
593 * @return enum _ecore_status_t -
594 * ECORE_SUCCESS - Operation was successful.
595 * ECORE_BUSY - Operation failed
597 enum _ecore_status_t ecore_mcp_get_media_type(struct ecore_hwfn *p_hwfn,
598 struct ecore_ptt *p_ptt,
602 * @brief - Sends a command to the MCP mailbox.
604 * @param p_hwfn - hw function
605 * @param p_ptt - PTT required for register access
606 * @param cmd - command to be sent to the MCP
607 * @param param - Optional param
608 * @param o_mcp_resp - The MCP response code (exclude sequence)
609 * @param o_mcp_param - Optional parameter provided by the MCP response
611 * @return enum _ecore_status_t -
612 * ECORE_SUCCESS - operation was successful
613 * ECORE_BUSY - operation failed
615 enum _ecore_status_t ecore_mcp_cmd(struct ecore_hwfn *p_hwfn,
616 struct ecore_ptt *p_ptt, u32 cmd, u32 param,
617 u32 *o_mcp_resp, u32 *o_mcp_param);
620 * @brief - drains the nig, allowing completion to pass in case of pauses.
621 * (Should be called only from sleepable context)
626 enum _ecore_status_t ecore_mcp_drain(struct ecore_hwfn *p_hwfn,
627 struct ecore_ptt *p_ptt);
631 * @brief - return the mcp function info of the hw function
635 * @returns pointer to mcp function info
637 const struct ecore_mcp_function_info
638 *ecore_mcp_get_function_info(struct ecore_hwfn *p_hwfn);
643 * @brief - count number of function with a matching personality on engine.
647 * @param personalities - a bitmask of ecore_pci_personality values
649 * @returns the count of all devices on engine whose personality match one of
652 int ecore_mcp_get_personality_cnt(struct ecore_hwfn *p_hwfn,
653 struct ecore_ptt *p_ptt,
658 * @brief Get the flash size value
662 * @param p_flash_size - flash size in bytes to be filled.
664 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
666 enum _ecore_status_t ecore_mcp_get_flash_size(struct ecore_hwfn *p_hwfn,
667 struct ecore_ptt *p_ptt,
671 * @brief Send driver version to MFW
675 * @param version - Version value
676 * @param name - Protocol driver name
678 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
681 ecore_mcp_send_drv_version(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
682 struct ecore_mcp_drv_version *p_ver);
685 * @brief Read the MFW process kill counter
692 u32 ecore_get_process_kill_counter(struct ecore_hwfn *p_hwfn,
693 struct ecore_ptt *p_ptt);
696 * @brief Trigger a recovery process
701 * @return enum _ecore_status_t
703 enum _ecore_status_t ecore_start_recovery_process(struct ecore_hwfn *p_hwfn,
704 struct ecore_ptt *p_ptt);
707 * @brief A recovery handler must call this function as its first step.
708 * It is assumed that the handler is not run from an interrupt context.
713 * @return enum _ecore_status_t
715 enum _ecore_status_t ecore_recovery_prolog(struct ecore_dev *p_dev);
718 * @brief Notify MFW about the change in base device properties
722 * @param client - ecore client type
724 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
727 ecore_mcp_ov_update_current_config(struct ecore_hwfn *p_hwfn,
728 struct ecore_ptt *p_ptt,
729 enum ecore_ov_client client);
732 * @brief Notify MFW about the driver state
736 * @param drv_state - Driver state
738 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
741 ecore_mcp_ov_update_driver_state(struct ecore_hwfn *p_hwfn,
742 struct ecore_ptt *p_ptt,
743 enum ecore_ov_driver_state drv_state);
746 * @brief Read NPIV settings form the MFW
750 * @param p_table - Array to hold the FC NPIV data. Client need allocate the
751 * required buffer. The field 'count' specifies number of NPIV
752 * entries. A value of 0 means the table was not populated.
754 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
757 ecore_mcp_ov_get_fc_npiv(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
758 struct ecore_fc_npiv_tbl *p_table);
761 * @brief Send MTU size to MFW
765 * @param mtu - MTU size
767 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
769 enum _ecore_status_t ecore_mcp_ov_update_mtu(struct ecore_hwfn *p_hwfn,
770 struct ecore_ptt *p_ptt, u16 mtu);
773 * @brief Set LED status
777 * @param mode - LED mode
779 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
781 enum _ecore_status_t ecore_mcp_set_led(struct ecore_hwfn *p_hwfn,
782 struct ecore_ptt *p_ptt,
783 enum ecore_led_mode mode);
786 * @brief Set secure mode
789 * @param addr - nvm offset
791 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
793 enum _ecore_status_t ecore_mcp_nvm_set_secure_mode(struct ecore_dev *p_dev,
797 * @brief Write to phy
800 * @param addr - nvm offset
801 * @param cmd - nvm command
802 * @param p_buf - nvm write buffer
803 * @param len - buffer len
805 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
807 enum _ecore_status_t ecore_mcp_phy_write(struct ecore_dev *p_dev, u32 cmd,
808 u32 addr, u8 *p_buf, u32 len);
811 * @brief Write to nvm
814 * @param addr - nvm offset
815 * @param cmd - nvm command
816 * @param p_buf - nvm write buffer
817 * @param len - buffer len
819 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
821 enum _ecore_status_t ecore_mcp_nvm_write(struct ecore_dev *p_dev, u32 cmd,
822 u32 addr, u8 *p_buf, u32 len);
825 * @brief Put file begin
828 * @param addr - nvm offset
830 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
832 enum _ecore_status_t ecore_mcp_nvm_put_file_begin(struct ecore_dev *p_dev,
839 * @param addr - nvm offset
841 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
843 enum _ecore_status_t ecore_mcp_nvm_del_file(struct ecore_dev *p_dev,
847 * @brief Check latest response
850 * @param p_buf - nvm write buffer
852 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
854 enum _ecore_status_t ecore_mcp_nvm_resp(struct ecore_dev *p_dev, u8 *p_buf);
857 * @brief Read from phy
860 * @param addr - nvm offset
861 * @param cmd - nvm command
862 * @param p_buf - nvm read buffer
863 * @param len - buffer len
865 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
867 enum _ecore_status_t ecore_mcp_phy_read(struct ecore_dev *p_dev, u32 cmd,
868 u32 addr, u8 *p_buf, u32 len);
871 * @brief Read from nvm
874 * @param addr - nvm offset
875 * @param p_buf - nvm read 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_read(struct ecore_dev *p_dev, u32 addr,
884 * @brief - Sends an NVM write command request to the MFW with
889 * @param cmd - Command: Either DRV_MSG_CODE_NVM_WRITE_NVRAM or
890 * DRV_MSG_CODE_NVM_PUT_FILE_DATA
891 * @param param - [0:23] - Offset [24:31] - Size
892 * @param o_mcp_resp - MCP response
893 * @param o_mcp_param - MCP response param
894 * @param i_txn_size - Buffer size
895 * @param i_buf - Pointer to the buffer
897 * @param return ECORE_SUCCESS upon success.
899 enum _ecore_status_t ecore_mcp_nvm_wr_cmd(struct ecore_hwfn *p_hwfn,
900 struct ecore_ptt *p_ptt,
909 * @brief - Sends an NVM read command request to the MFW to get
914 * @param cmd - Command: DRV_MSG_CODE_NVM_GET_FILE_DATA or
915 * DRV_MSG_CODE_NVM_READ_NVRAM commands
916 * @param param - [0:23] - Offset [24:31] - Size
917 * @param o_mcp_resp - MCP response
918 * @param o_mcp_param - MCP response param
919 * @param o_txn_size - Buffer size output
920 * @param o_buf - Pointer to the buffer returned by the MFW.
922 * @param return ECORE_SUCCESS upon success.
924 enum _ecore_status_t ecore_mcp_nvm_rd_cmd(struct ecore_hwfn *p_hwfn,
925 struct ecore_ptt *p_ptt,
934 * @brief Read from sfp
936 * @param p_hwfn - hw function
937 * @param p_ptt - PTT required for register access
938 * @param port - transceiver port
939 * @param addr - I2C address
940 * @param offset - offset in sfp
941 * @param len - buffer length
942 * @param p_buf - buffer to read into
944 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
946 enum _ecore_status_t ecore_mcp_phy_sfp_read(struct ecore_hwfn *p_hwfn,
947 struct ecore_ptt *p_ptt,
948 u32 port, u32 addr, u32 offset,
952 * @brief Write to sfp
954 * @param p_hwfn - hw function
955 * @param p_ptt - PTT required for register access
956 * @param port - transceiver port
957 * @param addr - I2C address
958 * @param offset - offset in sfp
959 * @param len - buffer length
960 * @param p_buf - buffer to write from
962 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
964 enum _ecore_status_t ecore_mcp_phy_sfp_write(struct ecore_hwfn *p_hwfn,
965 struct ecore_ptt *p_ptt,
966 u32 port, u32 addr, u32 offset,
972 * @param p_hwfn - hw function
973 * @param p_ptt - PTT required for register access
974 * @param gpio - gpio number
975 * @param gpio_val - value read from gpio
977 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
979 enum _ecore_status_t ecore_mcp_gpio_read(struct ecore_hwfn *p_hwfn,
980 struct ecore_ptt *p_ptt,
981 u16 gpio, u32 *gpio_val);
986 * @param p_hwfn - hw function
987 * @param p_ptt - PTT required for register access
988 * @param gpio - gpio number
989 * @param gpio_val - value to write to gpio
991 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
993 enum _ecore_status_t ecore_mcp_gpio_write(struct ecore_hwfn *p_hwfn,
994 struct ecore_ptt *p_ptt,
995 u16 gpio, u16 gpio_val);
998 * @brief Gpio get information
1000 * @param p_hwfn - hw function
1001 * @param p_ptt - PTT required for register access
1002 * @param gpio - gpio number
1003 * @param gpio_direction - gpio is output (0) or input (1)
1004 * @param gpio_ctrl - gpio control is uninitialized (0),
1005 * path 0 (1), path 1 (2) or shared(3)
1007 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
1009 enum _ecore_status_t ecore_mcp_gpio_info(struct ecore_hwfn *p_hwfn,
1010 struct ecore_ptt *p_ptt,
1011 u16 gpio, u32 *gpio_direction,
1015 * @brief Bist register test
1017 * @param p_hwfn - hw function
1018 * @param p_ptt - PTT required for register access
1020 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
1022 enum _ecore_status_t ecore_mcp_bist_register_test(struct ecore_hwfn *p_hwfn,
1023 struct ecore_ptt *p_ptt);
1026 * @brief Bist clock test
1028 * @param p_hwfn - hw function
1029 * @param p_ptt - PTT required for register access
1031 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
1033 enum _ecore_status_t ecore_mcp_bist_clock_test(struct ecore_hwfn *p_hwfn,
1034 struct ecore_ptt *p_ptt);
1037 * @brief Bist nvm test - get number of images
1039 * @param p_hwfn - hw function
1040 * @param p_ptt - PTT required for register access
1041 * @param num_images - number of images if operation was
1042 * successful. 0 if not.
1044 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
1046 enum _ecore_status_t ecore_mcp_bist_nvm_test_get_num_images(
1047 struct ecore_hwfn *p_hwfn,
1048 struct ecore_ptt *p_ptt,
1052 * @brief Bist nvm test - get image attributes by index
1054 * @param p_hwfn - hw function
1055 * @param p_ptt - PTT required for register access
1056 * @param p_image_att - Attributes of image
1057 * @param image_index - Index of image to get information for
1059 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
1061 enum _ecore_status_t ecore_mcp_bist_nvm_test_get_image_att(
1062 struct ecore_hwfn *p_hwfn,
1063 struct ecore_ptt *p_ptt,
1064 struct bist_nvm_image_att *p_image_att,
1068 * @brief ecore_mcp_get_temperature_info - get the status of the temperature
1071 * @param p_hwfn - hw function
1072 * @param p_ptt - PTT required for register access
1073 * @param p_temp_status - A pointer to an ecore_temperature_info structure to
1074 * be filled with the temperature data
1076 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
1078 enum _ecore_status_t
1079 ecore_mcp_get_temperature_info(struct ecore_hwfn *p_hwfn,
1080 struct ecore_ptt *p_ptt,
1081 struct ecore_temperature_info *p_temp_info);
1084 * @brief Get MBA versions - get MBA sub images versions
1086 * @param p_hwfn - hw function
1087 * @param p_ptt - PTT required for register access
1088 * @param p_mba_vers - MBA versions array to fill
1090 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
1092 enum _ecore_status_t ecore_mcp_get_mba_versions(
1093 struct ecore_hwfn *p_hwfn,
1094 struct ecore_ptt *p_ptt,
1095 struct ecore_mba_vers *p_mba_vers);
1098 * @brief Count memory ecc events
1100 * @param p_hwfn - hw function
1101 * @param p_ptt - PTT required for register access
1102 * @param num_events - number of memory ecc events
1104 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
1106 enum _ecore_status_t ecore_mcp_mem_ecc_events(struct ecore_hwfn *p_hwfn,
1107 struct ecore_ptt *p_ptt,
1110 struct ecore_mdump_info {
1120 * @brief - Gets the MFW crash dump configuration and logs info.
1124 * @param p_mdump_info
1126 * @param return ECORE_SUCCESS upon success.
1128 enum _ecore_status_t
1129 ecore_mcp_mdump_get_info(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
1130 struct ecore_mdump_info *p_mdump_info);
1133 * @brief - Clears the MFW crash dump logs.
1138 * @param return ECORE_SUCCESS upon success.
1140 enum _ecore_status_t ecore_mcp_mdump_clear_logs(struct ecore_hwfn *p_hwfn,
1141 struct ecore_ptt *p_ptt);
1144 * @brief - Clear the mdump retained data.
1149 * @param return ECORE_SUCCESS upon success.
1151 enum _ecore_status_t ecore_mcp_mdump_clr_retain(struct ecore_hwfn *p_hwfn,
1152 struct ecore_ptt *p_ptt);
1155 * @brief - Processes the TLV request from MFW i.e., get the required TLV info
1156 * from the ecore client and send it to the MFW.
1161 * @param return ECORE_SUCCESS upon success.
1163 enum _ecore_status_t ecore_mfw_process_tlv_req(struct ecore_hwfn *p_hwfn,
1164 struct ecore_ptt *p_ptt);
1168 * @brief - Return whether management firmware support smart AN
1172 * @return bool - true iff feature is supported.
1174 bool ecore_mcp_is_smart_an_supported(struct ecore_hwfn *p_hwfn);