@@ -6058,7 +6058,7 @@ static int mlx5e_resume(struct auxiliary_device *adev)
6058
6058
return 0 ;
6059
6059
}
6060
6060
6061
- static int _mlx5e_suspend (struct auxiliary_device * adev )
6061
+ static int _mlx5e_suspend (struct auxiliary_device * adev , bool pre_netdev_reg )
6062
6062
{
6063
6063
struct mlx5e_dev * mlx5e_dev = auxiliary_get_drvdata (adev );
6064
6064
struct mlx5e_priv * priv = mlx5e_dev -> priv ;
@@ -6067,7 +6067,7 @@ static int _mlx5e_suspend(struct auxiliary_device *adev)
6067
6067
struct mlx5_core_dev * pos ;
6068
6068
int i ;
6069
6069
6070
- if (!netif_device_present (netdev )) {
6070
+ if (!pre_netdev_reg && ! netif_device_present (netdev )) {
6071
6071
if (test_bit (MLX5E_STATE_DESTROYING , & priv -> state ))
6072
6072
mlx5_sd_for_each_dev (i , mdev , pos )
6073
6073
mlx5e_destroy_mdev_resources (pos );
@@ -6090,7 +6090,7 @@ static int mlx5e_suspend(struct auxiliary_device *adev, pm_message_t state)
6090
6090
6091
6091
actual_adev = mlx5_sd_get_adev (mdev , adev , edev -> idx );
6092
6092
if (actual_adev )
6093
- err = _mlx5e_suspend (actual_adev );
6093
+ err = _mlx5e_suspend (actual_adev , false );
6094
6094
6095
6095
mlx5_sd_cleanup (mdev );
6096
6096
return err ;
@@ -6157,7 +6157,7 @@ static int _mlx5e_probe(struct auxiliary_device *adev)
6157
6157
return 0 ;
6158
6158
6159
6159
err_resume :
6160
- _mlx5e_suspend (adev );
6160
+ _mlx5e_suspend (adev , true );
6161
6161
err_profile_cleanup :
6162
6162
profile -> cleanup (priv );
6163
6163
err_destroy_netdev :
@@ -6197,7 +6197,7 @@ static void _mlx5e_remove(struct auxiliary_device *adev)
6197
6197
mlx5_core_uplink_netdev_set (mdev , NULL );
6198
6198
mlx5e_dcbnl_delete_app (priv );
6199
6199
unregister_netdev (priv -> netdev );
6200
- _mlx5e_suspend (adev );
6200
+ _mlx5e_suspend (adev , false );
6201
6201
priv -> profile -> cleanup (priv );
6202
6202
mlx5e_destroy_netdev (priv );
6203
6203
mlx5e_devlink_port_unregister (mlx5e_dev );
0 commit comments