File tree Expand file tree Collapse file tree 1 file changed +14
-8
lines changed
drivers/net/ethernet/renesas Expand file tree Collapse file tree 1 file changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -3208,10 +3208,15 @@ static int ravb_suspend(struct device *dev)
32083208
32093209 netif_device_detach (ndev );
32103210
3211- if (priv -> wol_enabled )
3212- return ravb_wol_setup (ndev );
3211+ rtnl_lock ();
3212+ if (priv -> wol_enabled ) {
3213+ ret = ravb_wol_setup (ndev );
3214+ rtnl_unlock ();
3215+ return ret ;
3216+ }
32133217
32143218 ret = ravb_close (ndev );
3219+ rtnl_unlock ();
32153220 if (ret )
32163221 return ret ;
32173222
@@ -3236,19 +3241,20 @@ static int ravb_resume(struct device *dev)
32363241 if (!netif_running (ndev ))
32373242 return 0 ;
32383243
3244+ rtnl_lock ();
32393245 /* If WoL is enabled restore the interface. */
3240- if (priv -> wol_enabled ) {
3246+ if (priv -> wol_enabled )
32413247 ret = ravb_wol_restore (ndev );
3242- if (ret )
3243- return ret ;
3244- } else {
3248+ else
32453249 ret = pm_runtime_force_resume (dev );
3246- if (ret )
3247- return ret ;
3250+ if (ret ) {
3251+ rtnl_unlock ();
3252+ return ret ;
32483253 }
32493254
32503255 /* Reopening the interface will restore the device to the working state. */
32513256 ret = ravb_open (ndev );
3257+ rtnl_unlock ();
32523258 if (ret < 0 )
32533259 goto out_rpm_put ;
32543260
You can’t perform that action at this time.
0 commit comments