Skip to content

qat_init: fix qat.service timeout with multiple drivers#151

Merged
fionatrahe merged 1 commit into
mainfrom
fix_service
Apr 30, 2026
Merged

qat_init: fix qat.service timeout with multiple drivers#151
fionatrahe merged 1 commit into
mainfrom
fix_service

Conversation

@Ahsan-Atta
Copy link
Copy Markdown
Contributor

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.

@gcabiddu
Copy link
Copy Markdown
Contributor

On the commit message, can we use the format qat_init: <headline>

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 <ahsan.atta@intel.com>
@Ahsan-Atta Ahsan-Atta changed the title Fix qat.service timeout with multiple drivers qat_init: fix qat.service timeout with multiple drivers Apr 30, 2026
@Ahsan-Atta
Copy link
Copy Markdown
Contributor Author

On the commit message, can we use the format qat_init: <headline>

done.

@fionatrahe fionatrahe merged commit 58c996d into main Apr 30, 2026
3 checks passed
@fionatrahe fionatrahe deleted the fix_service branch April 30, 2026 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants