Thread (19 messages) 19 messages, 2 authors, 2014-03-09

[net-next 10/15] e1000e: Fix not generating an error on invalid load parameter

flat view
STALE4607d SUPERSEDED: 1 (0M)

From: Jeff Kirsher <hidden>
Date: 2014-03-08 09:25:54
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
  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 current
  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: David Ertman <redacted>

Valid values for InterruptThrottleRate are 10-100000, or one of
0, 1, 3, 4.  '2' is not valid.  This is a legacy from the branching
from the e1000 driver code that e1000e was based from.

Prior to this patch, if the e1000e driver  was loaded with a forced
invalid InterruptThrottleRate of '2', then no throttle rate would be
set and no error message generated.

Now, a message will be generated that an invalid value was used and the
value for InterruptThrottleRate will be set to the default value.

Signed-off-by: Dave Ertman <redacted>
Tested-by: Jeff Pieper <redacted>
Signed-off-by: Jeff Kirsher <redacted>
---
 drivers/net/ethernet/intel/e1000e/param.c | 6 ++++++
 1 file changed, 6 insertions(+)
diff --git a/drivers/net/ethernet/intel/e1000e/param.c b/drivers/net/ethernet/intel/e1000e/param.c
index 01797b7..d0ac0f3 100644
--- a/drivers/net/ethernet/intel/e1000e/param.c
+++ b/drivers/net/ethernet/intel/e1000e/param.c
@@ -374,6 +374,12 @@ void e1000e_check_options(struct e1000_adapter *adapter)
 				 "%s set to dynamic mode\n", opt.name);
 			adapter->itr = 20000;
 			break;
+		case 2:
+			dev_info(&adapter->pdev->dev,
+				 "%s Invalid mode - setting default\n",
+				 opt.name);
+			adapter->itr_setting = opt.def;
+			/* fall-through */
 		case 3:
 			dev_info(&adapter->pdev->dev,
 				 "%s set to dynamic conservative mode\n",
-- 
1.8.3.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help