From: Tejun Heo <tj@kernel.org>
To: Robert Richter <rric@kernel.org>
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>
Subject: Re: [PATCH v4 3/3] AHCI: Add generic MSI-X interrupt support to SATA PCI driver
Date: Wed, 3 Jun 2015 14:44:22 +0900 [thread overview]
Message-ID: <20150603054422.GD20091@mtj.duckdns.org> (raw)
In-Reply-To: <1433073319-13796-4-git-send-email-rric@kernel.org>
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
next prev parent reply other threads:[~2015-06-03 5:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-31 11:55 [PATCH v4 0/3] " Robert Richter
2015-05-31 11:55 ` [PATCH v4 1/3] ahci: Move interrupt enablement code to a separate function Robert Richter
2015-05-31 11:55 ` [PATCH v4 2/3] ahci: Store irq number in struct ahci_host_priv Robert Richter
2015-06-03 5:39 ` Tejun Heo
2015-05-31 11:55 ` [PATCH v4 3/3] AHCI: Add generic MSI-X interrupt support to SATA PCI driver Robert Richter
2015-06-03 5:44 ` Tejun Heo [this message]
2015-06-04 9:03 ` Robert Richter
2015-06-04 21:22 ` Tejun Heo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150603054422.GD20091@mtj.duckdns.org \
--to=tj@kernel.org \
--cc=jiang.liu@linux.intel.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rric@kernel.org \
--cc=rrichter@cavium.com \
--cc=sgoutham@cavium.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome