]> git.baikalelectronics.ru Git - kernel.git/commit
ice: Fix PTP TX timestamp offset calculation
authorMichal Michalik <michal.michalik@intel.com>
Tue, 10 May 2022 11:03:43 +0000 (13:03 +0200)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Tue, 14 Jun 2022 16:35:57 +0000 (09:35 -0700)
commit814434ebc102a521792d737f4d6f23af03ae6d64
tree0aca3a6bc65eb1828646805e77aa9b1f68621771
parenta2dddc154bcadd9c93a97a79136cefe2822fb6eb
ice: Fix PTP TX timestamp offset calculation

The offset was being incorrectly calculated for E822 - that led to
collisions in choosing TX timestamp register location when more than
one port was trying to use timestamping mechanism.

In E822 one quad is being logically split between ports, so quad 0 is
having trackers for ports 0-3, quad 1 ports 4-7 etc. Each port should
have separate memory location for tracking timestamps. Due to error for
example ports 1 and 2 had been assigned to quad 0 with same offset (0),
while port 1 should have offset 0 and 1 offset 16.

Fix it by correctly calculating quad offset.

Fixes: 4b1e0826f3a7 ("ice: implement basic E822 PTP support")
Signed-off-by: Michal Michalik <michal.michalik@intel.com>
Tested-by: Gurucharan <gurucharanx.g@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_ptp.c
drivers/net/ethernet/intel/ice/ice_ptp.h