net: stmmac: set IC bit when transmitting frames with HW timestamp
authorRoland Hii <roland.king.guan.hii@intel.com>
Wed, 19 Jun 2019 14:41:48 +0000 (22:41 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Jul 2019 11:14:47 +0000 (13:14 +0200)
commit9b7b0aab47508f5ee88c6475c2e1a3a39dff9c1c
tree1ccfa89f7bdc0b16fa4f77f23b431b62cbeb6442
parenta373bf728188377e8f64d5fd6209ab0c1d7d8f13
net: stmmac: set IC bit when transmitting frames with HW timestamp

[ Upstream commit d0bb82fd60183868f46c8ccc595a3d61c3334a18 ]

When transmitting certain PTP frames, e.g. SYNC and DELAY_REQ, the
PTP daemon, e.g. ptp4l, is polling the driver for the frame transmit
hardware timestamp. The polling will most likely timeout if the tx
coalesce is enabled due to the Interrupt-on-Completion (IC) bit is
not set in tx descriptor for those frames.

This patch will ignore the tx coalesce parameter and set the IC bit
when transmitting PTP frames which need to report out the frame
transmit hardware timestamp to user space.

Fixes: f748be531d70 ("net: stmmac: Rework coalesce timer and fix multi-queue races")
Signed-off-by: Roland Hii <roland.king.guan.hii@intel.com>
Signed-off-by: Ong Boon Leong <boon.leong.ong@intel.com>
Signed-off-by: Voon Weifeng <weifeng.voon@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c