Thread (14 messages) 14 messages, 3 authors, 2012-02-27

[net-next 03/11] e1000e: cleanup use of check_mng_mode function pointer

flat view
STALE5348d SUPERSEDED: 1 (0M)

From: Jeff Kirsher <hidden>
Date: 2012-02-25 05:50:03
Subsystem: intel ethernet drivers, networking drivers, the rest · Maintainers: Tony Nguyen, Przemek Kitszel, Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

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

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

Replace e1000_check_mng_mode() inline function with calls to the MAC ops
check_mng_mode function pointer.

Signed-off-by: Bruce Allan <redacted>
Tested-by: Aaron Brown <redacted>
Signed-off-by: Jeff Kirsher <redacted>
---
 drivers/net/ethernet/intel/e1000e/80003es2lan.c |    2 +-
 drivers/net/ethernet/intel/e1000e/e1000.h       |    5 -----
 drivers/net/ethernet/intel/e1000e/manage.c      |    4 ++--
 3 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/drivers/net/ethernet/intel/e1000e/80003es2lan.c b/drivers/net/ethernet/intel/e1000e/80003es2lan.c
index e1cbead..0ea3e7e 100644
--- a/drivers/net/ethernet/intel/e1000e/80003es2lan.c
+++ b/drivers/net/ethernet/intel/e1000e/80003es2lan.c
@@ -1056,7 +1056,7 @@ static s32 e1000_copper_link_setup_gg82563_80003es2lan(struct e1000_hw *hw)
 	 * firmware will have already initialized them.  We only initialize
 	 * them if the HW is not in IAMT mode.
 	 */
-	if (!e1000e_check_mng_mode(hw)) {
+	if (!hw->mac.ops.check_mng_mode(hw)) {
 		/* Enable Electrical Idle on the PHY */
 		data |= GG82563_PMCR_ENABLE_ELECTRICAL_IDLE;
 		ret_val = e1e_wphy(hw, GG82563_PHY_PWR_MGMT_CTRL, data);
diff --git a/drivers/net/ethernet/intel/e1000e/e1000.h b/drivers/net/ethernet/intel/e1000e/e1000.h
index 22e03e5..bae094b 100644
--- a/drivers/net/ethernet/intel/e1000e/e1000.h
+++ b/drivers/net/ethernet/intel/e1000e/e1000.h
@@ -725,11 +725,6 @@ static inline s32 e1000_get_phy_info(struct e1000_hw *hw)
 	return hw->phy.ops.get_info(hw);
 }
 
-static inline s32 e1000e_check_mng_mode(struct e1000_hw *hw)
-{
-	return hw->mac.ops.check_mng_mode(hw);
-}
-
 extern bool e1000e_check_mng_mode_generic(struct e1000_hw *hw);
 extern bool e1000e_enable_tx_pkt_filtering(struct e1000_hw *hw);
 extern s32 e1000e_mng_write_dhcp_info(struct e1000_hw *hw, u8 *buffer, u16 length);
diff --git a/drivers/net/ethernet/intel/e1000e/manage.c b/drivers/net/ethernet/intel/e1000e/manage.c
index 0d24b13..473f8e7 100644
--- a/drivers/net/ethernet/intel/e1000e/manage.c
+++ b/drivers/net/ethernet/intel/e1000e/manage.c
@@ -106,7 +106,7 @@ static s32 e1000_mng_enable_host_if(struct e1000_hw *hw)
 }
 
 /**
- *  e1000e_check_mng_mode_generic - check management mode
+ *  e1000e_check_mng_mode_generic - Generic check management mode
  *  @hw: pointer to the HW structure
  *
  *  Reads the firmware semaphore register and returns true (>0) if
@@ -138,7 +138,7 @@ bool e1000e_enable_tx_pkt_filtering(struct e1000_hw *hw)
 	hw->mac.tx_pkt_filtering = true;
 
 	/* No manageability, no filtering */
-	if (!e1000e_check_mng_mode(hw)) {
+	if (!hw->mac.ops.check_mng_mode(hw)) {
 		hw->mac.tx_pkt_filtering = false;
 		return hw->mac.tx_pkt_filtering;
 	}
-- 
1.7.7.6
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help