OSDN Git Service

ice: log an error message when eswitch fails to configure
authorJacob Keller <jacob.e.keller@intel.com>
Wed, 23 Feb 2022 00:26:57 +0000 (16:26 -0800)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Tue, 15 Mar 2022 00:22:59 +0000 (17:22 -0700)
When ice_eswitch_configure fails, print an error message to make it more
obvious why VF initialization did not succeed.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Sandeep Penigalapati <sandeep.penigalapati@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_sriov.c

index b695d47..d41fce1 100644 (file)
@@ -2087,8 +2087,10 @@ static int ice_ena_vfs(struct ice_pf *pf, u16 num_vfs)
        clear_bit(ICE_VF_DIS, pf->state);
 
        ret = ice_eswitch_configure(pf);
-       if (ret)
+       if (ret) {
+               dev_err(dev, "Failed to configure eswitch, err %d\n", ret);
                goto err_unroll_sriov;
+       }
 
        /* rearm global interrupts */
        if (test_and_clear_bit(ICE_OICR_INTR_DIS, pf->state))