Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 91c05ce1 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: emac: Avoid device suspend in case of link active"

parents 557100fa a206f95d
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
/* Copyright (c) 2013-2015, The Linux Foundation. All rights reserved.
/* Copyright (c) 2013-2016, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -3021,6 +3021,10 @@ static int emac_suspend(struct device *device)
	bool link_up = false;
	int retval = 0;

	/* Check link state. Don't suspend if link is up */
	if (netif_carrier_ok(adpt->netdev))
		return -EPERM;

	/* cannot suspend if WOL is disabled */
	if (!adpt->irq[EMAC_WOL_IRQ].irq)
		return -EPERM;