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

Commit 062e55e3 authored by Stephen Boyd's avatar Stephen Boyd Committed by David S. Miller
Browse files

ks8851: Update link status during link change interrupt



If a link change interrupt comes in we just clear the interrupt
and continue along without notifying the upper networking layers
that the link has changed. Use the mii_check_link() function to
update the link status whenever a link change interrupt occurs.

Cc: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f09e2249
Loading
Loading
Loading
Loading
+4 −3
Original line number Original line Diff line number Diff line
@@ -618,10 +618,8 @@ static void ks8851_irq_work(struct work_struct *work)
	netif_dbg(ks, intr, ks->netdev,
	netif_dbg(ks, intr, ks->netdev,
		  "%s: status 0x%04x\n", __func__, status);
		  "%s: status 0x%04x\n", __func__, status);


	if (status & IRQ_LCI) {
	if (status & IRQ_LCI)
		/* should do something about checking link status */
		handled |= IRQ_LCI;
		handled |= IRQ_LCI;
	}


	if (status & IRQ_LDI) {
	if (status & IRQ_LDI) {
		u16 pmecr = ks8851_rdreg16(ks, KS_PMECR);
		u16 pmecr = ks8851_rdreg16(ks, KS_PMECR);
@@ -684,6 +682,9 @@ static void ks8851_irq_work(struct work_struct *work)


	mutex_unlock(&ks->lock);
	mutex_unlock(&ks->lock);


	if (status & IRQ_LCI)
		mii_check_link(&ks->mii);

	if (status & IRQ_TXI)
	if (status & IRQ_TXI)
		netif_wake_queue(ks->netdev);
		netif_wake_queue(ks->netdev);