[PATCH v2 2/3] libahci: Implement the capability to override the generic ahci interrupt handler.
Tejun Heo
htejun at gmail.com
Sun Jan 31 03:35:40 PST 2016
On Wed, Jan 27, 2016 at 03:19:56PM +0530, Suman Tripathi wrote:
> @@ -2466,13 +2467,19 @@ int ahci_host_activate(struct ata_host *host, struct scsi_host_template *sht)
> {
> struct ahci_host_priv *hpriv = host->private_data;
> int irq = hpriv->irq;
> + irqreturn_t (*ahci_irq_handler)(int irq, void *dev_instance);
> int rc;
>
> if (hpriv->flags & (AHCI_HFLAG_MULTI_MSI | AHCI_HFLAG_MULTI_MSIX))
> rc = ahci_host_activate_multi_irqs(host, sht);
You need to add { } to the if body too. Please read CodingStyle.
> - else
> - rc = ata_host_activate(host, irq, ahci_single_level_irq_intr,
> + else {
> + ahci_irq_handler = hpriv->ahci_irq_intr ? hpriv->ahci_irq_intr :
> + ahci_single_level_irq_intr;
> +
> + rc = ata_host_activate(host, irq, ahci_irq_handler,
> IRQF_SHARED, sht);
> + }
Can you please make this handled the same way as ->start_engine?
Also, maybe print out a warning message if a driver specifies both
AHCI_HFLAG_MULTI_MSI[X] and the irq handler override?
Thanks.
--
tejun
More information about the linux-arm-kernel
mailing list