Thread (5 messages) 5 messages, 2 authors, 2015-12-04

[PATCH] ahci: don't use MSI when PCI is disabled

From: Dan Williams <hidden>
Date: 2015-12-04 16:37:10
Also in: linux-ide, lkml

On Fri, Dec 4, 2015 at 8:34 AM, Arnd Bergmann [off-list ref] wrote:
On Monday 23 November 2015 20:34:30 Arnd Bergmann wrote:
quoted
On Monday 23 November 2015 09:25:38 Dan Williams wrote:
quoted
If we had an "static inline ahci_irq_vector(int port)"  helper to
compile out the struct msix_entry de-reference would that be
sufficient?
Yes, that is probably a nicer way to do it. We should then also do
something like this:
@@ -2510,7 +2513,8 @@ int ahci_host_activate(struct ata_host *host, struct scsi_host_template *sht)
        int irq = hpriv->irq;
        int rc;

-       if (hpriv->flags & (AHCI_HFLAG_MULTI_MSI | AHCI_HFLAG_MULTI_MSIX))
+       if (IS_ENABLED(CONFIG_PCI_MSI) && \
+           hpriv->flags & (AHCI_HFLAG_MULTI_MSI | AHCI_HFLAG_MULTI_MSIX))
                rc = ahci_host_activate_multi_irqs(host, sht);
        else if (hpriv->flags & AHCI_HFLAG_EDGE_IRQ)
                rc = ata_host_activate(host, irq, ahci_single_edge_irq_intr,
which will let gcc leave out the entire ahci_host_activate_multi_irqs()
function but still flag compile errors in it even if CONFIG_PCI is
disabled.
Dan, are you going to do the ahci_irq_vector patch, or should we use my
original patch to fix up the build error?
Ah, I was about to ask you the same question.  No worries, I'll send
out a patch with the above approach today.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help