diff options
author | Tony Lindgren <tony@atomide.com> | 2011-02-25 15:27:14 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2011-02-25 15:27:14 -0500 |
commit | 02fa9f0451ac639a687bfc145eefe58703ff220e (patch) | |
tree | fe984acc78f22f6eb8fb98efaba8b1ac2f3ad8d9 /drivers/net/r8169.c | |
parent | cbc9438075ca9dee3f39a2e7310f81c304b40359 (diff) | |
parent | 51c404b2c514930e98e81e0b9294f19892a4f871 (diff) |
Merge branch 'patches_for_2.6.38rc' of git://git.pwsan.com/linux-2.6 into devel-fixes
Diffstat (limited to 'drivers/net/r8169.c')
-rw-r--r-- | drivers/net/r8169.c | 43 |
1 files changed, 34 insertions, 9 deletions
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index bde7d61f1930..469ab0b7ce31 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"); |
@@ -3189,6 +3190,8 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
3189 | if (pci_dev_run_wake(pdev)) | 3190 | if (pci_dev_run_wake(pdev)) |
3190 | pm_runtime_put_noidle(&pdev->dev); | 3191 | pm_runtime_put_noidle(&pdev->dev); |
3191 | 3192 | ||
3193 | netif_carrier_off(dev); | ||
3194 | |||
3192 | out: | 3195 | out: |
3193 | return rc; | 3196 | return rc; |
3194 | 3197 | ||
@@ -3757,7 +3760,8 @@ static void rtl_hw_start_8168(struct net_device *dev) | |||
3757 | RTL_W16(IntrMitigate, 0x5151); | 3760 | RTL_W16(IntrMitigate, 0x5151); |
3758 | 3761 | ||
3759 | /* Work around for RxFIFO overflow. */ | 3762 | /* Work around for RxFIFO overflow. */ |
3760 | if (tp->mac_version == RTL_GIGA_MAC_VER_11) { | 3763 | if (tp->mac_version == RTL_GIGA_MAC_VER_11 || |
3764 | tp->mac_version == RTL_GIGA_MAC_VER_22) { | ||
3761 | tp->intr_event |= RxFIFOOver | PCSTimeout; | 3765 | tp->intr_event |= RxFIFOOver | PCSTimeout; |
3762 | tp->intr_event &= ~RxOverflow; | 3766 | tp->intr_event &= ~RxOverflow; |
3763 | } | 3767 | } |
@@ -4639,12 +4643,33 @@ static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance) | |||
4639 | break; | 4643 | break; |
4640 | } | 4644 | } |
4641 | 4645 | ||
4642 | /* Work around for rx fifo overflow */ | 4646 | if (unlikely(status & RxFIFOOver)) { |
4643 | if (unlikely(status & RxFIFOOver) && | 4647 | switch (tp->mac_version) { |
4644 | (tp->mac_version == RTL_GIGA_MAC_VER_11)) { | 4648 | /* Work around for rx fifo overflow */ |
4645 | netif_stop_queue(dev); | 4649 | case RTL_GIGA_MAC_VER_11: |
4646 | rtl8169_tx_timeout(dev); | 4650 | case RTL_GIGA_MAC_VER_22: |
4647 | break; | 4651 | case RTL_GIGA_MAC_VER_26: |
4652 | netif_stop_queue(dev); | ||
4653 | rtl8169_tx_timeout(dev); | ||
4654 | goto done; | ||
4655 | /* Testers needed. */ | ||
4656 | case RTL_GIGA_MAC_VER_17: | ||
4657 | case RTL_GIGA_MAC_VER_19: | ||
4658 | case RTL_GIGA_MAC_VER_20: | ||
4659 | case RTL_GIGA_MAC_VER_21: | ||
4660 | case RTL_GIGA_MAC_VER_23: | ||
4661 | case RTL_GIGA_MAC_VER_24: | ||
4662 | case RTL_GIGA_MAC_VER_27: | ||
4663 | case RTL_GIGA_MAC_VER_28: | ||
4664 | /* Experimental science. Pktgen proof. */ | ||
4665 | case RTL_GIGA_MAC_VER_12: | ||
4666 | case RTL_GIGA_MAC_VER_25: | ||
4667 | if (status == RxFIFOOver) | ||
4668 | goto done; | ||
4669 | break; | ||
4670 | default: | ||
4671 | break; | ||
4672 | } | ||
4648 | } | 4673 | } |
4649 | 4674 | ||
4650 | if (unlikely(status & SYSErr)) { | 4675 | if (unlikely(status & SYSErr)) { |
@@ -4680,7 +4705,7 @@ static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance) | |||
4680 | (status & RxFIFOOver) ? (status | RxOverflow) : status); | 4705 | (status & RxFIFOOver) ? (status | RxOverflow) : status); |
4681 | status = RTL_R16(IntrStatus); | 4706 | status = RTL_R16(IntrStatus); |
4682 | } | 4707 | } |
4683 | 4708 | done: | |
4684 | return IRQ_RETVAL(handled); | 4709 | return IRQ_RETVAL(handled); |
4685 | } | 4710 | } |
4686 | 4711 | ||