diff options
Diffstat (limited to 'drivers/net/myri10ge/myri10ge.c')
| -rw-r--r-- | drivers/net/myri10ge/myri10ge.c | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c index deca65330b0f..ae9bb7b7fd67 100644 --- a/drivers/net/myri10ge/myri10ge.c +++ b/drivers/net/myri10ge/myri10ge.c | |||
| @@ -191,6 +191,7 @@ struct myri10ge_priv { | |||
| 191 | struct timer_list watchdog_timer; | 191 | struct timer_list watchdog_timer; |
| 192 | int watchdog_tx_done; | 192 | int watchdog_tx_done; |
| 193 | int watchdog_tx_req; | 193 | int watchdog_tx_req; |
| 194 | int watchdog_pause; | ||
| 194 | int watchdog_resets; | 195 | int watchdog_resets; |
| 195 | int tx_linearized; | 196 | int tx_linearized; |
| 196 | int pause; | 197 | int pause; |
| @@ -2800,6 +2801,7 @@ static void myri10ge_watchdog(struct work_struct *work) | |||
| 2800 | static void myri10ge_watchdog_timer(unsigned long arg) | 2801 | static void myri10ge_watchdog_timer(unsigned long arg) |
| 2801 | { | 2802 | { |
| 2802 | struct myri10ge_priv *mgp; | 2803 | struct myri10ge_priv *mgp; |
| 2804 | u32 rx_pause_cnt; | ||
| 2803 | 2805 | ||
| 2804 | mgp = (struct myri10ge_priv *)arg; | 2806 | mgp = (struct myri10ge_priv *)arg; |
| 2805 | 2807 | ||
| @@ -2816,19 +2818,28 @@ static void myri10ge_watchdog_timer(unsigned long arg) | |||
| 2816 | myri10ge_fill_thresh) | 2818 | myri10ge_fill_thresh) |
| 2817 | mgp->rx_big.watchdog_needed = 0; | 2819 | mgp->rx_big.watchdog_needed = 0; |
| 2818 | } | 2820 | } |
| 2821 | rx_pause_cnt = ntohl(mgp->fw_stats->dropped_pause); | ||
| 2819 | 2822 | ||
| 2820 | if (mgp->tx.req != mgp->tx.done && | 2823 | if (mgp->tx.req != mgp->tx.done && |
| 2821 | mgp->tx.done == mgp->watchdog_tx_done && | 2824 | mgp->tx.done == mgp->watchdog_tx_done && |
| 2822 | mgp->watchdog_tx_req != mgp->watchdog_tx_done) | 2825 | mgp->watchdog_tx_req != mgp->watchdog_tx_done) { |
| 2823 | /* nic seems like it might be stuck.. */ | 2826 | /* nic seems like it might be stuck.. */ |
| 2824 | schedule_work(&mgp->watchdog_work); | 2827 | if (rx_pause_cnt != mgp->watchdog_pause) { |
| 2825 | else | 2828 | if (net_ratelimit()) |
| 2826 | /* rearm timer */ | 2829 | printk(KERN_WARNING "myri10ge %s:" |
| 2827 | mod_timer(&mgp->watchdog_timer, | 2830 | "TX paused, check link partner\n", |
| 2828 | jiffies + myri10ge_watchdog_timeout * HZ); | 2831 | mgp->dev->name); |
| 2829 | 2832 | } else { | |
| 2833 | schedule_work(&mgp->watchdog_work); | ||
| 2834 | return; | ||
| 2835 | } | ||
| 2836 | } | ||
| 2837 | /* rearm timer */ | ||
| 2838 | mod_timer(&mgp->watchdog_timer, | ||
| 2839 | jiffies + myri10ge_watchdog_timeout * HZ); | ||
| 2830 | mgp->watchdog_tx_done = mgp->tx.done; | 2840 | mgp->watchdog_tx_done = mgp->tx.done; |
| 2831 | mgp->watchdog_tx_req = mgp->tx.req; | 2841 | mgp->watchdog_tx_req = mgp->tx.req; |
| 2842 | mgp->watchdog_pause = rx_pause_cnt; | ||
| 2832 | } | 2843 | } |
| 2833 | 2844 | ||
| 2834 | static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | 2845 | static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent) |
