When VFs need to be reconfigured dynamically after firmwware reset, the
configuration sequence on the PF needs to be changed to register the VF
buffers first. Otherwise, some VF firmware commands may not succeed as
there may not be PF buffers ready for the re-directed firmware commands.
This sequencing did not matter much before when we only supported
the normal bring-up of VFs.
Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
{
int rc;
+ /* Register buffers for VFs */
+ rc = bnxt_hwrm_func_buf_rgtr(bp);
+ if (rc)
+ return rc;
+
/* Reserve resources for VFs */
rc = bnxt_func_cfg(bp, *num_vfs);
if (rc != *num_vfs) {
*num_vfs = rc;
}
- /* Register buffers for VFs */
- rc = bnxt_hwrm_func_buf_rgtr(bp);
- if (rc)
- return rc;
-
bnxt_ulp_sriov_cfg(bp, *num_vfs);
return 0;
}