Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1157082

Re: [PATCH v4 3/3] AHCI: Add generic MSI-X interrupt support to SATA PCI driver

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From Tejun Heo <tj@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH v4 3/3] AHCI: Add generic MSI-X interrupt support to SATA PCI driver
Date Wed, 03 Jun 2015 07:50:02 +0200
Message-ID <px9IS-8ch-1@gated-at.bofh.it> (permalink)
References <pwa4i-1iE-3@gated-at.bofh.it> <pwa4j-1iE-13@gated-at.bofh.it>
X-Original-To Robert Richter <rric@kernel.org>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=Uqo4ki91s100n//xcild4/80NILl/xOb01dZwfJN86Y=; b=tB1VFCl2RwZt3+QW2pAyB4BUx7QhA3jMpFlzhrxmMdGGsKD4aro3faEg3DTBLzWe0K o7AYJCRa5NedhSfJuKoYw1Ppw4HqqboBvyKVOvcWWdPqyZzfMVSzaZkkC6HIgy4YTcQK owHrloStd/IsFEkjAZOqyvlN3WEVfFEo5RSV0C/owJUZT1TvTgDof9YGPGU7x0OlBa2W QkCsPWzaK/hrPEx2Y7KiyRDswDs3UI3jPdEWIL90qVj+UTXdfDqiRcayfBS2yoO3YKKv w0i4b8K+vLg6/f1cNw64pQkkjh4ZmBQipLoCzC5eN3JMc7kN5eMaP+sRRT/4vvg1Abqn kv1Q==
X-Received by 10.68.224.10 with SMTP id qy10mr19421214pbc.23.1433310273333; Tue, 02 Jun 2015 22:44:33 -0700 (PDT)
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
User-Agent Mutt/1.5.23 (2014-03-12)
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 62
Organization linux.* mail to news gateway
X-Original-Cc Sunil Goutham <sgoutham@cavium.com>, Jiang Liu <jiang.liu@linux.intel.com>, linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Robert Richter <rrichter@cavium.com>
X-Original-Date Wed, 3 Jun 2015 14:44:22 +0900
X-Original-Message-ID <20150603054422.GD20091@mtj.duckdns.org>
X-Original-References <1433073319-13796-1-git-send-email-rric@kernel.org> <1433073319-13796-4-git-send-email-rric@kernel.org>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref aioe.org linux.kernel:1157082

Show key headers only | View raw


Hello, Robert.

Maybe qualifying the subject that it's only for single IRQ would be a
good idea?

> @@ -52,6 +53,7 @@
>  
>  enum {
>  	AHCI_PCI_BAR_STA2X11	= 0,
> +	AHCI_PCI_BAR_CAVIUM	= 0,
>  	AHCI_PCI_BAR_ENMOTUS	= 2,
>  	AHCI_PCI_BAR_STANDARD	= 5,

I thought I already asked but please separate out CAVIUM specific
changes from msix implementation and follow up with why cavium depends
on msix support.

> +static int ahci_init_msix(struct pci_dev *pdev, unsigned int n_ports,
> +			  struct ahci_host_priv *hpriv)
> +{

Please add a comment describing that it's for single msix only and why
that'd be necessary for certain controllers.

...
> +	/*
> +	 * Per-port msix interrupts are not supported. Assume single
> +	 * port interrupts for:
> +	 *
> +	 *  n_ports == 1, or
> +	 *  nvec < n_ports.
> +	 *
> +	 * We also need to check for n_ports != 0 which is implicitly
> +	 * covered here since nvec > 0.
> +	 */
> +	if (n_ports != 1 && nvec >= n_ports) {
> +		rc = -ENOSYS;
> +		goto fail;
> +	}

Didn't I ask this one too the last time?  Can you explain why we can't
initialize single IRQ mode if nvec >= n_ports?

> @@ -1260,6 +1339,10 @@ static int ahci_init_interrupts(struct pci_dev *pdev, unsigned int n_ports,
>  	if (nvec >= 0)
>  		return nvec;
>  
> +	nvec = ahci_init_msix(pdev, n_ports, hpriv);
> +	if (nvec >= 0)
> +		return nvec;

Please add a comment explaining why we're doing msix after msi.

Thanks.

-- 
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH v4 3/3] AHCI: Add generic MSI-X interrupt support to SATA  PCI driver Tejun Heo <tj@kernel.org> - 2015-06-03 07:50 +0200

csiph-web