aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel
diff options
context:
space:
mode:
authorMatthew Vick <matthew.vick@intel.com>2012-12-13 02:20:36 -0500
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2013-01-18 09:52:22 -0500
commitba59814b39b7ec674f604b0f9b35f1773f2fbf1a (patch)
treedc9a5126db710cbfa0cada18f20acec42495b7b7 /drivers/net/ethernet/intel
parentbadc26dd648cb3017affb834e9f79995e3911335 (diff)
igb: Use in-kernel PTP_EV_PORT #define
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 <matthew.vick@intel.com> Acked-by: Jacob Keller <Jacob.e.keller@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel')
-rw-r--r--drivers/net/ethernet/intel/igb/igb_ptp.c6
1 files 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 09f61a4a951f..0987822359f0 100644
--- a/drivers/net/ethernet/intel/igb/igb_ptp.c
+++ b/drivers/net/ethernet/intel/igb/igb_ptp.c
@@ -20,6 +20,7 @@
20#include <linux/module.h> 20#include <linux/module.h>
21#include <linux/device.h> 21#include <linux/device.h>
22#include <linux/pci.h> 22#include <linux/pci.h>
23#include <linux/ptp_classify.h>
23 24
24#include "igb.h" 25#include "igb.h"
25 26
@@ -698,7 +699,6 @@ int igb_ptp_hwtstamp_ioctl(struct net_device *netdev,
698 else 699 else
699 wr32(E1000_ETQF(3), 0); 700 wr32(E1000_ETQF(3), 0);
700 701
701#define PTP_PORT 319
702 /* L4 Queue Filter[3]: filter by destination port and protocol */ 702 /* L4 Queue Filter[3]: filter by destination port and protocol */
703 if (is_l4) { 703 if (is_l4) {
704 u32 ftqf = (IPPROTO_UDP /* UDP */ 704 u32 ftqf = (IPPROTO_UDP /* UDP */
@@ -707,12 +707,12 @@ int igb_ptp_hwtstamp_ioctl(struct net_device *netdev,
707 | E1000_FTQF_MASK); /* mask all inputs */ 707 | E1000_FTQF_MASK); /* mask all inputs */
708 ftqf &= ~E1000_FTQF_MASK_PROTO_BP; /* enable protocol check */ 708 ftqf &= ~E1000_FTQF_MASK_PROTO_BP; /* enable protocol check */
709 709
710 wr32(E1000_IMIR(3), htons(PTP_PORT)); 710 wr32(E1000_IMIR(3), htons(PTP_EV_PORT));
711 wr32(E1000_IMIREXT(3), 711 wr32(E1000_IMIREXT(3),
712 (E1000_IMIREXT_SIZE_BP | E1000_IMIREXT_CTRL_BP)); 712 (E1000_IMIREXT_SIZE_BP | E1000_IMIREXT_CTRL_BP));
713 if (hw->mac.type == e1000_82576) { 713 if (hw->mac.type == e1000_82576) {
714 /* enable source port check */ 714 /* enable source port check */
715 wr32(E1000_SPQF(3), htons(PTP_PORT)); 715 wr32(E1000_SPQF(3), htons(PTP_EV_PORT));
716 ftqf &= ~E1000_FTQF_MASK_SOURCE_PORT_BP; 716 ftqf &= ~E1000_FTQF_MASK_SOURCE_PORT_BP;
717 } 717 }
718 wr32(E1000_FTQF(3), ftqf); 718 wr32(E1000_FTQF(3), ftqf);