*/
if (!details->async && !details->postpone) {
u32 total_delay = 0;
- u32 delay_len = 1;
do {
/* AQ designers suggest use of head for better
if (i40e_asq_done(hw))
break;
/* ugh! delay while spin_lock */
- i40e_msec_delay(delay_len);
- total_delay += delay_len;
+ i40e_msec_delay(1);
+ total_delay++;
} while (total_delay < hw->aq.asq_cmd_timeout);
}
break;
default:
return I40E_ERR_DEVICE_NOT_SUPPORTED;
- break;
}
hw->phy.get_link_info = true;
i40e_clear_pxe_mode(hw);
+
return I40E_SUCCESS;
}
*api_major_version = LE16_TO_CPU(resp->api_major);
if (api_minor_version != NULL)
*api_minor_version = LE16_TO_CPU(resp->api_minor);
+
+ /* A workaround to fix the API version in SW */
+ if (api_major_version && api_minor_version &&
+ fw_major_version && fw_minor_version &&
+ ((*api_major_version == 1) && (*api_minor_version == 1)) &&
+ (((*fw_major_version == 4) && (*fw_minor_version >= 2)) ||
+ (*fw_major_version > 4)))
+ *api_minor_version = 2;
}
return status;
struct i40e_asq_cmd_details *cmd_details)
{
struct i40e_aq_desc desc;
+ struct i40e_asq_cmd_details details;
enum i40e_status_code status;
i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_send_msg_to_pf);
desc.datalen = CPU_TO_LE16(msglen);
}
if (!cmd_details) {
- struct i40e_asq_cmd_details details;
i40e_memset(&details, 0, sizeof(details), I40E_NONDMA_MEM);
details.async = true;
cmd_details = &details;