From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, T_DKIMWL_WL_HIGH,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0E4F4C282DD for ; Thu, 23 May 2019 09:36:36 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D1FD820675 for ; Thu, 23 May 2019 09:36:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="VUcg80UD" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D1FD820675 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ptQ9+qHNy6+RcPIJ1F3EFmMIF/8IzpM6xs2jwHX5ExE=; b=VUcg80UDRiYabU hEVvK+yC7Sagf19yDsFl3krmkcaaKVnLVlAlWFTMpGE3QtcHFyyNNktTrHjH2skusp9D1wvG8kMCh vRFN9RCq2swp5O/xQHynRTDI6X3E/1PXUd//xT7MAknkeSI1h9RpTlVFnh5BWmclqSXqNEVgmEi6g R0uvK4NWY8YmhTvMd5+bfIItFueZD/LUr799yNUFbtn6shlc8gq6zp9LOPDapDVIL9oD9yr8tT+o7 uN7z0AwCDOxYtvLQkiNCNWUoFvgUY26wgSzmETSxVGv/c+pCF5Z0RpwdIbU3VZEaPqmI9SOjAE0VW YoWDcCQWPJau7MIXSMSQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hTk9E-0000nx-TS; Thu, 23 May 2019 09:36:28 +0000 Received: from hch by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1hTk9B-0000my-7A; Thu, 23 May 2019 09:36:25 +0000 Date: Thu, 23 May 2019 02:36:25 -0700 From: Christoph Hellwig To: Miquel Raynal Subject: Re: [PATCH v4 02/10] ata: ahci: Support per-port interrupts Message-ID: <20190523093625.GA26136@infradead.org> References: <20190521143023.31810-1-miquel.raynal@bootlin.com> <20190521143023.31810-3-miquel.raynal@bootlin.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190521143023.31810-3-miquel.raynal@bootlin.com> User-Agent: Mutt/1.9.2 (2017-12-15) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Andrew Lunn , Baruch Siach , Jason Cooper , devicetree@vger.kernel.org, Marc Zyngier , Gregory Clement , Maxime Chevallier , Nadav Haklai , Hans de Goede , Rob Herring , Antoine Tenart , Jens Axboe , Thomas Petazzoni , linux-ide@vger.kernel.org, Thomas Gleixner , linux-arm-kernel@lists.infradead.org, Sebastian Hesselbarth Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org > --- a/drivers/ata/acard-ahci.c > +++ b/drivers/ata/acard-ahci.c > @@ -434,7 +434,7 @@ static int acard_ahci_init_one(struct pci_dev *pdev, const struct pci_device_id > if (!hpriv) > return -ENOMEM; > > - hpriv->irq = pdev->irq; > + hpriv->irqs[0] = pdev->irq; > hpriv->flags |= (unsigned long)pi.private_data; Who allocates ->irqs for the non-ahci.c case? > @@ -95,6 +96,14 @@ static void ahci_platform_disable_phys(struct ahci_host_priv *hpriv) > } > } > > +int ahci_get_per_port_irq_vector(struct ata_host *host, int port) > +{ > + struct ahci_host_priv *hpriv = host->private_data; > + > + return hpriv->irqs[port]; > +} > +EXPORT_SYMBOL_GPL(ahci_get_per_port_irq_vector); This function seems a little misnamed. The only multi-irq support in the AHCI spec itself is PCIe MSI/MSI-X, which is not handled by this function, but instead in the PCI layer using pci_irq_vector and the ahci_get_irq_vector callback in ahci.c. In fact it seems like this scheme particular to your device config, why don't we just add a specific libahci-using subdriver for it? That would also get rid of the whole ->irq to ->irqs change. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel