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.
Unified · Split
| @@ -618,10 +618,8 @@ static void ks8851_irq_work(struct work_struct *work) · 617 unmodified lines | ||
| 618 | 618 | netif_dbg(ks, intr, ks->netdev, |
| 619 | 619 | "%s: status 0x%04x\n", __func__, status); |
| 620 | 620 | |
| 621 | − if (status & IRQ_LCI) { | |
| 622 | − /* should do something about checking link status */ | |
| 621 | + if (status & IRQ_LCI) | |
| 623 | 622 | handled |= IRQ_LCI; |
| 624 | − } | |
| 625 | 623 | |
| 626 | 624 | if (status & IRQ_LDI) { |
| 627 | 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 | 683 | mutex_unlock(&ks->lock); |
| 686 | 684 | |
| 685 | + if (status & IRQ_LCI) | |
| 686 | + mii_check_link(&ks->mii); | |
| 687 | + | |
| 687 | 688 | if (status & IRQ_TXI) |
| 688 | 689 | netif_wake_queue(ks->netdev); |
| 689 | 690 | |