Thread (27 messages) 27 messages, 8 authors, 2013-01-18

[net-next 13/14] igb: Use in-kernel PTP_EV_PORT #define

flat view
STALE5023d SUPERSEDED: 2 (1M)

From: Jeff Kirsher <hidden>
Date: 2013-01-17 11:35:45
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 72 in this series; 2 review trailers.

Revisions (72)
  1. v1
  2. v2 [diff vs current]
  3. v1
  4. v1
  5. v1
  6. v1
  7. v1
  8. v1
  9. v1
  10. v1
  11. v1
  12. v1
  13. v1
  14. v1
  15. v1
  16. v1
  17. v1
  18. v2 [diff vs current]
  19. v1 current
  20. v1
  21. v1
  22. v1
  23. v1
  24. v1
  25. v1
  26. v2 [diff vs current]
  27. v1
  28. v2 [diff vs current]
  29. v1
  30. v2 [diff vs current]
  31. v1
  32. v1
  33. v2 [diff vs current]
  34. v1
  35. v1
  36. v1
  37. v1
  38. v1
  39. v2 [diff vs current]
  40. v3 [diff vs current]
  41. v4 [diff vs current]
  42. v5 [diff vs current]
  43. v1
  44. v1
  45. v1
  46. v2 [diff vs current]
  47. v1
  48. v1
  49. v2 [diff vs current]
  50. v3 [diff vs current]
  51. v1
  52. v1
  53. v1
  54. v1
  55. v2 [diff vs current]
  56. v1
  57. v2 [diff vs current]
  58. v3 [diff vs current]
  59. v1
  60. v1
  61. v1
  62. v2 [diff vs current]
  63. v1
  64. v1
  65. v1
  66. v1
  67. v1
  68. v2 [diff vs current]
  69. v1
  70. v1
  71. v1
  72. v1
From: Matthew Vick <redacted>

Rather than use an extra #define for something that already exists, use the
kernel #define for the PTP port.

Cc: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: Matthew Vick <redacted>
Acked-by: Jacob Keller <Jacob.e.keller@intel.com>
Tested-by: Aaron Brown <redacted>
Signed-off-by: Jeff Kirsher <redacted>
---
 drivers/net/ethernet/intel/igb/igb_ptp.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/intel/igb/igb_ptp.c b/drivers/net/ethernet/intel/igb/igb_ptp.c
index 2ec53d7..5545abc 100644
--- a/drivers/net/ethernet/intel/igb/igb_ptp.c
+++ b/drivers/net/ethernet/intel/igb/igb_ptp.c
@@ -20,6 +20,7 @@
 #include <linux/module.h>
 #include <linux/device.h>
 #include <linux/pci.h>
+#include <linux/ptp_classify.h>
 
 #include "igb.h"
 
@@ -698,7 +699,6 @@ int igb_ptp_hwtstamp_ioctl(struct net_device *netdev,
 	else
 		wr32(E1000_ETQF(3), 0);
 
-#define PTP_PORT 319
 	/* L4 Queue Filter[3]: filter by destination port and protocol */
 	if (is_l4) {
 		u32 ftqf = (IPPROTO_UDP /* UDP */
@@ -707,12 +707,12 @@ int igb_ptp_hwtstamp_ioctl(struct net_device *netdev,
 			| E1000_FTQF_MASK); /* mask all inputs */
 		ftqf &= ~E1000_FTQF_MASK_PROTO_BP; /* enable protocol check */
 
-		wr32(E1000_IMIR(3), htons(PTP_PORT));
+		wr32(E1000_IMIR(3), htons(PTP_EV_PORT));
 		wr32(E1000_IMIREXT(3),
 		     (E1000_IMIREXT_SIZE_BP | E1000_IMIREXT_CTRL_BP));
 		if (hw->mac.type == e1000_82576) {
 			/* enable source port check */
-			wr32(E1000_SPQF(3), htons(PTP_PORT));
+			wr32(E1000_SPQF(3), htons(PTP_EV_PORT));
 			ftqf &= ~E1000_FTQF_MASK_SOURCE_PORT_BP;
 		}
 		wr32(E1000_FTQF(3), ftqf);
-- 
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