Thread (14 messages) 14 messages, 2 authors, 2013-05-22

[net-next 10/12] igb: Implementation of i210/i211 LED support

flat view
STALE4898d SUPERSEDED: 1 (0M)

From: Jeff Kirsher <hidden>
Date: 2013-05-21 22:03:33
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 113 in this series; 1 review trailer.

Revisions (113)
  1. v1
  2. v2 [diff vs current]
  3. v1
  4. v1
  5. v1
  6. v1
  7. v1
  8. v1
  9. v1
  10. v1
  11. v3 [diff vs current]
  12. v1
  13. v1
  14. v2 [diff vs current]
  15. v2 [diff vs current]
  16. v1
  17. v1
  18. v1
  19. v1
  20. v1
  21. v1
  22. v1
  23. v1
  24. v1
  25. v1
  26. v1
  27. v1
  28. v1
  29. v1
  30. v1
  31. v1
  32. v1
  33. v1
  34. v1
  35. v2 [diff vs current]
  36. v1
  37. v1
  38. v1
  39. v1
  40. v2 [diff vs current]
  41. v1
  42. v2 [diff vs current]
  43. v1
  44. v1
  45. v1
  46. v1
  47. v1
  48. v1
  49. v1
  50. v1
  51. v1
  52. v1
  53. v2 [diff vs current]
  54. v1 current
  55. v1
  56. v1
  57. v1
  58. v2 [diff vs current]
  59. v1
  60. v2 [diff vs current]
  61. v1
  62. v2 [diff vs current]
  63. v1
  64. v1
  65. v2 [diff vs current]
  66. v1
  67. v1
  68. v1
  69. v1
  70. v1
  71. v1
  72. v2 [diff vs current]
  73. v1
  74. v1
  75. v2 [diff vs current]
  76. v3 [diff vs current]
  77. v4 [diff vs current]
  78. v2 [diff vs current]
  79. v5 [diff vs current]
  80. v1
  81. v1
  82. v1
  83. v2 [diff vs current]
  84. v1
  85. v1
  86. v2 [diff vs current]
  87. v3 [diff vs current]
  88. v1
  89. v2 [diff vs current]
  90. v1
  91. v1
  92. v2 [diff vs current]
  93. v1
  94. v2 [diff vs current]
  95. v1
  96. v2 [diff vs current]
  97. v3 [diff vs current]
  98. v1
  99. v1
  100. v1
  101. v2 [diff vs current]
  102. v1
  103. v1
  104. v1
  105. v1
  106. v1
  107. v2 [diff vs current]
  108. v1
  109. v1
  110. v1
  111. v2 [diff vs current]
  112. v1
  113. v1
From: "Akeem G. Abodunrin" <redacted>

This patch fixes LED issues with i210 and i211 devices, due to changes in the
device registers.

Signed-off-by: Akeem G Abodunrin <redacted>
Tested-by: Jeff Pieper <redacted>
Signed-off-by: Jeff Kirsher <redacted>
---
 drivers/net/ethernet/intel/igb/e1000_i210.h | 6 +++---
 drivers/net/ethernet/intel/igb/e1000_mac.c  | 8 +++++++-
 2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/intel/igb/e1000_i210.h b/drivers/net/ethernet/intel/igb/e1000_i210.h
index bfc08e0..5caa332 100644
--- a/drivers/net/ethernet/intel/igb/e1000_i210.h
+++ b/drivers/net/ethernet/intel/igb/e1000_i210.h
@@ -82,11 +82,11 @@ enum E1000_INVM_STRUCTURE_TYPE {
 #define E1000_INVM_MAJOR_SHIFT		4
 
 #define ID_LED_DEFAULT_I210		((ID_LED_OFF1_ON2  << 8) | \
-					 (ID_LED_OFF1_OFF2 <<  4) | \
-					 (ID_LED_DEF1_DEF2))
+					 (ID_LED_DEF1_DEF2 <<  4) | \
+					 (ID_LED_OFF1_OFF2))
 #define ID_LED_DEFAULT_I210_SERDES	((ID_LED_DEF1_DEF2 << 8) | \
 					 (ID_LED_DEF1_DEF2 <<  4) | \
-					 (ID_LED_DEF1_DEF2))
+					 (ID_LED_OFF1_ON2))
 
 /* NVM offset defaults for i211 device */
 #define NVM_INIT_CTRL_2_DEFAULT_I211	0X7243
diff --git a/drivers/net/ethernet/intel/igb/e1000_mac.c b/drivers/net/ethernet/intel/igb/e1000_mac.c
index 660b7ad..bab556a 100644
--- a/drivers/net/ethernet/intel/igb/e1000_mac.c
+++ b/drivers/net/ethernet/intel/igb/e1000_mac.c
@@ -1332,7 +1332,13 @@ s32 igb_id_led_init(struct e1000_hw *hw)
 	u16 data, i, temp;
 	const u16 led_mask = 0x0F;
 
-	ret_val = igb_valid_led_default(hw, &data);
+	/* i210 and i211 devices have different LED mechanism */
+	if ((hw->mac.type == e1000_i210) ||
+	    (hw->mac.type == e1000_i211))
+		ret_val = igb_valid_led_default_i210(hw, &data);
+	else
+		ret_val = igb_valid_led_default(hw, &data);
+
 	if (ret_val)
 		goto out;
 
-- 
1.7.11.7
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help