[PATCH v2 4/9] ata: ahci: add ack callback to multi irq handler

Hans de Goede hdegoede at redhat.com
Mon Nov 9 08:59:01 EST 2020


Hi,

On 11/4/20 4:52 PM, sven.auhagen at voleatech.de wrote:
> From: Sven Auhagen <sven.auhagen at voleatech.de>
> 
> In order to support custom actions at the end of the irq handler
> a multi_irq_host_ack callback is added to the struct ahci_host_priv.
> 
> Suggested-by: Hans de Goede <hdegoede at redhat.com>
> Signed-off-by: Sven Auhagen <sven.auhagen at voleatech.de>

Thanks, patch looks good to me:

Reviewed-by: Hans de Goede <hdegoede at redhat.com>

Regards,

Hans

> ---
>  drivers/ata/ahci.h    | 2 ++
>  drivers/ata/libahci.c | 4 ++++
>  2 files changed, 6 insertions(+)
> 
> diff --git a/drivers/ata/ahci.h b/drivers/ata/ahci.h
> index 98b8baa47dc5..d8109e06794c 100644
> --- a/drivers/ata/ahci.h
> +++ b/drivers/ata/ahci.h
> @@ -371,6 +371,8 @@ struct ahci_host_priv {
>  	/* only required for per-port MSI(-X) support */
>  	int			(*get_irq_vector)(struct ata_host *host,
>  						  int port);
> +
> +	int			(*multi_irq_host_ack)(int irq, struct ata_port *ap);
>  };
>  
>  extern int ahci_ignore_sss;
> diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c
> index ea5bf5f4cbed..cf9839135a57 100644
> --- a/drivers/ata/libahci.c
> +++ b/drivers/ata/libahci.c
> @@ -1897,6 +1897,7 @@ static void ahci_port_intr(struct ata_port *ap)
>  static irqreturn_t ahci_multi_irqs_intr_hard(int irq, void *dev_instance)
>  {
>  	struct ata_port *ap = dev_instance;
> +	struct ahci_host_priv *hpriv = ap->host->private_data;
>  	void __iomem *port_mmio = ahci_port_base(ap);
>  	u32 status;
>  
> @@ -1909,6 +1910,9 @@ static irqreturn_t ahci_multi_irqs_intr_hard(int irq, void *dev_instance)
>  	ahci_handle_port_interrupt(ap, port_mmio, status);
>  	spin_unlock(ap->lock);
>  
> +	if (hpriv->multi_irq_host_ack)
> +		hpriv->multi_irq_host_ack(irq, ap);
> +
>  	VPRINTK("EXIT\n");
>  
>  	return IRQ_HANDLED;
> 




More information about the linux-arm-kernel mailing list