Skip to content

Commit 062e55e

Browse files
bebarinodavem330
authored andcommitted
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 <[email protected]> Signed-off-by: Stephen Boyd <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent f09e224 commit 062e55e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

drivers/net/ethernet/micrel/ks8851.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -618,10 +618,8 @@ static void ks8851_irq_work(struct work_struct *work)
618618
netif_dbg(ks, intr, ks->netdev,
619619
"%s: status 0x%04x\n", __func__, status);
620620

621-
if (status & IRQ_LCI) {
622-
/* should do something about checking link status */
621+
if (status & IRQ_LCI)
623622
handled |= IRQ_LCI;
624-
}
625623

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

685683
mutex_unlock(&ks->lock);
686684

685+
if (status & IRQ_LCI)
686+
mii_check_link(&ks->mii);
687+
687688
if (status & IRQ_TXI)
688689
netif_wake_queue(ks->netdev);
689690

0 commit comments

Comments
 (0)