]> git.baikalelectronics.ru Git - kernel.git/commit
igb: protect TX timestamping from API misuse
authorCliff Spradlin <cspradlin@google.com>
Mon, 19 Jun 2017 20:30:43 +0000 (13:30 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 9 Aug 2017 00:43:18 +0000 (17:43 -0700)
commit61ddc74779d13b0af1aa20680e5115b27a5e472e
tree66f276c731d252924006295691a1bf0cd16d051b
parent7dc3d268de74893173e27f1c81710e5b91f9cc1e
igb: 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 igb
driver still allowed TX packets to request HW timestamping. In this
situation, the _IGB_PTP_TX_IN_PROGRESS flag was set and would never
clear. This prevented any future HW timestamping requests to succeed.

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

Signed-off-by: Cliff Spradlin <cspradlin@google.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/igb/igb_main.c