]> git.baikalelectronics.ru Git - kernel.git/commit
ixgbe: protect TX timestamping from API misuse
authorManjunath Patil <manjunath.b.patil@oracle.com>
Sat, 5 Oct 2019 15:20:03 +0000 (08:20 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Mon, 4 Nov 2019 21:16:30 +0000 (13:16 -0800)
commit3b2b0ccd08da1cc6a8ab6379317cc7c81c58f3d5
treecc0dbc7217edbbead140c3aabf55448a9f9a2184
parentda7d1f84f611b29fb94f5f3cfbebfc6523902d40
ixgbe: protect TX timestamping from API misuse

HW timestamping can only be requested for a packet if the NIC is first
setup via ioctl(SIOCSHWTSTAMP). If this step was skipped, then the ixgbe
driver still allowed TX packets to request HW timestamping. In this
situation, we see 'clearing Tx Timestamp hang' noise in the log.

Fix this by checking that the NIC is configured for HW TX timestamping
before accepting a HW TX timestamping request.

Similar-to:
   commit 61ddc74779d1 ("igb: protect TX timestamping from API misuse")
   commit b64155c073aa ("igb: Fix a test with HWTSTAMP_TX_ON")

Signed-off-by: Manjunath Patil <manjunath.b.patil@oracle.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c