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

2015-05-18 Thread Robert Richter
On 17.05.15 08:33:32, Alexander Gordeev wrote: > You enable MSI-X for a single chip, but introduce a change to the > generic AHCI code. > > In general MSI-X case, what makes you believe that IRQ vectors are > assigned continuously? > > (Interface ahci_host_activate() kinda expects a contiguous ve

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

2015-05-17 Thread Alexander Gordeev
On Mon, May 04, 2015 at 09:45:37AM +0200, Robert Richter wrote: > From: Robert Richter > > This patch adds generic support for MSI-X interrupts to the SATA PCI > driver. Only single interrupt support is implemented. Thus, per-port > interrupts can not yet be enabled. > > The driver now checks th

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

2015-05-13 Thread Tejun Heo
Hello, On Wed, May 13, 2015 at 08:07:05PM +0200, Robert Richter wrote: > So I will move msix after msi then and mark it as a special case if > msi is not supported. I don't want to move it after intx since this is > the fallback if nothing else works, there is no explicit check for > intx, I even

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

2015-05-13 Thread Robert Richter
On 13.05.15 13:46:40, Tejun Heo wrote: > Hello, Robert. > > On Wed, May 13, 2015 at 07:28:28PM +0200, Robert Richter wrote: > > > > This looks not very useful to do. Since irq is used only a single > > > > time, there is no reason to store it in the host's data structure. It > > > > > > Doesn't r

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

2015-05-13 Thread Tejun Heo
Hello, Robert. On Wed, May 13, 2015 at 07:28:28PM +0200, Robert Richter wrote: > > > This looks not very useful to do. Since irq is used only a single > > > time, there is no reason to store it in the host's data structure. It > > > > Doesn't really matter tho. > > Since ahci_host_activate() is

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

2015-05-13 Thread Robert Richter
Tejun, On 13.05.15 10:39:06, Tejun Heo wrote: > On Tue, May 12, 2015 at 01:46:47PM +0200, Robert Richter wrote: > > I don't think this is worth the effort as all internal and external > > drivers need to be changed basically from: > > > > ahci_host_activate(host, irq, &ahci_sht); > > > > to: >

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

2015-05-13 Thread Tejun Heo
Hello, On Tue, May 12, 2015 at 01:46:47PM +0200, Robert Richter wrote: > I don't think this is worth the effort as all internal and external > drivers need to be changed basically from: > > ahci_host_activate(host, irq, &ahci_sht); > > to: > > host->irq = irq; > ahci_host_activate(host, &ahc

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

2015-05-13 Thread Tejun Heo
Hello, Robert. On Mon, May 11, 2015 at 07:18:10PM +0200, Robert Richter wrote: > static int ahci_init_msix(struct pci_dev *pdev, unsigned int n_ports, > struct ahci_host_priv *hpriv) > { > int rc, nvec; > struct msix_entry entry = {}; > > /* check if msix

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

2015-05-12 Thread Robert Richter
Tejun, On 11.05.15 19:18:10, Robert Richter wrote: > > > +static int ahci_init_interrupts(struct pci_dev *pdev, unsigned int > > > n_ports, > > > + struct ahci_host_priv *hpriv) > > > +{ > > > + struct msi_desc *desc; > > > + > > > + __ahci_init_interrupts(pdev, n_po

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

2015-05-11 Thread Robert Richter
Tejun, thanks for your review and answer. On 04.05.15 12:06:52, Tejun Heo wrote: > > This patch also enables AHCI for Cavium Thunder SoCs that uses MSI-X. > > Please don't mix these two changes in the same patch. I will split the patch. > > + /* per-port msix interrupts are not supported */ >

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

2015-05-04 Thread Tejun Heo
Hello, Robert. (cc'ing Alexander for ahci msi) On Mon, May 04, 2015 at 09:45:37AM +0200, Robert Richter wrote: > From: Robert Richter > > This patch adds generic support for MSI-X interrupts to the SATA PCI > driver. Only single interrupt support is implemented. Thus, per-port > interrupts can n