Re: [PATCH v8 5/9] scsi: ibmvfc: add interrupt routine for asynchronous sub CRQ

From: Tyrel Datwyler

Date: Thu Sep 10 2026 - 19:25:19 EST


On 9/9/26 12:08 PM, Dave Marquardt via B4 Relay wrote:
> From: Dave Marquardt <davemarq@xxxxxxxxxxxxx>
>
> Add ibmvfc_interrupt_async_subq(), an IRQ handler dedicated to
> asynchronous sub-CRQ events from the adapter. The handler disables
> the sub-CRQ IRQ and then calls ibmvfc_drain_async_subq() to consume
> all pending entries before re-enabling interrupts. The handler is
> marked as __maybe_unused until a later patch when it is used.
>
> ibmvfc_drain_async_subq() holds the per-queue q_lock while
> processing. It loops over available CRQ entries via ibmvfc_next_scrq(),
> wrapping each in a typed struct ibmvfc_async_crq_event and dispatching
> it to ibmvfc_handle_async(), then clears the valid bit and issues a
> write barrier. After draining, it re-enables the sub-CRQ IRQ and performs
> one final check for a newly arrived entry to close the IRQ-enable race;
> if one is found it is processed before exiting the loop.
>
> Signed-off-by: Dave Marquardt <davemarq@xxxxxxxxxxxxx>
> ---
Acked-by: Tyrel Datwyler <tyreld@xxxxxxxxxxxxx>