net/qede/base: fix multiple acquisition requests by VF
[dpdk.git] / drivers / net / qede / base / ecore_mcp_api.h
index f21f87a..c26b494 100644 (file)
@@ -31,6 +31,8 @@ struct ecore_mcp_link_params {
 
 struct ecore_mcp_link_capabilities {
        u32 speed_capabilities;
+       bool default_speed_autoneg; /* In Mb/s */
+       u32 default_speed; /* In Mb/s */
 };
 
 struct ecore_mcp_link_state {
@@ -115,10 +117,12 @@ struct ecore_mcp_nvm_params {
        };
 };
 
+#ifndef __EXTRACT__LINUX__
 enum ecore_nvm_images {
        ECORE_NVM_IMAGE_ISCSI_CFG,
        ECORE_NVM_IMAGE_FCOE_CFG,
 };
+#endif
 
 struct ecore_mcp_drv_version {
        u32 version;
@@ -133,13 +137,39 @@ struct ecore_mcp_lan_stats {
 
 #ifndef ECORE_PROTO_STATS
 #define ECORE_PROTO_STATS
+struct ecore_mcp_fcoe_stats {
+       u64 rx_pkts;
+       u64 tx_pkts;
+       u32 fcs_err;
+       u32 login_failure;
+};
+
+struct ecore_mcp_iscsi_stats {
+       u64 rx_pdus;
+       u64 tx_pdus;
+       u64 rx_bytes;
+       u64 tx_bytes;
+};
+
+struct ecore_mcp_rdma_stats {
+       u64 rx_pkts;
+       u64 tx_pkts;
+       u64 rx_bytes;
+       u64 tx_byts;
+};
 
 enum ecore_mcp_protocol_type {
        ECORE_MCP_LAN_STATS,
+       ECORE_MCP_FCOE_STATS,
+       ECORE_MCP_ISCSI_STATS,
+       ECORE_MCP_RDMA_STATS
 };
 
 union ecore_mcp_protocol_stats {
        struct ecore_mcp_lan_stats lan_stats;
+       struct ecore_mcp_fcoe_stats fcoe_stats;
+       struct ecore_mcp_iscsi_stats iscsi_stats;
+       struct ecore_mcp_rdma_stats rdma_stats;
 };
 #endif
 
@@ -183,7 +213,7 @@ struct ecore_temperature_sensor {
        u8 current_temp;
 };
 
-#define ECORE_MAX_NUM_OF_SENSORS        7
+#define ECORE_MAX_NUM_OF_SENSORS       7
 struct ecore_temperature_info {
        u32 num_sensors;
        struct ecore_temperature_sensor sensors[ECORE_MAX_NUM_OF_SENSORS];
@@ -243,19 +273,20 @@ struct ecore_mcp_link_capabilities
  * @return enum _ecore_status_t
  */
 enum _ecore_status_t ecore_mcp_set_link(struct ecore_hwfn *p_hwfn,
-                                       struct ecore_ptt *p_ptt, bool b_up);
+                                       struct ecore_ptt *p_ptt,
+                                       bool b_up);
 
 /**
  * @brief Get the management firmware version value
  *
- * @param p_dev       - ecore dev pointer
+ * @param p_hwfn
  * @param p_ptt
  * @param p_mfw_ver    - mfw version value
  * @param p_running_bundle_id  - image id in nvram; Optional.
  *
  * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
  */
-enum _ecore_status_t ecore_mcp_get_mfw_ver(struct ecore_dev *p_dev,
+enum _ecore_status_t ecore_mcp_get_mfw_ver(struct ecore_hwfn *p_hwfn,
                                           struct ecore_ptt *p_ptt,
                                           u32 *p_mfw_ver,
                                           u32 *p_running_bundle_id);
@@ -301,6 +332,7 @@ enum _ecore_status_t ecore_mcp_cmd(struct ecore_hwfn *p_hwfn,
 enum _ecore_status_t ecore_mcp_drain(struct ecore_hwfn *p_hwfn,
                                     struct ecore_ptt *p_ptt);
 
+#ifndef LINUX_REMOVE
 /**
  * @brief - return the mcp function info of the hw function
  *
@@ -310,6 +342,7 @@ enum _ecore_status_t ecore_mcp_drain(struct ecore_hwfn *p_hwfn,
  */
 const struct ecore_mcp_function_info
 *ecore_mcp_get_function_info(struct ecore_hwfn *p_hwfn);
+#endif
 
 /**
  * @brief - Function for reading/manipulating the nvram. Following are supported
@@ -349,6 +382,7 @@ enum _ecore_status_t ecore_mcp_nvm_command(struct ecore_hwfn *p_hwfn,
                                           struct ecore_ptt *p_ptt,
                                           struct ecore_mcp_nvm_params *params);
 
+#ifndef LINUX_REMOVE
 /**
  * @brief - count number of function with a matching personality on engine.
  *
@@ -360,7 +394,9 @@ enum _ecore_status_t ecore_mcp_nvm_command(struct ecore_hwfn *p_hwfn,
  *          the bitsmasks.
  */
 int ecore_mcp_get_personality_cnt(struct ecore_hwfn *p_hwfn,
-                                 struct ecore_ptt *p_ptt, u32 personalities);
+                                 struct ecore_ptt *p_ptt,
+                                 u32 personalities);
+#endif
 
 /**
  * @brief Get the flash size value
@@ -539,7 +575,8 @@ enum _ecore_status_t ecore_mcp_nvm_put_file_begin(struct ecore_dev *p_dev,
  *
  * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
  */
-enum _ecore_status_t ecore_mcp_nvm_del_file(struct ecore_dev *p_dev, u32 addr);
+enum _ecore_status_t ecore_mcp_nvm_del_file(struct ecore_dev *p_dev,
+                                           u32 addr);
 
 /**
  * @brief Check latest response
@@ -641,6 +678,7 @@ enum _ecore_status_t ecore_mcp_gpio_read(struct ecore_hwfn *p_hwfn,
 enum _ecore_status_t ecore_mcp_gpio_write(struct ecore_hwfn *p_hwfn,
                                          struct ecore_ptt *p_ptt,
                                          u16 gpio, u16 gpio_val);
+
 /**
  * @brief Gpio get information
  *
@@ -686,14 +724,14 @@ enum _ecore_status_t ecore_mcp_bist_clock_test(struct ecore_hwfn *p_hwfn,
  *  @param p_hwfn       - hw function
  *  @param p_ptt        - PTT required for register access
  *  @param num_images   - number of images if operation was
- *                        successful. 0 if not.
+ *                       successful. 0 if not.
  *
  * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
  */
-enum _ecore_status_t
-ecore_mcp_bist_nvm_test_get_num_images(struct ecore_hwfn *p_hwfn,
-                                      struct ecore_ptt *p_ptt,
-                                      u32 *num_images);
+enum _ecore_status_t ecore_mcp_bist_nvm_test_get_num_images(
+                                               struct ecore_hwfn *p_hwfn,
+                                               struct ecore_ptt *p_ptt,
+                                               u32 *num_images);
 
 /**
  * @brief Bist nvm test - get image attributes by index
@@ -705,11 +743,11 @@ ecore_mcp_bist_nvm_test_get_num_images(struct ecore_hwfn *p_hwfn,
  *
  * @return enum _ecore_status_t - ECORE_SUCCESS - operation was successful.
  */
-enum _ecore_status_t
-ecore_mcp_bist_nvm_test_get_image_att(struct ecore_hwfn *p_hwfn,
-                                     struct ecore_ptt *p_ptt,
-                                     struct bist_nvm_image_att *p_image_att,
-                                     u32 image_index);
+enum _ecore_status_t ecore_mcp_bist_nvm_test_get_image_att(
+                                       struct ecore_hwfn *p_hwfn,
+                                       struct ecore_ptt *p_ptt,
+                                       struct bist_nvm_image_att *p_image_att,
+                                       u32 image_index);
 
 /**
  * @brief ecore_mcp_get_temperature_info - get the status of the temperature
@@ -726,6 +764,7 @@ enum _ecore_status_t
 ecore_mcp_get_temperature_info(struct ecore_hwfn *p_hwfn,
                               struct ecore_ptt *p_ptt,
                               struct ecore_temperature_info *p_temp_info);
+
 /**
  * @brief Get MBA versions - get MBA sub images versions
  *