qed*: Fix issues in the ptp filter config implementation.
PTP hardware filter configuration performed by the driver for a given user requested config is not correct for some of the PTP modes. Following changes are needed for PTP config-filter implementation. 1. NIG_REG_TX_PTP_EN register - Bits 0/1/2 respectively enables TimeSync/"V1 frame format support"/"V2 frame format support" on the TX side. Set the associated bits based on the user request. 2. ptp4l application fails to operate in Peer Delay mode. Following changes are needed to fix this, a. Driver should enable (set to 0) DA #1-related bits for IPv4, IPv6 and MAC destination addresses in these registers: NIG_REG_TX_LLH_PTP_RULE_MASK NIG_REG_LLH_PTP_RULE_MASK b. NIG_REG_LLH_PTP_PARAM_MASK/NIG_REG_TX_LLH_PTP_PARAM_MASK should be set to 0x0 in all modes. Signed-off-by: Sudarsana Reddy Kalluru <Sudarsana.Kalluru@cavium.com> Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
461eec1201
commit
8d3f87d8cd
@@ -164,10 +164,21 @@ struct qed_eth_cb_ops {
|
||||
#define QED_MAX_PHC_DRIFT_PPB 291666666
|
||||
|
||||
enum qed_ptp_filter_type {
|
||||
QED_PTP_FILTER_L2,
|
||||
QED_PTP_FILTER_IPV4,
|
||||
QED_PTP_FILTER_IPV4_IPV6,
|
||||
QED_PTP_FILTER_L2_IPV4_IPV6
|
||||
QED_PTP_FILTER_NONE,
|
||||
QED_PTP_FILTER_ALL,
|
||||
QED_PTP_FILTER_V1_L4_EVENT,
|
||||
QED_PTP_FILTER_V1_L4_GEN,
|
||||
QED_PTP_FILTER_V2_L4_EVENT,
|
||||
QED_PTP_FILTER_V2_L4_GEN,
|
||||
QED_PTP_FILTER_V2_L2_EVENT,
|
||||
QED_PTP_FILTER_V2_L2_GEN,
|
||||
QED_PTP_FILTER_V2_EVENT,
|
||||
QED_PTP_FILTER_V2_GEN
|
||||
};
|
||||
|
||||
enum qed_ptp_hwtstamp_tx_type {
|
||||
QED_PTP_HWTSTAMP_TX_OFF,
|
||||
QED_PTP_HWTSTAMP_TX_ON,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_DCB
|
||||
@@ -230,8 +241,8 @@ struct qed_eth_dcbnl_ops {
|
||||
#endif
|
||||
|
||||
struct qed_eth_ptp_ops {
|
||||
int (*hwtstamp_tx_on)(struct qed_dev *);
|
||||
int (*cfg_rx_filters)(struct qed_dev *, enum qed_ptp_filter_type);
|
||||
int (*cfg_filters)(struct qed_dev *, enum qed_ptp_filter_type,
|
||||
enum qed_ptp_hwtstamp_tx_type);
|
||||
int (*read_rx_ts)(struct qed_dev *, u64 *);
|
||||
int (*read_tx_ts)(struct qed_dev *, u64 *);
|
||||
int (*read_cc)(struct qed_dev *, u64 *);
|
||||
|
Reference in New Issue
Block a user