简体   繁体   中英

How to invoke pcie functions with nvme linux driver installed in device

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM