2016年11月16日 星期三

Setting PCIe MPS/MRRS with setpci

setpci(8): configure PCI devices - Linux man page
https://linux.die.net/man/8/setpci

PCI express maximal payload size: Finding it and its impact on bandwidth
http://billauer.co.il/blog/2011/05/pcie-pci-express-linux-max-payload-size-configuration-capabilities-tlp-lspci/

Intel Ethernet Drivers and Utilities / Mailing Lists
https://sourceforge.net/p/e1000/mailman/message/30249072/

Intel PCI Express base 1.0 spec.pdf
http://teacher.en.rmutt.ac.th/ktw/MicroProcessor/buses/Intel%20PCI%20Express%20base%201.0%20spec.pdf
p337, ch7.8.3. Device Capabilities Register (Offset 04)
p341, ch7.8.4. Device Control Register (Offset 08h)

dev=0002:01:02.2

setpci --dumpregs

setpci -v -s $dev CAP_EXP.l
#display the first 4-byte of CAP_EXP...
for a in $(lspci | cut -d' ' -f1 ); do echo $a ----; --;setpci -v -s $a CAP_EXP.l 2>&1 ; done | less

#Show Device Capabilities Register
setpci -v -s $dev CAP_EXP+4.l
#Show Device Control Register
setpci -v -s $dev CAP_EXP+8.l

#Set value to Device Control Register 
setpci -v -s $dev CAP_EXP+8.l=aabbccdd

沒有留言: