aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python/libxed.py
diff options
context:
space:
mode:
authorJacob Keller <jacob.e.keller@intel.com>2022-12-05 11:52:45 -0800
committerTony Nguyen <anthony.l.nguyen@intel.com>2022-12-08 11:13:21 -0800
commit10e4b4a3a3e1b7007a72988bb0a7c741b19d90d7 (patch)
treeff6e3352685d1e57dd8351b834fb5a207a3f4a81 /tools/perf/scripts/python/libxed.py
parentice: handle discarding old Tx requests in ice_ptp_tx_tstamp (diff)
downloadlinux-10e4b4a3a3e1b7007a72988bb0a7c741b19d90d7.tar.gz
linux-10e4b4a3a3e1b7007a72988bb0a7c741b19d90d7.zip
ice: check Tx timestamp memory register for ready timestamps
The PHY for E822 based hardware has a register which indicates which timestamps are valid in the PHY timestamp memory block. Each bit in the register indicates whether the associated index in the timestamp memory is valid. Hardware sets this bit when the timestamp is captured, and clears the bit when the timestamp is read. Use of this register is important as reading timestamp registers can impact the way that hardware generates timestamp interrupts. This occurs because the PHY has an internal value which is incremented when hardware captures a timestamp and decremented when software reads a timestamp. Reading timestamps which are not marked as valid still decrement the internal value and can result in the Tx timestamp interrupt not triggering in the future. To prevent this, use the timestamp memory value to determine which timestamps are ready to be read. The ice_get_phy_tx_tstamp_ready function reads this value. For E810 devices, this just always returns with all bits set. Skip any timestamp which is not set in this bitmap, avoiding reading extra timestamps on E822 devices. The stale check against a cached timestamp value is no longer necessary for PHYs which support the timestamp ready bitmap properly. E810 devices still need this. Introduce a new verify_cached flag to the ice_ptp_tx structure. Use this to determine if we need to perform the verification against the cached timestamp value. Set this to 1 for the E810 Tx tracker init function. Notice that many of the fields in ice_ptp_tx are simple 1 bit flags. Save some structure space by using bitfields of length 1 for these values. Modify the ICE_PTP_TS_VALID check to simply drop the timestamp immediately so that in an event of getting such an invalid timestamp the driver does not attempt to re-read the timestamp again in a future poll of the register. With these changes, the driver now reads each timestamp register exactly once, and does not attempt any re-reads. This ensures the interrupt tracking logic in the PHY will not get stuck. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Tested-by: Gurucharan G <gurucharanx.g@intel.com> (A Contingent worker at Intel) Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Diffstat (limited to 'tools/perf/scripts/python/libxed.py')
0 files changed, 0 insertions, 0 deletions
>watchdog: pcwd_usb: Use allocated buffer for usb_control_msgGuenter Roeck1-1/+7 2013-11-17watchdog: sp805_wdt: Remove unnecessary amba_set_drvdata()Michal Simek1-1/+0 2013-11-17watchdog: sirf: add watchdog driver of CSR SiRFprimaII and SiRFatlasVIXianglong Du5-0/+249 2013-11-17watchdog: Remove redundant of_match_ptrSachin Kamat3-3/+3 2013-11-17watchdog: ts72xx_wdt: cleanup return codes in ioctlDan Carpenter1-20/+16 2013-11-17documentation/devicetree: Move DT bindings from gpio to watchdogJohannes Thumshirn1-0/+0 2013-11-17watchdog: add ralink watchdog driverJohn Crispin4-0/+235 2013-11-17watchdog: Add MOXA ART watchdog driverJonas Jensen4-0/+191 2013-11-17watchdog: kempld_wdt: Add __user annotationJingoo Han1-2/+2 2013-11-17watchdog: dw_wdt: Add __user annotationJingoo Han1-2/+2 2013-11-17watchdog: use dev_get_platdata()Jingoo Han7-12/+10 2013-11-17watchdog: imx2_wdt: expose module alias for loading from device-treeNiels de Vos1-0/+1 2013-11-17watchdog: dw_wdt: use clk_prepare_enable and clk_disable_unprepareHeiko Stübner1-5/+5 2013-11-17watchdog: dw_wdt: convert to SIMPLE_DEV_PM_OPSHeiko Stübner1-8/+3 2013-11-17i2c: i2c-eg20t: do not print error message in syslog if no ACK receivedAndreas Werner1-22/+4 2013-11-17IB/core: Re-enable create_flow/destroy_flow uverbsMatan Barak6-32/+0 2013-11-17IB/core: extended command: an improved infrastructure for uverbs commandsYann Droneaud6-73/+160 2013-11-17IB/core: Remove ib_uverbs_flow_spec structure from userspaceYann Droneaud2-16/+16 2013-11-17IB/core: Use a common header for uverbs flow_specsYann Droneaud1-13/+40 2013-11-17IB/core: Make uverbs flow structure use names like verbs onesYann Droneaud2-22/+22 2013-11-17IB/core: Rename 'flow' structs to match other uverbs structsYann Droneaud2-25/+25 2013-11-17IB/core: clarify overflow/underflow checks on ib_create/destroy_flowMatan Barak2-17/+16 2013-11-17um: Remove unused declarations from <as-layout.h>Geert Uytterhoeven2-3/+1 2013-11-17um: remove used STDIO_CONSOLE Kconfig paramMichael Opdenacker1-4/+0