Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit e8b6428

Browse files
committedMar 11, 2025·
qat: init: detect all system QAT devices
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
1 parent 65a5393 commit e8b6428

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎demo/qat-init.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ check_config() {
3030
sysfs_config() {
3131
if [ "$SERVICES_ENABLED_FOUND" = "TRUE" ]; then
3232
for dev in $DEVS; do
33-
DEVPATH="/sys/bus/pci/devices/0000:$dev"
33+
DEVPATH=$(realpath /sys/bus/pci/devices/????:"$dev")
3434
PCI_DEV=$(cat "$DEVPATH"/device 2> /dev/null)
3535
if [ "$PCI_DEV" != "$QAT_4XXX_DEVICE_PCI_ID" ] && [ "$PCI_DEV" != "$QAT_401XX_DEVICE_PCI_ID" ] && [ "$PCI_DEV" != "$QAT_402XX_DEVICE_PCI_ID" ] && [ "$PCI_DEV" != "$QAT_420XX_DEVICE_PCI_ID" ]; then
3636
continue
@@ -52,7 +52,7 @@ sysfs_config() {
5252

5353
enable_sriov() {
5454
for dev in $DEVS; do
55-
DEVPATH="/sys/bus/pci/devices/0000:$dev"
55+
DEVPATH=$(realpath /sys/bus/pci/devices/????:"$dev")
5656
NUMVFS="$DEVPATH/sriov_numvfs"
5757
if ! test -w "$NUMVFS"; then
5858
echo "error: $NUMVFS is not found or not writable. Check if QAT driver module is loaded"

0 commit comments

Comments
 (0)
Please sign in to comment.