Files
Centos-kernel-stream-10/include
Jaroslav Kysela 1fef8dedce firmware_loader: Add cancel helper for async requests
JIRA: https://issues.redhat.com/browse/RHEL-193253

commit b9bdd68b8b979c7e9de58b2e7d21e1d7d932c755
Author: Cássio Gabriel <cassiogabrielcontato@gmail.com>
Date: Tue May 5 08:18:16 2026 -0300

    firmware_loader: Add cancel helper for async requests

    request_firmware_nowait() keeps the callback module pinned and holds
    a device reference until the firmware work completes.

    Callers still have no way to cancel or synchronize the queued callback
    before tearing down their driver-private state.

    Track scheduled async firmware work in an internal list and add
    request_firmware_nowait_cancel(). The helper cancels work matching the
    device, callback context and callback function. It cancels work that has
    not started yet and waits for an already-running callback to return. If
    the request has already completed, it is a no-op.

    Keep the existing request_firmware_nowait() lifetime model manual. A
    devres-managed variant can be layered on top separately if needed.

    Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com>
    Reviewed-by: Takashi Iwai <tiwai@suse.de>
    Acked-by: Danilo Krummrich <dakr@kernel.org>
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Link: https://patch.msgid.link/20260505-alsa-hda-tas2781-fw-callback-teardown-v4-1-e7c4bf930dc8@gmail.com

Signed-off-by: Jaroslav Kysela <jkysela@redhat.com>
2026-07-29 18:01:32 +02:00
..
2026-07-14 19:41:13 +02:00