qed: Fix timestamping issue for L2 unicast ptp packets.
authorSudarsana Reddy Kalluru <skalluru@marvell.com>
Wed, 5 Feb 2020 13:10:55 +0000 (05:10 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 5 Feb 2020 14:19:34 +0000 (15:19 +0100)
commit 52117024cde2 ("qed: Add support for Timestamping the unicast
PTP packets.") handles the timestamping of L4 ptp packets only.
This patch adds driver changes to detect/timestamp both L2/L4 unicast
PTP packets.

Fixes: 52117024cde2 ("qed: Add support for Timestamping the unicast PTP packets.")
Signed-off-by: Sudarsana Reddy Kalluru <skalluru@marvell.com>
Signed-off-by: Ariel Elior <aelior@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qed/qed_ptp.c

index 0dacf2c18c095ba154cfd61400858be865e63042..3e613058e2251256dc53afcf1fdae7dde71b72c3 100644 (file)
@@ -44,8 +44,8 @@
 /* Add/subtract the Adjustment_Value when making a Drift adjustment */
 #define QED_DRIFT_CNTR_DIRECTION_SHIFT         31
 #define QED_TIMESTAMP_MASK                     BIT(16)
-/* Param mask for Hardware to detect/timestamp the unicast PTP packets */
-#define QED_PTP_UCAST_PARAM_MASK               0xF
+/* Param mask for Hardware to detect/timestamp the L2/L4 unicast PTP packets */
+#define QED_PTP_UCAST_PARAM_MASK              0x70F
 
 static enum qed_resc_lock qed_ptcdev_to_resc(struct qed_hwfn *p_hwfn)
 {