From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754378AbbKWJsY (ORCPT ); Mon, 23 Nov 2015 04:48:24 -0500 Received: from mout.kundenserver.de ([217.72.192.73]:61733 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754028AbbKWJsV (ORCPT ); Mon, 23 Nov 2015 04:48:21 -0500 From: Arnd Bergmann To: Tejun Heo , linux-ide@vger.kernel.org Cc: Ricardo Neri , Dan Williams , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH] ahci: don't use MSI when PCI is disabled Date: Mon, 23 Nov 2015 10:47:43 +0100 Message-ID: <4754092.OYovO36g28@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:A511n2WhaPTXwN4gPA52YJbhWlSzZG1tPbXTZlBtVKR0Vturjt+ db4TtEeXW2df5B0bUb3a5atLvguSGzKKdFDdjBcTfbWoo4YihFi8f/QzO1wPktfmYO93eDP q53sS37FjF/Fl/PJHbhzm7ptsDzx5XwnQwl+m1WVTFBjiF0SoVAGs4P5l7d/z3pffpdU8ur M4B8TEtVIg6KGNMaI6JoA== X-UI-Out-Filterresults: notjunk:1;V01:K0:yczy5SlX6Gg=:6g2MsdO80fqfKUkm0W3X/U xP7PVQ1EzXSKe1irZzld0xDv1zJWFq9WzI+mM6pnsCveeA2aUoZdO+uRStbKHupFC5DRFv6Cz Mk0pu8k8qluXT8Qwq1k/wGfcyOk1ocq2QSYBu82VleiR7gwcDJKW4EOLhNli8pjry5xXibvzm neTrdQvWD5+WrdIgJAiRvordKFDLA2hqgcLtvixD42xjAZH+TPJ2ihP+24JX+lNBDgh2e5ENR dw7WNxaint3RQikdH3q3yGJWwlQEJRJTf92Wf/8LyLMh2SpW5U2NpJlznNmVTnD58aiO2OID9 23IH4/nwJ+J4xhvvjB7X9tnMnFQ2s9HgVpxhUhTzxSaDouVXCghSO8mumIwmSd+e9txjQSjxc jZ3T2eN+Rj5yRWQjpaEZ1pvqKjrAAPbaATFw3/u7CDQwqgspltNf4e2w5xM/AG1KR4Lo4rdC2 HYiSVr1HJhMJH3VXZnLKhPnjOt0wgMZyfNve77yk4KpMeiCRjTUIsaFTEIF3enIOCo5n2ne80 zD8aaAr3E8huDD4cXPwbD30ZxOxk+1uW0s2Z3tknz9pmdCjCVCHTkS9z/TYENi3GSP8bBbSfE LI1vXARlLM0CmC5d/Kmbwc6jfgrlagzFK710Srm2m3o0h1JrR9xpTohZL3HYdEzSy0ooWexBd bNEBs4b/euy62pA8ektO42lw7XeHsCxOiauShBM5jnDPsE3FNqA068LoCMrs4B7KYvX29+S66 2JURgCeSLjQI3dkw Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The AHCI driver is used for some on-chip devices that do not use PCI for probing, and it can be built even when CONFIG_PCI is disabled, but that now results in a build failure: ata/libahci.c: In function 'ahci_host_activate_multi_irqs': ata/libahci.c:2475:4: error: invalid use of undefined type 'struct msix_entry' ata/libahci.c:2475:21: error: dereferencing pointer to incomplete type 'struct msix_entry' This adds an #ifdef so we use that code only if actual PCI MSI is available. Signed-off-by: Arnd Bergmann Fixes: d684a90d38e2 ("ahci: per-port msix support") diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c index 1b6c7cc415bf..54fe01d8145b 100644 --- a/drivers/ata/libahci.c +++ b/drivers/ata/libahci.c @@ -1796,7 +1796,8 @@ static void ahci_port_intr(struct ata_port *ap) ahci_handle_port_interrupt(ap, port_mmio, status); } -static irqreturn_t ahci_multi_irqs_intr_hard(int irq, void *dev_instance) +static irqreturn_t __maybe_unused ahci_multi_irqs_intr_hard(int irq, + void *dev_instance) { struct ata_port *ap = dev_instance; void __iomem *port_mmio = ahci_port_base(ap); @@ -2454,6 +2455,7 @@ void ahci_set_em_messages(struct ahci_host_priv *hpriv, } EXPORT_SYMBOL_GPL(ahci_set_em_messages); +#ifdef CONFIG_PCI_MSI static int ahci_host_activate_multi_irqs(struct ata_host *host, struct scsi_host_template *sht) { @@ -2492,6 +2494,7 @@ static int ahci_host_activate_multi_irqs(struct ata_host *host, return ata_host_register(host, sht); } +#endif /** * ahci_host_activate - start AHCI host, request IRQs and register it @@ -2510,9 +2513,12 @@ int ahci_host_activate(struct ata_host *host, struct scsi_host_template *sht) int irq = hpriv->irq; int rc; +#ifdef CONFIG_PCI_MSI if (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) + else +#endif + if (hpriv->flags & AHCI_HFLAG_EDGE_IRQ) rc = ata_host_activate(host, irq, ahci_single_edge_irq_intr, IRQF_SHARED, sht); else