]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
commit26bd4e2db06be8a367cba076c6600b4d5c3e65af
tree66f276c731d252924006295691a1bf0cd16d051b
parent94221ae75c869b28bceb76ae300b55d35c186406
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