Thread (9 messages) 9 messages, 2 authors, 2011-02-25

[net-next-2.6 4/7] igbvf: remove Tx hang detection

flat view
STALE5716d SUPERSEDED: 1 (0M)

From: Jeff Kirsher <hidden>
Date: 2011-02-24 10:58:36
Subsystem: networking drivers, the rest · Maintainers: Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

Revision v1 of 208 in this series; 1 review trailer.

Revisions (208)
  1. v1
  2. v1
  3. v2 [diff vs current]
  4. v1
  5. v1
  6. v2 [diff vs current]
  7. v1
  8. v1 current
  9. v1
  10. v1
  11. v1
  12. v1
  13. v1
  14. v1
  15. v1
  16. v2 [diff vs current]
  17. v1
  18. v3 [diff vs current]
  19. v1
  20. v1
  21. v1
  22. v2 [diff vs current]
  23. v2 [diff vs current]
  24. v1
  25. v2 [diff vs current]
  26. v1
  27. v2 [diff vs current]
  28. v3 [diff vs current]
  29. v1
  30. v1
  31. v1
  32. v2 [diff vs current]
  33. v1
  34. v1
  35. v1
  36. v2 [diff vs current]
  37. v1
  38. v1
  39. v1
  40. v1
  41. v1
  42. v2 [diff vs current]
  43. v1
  44. v2 [diff vs current]
  45. v1
  46. v1
  47. v1
  48. v1
  49. v1
  50. v1
  51. v1
  52. v1
  53. v1
  54. v1
  55. v1
  56. v1
  57. v1
  58. v1
  59. v1
  60. v1
  61. v1
  62. v2 [diff vs current]
  63. v1
  64. v2 [diff vs current]
  65. v1
  66. v1
  67. v1
  68. v2 [diff vs current]
  69. v1
  70. v1
  71. v1
  72. v1
  73. v1
  74. v1
  75. v1
  76. v1
  77. v1
  78. v1
  79. v1
  80. v1
  81. v1
  82. v1
  83. v1
  84. v1
  85. v1
  86. v1
  87. v1
  88. v2 [diff vs current]
  89. v1
  90. v1
  91. v1
  92. v1
  93. v1
  94. v1
  95. v1
  96. v1
  97. v2 [diff vs current]
  98. v1
  99. v1
  100. v1
  101. v1
  102. v1
  103. v2 [diff vs current]
  104. v1
  105. v1
  106. v1
  107. v1
  108. v2 [diff vs current]
  109. v1
  110. v2 [diff vs current]
  111. v1
  112. v1
  113. v1
  114. v1
  115. v1
  116. v1
  117. v1
  118. v1
  119. v1
  120. v1
  121. v2 [diff vs current]
  122. v1
  123. v1
  124. v2 [diff vs current]
  125. v1
  126. v1
  127. v1
  128. v1
  129. v1
  130. v1
  131. v2 [diff vs current]
  132. v1
  133. v2 [diff vs current]
  134. v2 [diff vs current]
  135. v1
  136. v2 [diff vs current]
  137. v3 [diff vs current]
  138. v1
  139. v4 [diff vs current]
  140. v1
  141. v5 [diff vs current]
  142. v6 [diff vs current]
  143. v7 [diff vs current]
  144. v1
  145. v1
  146. v2 [diff vs current]
  147. v1
  148. v1
  149. v1
  150. v2 [diff vs current]
  151. v1
  152. v1
  153. v1
  154. v1
  155. v2 [diff vs current]
  156. v1
  157. v1
  158. v1
  159. v1
  160. v2 [diff vs current]
  161. v1
  162. v1
  163. v1
  164. v2 [diff vs current]
  165. v3 [diff vs current]
  166. v4 [diff vs current]
  167. v1
  168. v1
  169. v2 [diff vs current]
  170. v5 [diff vs current]
  171. v1
  172. v1
  173. v1
  174. v2 [diff vs current]
  175. v1
  176. v1
  177. v2 [diff vs current]
  178. v3 [diff vs current]
  179. v1
  180. v2 [diff vs current]
  181. v1
  182. v1
  183. v2 [diff vs current]
  184. v1
  185. v2 [diff vs current]
  186. v1
  187. v2 [diff vs current]
  188. v3 [diff vs current]
  189. v1
  190. v1
  191. v1
  192. v2 [diff vs current]
  193. v1
  194. v1
  195. v1
  196. v1
  197. v1
  198. v1
  199. v2 [diff vs current]
  200. v1
  201. v1
  202. v1
  203. v1
  204. v2 [diff vs current]
  205. v1
  206. v1
  207. v1
  208. v2 [diff vs current]
From: Lior Levy <redacted>

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 <redacted>
Tested-by: Jeff Pieper <redacted>
Signed-off-by: Jeff Kirsher <redacted>
---
 drivers/net/igbvf/igbvf.h  |    3 --
 drivers/net/igbvf/netdev.c |   60 --------------------------------------------
 2 files changed, 0 insertions(+), 63 deletions(-)
diff --git a/drivers/net/igbvf/igbvf.h b/drivers/net/igbvf/igbvf.h
index 990c329..d5dad5d 100644
--- a/drivers/net/igbvf/igbvf.h
+++ b/drivers/net/igbvf/igbvf.h
@@ -201,9 +201,6 @@ struct igbvf_adapter {
 	unsigned int restart_queue;
 	u32 txd_cmd;
 
-	bool detect_tx_hung;
-	u8 tx_timeout_factor;
-
 	u32 tx_int_delay;
 	u32 tx_abs_int_delay;
 
diff --git a/drivers/net/igbvf/netdev.c b/drivers/net/igbvf/netdev.c
index 6352c81..42fdf59 100644
--- a/drivers/net/igbvf/netdev.c
+++ b/drivers/net/igbvf/netdev.c
@@ -396,35 +396,6 @@ static void igbvf_put_txbuf(struct igbvf_adapter *adapter,
 	buffer_info->time_stamp = 0;
 }
 
-static void igbvf_print_tx_hang(struct igbvf_adapter *adapter)
-{
-	struct igbvf_ring *tx_ring = adapter->tx_ring;
-	unsigned int i = tx_ring->next_to_clean;
-	unsigned int eop = tx_ring->buffer_info[i].next_to_watch;
-	union e1000_adv_tx_desc *eop_desc = IGBVF_TX_DESC_ADV(*tx_ring, eop);
-
-	/* detected Tx unit hang */
-	dev_err(&adapter->pdev->dev,
-	        "Detected Tx Unit Hang:\n"
-	        "  TDH                  <%x>\n"
-	        "  TDT                  <%x>\n"
-	        "  next_to_use          <%x>\n"
-	        "  next_to_clean        <%x>\n"
-	        "buffer_info[next_to_clean]:\n"
-	        "  time_stamp           <%lx>\n"
-	        "  next_to_watch        <%x>\n"
-	        "  jiffies              <%lx>\n"
-	        "  next_to_watch.status <%x>\n",
-	        readl(adapter->hw.hw_addr + tx_ring->head),
-	        readl(adapter->hw.hw_addr + tx_ring->tail),
-	        tx_ring->next_to_use,
-	        tx_ring->next_to_clean,
-	        tx_ring->buffer_info[eop].time_stamp,
-	        eop,
-	        jiffies,
-	        eop_desc->wb.status);
-}
-
 /**
  * igbvf_setup_tx_resources - allocate Tx resources (Descriptors)
  * @adapter: board private structure
@@ -771,7 +742,6 @@ static void igbvf_set_itr(struct igbvf_adapter *adapter)
 static bool igbvf_clean_tx_irq(struct igbvf_ring *tx_ring)
 {
 	struct igbvf_adapter *adapter = tx_ring->adapter;
-	struct e1000_hw *hw = &adapter->hw;
 	struct net_device *netdev = adapter->netdev;
 	struct igbvf_buffer *buffer_info;
 	struct sk_buff *skb;
@@ -832,22 +802,6 @@ static bool igbvf_clean_tx_irq(struct igbvf_ring *tx_ring)
 		}
 	}
 
-	if (adapter->detect_tx_hung) {
-		/* Detect a transmit hang in hardware, this serializes the
-		 * check with the clearing of time_stamp and movement of i */
-		adapter->detect_tx_hung = false;
-		if (tx_ring->buffer_info[i].time_stamp &&
-		    time_after(jiffies, tx_ring->buffer_info[i].time_stamp +
-		               (adapter->tx_timeout_factor * HZ)) &&
-		    !(er32(STATUS) & E1000_STATUS_TXOFF)) {
-
-			tx_desc = IGBVF_TX_DESC_ADV(*tx_ring, i);
-			/* detected Tx unit hang */
-			igbvf_print_tx_hang(adapter);
-
-			netif_stop_queue(netdev);
-		}
-	}
 	adapter->net_stats.tx_bytes += total_bytes;
 	adapter->net_stats.tx_packets += total_packets;
 	return count < tx_ring->count;
@@ -1863,17 +1817,6 @@ static void igbvf_watchdog_task(struct work_struct *work)
 			                          &adapter->link_duplex);
 			igbvf_print_link_info(adapter);
 
-			/* adjust timeout factor according to speed/duplex */
-			adapter->tx_timeout_factor = 1;
-			switch (adapter->link_speed) {
-			case SPEED_10:
-				adapter->tx_timeout_factor = 16;
-				break;
-			case SPEED_100:
-				/* maybe add some timeout factor ? */
-				break;
-			}
-
 			netif_carrier_on(netdev);
 			netif_wake_queue(netdev);
 		}
@@ -1907,9 +1850,6 @@ static void igbvf_watchdog_task(struct work_struct *work)
 	/* Cause software interrupt to ensure Rx ring is cleaned */
 	ew32(EICS, adapter->rx_ring->eims_value);
 
-	/* Force detection of hung controller every watchdog period */
-	adapter->detect_tx_hung = 1;
-
 	/* Reset the timer */
 	if (!test_bit(__IGBVF_DOWN, &adapter->state))
 		mod_timer(&adapter->watchdog_timer,
-- 
1.7.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help