History

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.

Stephen Boyd committed 14 years ago

Commit 062e55e1 parent f09e2241 file · +4 −3Browse files

Unified · Split

drivers/net/ethernet/micrel/ks8851.c+4−3
@@ -618,10 +618,8 @@ static void ks8851_irq_work(struct work_struct *work) · 617 unmodified lines
618 netif_dbg(ks, intr, ks->netdev,618 netif_dbg(ks, intr, ks->netdev,
619 "%s: status 0x%04x\n", __func__, status);619 "%s: status 0x%04x\n", __func__, status);
620 620
621 if (status & IRQ_LCI) {621 if (status & IRQ_LCI)
622 /* should do something about checking link status */
623 handled |= IRQ_LCI;622 handled |= IRQ_LCI;
624 }
625 623
626 if (status & IRQ_LDI) {624 if (status & IRQ_LDI) {
627 u16 pmecr = ks8851_rdreg16(ks, KS_PMECR);625 u16 pmecr = ks8851_rdreg16(ks, KS_PMECR);
@@ -684,6 +682,9 @@ static void ks8851_irq_work(struct work_struct *work) · 56 unmodified lines
684 682
685 mutex_unlock(&ks->lock);683 mutex_unlock(&ks->lock);
686 684
685 if (status & IRQ_LCI)
686 mii_check_link(&ks->mii);
687
687 if (status & IRQ_TXI)688 if (status & IRQ_TXI)
688 netif_wake_queue(ks->netdev);689 netif_wake_queue(ks->netdev);
689 690