]> mj.ucw.cz Git - pciutils.git/commit
pcilmr: Add functions for device checking and preparations before main margining...
authorNikita Proshkin <n.proshkin@yadro.com>
Wed, 27 Dec 2023 09:44:54 +0000 (14:44 +0500)
committerMartin Mares <mj@ucw.cz>
Sat, 17 Feb 2024 22:44:40 +0000 (23:44 +0100)
commit3d9ad790e6fdefb98fac4ec232a79d54a475d43a
tree91018366295972f87d3f192d95520683d51f0bd1
parent7d23054d18402b1891343f090d3cd37d7e83c82f
pcilmr: Add functions for device checking and preparations before main margining processes

Follow the checklist from PCIe Base Spec Rev 5.0 section 4.2.13.3
"Receiver Margin Testing Requirements":
* Verify the Link is at 16 GT/s or higher data rate, in DO PM state;
* Verify that Margining Ready bit of the device is set;
* Disable the ASPM and Autonomous Speed/Width features for the duration
  of the test.

Also verify that Upstream Port of the Link is Function 0 of a Device,
according to spec, only it must implement margining registers.

Reviewed-by: Sergei Miroshnichenko <s.miroshnichenko@yadro.com>
Signed-off-by: Nikita Proshkin <n.proshkin@yadro.com>
lmr/lmr.h [new file with mode: 0644]
lmr/margin_hw.c [new file with mode: 0644]