Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

igbvf: remove Tx hang detection

Removed Tx hang detection mechanism from igbvf.
This mechanism has no affect and can cause false alarm message in some cases.

Signed-off-by: Lior Levy <lior.levy@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

authored by

Lior Levy and committed by
Jeff Kirsher
6799746a 65d676c8

-63
-3
drivers/net/igbvf/igbvf.h
··· 201 201 unsigned int restart_queue; 202 202 u32 txd_cmd; 203 203 204 - bool detect_tx_hung; 205 - u8 tx_timeout_factor; 206 - 207 204 u32 tx_int_delay; 208 205 u32 tx_abs_int_delay; 209 206
-60
drivers/net/igbvf/netdev.c
··· 396 396 buffer_info->time_stamp = 0; 397 397 } 398 398 399 - static void igbvf_print_tx_hang(struct igbvf_adapter *adapter) 400 - { 401 - struct igbvf_ring *tx_ring = adapter->tx_ring; 402 - unsigned int i = tx_ring->next_to_clean; 403 - unsigned int eop = tx_ring->buffer_info[i].next_to_watch; 404 - union e1000_adv_tx_desc *eop_desc = IGBVF_TX_DESC_ADV(*tx_ring, eop); 405 - 406 - /* detected Tx unit hang */ 407 - dev_err(&adapter->pdev->dev, 408 - "Detected Tx Unit Hang:\n" 409 - " TDH <%x>\n" 410 - " TDT <%x>\n" 411 - " next_to_use <%x>\n" 412 - " next_to_clean <%x>\n" 413 - "buffer_info[next_to_clean]:\n" 414 - " time_stamp <%lx>\n" 415 - " next_to_watch <%x>\n" 416 - " jiffies <%lx>\n" 417 - " next_to_watch.status <%x>\n", 418 - readl(adapter->hw.hw_addr + tx_ring->head), 419 - readl(adapter->hw.hw_addr + tx_ring->tail), 420 - tx_ring->next_to_use, 421 - tx_ring->next_to_clean, 422 - tx_ring->buffer_info[eop].time_stamp, 423 - eop, 424 - jiffies, 425 - eop_desc->wb.status); 426 - } 427 - 428 399 /** 429 400 * igbvf_setup_tx_resources - allocate Tx resources (Descriptors) 430 401 * @adapter: board private structure ··· 742 771 static bool igbvf_clean_tx_irq(struct igbvf_ring *tx_ring) 743 772 { 744 773 struct igbvf_adapter *adapter = tx_ring->adapter; 745 - struct e1000_hw *hw = &adapter->hw; 746 774 struct net_device *netdev = adapter->netdev; 747 775 struct igbvf_buffer *buffer_info; 748 776 struct sk_buff *skb; ··· 802 832 } 803 833 } 804 834 805 - if (adapter->detect_tx_hung) { 806 - /* Detect a transmit hang in hardware, this serializes the 807 - * check with the clearing of time_stamp and movement of i */ 808 - adapter->detect_tx_hung = false; 809 - if (tx_ring->buffer_info[i].time_stamp && 810 - time_after(jiffies, tx_ring->buffer_info[i].time_stamp + 811 - (adapter->tx_timeout_factor * HZ)) && 812 - !(er32(STATUS) & E1000_STATUS_TXOFF)) { 813 - 814 - tx_desc = IGBVF_TX_DESC_ADV(*tx_ring, i); 815 - /* detected Tx unit hang */ 816 - igbvf_print_tx_hang(adapter); 817 - 818 - netif_stop_queue(netdev); 819 - } 820 - } 821 835 adapter->net_stats.tx_bytes += total_bytes; 822 836 adapter->net_stats.tx_packets += total_packets; 823 837 return count < tx_ring->count; ··· 1817 1863 &adapter->link_duplex); 1818 1864 igbvf_print_link_info(adapter); 1819 1865 1820 - /* adjust timeout factor according to speed/duplex */ 1821 - adapter->tx_timeout_factor = 1; 1822 - switch (adapter->link_speed) { 1823 - case SPEED_10: 1824 - adapter->tx_timeout_factor = 16; 1825 - break; 1826 - case SPEED_100: 1827 - /* maybe add some timeout factor ? */ 1828 - break; 1829 - } 1830 - 1831 1866 netif_carrier_on(netdev); 1832 1867 netif_wake_queue(netdev); 1833 1868 } ··· 1849 1906 1850 1907 /* Cause software interrupt to ensure Rx ring is cleaned */ 1851 1908 ew32(EICS, adapter->rx_ring->eims_value); 1852 - 1853 - /* Force detection of hung controller every watchdog period */ 1854 - adapter->detect_tx_hung = 1; 1855 1909 1856 1910 /* Reset the timer */ 1857 1911 if (!test_bit(__IGBVF_DOWN, &adapter->state))