From 4cd509d35ca8b6e8487643510d427e788d1321a7 Mon Sep 17 00:00:00 2001 From: Ahsan Atta Date: Thu, 30 Apr 2026 10:00:35 +0100 Subject: [PATCH] qat_init: fix qat.service timeout with multiple drivers When multiple QAT drivers are loaded (e.g. qat_4xxx and qat_420xx), get_module_state() returns one "Live" line per module. The check_driver() comparison: while [ "$CURRENT_STATE" != "Live" ] fails because "Live\nLive" never equals "Live", causing qat_init to loop until the 20-second timeout and abort. Add sort -u to deduplicate the module state output so that when all loaded drivers report "Live", the result collapses to a single "Live" and the comparison succeeds. If any module is in a different state, the deduplicated output remains multi-line and the wait loop continues correctly. Signed-off-by: Ahsan Atta --- quickassist/utilities/service/qat_init.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quickassist/utilities/service/qat_init.sh.in b/quickassist/utilities/service/qat_init.sh.in index b6706401..a569ee82 100644 --- a/quickassist/utilities/service/qat_init.sh.in +++ b/quickassist/utilities/service/qat_init.sh.in @@ -88,7 +88,7 @@ get_module_state() { do CMD="$CMD -e ^$SUPPORTED_DRIVER_NAME" done - echo "$(cat /proc/modules | grep $CMD | cut -d' ' -f5)" + echo "$(cat /proc/modules | grep $CMD | cut -d' ' -f5 | sort -u)" } check_driver() {