0
votes

I am new to linux device drivers.I am familiar with linux driver code for pcie and nvme. I have loaded linux nvme driver and able to send read, write command through nvme cli. With nvme driver loaded, is there a way to send pcie commads( change speed, lanes) to device. What are the changes to be done to existing nvme driver code? The main objective is to port bunch of pcie testcases to run in parallel with nvme read/writes.

1
Please see: Why is “Is it possible to…” a poorly worded question? (don't just change your question to "How"). Please show your attempts you have tried and the problems/error messages you get from your attempts.Progman
For test cases you have a mechanism called PCI AER injection. Use it.0andriy

1 Answers

0
votes

You can use setpci to issue PCIe commands. No changes required to be done on nvme driver code.

setpci -s Bus:device.function reg=value

You can use setpci --dumpregs to check the register address for link control 2 register. And then modify the target link speed for the upstream bridge of nvme device