Linux ATA/IDE development
 help / color / mirror / Atom feed
* [PATCH v2 0/9] Phase out pci_enable_msi_block()
@ 2014-01-17 16:02 Alexander Gordeev
  2014-01-17 16:02 ` [PATCH v2 1/9] ahci: Fix broken fallback to single MSI mode Alexander Gordeev
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Alexander Gordeev @ 2014-01-17 16:02 UTC (permalink / raw)
  To: linux-kernel
  Cc: Alexander Gordeev, Brian King, Tejun Heo, Matthew Wilcox,
	Alex Williamson, Kalle Valo, Vladimir Kondratiev, linux-wireless,
	wil6210, ath10k, linux-nvme, linux-ide, linux-scsi, kvm,
	linux-pci

This series is against "next" branch in Bjorn's repo:
git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git

Changes from v1 to v2:
  - added a regression fix "ahci: Fix broken fallback to single
    MSI mode" as patch 1/9;
  - the series is reordered to move the regression fix in front;
  - at Bjorn's request pci_enable_msi() is un-deprecated;
  - as result, pci_enable_msi_range(pdev, 1, 1) styled calls
    rolled back to pci_enable_msi(pdev);
  - nvme bug fix moved out as a separate patch 5/9 "nvme: Fix
    invalid call to irq_set_affinity_hint()"
  - patches changelog elaborated a bit;

Bjorn,

As the release is supposedly this weekend, do you prefer
the patches to go to your tree or to individual trees after
the release?

Thanks!

Alexander Gordeev (9):
  ahci: Fix broken fallback to single MSI mode
  ahci: Use pci_enable_msi_range()
  ipr: Get rid of superfluous call to pci_disable_msi/msix()
  ipr: Use pci_enable_msi_range() and pci_enable_msix_range()
  nvme: Fix invalid call to irq_set_affinity_hint()
  nvme: Use pci_enable_msi_range() and pci_enable_msix_range()
  vfio: Use pci_enable_msi_range() and pci_enable_msix_range()
  ath10k: Use pci_enable_msi_range()
  wil6210: Use pci_enable_msi_range()

 drivers/ata/ahci.c                          |   18 +++++-----
 drivers/block/nvme-core.c                   |   33 ++++-------------
 drivers/net/wireless/ath/ath10k/pci.c       |   20 +++++-----
 drivers/net/wireless/ath/wil6210/pcie_bus.c |   36 ++++++++++---------
 drivers/scsi/ipr.c                          |   51 +++++++++-----------------
 drivers/vfio/pci/vfio_pci_intrs.c           |   12 ++++--
 6 files changed, 72 insertions(+), 98 deletions(-)

-- 
1.7.7.6

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v2 1/9] ahci: Fix broken fallback to single MSI mode
  2014-01-17 16:02 [PATCH v2 0/9] Phase out pci_enable_msi_block() Alexander Gordeev
@ 2014-01-17 16:02 ` Alexander Gordeev
  2014-01-17 16:02 ` [PATCH v2 2/9] ahci: Use pci_enable_msi_range() Alexander Gordeev
  2014-01-17 21:00 ` [PATCH v2 0/9] Phase out pci_enable_msi_block() Bjorn Helgaas
  2 siblings, 0 replies; 9+ messages in thread
From: Alexander Gordeev @ 2014-01-17 16:02 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alexander Gordeev, Tejun Heo, linux-ide, linux-pci

Commit 7b92b4f ("PCI/MSI: Remove pci_enable_msi_block_auto()")
introduced a regression - in case multiple MSIs initialization
fails the code falls back to INTx rather than to single MSI.

Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
---
 drivers/ata/ahci.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 8516f4d..df24eef4 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -1117,8 +1117,10 @@ int ahci_init_interrupts(struct pci_dev *pdev, unsigned int n_ports,
 
 	nvec = rc;
 	rc = pci_enable_msi_block(pdev, nvec);
-	if (rc)
+	if (rc < 0)
 		goto intx;
+	else if (rc > 0)
+		goto single_msi;
 
 	return nvec;
 
-- 
1.7.7.6

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v2 2/9] ahci: Use pci_enable_msi_range()
  2014-01-17 16:02 [PATCH v2 0/9] Phase out pci_enable_msi_block() Alexander Gordeev
  2014-01-17 16:02 ` [PATCH v2 1/9] ahci: Fix broken fallback to single MSI mode Alexander Gordeev
@ 2014-01-17 16:02 ` Alexander Gordeev
  2014-01-17 21:00 ` [PATCH v2 0/9] Phase out pci_enable_msi_block() Bjorn Helgaas
  2 siblings, 0 replies; 9+ messages in thread
From: Alexander Gordeev @ 2014-01-17 16:02 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alexander Gordeev, Tejun Heo, linux-ide, linux-pci

As result deprecation of MSI-X/MSI enablement functions
pci_enable_msix() and pci_enable_msi_block() all drivers
using these two interfaces need to be updated to use the
new pci_enable_msi_range() and pci_enable_msix_range()
interfaces.

Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
---
 drivers/ata/ahci.c |   20 +++++++++-----------
 1 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index df24eef4..73ffd39 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -1098,13 +1098,13 @@ static inline void ahci_gtf_filter_workaround(struct ata_host *host)
 int ahci_init_interrupts(struct pci_dev *pdev, unsigned int n_ports,
 			 struct ahci_host_priv *hpriv)
 {
-	int rc, nvec;
+	int nvec;
 
 	if (hpriv->flags & AHCI_HFLAG_NO_MSI)
 		goto intx;
 
-	rc = pci_msi_vec_count(pdev);
-	if (rc < 0)
+	nvec = pci_msi_vec_count(pdev);
+	if (nvec < 0)
 		goto intx;
 
 	/*
@@ -1112,21 +1112,19 @@ int ahci_init_interrupts(struct pci_dev *pdev, unsigned int n_ports,
 	 * Message mode could be enforced. In this case assume that advantage
 	 * of multipe MSIs is negated and use single MSI mode instead.
 	 */
-	if (rc < n_ports)
+	if (nvec < n_ports)
 		goto single_msi;
 
-	nvec = rc;
-	rc = pci_enable_msi_block(pdev, nvec);
-	if (rc < 0)
-		goto intx;
-	else if (rc > 0)
+	nvec = pci_enable_msi_range(pdev, nvec, nvec);
+	if (nvec == -ENOSPC)
 		goto single_msi;
+	else if (nvec < 0)
+		goto intx;
 
 	return nvec;
 
 single_msi:
-	rc = pci_enable_msi(pdev);
-	if (rc)
+	if (pci_enable_msi(pdev))
 		goto intx;
 	return 1;
 
-- 
1.7.7.6


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 0/9] Phase out pci_enable_msi_block()
  2014-01-17 16:02 [PATCH v2 0/9] Phase out pci_enable_msi_block() Alexander Gordeev
  2014-01-17 16:02 ` [PATCH v2 1/9] ahci: Fix broken fallback to single MSI mode Alexander Gordeev
  2014-01-17 16:02 ` [PATCH v2 2/9] ahci: Use pci_enable_msi_range() Alexander Gordeev
@ 2014-01-17 21:00 ` Bjorn Helgaas
  2014-01-18  7:15   ` Alexander Gordeev
  2014-01-29 13:59   ` Alexander Gordeev
  2 siblings, 2 replies; 9+ messages in thread
From: Bjorn Helgaas @ 2014-01-17 21:00 UTC (permalink / raw)
  To: Alexander Gordeev
  Cc: linux-kernel@vger.kernel.org, Brian King, Tejun Heo,
	Matthew Wilcox, Alex Williamson, Kalle Valo, Vladimir Kondratiev,
	linux-wireless, wil6210, ath10k, linux-nvme,
	linux-ide@vger.kernel.org, linux-scsi@vger.kernel.org,
	kvm@vger.kernel.org, linux-pci@vger.kernel.org

On Fri, Jan 17, 2014 at 9:02 AM, Alexander Gordeev <agordeev@redhat.com> wrote:
> This series is against "next" branch in Bjorn's repo:
> git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git
>
> Changes from v1 to v2:
>   - added a regression fix "ahci: Fix broken fallback to single
>     MSI mode" as patch 1/9;
>   - the series is reordered to move the regression fix in front;
>   - at Bjorn's request pci_enable_msi() is un-deprecated;
>   - as result, pci_enable_msi_range(pdev, 1, 1) styled calls
>     rolled back to pci_enable_msi(pdev);
>   - nvme bug fix moved out as a separate patch 5/9 "nvme: Fix
>     invalid call to irq_set_affinity_hint()"
>   - patches changelog elaborated a bit;
>
> Bjorn,
>
> As the release is supposedly this weekend, do you prefer
> the patches to go to your tree or to individual trees after
> the release?

I'd be happy to merge them, except for the fact that they probably
wouldn't have any time in -next before I ask Linus to pull them.  So
how about if we wait until after the release, ask the area maintainers
to take them, and if they don't take them, I'll put them in my tree
for v3.15?

Bjorn

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 0/9] Phase out pci_enable_msi_block()
  2014-01-17 21:00 ` [PATCH v2 0/9] Phase out pci_enable_msi_block() Bjorn Helgaas
@ 2014-01-18  7:15   ` Alexander Gordeev
  2014-01-18 14:38     ` Bjorn Helgaas
  2014-01-29 13:59   ` Alexander Gordeev
  1 sibling, 1 reply; 9+ messages in thread
From: Alexander Gordeev @ 2014-01-18  7:15 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: linux-kernel@vger.kernel.org, Brian King, Tejun Heo,
	Matthew Wilcox, Alex Williamson, Kalle Valo, Vladimir Kondratiev,
	linux-wireless, wil6210, ath10k, linux-nvme,
	linux-ide@vger.kernel.org, linux-scsi@vger.kernel.org,
	kvm@vger.kernel.org, linux-pci@vger.kernel.org

On Fri, Jan 17, 2014 at 02:00:32PM -0700, Bjorn Helgaas wrote:
> > As the release is supposedly this weekend, do you prefer
> > the patches to go to your tree or to individual trees after
> > the release?
> 
> I'd be happy to merge them, except for the fact that they probably
> wouldn't have any time in -next before I ask Linus to pull them.  So
> how about if we wait until after the release, ask the area maintainers
> to take them, and if they don't take them, I'll put them in my tree
> for v3.15?

Patch 11 depends on patches 1-10, so I am not sure how to better handle it.
Whatever works for you ;)

I am only concerned with a regression fix "ahci: Fix broken fallback to
single MSI mode" which would be nice to have in 3.14. But it seems pretty
much too late.

> Bjorn

Thanks!

-- 
Regards,
Alexander Gordeev
agordeev@redhat.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 0/9] Phase out pci_enable_msi_block()
  2014-01-18  7:15   ` Alexander Gordeev
@ 2014-01-18 14:38     ` Bjorn Helgaas
  2014-01-18 14:59       ` Tejun Heo
  0 siblings, 1 reply; 9+ messages in thread
From: Bjorn Helgaas @ 2014-01-18 14:38 UTC (permalink / raw)
  To: Alexander Gordeev
  Cc: linux-kernel@vger.kernel.org, Brian King, Tejun Heo,
	Matthew Wilcox, Alex Williamson, Kalle Valo, Vladimir Kondratiev,
	linux-wireless, wil6210, ath10k, linux-nvme,
	linux-ide@vger.kernel.org, linux-scsi@vger.kernel.org,
	kvm@vger.kernel.org, linux-pci@vger.kernel.org

On Sat, Jan 18, 2014 at 12:15 AM, Alexander Gordeev <agordeev@redhat.com> wrote:
> On Fri, Jan 17, 2014 at 02:00:32PM -0700, Bjorn Helgaas wrote:
>> > As the release is supposedly this weekend, do you prefer
>> > the patches to go to your tree or to individual trees after
>> > the release?
>>
>> I'd be happy to merge them, except for the fact that they probably
>> wouldn't have any time in -next before I ask Linus to pull them.  So
>> how about if we wait until after the release, ask the area maintainers
>> to take them, and if they don't take them, I'll put them in my tree
>> for v3.15?
>
> Patch 11 depends on patches 1-10, so I am not sure how to better handle it.
> Whatever works for you ;)
>
> I am only concerned with a regression fix "ahci: Fix broken fallback to
> single MSI mode" which would be nice to have in 3.14. But it seems pretty
> much too late.

Tejun, if you want to ack that one, I can put it in either the first
3.14 pull request or a subsequent one.  Either way, since it's a
regression fix, we should be able to get it in 3.14.

Bjorn

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 0/9] Phase out pci_enable_msi_block()
  2014-01-18 14:38     ` Bjorn Helgaas
@ 2014-01-18 14:59       ` Tejun Heo
  2014-01-29 21:48         ` Bjorn Helgaas
  0 siblings, 1 reply; 9+ messages in thread
From: Tejun Heo @ 2014-01-18 14:59 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Alexander Gordeev, linux-kernel@vger.kernel.org, Brian King,
	Matthew Wilcox, Alex Williamson, Kalle Valo, Vladimir Kondratiev,
	linux-wireless, wil6210, ath10k, linux-nvme,
	linux-ide@vger.kernel.org, linux-scsi@vger.kernel.org,
	kvm@vger.kernel.org, linux-pci@vger.kernel.org

On Sat, Jan 18, 2014 at 07:38:55AM -0700, Bjorn Helgaas wrote:
> On Sat, Jan 18, 2014 at 12:15 AM, Alexander Gordeev <agordeev@redhat.com> wrote:
> > On Fri, Jan 17, 2014 at 02:00:32PM -0700, Bjorn Helgaas wrote:
> >> > As the release is supposedly this weekend, do you prefer
> >> > the patches to go to your tree or to individual trees after
> >> > the release?
> >>
> >> I'd be happy to merge them, except for the fact that they probably
> >> wouldn't have any time in -next before I ask Linus to pull them.  So
> >> how about if we wait until after the release, ask the area maintainers
> >> to take them, and if they don't take them, I'll put them in my tree
> >> for v3.15?
> >
> > Patch 11 depends on patches 1-10, so I am not sure how to better handle it.
> > Whatever works for you ;)
> >
> > I am only concerned with a regression fix "ahci: Fix broken fallback to
> > single MSI mode" which would be nice to have in 3.14. But it seems pretty
> > much too late.
> 
> Tejun, if you want to ack that one, I can put it in either the first
> 3.14 pull request or a subsequent one.  Either way, since it's a
> regression fix, we should be able to get it in 3.14.

Acked-by: Tejun Heo <tj@kernel.org>

Please feel free to route it any way you see fit.

Thanks!

-- 
tejun

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 0/9] Phase out pci_enable_msi_block()
  2014-01-17 21:00 ` [PATCH v2 0/9] Phase out pci_enable_msi_block() Bjorn Helgaas
  2014-01-18  7:15   ` Alexander Gordeev
@ 2014-01-29 13:59   ` Alexander Gordeev
  1 sibling, 0 replies; 9+ messages in thread
From: Alexander Gordeev @ 2014-01-29 13:59 UTC (permalink / raw)
  To: Alex Williamson, Kalle Valo, Vladimir Kondratiev
  Cc: linux-kernel@vger.kernel.org, Brian King, Tejun Heo,
	Matthew Wilcox, linux-wireless, wil6210, ath10k, linux-nvme,
	linux-ide@vger.kernel.org, linux-scsi@vger.kernel.org,
	kvm@vger.kernel.org, linux-pci@vger.kernel.org, Bjorn Helgaas

On Fri, Jan 17, 2014 at 02:00:32PM -0700, Bjorn Helgaas wrote:
> > Bjorn,
> >
> > As the release is supposedly this weekend, do you prefer
> > the patches to go to your tree or to individual trees after
> > the release?
> 
> I'd be happy to merge them, except for the fact that they probably
> wouldn't have any time in -next before I ask Linus to pull them.  So
> how about if we wait until after the release, ask the area maintainers
> to take them, and if they don't take them, I'll put them in my tree
> for v3.15?

Hi Gentleman,

As the prerequisite commit 302a252 ("PCI/MSI: Add pci_enable_msi_range()
and pci_enable_msix_range()") is in mainline now, could you please take
the ACKed patches to your trees?

Thanks!

> Bjorn

-- 
Regards,
Alexander Gordeev
agordeev@redhat.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 0/9] Phase out pci_enable_msi_block()
  2014-01-18 14:59       ` Tejun Heo
@ 2014-01-29 21:48         ` Bjorn Helgaas
  0 siblings, 0 replies; 9+ messages in thread
From: Bjorn Helgaas @ 2014-01-29 21:48 UTC (permalink / raw)
  To: Tejun Heo
  Cc: Alexander Gordeev, linux-kernel@vger.kernel.org, Brian King,
	Matthew Wilcox, Alex Williamson, Kalle Valo, Vladimir Kondratiev,
	linux-wireless, wil6210, ath10k, linux-nvme,
	linux-ide@vger.kernel.org, linux-scsi@vger.kernel.org,
	kvm@vger.kernel.org, linux-pci@vger.kernel.org

On Sat, Jan 18, 2014 at 09:59:40AM -0500, Tejun Heo wrote:
> On Sat, Jan 18, 2014 at 07:38:55AM -0700, Bjorn Helgaas wrote:
> > On Sat, Jan 18, 2014 at 12:15 AM, Alexander Gordeev <agordeev@redhat.com> wrote:
> > > On Fri, Jan 17, 2014 at 02:00:32PM -0700, Bjorn Helgaas wrote:
> > >> > As the release is supposedly this weekend, do you prefer
> > >> > the patches to go to your tree or to individual trees after
> > >> > the release?
> > >>
> > >> I'd be happy to merge them, except for the fact that they probably
> > >> wouldn't have any time in -next before I ask Linus to pull them.  So
> > >> how about if we wait until after the release, ask the area maintainers
> > >> to take them, and if they don't take them, I'll put them in my tree
> > >> for v3.15?
> > >
> > > Patch 11 depends on patches 1-10, so I am not sure how to better handle it.
> > > Whatever works for you ;)
> > >
> > > I am only concerned with a regression fix "ahci: Fix broken fallback to
> > > single MSI mode" which would be nice to have in 3.14. But it seems pretty
> > > much too late.
> > 
> > Tejun, if you want to ack that one, I can put it in either the first
> > 3.14 pull request or a subsequent one.  Either way, since it's a
> > regression fix, we should be able to get it in 3.14.
> 
> Acked-by: Tejun Heo <tj@kernel.org>
> 
> Please feel free to route it any way you see fit.

I applied the following to my pci/msi branch, since they had acks from
maintainers (Tejun, I assumed your ack applies to both ahci patches):

    ahci: Fix broken fallback to single MSI mode
    ahci: Use pci_enable_msi_range()
    vfio: Use pci_enable_msi_range() and pci_enable_msix_range()
    wil6210: Use pci_enable_msi_range()

I didn't do anything with these:

    ipr: Get rid of superfluous call to pci_disable_msi/msix()
    ipr: Use pci_enable_msi_range() and pci_enable_msix_range()

	The conflict with "ipr: Handle early EEH" needs to get resolved
	first.  Either Alexander's patches need to go via the same tree as
	the EEH change, or the EEH change needs to be in some published
	tree so I can cherry-pick it.

    nvme: Fix invalid call to irq_set_affinity_hint()
    nvme: Use pci_enable_msi_range() and pci_enable_msix_range()

	These don't seem fully baked yet.  If/when Keith acks them, I (or
	he) can merge them.

    ath10k: Use pci_enable_msi_range()

	This has been acked, but no longer applies to mainline (I'm
	currently at 0e47c969c65e).

Bjorn

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-01-29 21:48 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-17 16:02 [PATCH v2 0/9] Phase out pci_enable_msi_block() Alexander Gordeev
2014-01-17 16:02 ` [PATCH v2 1/9] ahci: Fix broken fallback to single MSI mode Alexander Gordeev
2014-01-17 16:02 ` [PATCH v2 2/9] ahci: Use pci_enable_msi_range() Alexander Gordeev
2014-01-17 21:00 ` [PATCH v2 0/9] Phase out pci_enable_msi_block() Bjorn Helgaas
2014-01-18  7:15   ` Alexander Gordeev
2014-01-18 14:38     ` Bjorn Helgaas
2014-01-18 14:59       ` Tejun Heo
2014-01-29 21:48         ` Bjorn Helgaas
2014-01-29 13:59   ` Alexander Gordeev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox