File tree 1 file changed +14
-8
lines changed
drivers/net/ethernet/renesas
1 file changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -3217,10 +3217,15 @@ static int ravb_suspend(struct device *dev)
3217
3217
3218
3218
netif_device_detach (ndev );
3219
3219
3220
- if (priv -> wol_enabled )
3221
- return ravb_wol_setup (ndev );
3220
+ rtnl_lock ();
3221
+ if (priv -> wol_enabled ) {
3222
+ ret = ravb_wol_setup (ndev );
3223
+ rtnl_unlock ();
3224
+ return ret ;
3225
+ }
3222
3226
3223
3227
ret = ravb_close (ndev );
3228
+ rtnl_unlock ();
3224
3229
if (ret )
3225
3230
return ret ;
3226
3231
@@ -3245,19 +3250,20 @@ static int ravb_resume(struct device *dev)
3245
3250
if (!netif_running (ndev ))
3246
3251
return 0 ;
3247
3252
3253
+ rtnl_lock ();
3248
3254
/* If WoL is enabled restore the interface. */
3249
- if (priv -> wol_enabled ) {
3255
+ if (priv -> wol_enabled )
3250
3256
ret = ravb_wol_restore (ndev );
3251
- if (ret )
3252
- return ret ;
3253
- } else {
3257
+ else
3254
3258
ret = pm_runtime_force_resume (dev );
3255
- if (ret )
3256
- return ret ;
3259
+ if (ret ) {
3260
+ rtnl_unlock ();
3261
+ return ret ;
3257
3262
}
3258
3263
3259
3264
/* Reopening the interface will restore the device to the working state. */
3260
3265
ret = ravb_open (ndev );
3266
+ rtnl_unlock ();
3261
3267
if (ret < 0 )
3262
3268
goto out_rpm_put ;
3263
3269
You can’t perform that action at this time.
0 commit comments