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

Commit 6c988853 authored by Petri Gynther's avatar Petri Gynther Committed by David S. Miller
Browse files

bonding: Have bond_check_dev_link examine netif_running



bonding: Have bond_check_dev_link examine netif_running

	Some network devices do not call netif_carrier_off when they
are set administratively down.  Have the bonding link check function
also inspect the netif_running state.  Ignore netif_running if the
bond_check_dev_link function is called with "reporting" set, as in that
case it's inspecting the capabilities of the non-netif_carrier device
driver.

Signed-off-by: default avatarPetri Gynther <pgynther@google.com>
Signed-off-by: default avatarJay Vosburgh <fubar@us.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f5841306
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -695,6 +695,9 @@ static int bond_check_dev_link(struct bonding *bond,
	struct ifreq ifr;
	struct mii_ioctl_data *mii;

	if (!reporting && !netif_running(slave_dev))
		return 0;

	if (bond->params.use_carrier)
		return netif_carrier_ok(slave_dev) ? BMSR_LSTATUS : 0;