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>
This commit is contained in:
parent
badc26dd64
commit
ba59814b39
@ -20,6 +20,7 @@
|
|||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/device.h>
|
#include <linux/device.h>
|
||||||
#include <linux/pci.h>
|
#include <linux/pci.h>
|
||||||
|
#include <linux/ptp_classify.h>
|
||||||
|
|
||||||
#include "igb.h"
|
#include "igb.h"
|
||||||
|
|
||||||
@ -698,7 +699,6 @@ int igb_ptp_hwtstamp_ioctl(struct net_device *netdev,
|
|||||||
else
|
else
|
||||||
wr32(E1000_ETQF(3), 0);
|
wr32(E1000_ETQF(3), 0);
|
||||||
|
|
||||||
#define PTP_PORT 319
|
|
||||||
/* L4 Queue Filter[3]: filter by destination port and protocol */
|
/* L4 Queue Filter[3]: filter by destination port and protocol */
|
||||||
if (is_l4) {
|
if (is_l4) {
|
||||||
u32 ftqf = (IPPROTO_UDP /* UDP */
|
u32 ftqf = (IPPROTO_UDP /* UDP */
|
||||||
@ -707,12 +707,12 @@ int igb_ptp_hwtstamp_ioctl(struct net_device *netdev,
|
|||||||
| E1000_FTQF_MASK); /* mask all inputs */
|
| E1000_FTQF_MASK); /* mask all inputs */
|
||||||
ftqf &= ~E1000_FTQF_MASK_PROTO_BP; /* enable protocol check */
|
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),
|
wr32(E1000_IMIREXT(3),
|
||||||
(E1000_IMIREXT_SIZE_BP | E1000_IMIREXT_CTRL_BP));
|
(E1000_IMIREXT_SIZE_BP | E1000_IMIREXT_CTRL_BP));
|
||||||
if (hw->mac.type == e1000_82576) {
|
if (hw->mac.type == e1000_82576) {
|
||||||
/* enable source port check */
|
/* 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;
|
ftqf &= ~E1000_FTQF_MASK_SOURCE_PORT_BP;
|
||||||
}
|
}
|
||||||
wr32(E1000_FTQF(3), ftqf);
|
wr32(E1000_FTQF(3), ftqf);
|
||||||
|
Loading…
Reference in New Issue
Block a user