net/i40e/base: track id can be 0
authorJingjing Wu <jingjing.wu@intel.com>
Tue, 27 Jun 2017 13:29:09 +0000 (21:29 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 6 Jul 2017 13:00:57 +0000 (15:00 +0200)
track_id == 0 is valid for “read only” profiles when
profile does not have any “write” commands.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
drivers/net/i40e/base/i40e_common.c
drivers/net/i40e/base/i40e_prototype.h

index bb4b7eb..38c30a1 100644 (file)
@@ -7370,11 +7370,6 @@ i40e_write_profile(struct i40e_hw *hw, struct i40e_profile_segment *profile,
        u32 offset = 0, info = 0;
        u32 i;
 
-       if (!track_id) {
-               i40e_debug(hw, I40E_DEBUG_PACKAGE, "Track_id can't be 0.");
-               return I40E_NOT_SUPPORTED;
-       }
-
        dev_cnt = profile->device_table_count;
 
        for (i = 0; i < dev_cnt; i++) {
@@ -7449,6 +7444,6 @@ i40e_add_pinfo_to_list(struct i40e_hw *hw,
        memcpy(pinfo->name, profile->name, I40E_DDP_NAME_SIZE);
 
        status = i40e_aq_write_ddp(hw, (void *)sec, sec->data_end,
-                               track_id, &offset, &info, NULL);
+                                  track_id, &offset, &info, NULL);
        return status;
 }
index 54b6750..9171e97 100644 (file)
@@ -575,12 +575,14 @@ u8 i40e_get_phy_address(struct i40e_hw *hw, u8 dev_num);
 enum i40e_status_code i40e_blink_phy_link_led(struct i40e_hw *hw,
                                              u32 time, u32 interval);
 enum i40e_status_code i40e_aq_write_ddp(struct i40e_hw *hw, void *buff,
-                               u16 buff_size, u32 track_id,
-                               u32 *error_offset, u32 *error_info,
-                               struct i40e_asq_cmd_details *cmd_details);
+                                       u16 buff_size, u32 track_id,
+                                       u32 *error_offset, u32 *error_info,
+                                       struct i40e_asq_cmd_details *
+                                       cmd_details);
 enum i40e_status_code i40e_aq_get_ddp_list(struct i40e_hw *hw, void *buff,
-                                  u16 buff_size, u8 flags,
-                                  struct i40e_asq_cmd_details *cmd_details);
+                                          u16 buff_size, u8 flags,
+                                          struct i40e_asq_cmd_details *
+                                          cmd_details);
 struct i40e_generic_seg_header *
 i40e_find_segment_in_package(u32 segment_type,
                             struct i40e_package_header *pkg_header);