diff options
Diffstat (limited to 'drivers/net/r8169.c')
-rw-r--r-- | drivers/net/r8169.c | 41 |
1 files changed, 32 insertions, 9 deletions
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index bde7d61f1930..59ccf0c5c610 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c | |||
@@ -973,7 +973,8 @@ static void __rtl8169_check_link_status(struct net_device *dev, | |||
973 | if (pm) | 973 | if (pm) |
974 | pm_request_resume(&tp->pci_dev->dev); | 974 | pm_request_resume(&tp->pci_dev->dev); |
975 | netif_carrier_on(dev); | 975 | netif_carrier_on(dev); |
976 | netif_info(tp, ifup, dev, "link up\n"); | 976 | if (net_ratelimit()) |
977 | netif_info(tp, ifup, dev, "link up\n"); | ||
977 | } else { | 978 | } else { |
978 | netif_carrier_off(dev); | 979 | netif_carrier_off(dev); |
979 | netif_info(tp, ifdown, dev, "link down\n"); | 980 | netif_info(tp, ifdown, dev, "link down\n"); |
@@ -3757,7 +3758,8 @@ static void rtl_hw_start_8168(struct net_device *dev) | |||
3757 | RTL_W16(IntrMitigate, 0x5151); | 3758 | RTL_W16(IntrMitigate, 0x5151); |
3758 | 3759 | ||
3759 | /* Work around for RxFIFO overflow. */ | 3760 | /* Work around for RxFIFO overflow. */ |
3760 | if (tp->mac_version == RTL_GIGA_MAC_VER_11) { | 3761 | if (tp->mac_version == RTL_GIGA_MAC_VER_11 || |
3762 | tp->mac_version == RTL_GIGA_MAC_VER_22) { | ||
3761 | tp->intr_event |= RxFIFOOver | PCSTimeout; | 3763 | tp->intr_event |= RxFIFOOver | PCSTimeout; |
3762 | tp->intr_event &= ~RxOverflow; | 3764 | tp->intr_event &= ~RxOverflow; |
3763 | } | 3765 | } |
@@ -4639,12 +4641,33 @@ static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance) | |||
4639 | break; | 4641 | break; |
4640 | } | 4642 | } |
4641 | 4643 | ||
4642 | /* Work around for rx fifo overflow */ | 4644 | if (unlikely(status & RxFIFOOver)) { |
4643 | if (unlikely(status & RxFIFOOver) && | 4645 | switch (tp->mac_version) { |
4644 | (tp->mac_version == RTL_GIGA_MAC_VER_11)) { | 4646 | /* Work around for rx fifo overflow */ |
4645 | netif_stop_queue(dev); | 4647 | case RTL_GIGA_MAC_VER_11: |
4646 | rtl8169_tx_timeout(dev); | 4648 | case RTL_GIGA_MAC_VER_22: |
4647 | break; | 4649 | case RTL_GIGA_MAC_VER_26: |
4650 | netif_stop_queue(dev); | ||
4651 | rtl8169_tx_timeout(dev); | ||
4652 | goto done; | ||
4653 | /* Testers needed. */ | ||
4654 | case RTL_GIGA_MAC_VER_17: | ||
4655 | case RTL_GIGA_MAC_VER_19: | ||
4656 | case RTL_GIGA_MAC_VER_20: | ||
4657 | case RTL_GIGA_MAC_VER_21: | ||
4658 | case RTL_GIGA_MAC_VER_23: | ||
4659 | case RTL_GIGA_MAC_VER_24: | ||
4660 | case RTL_GIGA_MAC_VER_27: | ||
4661 | case RTL_GIGA_MAC_VER_28: | ||
4662 | /* Experimental science. Pktgen proof. */ | ||
4663 | case RTL_GIGA_MAC_VER_12: | ||
4664 | case RTL_GIGA_MAC_VER_25: | ||
4665 | if (status == RxFIFOOver) | ||
4666 | goto done; | ||
4667 | break; | ||
4668 | default: | ||
4669 | break; | ||
4670 | } | ||
4648 | } | 4671 | } |
4649 | 4672 | ||
4650 | if (unlikely(status & SYSErr)) { | 4673 | if (unlikely(status & SYSErr)) { |
@@ -4680,7 +4703,7 @@ static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance) | |||
4680 | (status & RxFIFOOver) ? (status | RxOverflow) : status); | 4703 | (status & RxFIFOOver) ? (status | RxOverflow) : status); |
4681 | status = RTL_R16(IntrStatus); | 4704 | status = RTL_R16(IntrStatus); |
4682 | } | 4705 | } |
4683 | 4706 | done: | |
4684 | return IRQ_RETVAL(handled); | 4707 | return IRQ_RETVAL(handled); |
4685 | } | 4708 | } |
4686 | 4709 | ||