/gen-pcie

Generic PCIe device driver

Primary LanguageC

gen-pcie

The GPD(generic PCIe driver) enables all the basic capabilities of any PCIe supported device.

Prereqs

Make sure the kernel sources are same while building and testing.

$ export KSRC=/tools/AGRtools/fedora24/4.8.6-201.frio.fc24.x86_64

Build

To build the driver related file do:

$ make

Load

To load the GPD driver do:

$ insmod gpd.ko

Debug

To view device capabilities and status do:

$ lspci -d [VENDOR_ID:DEVICE_ID] -vvv

To view kernel logs specific to GPD do:

$ dmesg | grep GPD

To print all the kernel logs to console do:

$ echo 8 > /proc/sys/kernel/printk

Remove

To unload the driver do:

$ rmmod gpd

To clean all kernel objects files do:

$ make clean

Extras

To save logs to a file do:

$ lspci -d [VENDOR_ID:DEVICE_ID] -vvv > [file_name]

To compare two files do:

$ diff [file_1] [file_2]

Config

The DEVICE_ID, VENDOR_IDand some other parameters can be defined in the gpd_config.h file.