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 #ifndef __EXTRACT__LINUX__
117 enum ecore_nvm_images {
118 ECORE_NVM_IMAGE_ISCSI_CFG,
119 ECORE_NVM_IMAGE_FCOE_CFG,
123 struct ecore_mcp_drv_version {
125 u8 name[MCP_DRV_VER_STR_SIZE - 4];
128 struct ecore_mcp_lan_stats {
134 #ifndef ECORE_PROTO_STATS
135 #define ECORE_PROTO_STATS
136 struct ecore_mcp_fcoe_stats {
143 struct ecore_mcp_iscsi_stats {
150 struct ecore_mcp_rdma_stats {
157 enum ecore_mcp_protocol_type {
159 ECORE_MCP_FCOE_STATS,
160 ECORE_MCP_ISCSI_STATS,
164 union ecore_mcp_protocol_stats {
165 struct ecore_mcp_lan_stats lan_stats;
166 struct ecore_mcp_fcoe_stats fcoe_stats;
167 struct ecore_mcp_iscsi_stats iscsi_stats;
168 struct ecore_mcp_rdma_stats rdma_stats;
172 enum ecore_ov_client {
174 ECORE_OV_CLIENT_USER,
175 ECORE_OV_CLIENT_VENDOR_SPEC
178 enum ecore_ov_driver_state {
179 ECORE_OV_DRIVER_STATE_NOT_LOADED,
180 ECORE_OV_DRIVER_STATE_DISABLED,
181 ECORE_OV_DRIVER_STATE_ACTIVE
184 #define ECORE_MAX_NPIV_ENTRIES 128
185 #define ECORE_WWN_SIZE 8
186 struct ecore_fc_npiv_tbl {
188 u8 wwpn[ECORE_MAX_NPIV_ENTRIES][ECORE_WWN_SIZE];
189 u8 wwnn[ECORE_MAX_NPIV_ENTRIES][ECORE_WWN_SIZE];
192 #ifndef __EXTRACT__LINUX__
193 enum ecore_led_mode {
196 ECORE_LED_MODE_RESTORE
200 struct ecore_temperature_sensor {
207 #define ECORE_MAX_NUM_OF_SENSORS 7
208 struct ecore_temperature_info {
210 struct ecore_temperature_sensor sensors[ECORE_MAX_NUM_OF_SENSORS];
213 enum ecore_mba_img_idx {
214 ECORE_MBA_LEGACY_IDX,
215 ECORE_MBA_PCI3CLP_IDX,
222 ECORE_MAX_NUM_OF_ROMIMG
225 struct ecore_mba_vers {
226 u32 mba_vers[ECORE_MAX_NUM_OF_ROMIMG];
229 enum ecore_mfw_tlv_type {
230 ECORE_MFW_TLV_GENERIC = 0x1, /* Core driver TLVs */
231 ECORE_MFW_TLV_ETH = 0x2, /* L2 driver TLVs */
232 ECORE_MFW_TLV_FCOE = 0x4, /* FCoE protocol TLVs */
233 ECORE_MFW_TLV_ISCSI = 0x8, /* SCSI protocol TLVs */
234 ECORE_MFW_TLV_MAX = 0x16,
237 struct ecore_mfw_tlv_generic {
243 bool additional_mac1_set;
245 bool additional_mac2_set;
249 bool pxe_progress_set;
260 struct ecore_mfw_tlv_eth {
262 bool lso_maxoff_size_set;
264 bool lso_minseg_size_set;
268 bool tx_descr_size_set;
270 bool rx_descr_size_set;
274 bool tcp4_offloads_set;
276 bool tcp6_offloads_set;
278 bool tx_descr_qdepth_set;
280 bool rx_descr_qdepth_set;
282 bool iov_offload_set;
288 bool num_txqs_full_set;
290 bool num_rxqs_full_set;
293 struct ecore_mfw_tlv_fcoe {
295 bool scsi_timeout_set;
309 bool num_npiv_ids_set;
311 bool switch_name_set;
313 bool switch_portnum_set;
315 bool switch_portid_set;
317 bool vendor_name_set;
319 bool switch_model_set;
320 u8 switch_fw_version[8];
321 bool switch_fw_version_set;
328 u16 fip_tx_descr_size;
329 bool fip_tx_descr_size_set;
330 u16 fip_rx_descr_size;
331 bool fip_rx_descr_size_set;
333 bool link_failures_set;
334 u8 fcoe_boot_progress;
335 bool fcoe_boot_progress_set;
341 bool fcoe_txq_depth_set;
343 bool fcoe_rxq_depth_set;
345 bool fcoe_rx_frames_set;
347 bool fcoe_rx_bytes_set;
349 bool fcoe_tx_frames_set;
351 bool fcoe_tx_bytes_set;
354 u32 crc_err_src_fcid[5];
355 bool crc_err_src_fcid_set[5];
356 u8 crc_err_tstamp[5][14];
357 bool crc_err_tstamp_set[5];
363 bool primtive_err_set;
365 bool disparity_err_set;
366 u16 code_violation_err;
367 bool code_violation_err_set;
369 bool flogi_param_set[4];
371 bool flogi_tstamp_set;
372 u32 flogi_acc_param[4];
373 bool flogi_acc_param_set[4];
374 u8 flogi_acc_tstamp[14];
375 bool flogi_acc_tstamp_set;
378 u8 flogi_rjt_tstamp[14];
379 bool flogi_rjt_tstamp_set;
392 u32 plogi_dst_fcid[5];
393 bool plogi_dst_fcid_set[5];
394 u8 plogi_tstamp[5][14];
395 bool plogi_tstamp_set[5];
396 u32 plogi_acc_src_fcid[5];
397 bool plogi_acc_src_fcid_set[5];
398 u8 plogi_acc_tstamp[5][14];
399 bool plogi_acc_tstamp_set[5];
406 u32 plogo_src_fcid[5];
407 bool plogo_src_fcid_set[5];
408 u8 plogo_tstamp[5][14];
409 bool plogo_tstamp_set[5];
421 bool rx_abts_acc_set;
423 bool rx_abts_rjt_set;
424 u32 abts_dst_fcid[5];
425 bool abts_dst_fcid_set[5];
426 u8 abts_tstamp[5][14];
427 bool abts_tstamp_set[5];
430 u32 rx_rscn_nport[4];
431 bool rx_rscn_nport_set[4];
435 bool abort_task_sets_set;
459 bool scsi_cond_met_set;
464 u8 scsi_inter_cond_met;
465 bool scsi_inter_cond_met_set;
466 u8 scsi_rsv_conflicts;
467 bool scsi_rsv_conflicts_set;
469 bool scsi_tsk_full_set;
471 bool scsi_aca_active_set;
473 bool scsi_tsk_abort_set;
475 bool scsi_rx_chk_set[5];
476 u8 scsi_chk_tstamp[5][14];
477 bool scsi_chk_tstamp_set[5];
480 struct ecore_mfw_tlv_iscsi {
482 bool target_llmnr_set;
484 bool header_digest_set;
486 bool data_digest_set;
488 bool auth_method_set;
489 u16 boot_taget_portal;
490 bool boot_taget_portal_set;
494 bool tx_desc_size_set;
496 bool rx_desc_size_set;
498 bool boot_progress_set;
500 bool tx_desc_qdepth_set;
502 bool rx_desc_qdepth_set;
513 union ecore_mfw_tlv_data {
514 struct ecore_mfw_tlv_generic generic;
515 struct ecore_mfw_tlv_eth eth;
516 struct ecore_mfw_tlv_fcoe fcoe;
517 struct ecore_mfw_tlv_iscsi iscsi;
521 * @brief - returns the link params of the hw function
525 * @returns pointer to link params
527 struct ecore_mcp_link_params *ecore_mcp_get_link_params(struct ecore_hwfn *);
530 * @brief - return the link state of the hw function
534 * @returns pointer to link state
536 struct ecore_mcp_link_state *ecore_mcp_get_link_state(struct ecore_hwfn *);
539 * @brief - return the link capabilities of the hw function
543 * @returns pointer to link capabilities
545 struct ecore_mcp_link_capabilities
546 *ecore_mcp_get_link_capabilities(struct ecore_hwfn *p_hwfn);
549 * @brief Request the MFW to set the the link according to 'link_input'.
553 * @param b_up - raise link if `true'. Reset link if `false'.
555 * @return enum _ecore_status_t
557 enum _ecore_status_t ecore_mcp_set_link(struct ecore_hwfn *p_hwfn,
558 struct ecore_ptt *p_ptt,
562 * @brief Get the management firmware version value
566 * @param p_mfw_ver - mfw version value
567 * @param p_running_bundle_id - image id in nvram; Optional.
569 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
571 enum _ecore_status_t ecore_mcp_get_mfw_ver(struct ecore_hwfn *p_hwfn,
572 struct ecore_ptt *p_ptt,
574 u32 *p_running_bundle_id);
577 * @brief Get media type value of the port.
579 * @param p_dev - ecore dev pointer
581 * @param mfw_ver - media type value
583 * @return enum _ecore_status_t -
584 * ECORE_SUCCESS - Operation was successful.
585 * ECORE_BUSY - Operation failed
587 enum _ecore_status_t ecore_mcp_get_media_type(struct ecore_hwfn *p_hwfn,
588 struct ecore_ptt *p_ptt,
592 * @brief - Sends a command to the MCP mailbox.
594 * @param p_hwfn - hw function
595 * @param p_ptt - PTT required for register access
596 * @param cmd - command to be sent to the MCP
597 * @param param - optional param
598 * @param o_mcp_resp - the MCP response code (exclude sequence)
599 * @param o_mcp_param - optional parameter provided by the MCP response
601 * @return enum _ecore_status_t -
602 * ECORE_SUCCESS - operation was successful
603 * ECORE_BUSY - operation failed
605 enum _ecore_status_t ecore_mcp_cmd(struct ecore_hwfn *p_hwfn,
606 struct ecore_ptt *p_ptt, u32 cmd, u32 param,
607 u32 *o_mcp_resp, u32 *o_mcp_param);
610 * @brief - drains the nig, allowing completion to pass in case of pauses.
611 * (Should be called only from sleepable context)
616 enum _ecore_status_t ecore_mcp_drain(struct ecore_hwfn *p_hwfn,
617 struct ecore_ptt *p_ptt);
621 * @brief - return the mcp function info of the hw function
625 * @returns pointer to mcp function info
627 const struct ecore_mcp_function_info
628 *ecore_mcp_get_function_info(struct ecore_hwfn *p_hwfn);
633 * @brief - count number of function with a matching personality on engine.
637 * @param personalities - a bitmask of ecore_pci_personality values
639 * @returns the count of all devices on engine whose personality match one of
642 int ecore_mcp_get_personality_cnt(struct ecore_hwfn *p_hwfn,
643 struct ecore_ptt *p_ptt,
648 * @brief Get the flash size value
652 * @param p_flash_size - flash size in bytes to be filled.
654 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
656 enum _ecore_status_t ecore_mcp_get_flash_size(struct ecore_hwfn *p_hwfn,
657 struct ecore_ptt *p_ptt,
661 * @brief Send driver version to MFW
665 * @param version - Version value
666 * @param name - Protocol driver name
668 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
671 ecore_mcp_send_drv_version(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
672 struct ecore_mcp_drv_version *p_ver);
675 * @brief Read the MFW process kill counter
682 u32 ecore_get_process_kill_counter(struct ecore_hwfn *p_hwfn,
683 struct ecore_ptt *p_ptt);
686 * @brief Trigger a recovery process
691 * @return enum _ecore_status_t
693 enum _ecore_status_t ecore_start_recovery_process(struct ecore_hwfn *p_hwfn,
694 struct ecore_ptt *p_ptt);
697 * @brief A recovery handler must call this function as its first step.
698 * It is assumed that the handler is not run from an interrupt context.
703 * @return enum _ecore_status_t
705 enum _ecore_status_t ecore_recovery_prolog(struct ecore_dev *p_dev);
708 * @brief Notify MFW about the change in base device properties
712 * @param client - ecore client type
714 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
717 ecore_mcp_ov_update_current_config(struct ecore_hwfn *p_hwfn,
718 struct ecore_ptt *p_ptt,
719 enum ecore_ov_client client);
722 * @brief Notify MFW about the driver state
726 * @param drv_state - Driver state
728 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
731 ecore_mcp_ov_update_driver_state(struct ecore_hwfn *p_hwfn,
732 struct ecore_ptt *p_ptt,
733 enum ecore_ov_driver_state drv_state);
736 * @brief Read NPIV settings form the MFW
740 * @param p_table - Array to hold the FC NPIV data. Client need allocate the
741 * required buffer. The field 'count' specifies number of NPIV
742 * entries. A value of 0 means the table was not populated.
744 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
747 ecore_mcp_ov_get_fc_npiv(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
748 struct ecore_fc_npiv_tbl *p_table);
751 * @brief Send MTU size to MFW
755 * @param mtu - MTU size
757 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
759 enum _ecore_status_t ecore_mcp_ov_update_mtu(struct ecore_hwfn *p_hwfn,
760 struct ecore_ptt *p_ptt, u16 mtu);
763 * @brief Set LED status
767 * @param mode - LED mode
769 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
771 enum _ecore_status_t ecore_mcp_set_led(struct ecore_hwfn *p_hwfn,
772 struct ecore_ptt *p_ptt,
773 enum ecore_led_mode mode);
776 * @brief Set secure mode
779 * @param addr - nvm offset
781 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
783 enum _ecore_status_t ecore_mcp_nvm_set_secure_mode(struct ecore_dev *p_dev,
787 * @brief Write to phy
790 * @param addr - nvm offset
791 * @param cmd - nvm command
792 * @param p_buf - nvm write buffer
793 * @param len - buffer len
795 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
797 enum _ecore_status_t ecore_mcp_phy_write(struct ecore_dev *p_dev, u32 cmd,
798 u32 addr, u8 *p_buf, u32 len);
801 * @brief Write to nvm
804 * @param addr - nvm offset
805 * @param cmd - nvm command
806 * @param p_buf - nvm write buffer
807 * @param len - buffer len
809 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
811 enum _ecore_status_t ecore_mcp_nvm_write(struct ecore_dev *p_dev, u32 cmd,
812 u32 addr, u8 *p_buf, u32 len);
815 * @brief Put file begin
818 * @param addr - nvm offset
820 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
822 enum _ecore_status_t ecore_mcp_nvm_put_file_begin(struct ecore_dev *p_dev,
829 * @param addr - nvm offset
831 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
833 enum _ecore_status_t ecore_mcp_nvm_del_file(struct ecore_dev *p_dev,
837 * @brief Check latest response
840 * @param p_buf - nvm write buffer
842 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
844 enum _ecore_status_t ecore_mcp_nvm_resp(struct ecore_dev *p_dev, u8 *p_buf);
847 * @brief Read from phy
850 * @param addr - nvm offset
851 * @param cmd - nvm command
852 * @param p_buf - nvm write buffer
853 * @param len - buffer len
855 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
857 enum _ecore_status_t ecore_mcp_phy_read(struct ecore_dev *p_dev, u32 cmd,
858 u32 addr, u8 *p_buf, u32 len);
861 * @brief Read from nvm
864 * @param addr - nvm offset
865 * @param p_buf - nvm write buffer
866 * @param len - buffer len
868 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
870 enum _ecore_status_t ecore_mcp_nvm_read(struct ecore_dev *p_dev, u32 addr,
874 * @brief - Sends an NVM write command request to the MFW with
879 * @param cmd - Command: Either DRV_MSG_CODE_NVM_WRITE_NVRAM or
880 * DRV_MSG_CODE_NVM_PUT_FILE_DATA
881 * @param param - [0:23] - Offset [24:31] - Size
882 * @param o_mcp_resp - MCP response
883 * @param o_mcp_param - MCP response param
884 * @param i_txn_size - Buffer size
885 * @param i_buf - Pointer to the buffer
887 * @param return ECORE_SUCCESS upon success.
889 enum _ecore_status_t ecore_mcp_nvm_wr_cmd(struct ecore_hwfn *p_hwfn,
890 struct ecore_ptt *p_ptt,
899 * @brief - Sends an NVM read command request to the MFW to get
904 * @param cmd - Command: DRV_MSG_CODE_NVM_GET_FILE_DATA or
905 * DRV_MSG_CODE_NVM_READ_NVRAM commands
906 * @param param - [0:23] - Offset [24:31] - Size
907 * @param o_mcp_resp - MCP response
908 * @param o_mcp_param - MCP response param
909 * @param o_txn_size - Buffer size output
910 * @param o_buf - Pointer to the buffer returned by the MFW.
912 * @param return ECORE_SUCCESS upon success.
914 enum _ecore_status_t ecore_mcp_nvm_rd_cmd(struct ecore_hwfn *p_hwfn,
915 struct ecore_ptt *p_ptt,
924 * @brief Read from sfp
926 * @param p_hwfn - hw function
927 * @param p_ptt - PTT required for register access
928 * @param port - transceiver port
929 * @param addr - I2C address
930 * @param offset - offset in sfp
931 * @param len - buffer length
932 * @param p_buf - buffer to read into
934 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
936 enum _ecore_status_t ecore_mcp_phy_sfp_read(struct ecore_hwfn *p_hwfn,
937 struct ecore_ptt *p_ptt,
938 u32 port, u32 addr, u32 offset,
942 * @brief Write to sfp
944 * @param p_hwfn - hw function
945 * @param p_ptt - PTT required for register access
946 * @param port - transceiver port
947 * @param addr - I2C address
948 * @param offset - offset in sfp
949 * @param len - buffer length
950 * @param p_buf - buffer to write from
952 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
954 enum _ecore_status_t ecore_mcp_phy_sfp_write(struct ecore_hwfn *p_hwfn,
955 struct ecore_ptt *p_ptt,
956 u32 port, u32 addr, u32 offset,
962 * @param p_hwfn - hw function
963 * @param p_ptt - PTT required for register access
964 * @param gpio - gpio number
965 * @param gpio_val - value read from gpio
967 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
969 enum _ecore_status_t ecore_mcp_gpio_read(struct ecore_hwfn *p_hwfn,
970 struct ecore_ptt *p_ptt,
971 u16 gpio, u32 *gpio_val);
976 * @param p_hwfn - hw function
977 * @param p_ptt - PTT required for register access
978 * @param gpio - gpio number
979 * @param gpio_val - value to write to gpio
981 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
983 enum _ecore_status_t ecore_mcp_gpio_write(struct ecore_hwfn *p_hwfn,
984 struct ecore_ptt *p_ptt,
985 u16 gpio, u16 gpio_val);
988 * @brief Gpio get information
990 * @param p_hwfn - hw function
991 * @param p_ptt - PTT required for register access
992 * @param gpio - gpio number
993 * @param gpio_direction - gpio is output (0) or input (1)
994 * @param gpio_ctrl - gpio control is uninitialized (0),
995 * path 0 (1), path 1 (2) or shared(3)
997 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
999 enum _ecore_status_t ecore_mcp_gpio_info(struct ecore_hwfn *p_hwfn,
1000 struct ecore_ptt *p_ptt,
1001 u16 gpio, u32 *gpio_direction,
1005 * @brief Bist register test
1007 * @param p_hwfn - hw function
1008 * @param p_ptt - PTT required for register access
1010 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
1012 enum _ecore_status_t ecore_mcp_bist_register_test(struct ecore_hwfn *p_hwfn,
1013 struct ecore_ptt *p_ptt);
1016 * @brief Bist clock test
1018 * @param p_hwfn - hw function
1019 * @param p_ptt - PTT required for register access
1021 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
1023 enum _ecore_status_t ecore_mcp_bist_clock_test(struct ecore_hwfn *p_hwfn,
1024 struct ecore_ptt *p_ptt);
1027 * @brief Bist nvm test - get number of images
1029 * @param p_hwfn - hw function
1030 * @param p_ptt - PTT required for register access
1031 * @param num_images - number of images if operation was
1032 * successful. 0 if not.
1034 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
1036 enum _ecore_status_t ecore_mcp_bist_nvm_test_get_num_images(
1037 struct ecore_hwfn *p_hwfn,
1038 struct ecore_ptt *p_ptt,
1042 * @brief Bist nvm test - get image attributes by index
1044 * @param p_hwfn - hw function
1045 * @param p_ptt - PTT required for register access
1046 * @param p_image_att - Attributes of image
1047 * @param image_index - Index of image to get information for
1049 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
1051 enum _ecore_status_t ecore_mcp_bist_nvm_test_get_image_att(
1052 struct ecore_hwfn *p_hwfn,
1053 struct ecore_ptt *p_ptt,
1054 struct bist_nvm_image_att *p_image_att,
1058 * @brief ecore_mcp_get_temperature_info - get the status of the temperature
1061 * @param p_hwfn - hw function
1062 * @param p_ptt - PTT required for register access
1063 * @param p_temp_status - A pointer to an ecore_temperature_info structure to
1064 * be filled with the temperature data
1066 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
1068 enum _ecore_status_t
1069 ecore_mcp_get_temperature_info(struct ecore_hwfn *p_hwfn,
1070 struct ecore_ptt *p_ptt,
1071 struct ecore_temperature_info *p_temp_info);
1074 * @brief Get MBA versions - get MBA sub images versions
1076 * @param p_hwfn - hw function
1077 * @param p_ptt - PTT required for register access
1078 * @param p_mba_vers - MBA versions array to fill
1080 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
1082 enum _ecore_status_t ecore_mcp_get_mba_versions(
1083 struct ecore_hwfn *p_hwfn,
1084 struct ecore_ptt *p_ptt,
1085 struct ecore_mba_vers *p_mba_vers);
1088 * @brief Count memory ecc events
1090 * @param p_hwfn - hw function
1091 * @param p_ptt - PTT required for register access
1092 * @param num_events - number of memory ecc events
1094 * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
1096 enum _ecore_status_t ecore_mcp_mem_ecc_events(struct ecore_hwfn *p_hwfn,
1097 struct ecore_ptt *p_ptt,
1100 struct ecore_mdump_info {
1110 * @brief - Gets the MFW crash dump configuration and logs info.
1114 * @param p_mdump_info
1116 * @param return ECORE_SUCCESS upon success.
1118 enum _ecore_status_t
1119 ecore_mcp_mdump_get_info(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
1120 struct ecore_mdump_info *p_mdump_info);
1123 * @brief - Clears the MFW crash dump logs.
1128 * @param return ECORE_SUCCESS upon success.
1130 enum _ecore_status_t ecore_mcp_mdump_clear_logs(struct ecore_hwfn *p_hwfn,
1131 struct ecore_ptt *p_ptt);
1134 * @brief - Clear the mdump retained data.
1139 * @param return ECORE_SUCCESS upon success.
1141 enum _ecore_status_t ecore_mcp_mdump_clr_retain(struct ecore_hwfn *p_hwfn,
1142 struct ecore_ptt *p_ptt);
1145 * @brief - Processes the TLV request from MFW i.e., get the required TLV info
1146 * from the ecore client and send it to the MFW.
1151 * @param return ECORE_SUCCESS upon success.
1153 enum _ecore_status_t ecore_mfw_process_tlv_req(struct ecore_hwfn *p_hwfn,
1154 struct ecore_ptt *p_ptt);
1158 * @brief - Return whether management firmware support smart AN
1162 * @return bool - true iff feature is supported.
1164 bool ecore_mcp_is_smart_an_supported(struct ecore_hwfn *p_hwfn);