Troubleshooting and Debugging

This section provides guidance for diagnosing and resolving common issues with the MDB5 DMA driver and client applications.

Note

When troubleshooting driver issues, always check kernel messages first using dmesg to identify the root cause.

Controller Driver Issues

no read/write channel found

The controller driver dw_edma is built into the kernel (not a loadable module). This error indicates that the required kernel configuration options are not enabled in the current kernel build.

Check if the required kernel options are enabled:

cat /boot/config-`uname -r` | grep -E "^(CONFIG_DW_EDMA|CONFIG_DW_EDMA_PCIE)="

Both options should show =y. If they are missing or disabled, the user must recompile the kernel with these options enabled. For detailed instructions, see the Controller Driver Setup section.


Client Driver Issues

modprobe: ERROR: could not insert ‘amd_client_drv’: Operation not permitted

This error occurs when the BDF (Bus:Device:Function) or DMA device ID parameters provided to modprobe are incorrect or don’t match the actual PCIe device.

Verify and correct the device_dbdf and dma_dev_id parameters:

modprobe ./bin/`uname -p`/mdb5-dmaclient-drv.ko device_dbdf="0000:01:00.0" dma_dev_id=1

Ensure device_dbdf matches the actual PCIe device (use lspci to find it) and dma_dev_id is the correct unique index.


modprobe: FATAL: Module ./bin/x86_64/mdb5-dmaclient-drv.ko not found

The client driver module file doesn’t exist at the specified path, either because it hasn’t been compiled yet or the path is incorrect.

Compile the client driver:

cd <path-to-mdb5-ep-drivers>/client-driver
make

Verify the module exists:

ls -la ./bin/x86_64/mdb5-dmaclient-drv.ko

modprobe: ERROR: could not insert module: Invalid module format

The module was compiled for a different kernel version than the one currently running. Kernel modules must match the exact kernel version.

Recompile the client driver for the current kernel:

cd <path-to-mdb5-ep-drivers>/client-driver
make clean
make

Note

This driver is verified to work with Linux kernel v6.8.0. The kernel version can be checked with uname -r. If the system is running a significantly different version, consider updating to a supported kernel version.


Application Issues

Root privileges required

Client applications need root privileges to access DMA device files in /dev/.

Run applications with root privileges:

sudo ./<dma-application>

libaio dependency missing

The libaio library is required for asynchronous I/O operations but is not installed on the system.

Install the libaio development package:

# Ubuntu/Debian
sudo apt-get install libaio-dev

Verify installation:

ldconfig -p | grep libaio

Failed to stat file ‘/dev/mdb5_ctrl’: No such file or directory

The client driver module is not loaded, or it failed to create the device nodes properly.

Load the client driver module:

modprobe ./bin/`uname -p`/mdb5-dmaclient-drv.ko device_dbdf="0000:01:00.0" dma_dev_id=1

Verify device nodes are created:

ls -la /dev/mdb*