* [PATCH RFC 01/77] PCI/MSI: Fix return value when populate_msi_sysfs() failed
[not found] <cover.1380703262.git.agordeev@redhat.com>
@ 2013-10-02 10:48 ` Alexander Gordeev
2013-10-03 0:39 ` Jon Mason
2013-10-02 10:48 ` [PATCH RFC 02/77] PCI/MSI/PPC: Fix wrong RTAS error code reporting Alexander Gordeev
` (34 subsequent siblings)
35 siblings, 1 reply; 49+ messages in thread
From: Alexander Gordeev @ 2013-10-02 10:48 UTC (permalink / raw)
To: linux-kernel
Cc: Alexander Gordeev, Bjorn Helgaas, Ralf Baechle, Michael Ellerman,
Benjamin Herrenschmidt, Martin Schwidefsky, Ingo Molnar,
Tejun Heo, Dan Williams, Andy King, Jon Mason, Matt Porter,
stable, linux-pci, linux-mips, linuxppc-dev, linux390, linux-s390,
x86, linux-ide, iss_storagedev, linux-nvme, linux-rdma, netdev,
e1000-devel, linux-driver, Solarflare linux maintainers,
VMware, Inc., linux-scsi
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
---
drivers/pci/msi.c | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index d5f90d6..b43f391 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -719,7 +719,7 @@ static int msix_capability_init(struct pci_dev *dev,
ret = arch_setup_msi_irqs(dev, nvec, PCI_CAP_ID_MSIX);
if (ret)
- goto error;
+ goto out_avail;
/*
* Some devices require MSI-X to be enabled before we can touch the
@@ -732,10 +732,8 @@ static int msix_capability_init(struct pci_dev *dev,
msix_program_entries(dev, entries);
ret = populate_msi_sysfs(dev);
- if (ret) {
- ret = 0;
- goto error;
- }
+ if (ret)
+ goto out_free;
/* Set MSI-X enabled bits and unmask the function */
pci_intx_for_msi(dev, 0);
@@ -746,7 +744,7 @@ static int msix_capability_init(struct pci_dev *dev,
return 0;
-error:
+out_avail:
if (ret < 0) {
/*
* If we had some success, report the number of irqs
@@ -763,6 +761,7 @@ error:
ret = avail;
}
+out_free:
free_msi_irqs(dev);
return ret;
--
1.7.7.6
^ permalink raw reply related [flat|nested] 49+ messages in thread* Re: [PATCH RFC 01/77] PCI/MSI: Fix return value when populate_msi_sysfs() failed
2013-10-02 10:48 ` [PATCH RFC 01/77] PCI/MSI: Fix return value when populate_msi_sysfs() failed Alexander Gordeev
@ 2013-10-03 0:39 ` Jon Mason
2013-10-03 21:46 ` Ben Hutchings
0 siblings, 1 reply; 49+ messages in thread
From: Jon Mason @ 2013-10-03 0:39 UTC (permalink / raw)
To: Alexander Gordeev
Cc: linux-kernel, Bjorn Helgaas, Ralf Baechle, Michael Ellerman,
Benjamin Herrenschmidt, Martin Schwidefsky, Ingo Molnar,
Tejun Heo, Dan Williams, Andy King, Matt Porter, stable,
linux-pci, linux-mips, linuxppc-dev, linux390, linux-s390, x86,
linux-ide, iss_storagedev, linux-nvme, linux-rdma, netdev,
e1000-devel, linux-driver, Solarflare linux maintainers,
VMware, Inc., linux-scsi
On Wed, Oct 02, 2013 at 12:48:17PM +0200, Alexander Gordeev wrote:
> Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Since you are changing the behavior of the msix_capability_init
function on populate_msi_sysfs error, a comment describing why in this
commit would be nice.
> ---
> drivers/pci/msi.c | 11 +++++------
> 1 files changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
> index d5f90d6..b43f391 100644
> --- a/drivers/pci/msi.c
> +++ b/drivers/pci/msi.c
> @@ -719,7 +719,7 @@ static int msix_capability_init(struct pci_dev *dev,
>
> ret = arch_setup_msi_irqs(dev, nvec, PCI_CAP_ID_MSIX);
> if (ret)
> - goto error;
> + goto out_avail;
>
> /*
> * Some devices require MSI-X to be enabled before we can touch the
> @@ -732,10 +732,8 @@ static int msix_capability_init(struct pci_dev *dev,
> msix_program_entries(dev, entries);
>
> ret = populate_msi_sysfs(dev);
> - if (ret) {
> - ret = 0;
> - goto error;
> - }
> + if (ret)
> + goto out_free;
>
> /* Set MSI-X enabled bits and unmask the function */
> pci_intx_for_msi(dev, 0);
> @@ -746,7 +744,7 @@ static int msix_capability_init(struct pci_dev *dev,
>
> return 0;
>
> -error:
> +out_avail:
> if (ret < 0) {
> /*
> * If we had some success, report the number of irqs
> @@ -763,6 +761,7 @@ error:
> ret = avail;
> }
>
> +out_free:
> free_msi_irqs(dev);
>
> return ret;
> --
> 1.7.7.6
>
^ permalink raw reply [flat|nested] 49+ messages in thread* Re: [PATCH RFC 01/77] PCI/MSI: Fix return value when populate_msi_sysfs() failed
2013-10-03 0:39 ` Jon Mason
@ 2013-10-03 21:46 ` Ben Hutchings
2013-10-04 0:59 ` Jon Mason
0 siblings, 1 reply; 49+ messages in thread
From: Ben Hutchings @ 2013-10-03 21:46 UTC (permalink / raw)
To: Jon Mason
Cc: Alexander Gordeev, linux-kernel, Bjorn Helgaas, Ralf Baechle,
Michael Ellerman, Benjamin Herrenschmidt, Martin Schwidefsky,
Ingo Molnar, Tejun Heo, Dan Williams, Andy King, Matt Porter,
stable, linux-pci, linux-mips, linuxppc-dev, linux390, linux-s390,
x86, linux-ide, iss_storagedev, linux-nvme, linux-rdma, netdev,
e1000-devel, linux-driver, Solarflare linux maintainers,
VMware, Inc., linux-scsi
On Wed, 2013-10-02 at 17:39 -0700, Jon Mason wrote:
> On Wed, Oct 02, 2013 at 12:48:17PM +0200, Alexander Gordeev wrote:
> > Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
>
> Since you are changing the behavior of the msix_capability_init
> function on populate_msi_sysfs error, a comment describing why in this
> commit would be nice.
[...]
This function was already treating that error as fatal, and freeing the
MSIs. The change in behaviour is that it now returns the error code in
this case, rather than 0. This is obviously correct and properly
described by the one-line summary.
Ben.
--
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply [flat|nested] 49+ messages in thread
* Re: [PATCH RFC 01/77] PCI/MSI: Fix return value when populate_msi_sysfs() failed
2013-10-03 21:46 ` Ben Hutchings
@ 2013-10-04 0:59 ` Jon Mason
0 siblings, 0 replies; 49+ messages in thread
From: Jon Mason @ 2013-10-04 0:59 UTC (permalink / raw)
To: Ben Hutchings
Cc: Alexander Gordeev, linux-kernel, Bjorn Helgaas, Ralf Baechle,
Michael Ellerman, Benjamin Herrenschmidt, Martin Schwidefsky,
Ingo Molnar, Tejun Heo, Dan Williams, Andy King, Matt Porter,
stable, linux-pci, linux-mips, linuxppc-dev, linux390, linux-s390,
x86, linux-ide, iss_storagedev, linux-nvme, linux-rdma, netdev,
e1000-devel, linux-driver, Solarflare linux maintainers,
VMware, Inc., linux-scsi
On Thu, Oct 03, 2013 at 10:46:21PM +0100, Ben Hutchings wrote:
> On Wed, 2013-10-02 at 17:39 -0700, Jon Mason wrote:
> > On Wed, Oct 02, 2013 at 12:48:17PM +0200, Alexander Gordeev wrote:
> > > Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
> >
> > Since you are changing the behavior of the msix_capability_init
> > function on populate_msi_sysfs error, a comment describing why in this
> > commit would be nice.
> [...]
>
> This function was already treating that error as fatal, and freeing the
> MSIs. The change in behaviour is that it now returns the error code in
> this case, rather than 0. This is obviously correct and properly
> described by the one-line summary.
If someone dumb, like me, is looking at this commit and trying to
figure out what is happening, having ANY commit message is good. "Fix
the return value" doesn't tell me anything. Documenting what issue(s)
would've been seen had the error case been encountered and what will
now been seen would be very nice.
>
> Ben.
>
> --
> Ben Hutchings, Staff Engineer, Solarflare
> Not speaking for my employer; that's the marketing department's job.
> They asked us to note that Solarflare product names are trademarked.
>
^ permalink raw reply [flat|nested] 49+ messages in thread
* [PATCH RFC 02/77] PCI/MSI/PPC: Fix wrong RTAS error code reporting
[not found] <cover.1380703262.git.agordeev@redhat.com>
2013-10-02 10:48 ` [PATCH RFC 01/77] PCI/MSI: Fix return value when populate_msi_sysfs() failed Alexander Gordeev
@ 2013-10-02 10:48 ` Alexander Gordeev
2013-10-02 10:48 ` [PATCH RFC 03/77] PCI/MSI/s390: Fix single MSI only check Alexander Gordeev
` (33 subsequent siblings)
35 siblings, 0 replies; 49+ messages in thread
From: Alexander Gordeev @ 2013-10-02 10:48 UTC (permalink / raw)
To: linux-kernel
Cc: Alexander Gordeev, Bjorn Helgaas, Ralf Baechle, Michael Ellerman,
Benjamin Herrenschmidt, Martin Schwidefsky, Ingo Molnar,
Tejun Heo, Dan Williams, Andy King, Jon Mason, Matt Porter,
stable, linux-pci, linux-mips, linuxppc-dev, linux390, linux-s390,
x86, linux-ide, iss_storagedev, linux-nvme, linux-rdma, netdev,
e1000-devel, linux-driver, Solarflare linux maintainers,
VMware, Inc., linux-scsi
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
---
arch/powerpc/platforms/pseries/msi.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/platforms/pseries/msi.c b/arch/powerpc/platforms/pseries/msi.c
index 6d2f0ab..009ec73 100644
--- a/arch/powerpc/platforms/pseries/msi.c
+++ b/arch/powerpc/platforms/pseries/msi.c
@@ -467,7 +467,7 @@ again:
list_for_each_entry(entry, &pdev->msi_list, list) {
hwirq = rtas_query_irq_number(pdn, i++);
if (hwirq < 0) {
- pr_debug("rtas_msi: error (%d) getting hwirq\n", rc);
+ pr_debug("rtas_msi: error (%d) getting hwirq\n", hwirq);
return hwirq;
}
--
1.7.7.6
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH RFC 03/77] PCI/MSI/s390: Fix single MSI only check
[not found] <cover.1380703262.git.agordeev@redhat.com>
2013-10-02 10:48 ` [PATCH RFC 01/77] PCI/MSI: Fix return value when populate_msi_sysfs() failed Alexander Gordeev
2013-10-02 10:48 ` [PATCH RFC 02/77] PCI/MSI/PPC: Fix wrong RTAS error code reporting Alexander Gordeev
@ 2013-10-02 10:48 ` Alexander Gordeev
2013-10-04 7:39 ` Martin Schwidefsky
2013-10-02 10:48 ` [PATCH RFC 04/77] PCI/MSI/s390: Remove superfluous check of MSI type Alexander Gordeev
` (32 subsequent siblings)
35 siblings, 1 reply; 49+ messages in thread
From: Alexander Gordeev @ 2013-10-02 10:48 UTC (permalink / raw)
To: linux-kernel
Cc: Alexander Gordeev, Bjorn Helgaas, Ralf Baechle, Michael Ellerman,
Benjamin Herrenschmidt, Martin Schwidefsky, Ingo Molnar,
Tejun Heo, Dan Williams, Andy King, Jon Mason, Matt Porter,
stable, linux-pci, linux-mips, linuxppc-dev, linux390, linux-s390,
x86, linux-ide, iss_storagedev, linux-nvme, linux-rdma, netdev,
e1000-devel, linux-driver, Solarflare linux maintainers,
VMware, Inc., linux-scsi
Multiple MSIs have never been supported on s390 architecture,
but the platform code fails to report single MSI only.
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
---
arch/s390/pci/pci.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/arch/s390/pci/pci.c b/arch/s390/pci/pci.c
index f17a834..c79c6e4 100644
--- a/arch/s390/pci/pci.c
+++ b/arch/s390/pci/pci.c
@@ -427,6 +427,8 @@ int arch_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
pr_debug("%s: requesting %d MSI-X interrupts...", __func__, nvec);
if (type != PCI_CAP_ID_MSIX && type != PCI_CAP_ID_MSI)
return -EINVAL;
+ if (type == PCI_CAP_ID_MSI && nvec > 1)
+ return 1;
msi_vecs = min(nvec, ZPCI_MSI_VEC_MAX);
msi_vecs = min_t(unsigned int, msi_vecs, CONFIG_PCI_NR_MSI);
--
1.7.7.6
^ permalink raw reply related [flat|nested] 49+ messages in thread* Re: [PATCH RFC 03/77] PCI/MSI/s390: Fix single MSI only check
2013-10-02 10:48 ` [PATCH RFC 03/77] PCI/MSI/s390: Fix single MSI only check Alexander Gordeev
@ 2013-10-04 7:39 ` Martin Schwidefsky
0 siblings, 0 replies; 49+ messages in thread
From: Martin Schwidefsky @ 2013-10-04 7:39 UTC (permalink / raw)
To: Alexander Gordeev
Cc: linux-kernel, Bjorn Helgaas, Ralf Baechle, Michael Ellerman,
Benjamin Herrenschmidt, Ingo Molnar, Tejun Heo, Dan Williams,
Andy King, Jon Mason, Matt Porter, stable, linux-pci, linux-mips,
linuxppc-dev, linux390, linux-s390, x86, linux-ide,
iss_storagedev, linux-nvme, linux-rdma, netdev, e1000-devel,
linux-driver, Solarflare linux maintainers, VMware, Inc.,
linux-scsi
On Wed, 2 Oct 2013 12:48:19 +0200
Alexander Gordeev <agordeev@redhat.com> wrote:
> Multiple MSIs have never been supported on s390 architecture,
> but the platform code fails to report single MSI only.
>
> Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
> ---
> arch/s390/pci/pci.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/arch/s390/pci/pci.c b/arch/s390/pci/pci.c
> index f17a834..c79c6e4 100644
> --- a/arch/s390/pci/pci.c
> +++ b/arch/s390/pci/pci.c
> @@ -427,6 +427,8 @@ int arch_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
> pr_debug("%s: requesting %d MSI-X interrupts...", __func__, nvec);
> if (type != PCI_CAP_ID_MSIX && type != PCI_CAP_ID_MSI)
> return -EINVAL;
> + if (type == PCI_CAP_ID_MSI && nvec > 1)
> + return 1;
> msi_vecs = min(nvec, ZPCI_MSI_VEC_MAX);
> msi_vecs = min_t(unsigned int, msi_vecs, CONFIG_PCI_NR_MSI);
>
Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
--
blue skies,
Martin.
"Reality continues to ruin my life." - Calvin.
^ permalink raw reply [flat|nested] 49+ messages in thread
* [PATCH RFC 04/77] PCI/MSI/s390: Remove superfluous check of MSI type
[not found] <cover.1380703262.git.agordeev@redhat.com>
` (2 preceding siblings ...)
2013-10-02 10:48 ` [PATCH RFC 03/77] PCI/MSI/s390: Fix single MSI only check Alexander Gordeev
@ 2013-10-02 10:48 ` Alexander Gordeev
2013-10-02 18:17 ` Greg KH
2013-10-04 7:40 ` Martin Schwidefsky
2013-10-02 10:48 ` [PATCH RFC 17/77] cciss: Update a misleading comment on interrupt usage Alexander Gordeev
` (31 subsequent siblings)
35 siblings, 2 replies; 49+ messages in thread
From: Alexander Gordeev @ 2013-10-02 10:48 UTC (permalink / raw)
To: linux-kernel
Cc: Alexander Gordeev, Bjorn Helgaas, Ralf Baechle, Michael Ellerman,
Benjamin Herrenschmidt, Martin Schwidefsky, Ingo Molnar,
Tejun Heo, Dan Williams, Andy King, Jon Mason, Matt Porter,
stable, linux-pci, linux-mips, linuxppc-dev, linux390, linux-s390,
x86, linux-ide, iss_storagedev, linux-nvme, linux-rdma, netdev,
e1000-devel, linux-driver, Solarflare linux maintainers,
VMware, Inc., linux-scsi
arch_setup_msi_irqs() hook can only be called from the generic
MSI code which ensures correct MSI type parameter.
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
---
arch/s390/pci/pci.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/arch/s390/pci/pci.c b/arch/s390/pci/pci.c
index c79c6e4..61a3c2c 100644
--- a/arch/s390/pci/pci.c
+++ b/arch/s390/pci/pci.c
@@ -425,8 +425,6 @@ int arch_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
int rc;
pr_debug("%s: requesting %d MSI-X interrupts...", __func__, nvec);
- if (type != PCI_CAP_ID_MSIX && type != PCI_CAP_ID_MSI)
- return -EINVAL;
if (type == PCI_CAP_ID_MSI && nvec > 1)
return 1;
msi_vecs = min(nvec, ZPCI_MSI_VEC_MAX);
--
1.7.7.6
^ permalink raw reply related [flat|nested] 49+ messages in thread* Re: [PATCH RFC 04/77] PCI/MSI/s390: Remove superfluous check of MSI type
2013-10-02 10:48 ` [PATCH RFC 04/77] PCI/MSI/s390: Remove superfluous check of MSI type Alexander Gordeev
@ 2013-10-02 18:17 ` Greg KH
2013-10-04 7:40 ` Martin Schwidefsky
1 sibling, 0 replies; 49+ messages in thread
From: Greg KH @ 2013-10-02 18:17 UTC (permalink / raw)
To: Alexander Gordeev
Cc: linux-kernel, Bjorn Helgaas, Ralf Baechle, Michael Ellerman,
Benjamin Herrenschmidt, Martin Schwidefsky, Ingo Molnar,
Tejun Heo, Dan Williams, Andy King, Jon Mason, Matt Porter,
stable, linux-pci, linux-mips, linuxppc-dev, linux390, linux-s390,
x86, linux-ide, iss_storagedev, linux-nvme, linux-rdma, netdev,
e1000-devel, linux-driver, Solarflare linux maintainers,
VMware, Inc., linux-scsi
On Wed, Oct 02, 2013 at 12:48:20PM +0200, Alexander Gordeev wrote:
> arch_setup_msi_irqs() hook can only be called from the generic
> MSI code which ensures correct MSI type parameter.
>
> Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
> ---
> arch/s390/pci/pci.c | 2 --
> 1 files changed, 0 insertions(+), 2 deletions(-)
I have no idea why you sent the stable@ alias so many patches, all in
the incorrect form for them to be ever accepted in the stable kernel
releases. Please read Documentation/stable_kernel_rules.txt for how to
do this properly.
greg k-h
^ permalink raw reply [flat|nested] 49+ messages in thread
* Re: [PATCH RFC 04/77] PCI/MSI/s390: Remove superfluous check of MSI type
2013-10-02 10:48 ` [PATCH RFC 04/77] PCI/MSI/s390: Remove superfluous check of MSI type Alexander Gordeev
2013-10-02 18:17 ` Greg KH
@ 2013-10-04 7:40 ` Martin Schwidefsky
1 sibling, 0 replies; 49+ messages in thread
From: Martin Schwidefsky @ 2013-10-04 7:40 UTC (permalink / raw)
To: Alexander Gordeev
Cc: linux-kernel, Bjorn Helgaas, Ralf Baechle, Michael Ellerman,
Benjamin Herrenschmidt, Ingo Molnar, Tejun Heo, Dan Williams,
Andy King, Jon Mason, Matt Porter, stable, linux-pci, linux-mips,
linuxppc-dev, linux390, linux-s390, x86, linux-ide,
iss_storagedev, linux-nvme, linux-rdma, netdev, e1000-devel,
linux-driver, Solarflare linux maintainers, VMware, Inc.,
linux-scsi
On Wed, 2 Oct 2013 12:48:20 +0200
Alexander Gordeev <agordeev@redhat.com> wrote:
> arch_setup_msi_irqs() hook can only be called from the generic
> MSI code which ensures correct MSI type parameter.
>
> Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
> ---
> arch/s390/pci/pci.c | 2 --
> 1 files changed, 0 insertions(+), 2 deletions(-)
>
> diff --git a/arch/s390/pci/pci.c b/arch/s390/pci/pci.c
> index c79c6e4..61a3c2c 100644
> --- a/arch/s390/pci/pci.c
> +++ b/arch/s390/pci/pci.c
> @@ -425,8 +425,6 @@ int arch_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
> int rc;
>
> pr_debug("%s: requesting %d MSI-X interrupts...", __func__, nvec);
> - if (type != PCI_CAP_ID_MSIX && type != PCI_CAP_ID_MSI)
> - return -EINVAL;
> if (type == PCI_CAP_ID_MSI && nvec > 1)
> return 1;
> msi_vecs = min(nvec, ZPCI_MSI_VEC_MAX);
Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
--
blue skies,
Martin.
"Reality continues to ruin my life." - Calvin.
^ permalink raw reply [flat|nested] 49+ messages in thread
* [PATCH RFC 17/77] cciss: Update a misleading comment on interrupt usage
[not found] <cover.1380703262.git.agordeev@redhat.com>
` (3 preceding siblings ...)
2013-10-02 10:48 ` [PATCH RFC 04/77] PCI/MSI/s390: Remove superfluous check of MSI type Alexander Gordeev
@ 2013-10-02 10:48 ` Alexander Gordeev
2013-10-02 10:48 ` [PATCH RFC 18/77] cciss: Fallback to single MSI mode in case MSI-X failed Alexander Gordeev
` (30 subsequent siblings)
35 siblings, 0 replies; 49+ messages in thread
From: Alexander Gordeev @ 2013-10-02 10:48 UTC (permalink / raw)
To: linux-kernel
Cc: Alexander Gordeev, Bjorn Helgaas, Ralf Baechle, Michael Ellerman,
Benjamin Herrenschmidt, Martin Schwidefsky, Ingo Molnar,
Tejun Heo, Dan Williams, Andy King, Jon Mason, Matt Porter,
stable, linux-pci, linux-mips, linuxppc-dev, linux390, linux-s390,
x86, linux-ide, iss_storagedev, linux-nvme, linux-rdma, netdev,
e1000-devel, linux-driver, Solarflare linux maintainers,
VMware, Inc., linux-scsi
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
---
drivers/block/cciss.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index 80068a0..bf11540 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -4103,7 +4103,10 @@ static void cciss_interrupt_mode(ctlr_info_t *h)
}
default_int_mode:
#endif /* CONFIG_PCI_MSI */
- /* if we get here we're going to use the default interrupt mode */
+ /*
+ * If we get here we're going to use either the
+ * default interrupt mode or single MSI mode
+ */
h->intr[h->intr_mode] = h->pdev->irq;
return;
}
--
1.7.7.6
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH RFC 18/77] cciss: Fallback to single MSI mode in case MSI-X failed
[not found] <cover.1380703262.git.agordeev@redhat.com>
` (4 preceding siblings ...)
2013-10-02 10:48 ` [PATCH RFC 17/77] cciss: Update a misleading comment on interrupt usage Alexander Gordeev
@ 2013-10-02 10:48 ` Alexander Gordeev
2013-10-02 10:48 ` [PATCH RFC 19/77] csiostor: Do not call pci_disable_msix() if pci_enable_msix() failed Alexander Gordeev
` (29 subsequent siblings)
35 siblings, 0 replies; 49+ messages in thread
From: Alexander Gordeev @ 2013-10-02 10:48 UTC (permalink / raw)
To: linux-kernel
Cc: Alexander Gordeev, Bjorn Helgaas, Ralf Baechle, Michael Ellerman,
Benjamin Herrenschmidt, Martin Schwidefsky, Ingo Molnar,
Tejun Heo, Dan Williams, Andy King, Jon Mason, Matt Porter,
stable, linux-pci, linux-mips, linuxppc-dev, linux390, linux-s390,
x86, linux-ide, iss_storagedev, linux-nvme, linux-rdma, netdev,
e1000-devel, linux-driver, Solarflare linux maintainers,
VMware, Inc., linux-scsi
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
---
drivers/block/cciss.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index bf11540..0eea035 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -4081,7 +4081,7 @@ static void cciss_interrupt_mode(ctlr_info_t *h)
if (pci_find_capability(h->pdev, PCI_CAP_ID_MSIX)) {
err = pci_msix_table_size(h->pdev);
if (err < ARRAY_SIZE(cciss_msix_entries))
- goto default_int_mode;
+ goto single_msi_mode;
err = pci_enable_msix(h->pdev, cciss_msix_entries,
ARRAY_SIZE(cciss_msix_entries));
if (!err) {
@@ -4093,8 +4093,8 @@ static void cciss_interrupt_mode(ctlr_info_t *h)
return;
}
dev_warn(&h->pdev->dev, "MSI-X init failed %d\n", err);
- goto default_int_mode;
}
+single_msi_mode:
if (pci_find_capability(h->pdev, PCI_CAP_ID_MSI)) {
if (!pci_enable_msi(h->pdev))
h->msi_vector = 1;
--
1.7.7.6
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH RFC 19/77] csiostor: Do not call pci_disable_msix() if pci_enable_msix() failed
[not found] <cover.1380703262.git.agordeev@redhat.com>
` (5 preceding siblings ...)
2013-10-02 10:48 ` [PATCH RFC 18/77] cciss: Fallback to single MSI mode in case MSI-X failed Alexander Gordeev
@ 2013-10-02 10:48 ` Alexander Gordeev
2013-10-02 10:48 ` [PATCH RFC 20/77] csiostor: Return -ENOSPC when not enough MSI-X vectors available Alexander Gordeev
` (28 subsequent siblings)
35 siblings, 0 replies; 49+ messages in thread
From: Alexander Gordeev @ 2013-10-02 10:48 UTC (permalink / raw)
To: linux-kernel
Cc: Alexander Gordeev, Bjorn Helgaas, Ralf Baechle, Michael Ellerman,
Benjamin Herrenschmidt, Martin Schwidefsky, Ingo Molnar,
Tejun Heo, Dan Williams, Andy King, Jon Mason, Matt Porter,
stable, linux-pci, linux-mips, linuxppc-dev, linux390, linux-s390,
x86, linux-ide, iss_storagedev, linux-nvme, linux-rdma, netdev,
e1000-devel, linux-driver, Solarflare linux maintainers,
VMware, Inc., linux-scsi
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
---
drivers/scsi/csiostor/csio_isr.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/csiostor/csio_isr.c b/drivers/scsi/csiostor/csio_isr.c
index 7ee9777..91ba91d 100644
--- a/drivers/scsi/csiostor/csio_isr.c
+++ b/drivers/scsi/csiostor/csio_isr.c
@@ -529,10 +529,8 @@ csio_enable_msix(struct csio_hw *hw)
csio_reduce_sqsets(hw, cnt - extra);
}
} else {
- if (rv > 0) {
- pci_disable_msix(hw->pdev);
+ if (rv > 0)
csio_info(hw, "Not using MSI-X, remainder:%d\n", rv);
- }
kfree(entries);
return -ENOMEM;
--
1.7.7.6
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH RFC 20/77] csiostor: Return -ENOSPC when not enough MSI-X vectors available
[not found] <cover.1380703262.git.agordeev@redhat.com>
` (6 preceding siblings ...)
2013-10-02 10:48 ` [PATCH RFC 19/77] csiostor: Do not call pci_disable_msix() if pci_enable_msix() failed Alexander Gordeev
@ 2013-10-02 10:48 ` Alexander Gordeev
2013-10-02 10:48 ` [PATCH RFC 22/77] cxgb3: Do not call pci_disable_msix() if pci_enable_msix() failed Alexander Gordeev
` (27 subsequent siblings)
35 siblings, 0 replies; 49+ messages in thread
From: Alexander Gordeev @ 2013-10-02 10:48 UTC (permalink / raw)
To: linux-kernel
Cc: Alexander Gordeev, Bjorn Helgaas, Ralf Baechle, Michael Ellerman,
Benjamin Herrenschmidt, Martin Schwidefsky, Ingo Molnar,
Tejun Heo, Dan Williams, Andy King, Jon Mason, Matt Porter,
stable, linux-pci, linux-mips, linuxppc-dev, linux390, linux-s390,
x86, linux-ide, iss_storagedev, linux-nvme, linux-rdma, netdev,
e1000-devel, linux-driver, Solarflare linux maintainers,
VMware, Inc., linux-scsi
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
---
drivers/scsi/csiostor/csio_isr.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/scsi/csiostor/csio_isr.c b/drivers/scsi/csiostor/csio_isr.c
index 91ba91d..abf20ab 100644
--- a/drivers/scsi/csiostor/csio_isr.c
+++ b/drivers/scsi/csiostor/csio_isr.c
@@ -533,7 +533,7 @@ csio_enable_msix(struct csio_hw *hw)
csio_info(hw, "Not using MSI-X, remainder:%d\n", rv);
kfree(entries);
- return -ENOMEM;
+ return -ENOSPC;
}
/* Save off vectors */
--
1.7.7.6
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH RFC 22/77] cxgb3: Do not call pci_disable_msix() if pci_enable_msix() failed
[not found] <cover.1380703262.git.agordeev@redhat.com>
` (7 preceding siblings ...)
2013-10-02 10:48 ` [PATCH RFC 20/77] csiostor: Return -ENOSPC when not enough MSI-X vectors available Alexander Gordeev
@ 2013-10-02 10:48 ` Alexander Gordeev
2013-10-02 10:48 ` [PATCH RFC 23/77] cxgb3: Return -ENOSPC when not enough MSI-X vectors available Alexander Gordeev
` (26 subsequent siblings)
35 siblings, 0 replies; 49+ messages in thread
From: Alexander Gordeev @ 2013-10-02 10:48 UTC (permalink / raw)
To: linux-kernel
Cc: Alexander Gordeev, Bjorn Helgaas, Ralf Baechle, Michael Ellerman,
Benjamin Herrenschmidt, Martin Schwidefsky, Ingo Molnar,
Tejun Heo, Dan Williams, Andy King, Jon Mason, Matt Porter,
stable, linux-pci, linux-mips, linuxppc-dev, linux390, linux-s390,
x86, linux-ide, iss_storagedev, linux-nvme, linux-rdma, netdev,
e1000-devel, linux-driver, Solarflare linux maintainers,
VMware, Inc., linux-scsi
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
---
drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c b/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c
index b650951..9bd3099 100644
--- a/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c
@@ -3097,9 +3097,6 @@ static int cxgb_enable_msix(struct adapter *adap)
while ((err = pci_enable_msix(adap->pdev, entries, vectors)) > 0)
vectors = err;
- if (err < 0)
- pci_disable_msix(adap->pdev);
-
if (!err && vectors < (adap->params.nports + 1)) {
pci_disable_msix(adap->pdev);
err = -1;
--
1.7.7.6
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH RFC 23/77] cxgb3: Return -ENOSPC when not enough MSI-X vectors available
[not found] <cover.1380703262.git.agordeev@redhat.com>
` (8 preceding siblings ...)
2013-10-02 10:48 ` [PATCH RFC 22/77] cxgb3: Do not call pci_disable_msix() if pci_enable_msix() failed Alexander Gordeev
@ 2013-10-02 10:48 ` Alexander Gordeev
2013-10-02 10:48 ` [PATCH RFC 25/77] cxgb4: " Alexander Gordeev
` (25 subsequent siblings)
35 siblings, 0 replies; 49+ messages in thread
From: Alexander Gordeev @ 2013-10-02 10:48 UTC (permalink / raw)
To: linux-kernel
Cc: Alexander Gordeev, Bjorn Helgaas, Ralf Baechle, Michael Ellerman,
Benjamin Herrenschmidt, Martin Schwidefsky, Ingo Molnar,
Tejun Heo, Dan Williams, Andy King, Jon Mason, Matt Porter,
stable, linux-pci, linux-mips, linuxppc-dev, linux390, linux-s390,
x86, linux-ide, iss_storagedev, linux-nvme, linux-rdma, netdev,
e1000-devel, linux-driver, Solarflare linux maintainers,
VMware, Inc., linux-scsi
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
---
drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c b/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c
index 9bd3099..915729c 100644
--- a/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c
@@ -3099,7 +3099,7 @@ static int cxgb_enable_msix(struct adapter *adap)
if (!err && vectors < (adap->params.nports + 1)) {
pci_disable_msix(adap->pdev);
- err = -1;
+ err = -ENOSPC;
}
if (!err) {
--
1.7.7.6
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH RFC 25/77] cxgb4: Return -ENOSPC when not enough MSI-X vectors available
[not found] <cover.1380703262.git.agordeev@redhat.com>
` (9 preceding siblings ...)
2013-10-02 10:48 ` [PATCH RFC 23/77] cxgb3: Return -ENOSPC when not enough MSI-X vectors available Alexander Gordeev
@ 2013-10-02 10:48 ` Alexander Gordeev
2013-10-02 10:48 ` [PATCH RFC 27/77] cxgb4vf: Do not call pci_disable_msix() if pci_enable_msix() failed Alexander Gordeev
` (24 subsequent siblings)
35 siblings, 0 replies; 49+ messages in thread
From: Alexander Gordeev @ 2013-10-02 10:48 UTC (permalink / raw)
To: linux-kernel
Cc: Alexander Gordeev, Bjorn Helgaas, Ralf Baechle, Michael Ellerman,
Benjamin Herrenschmidt, Martin Schwidefsky, Ingo Molnar,
Tejun Heo, Dan Williams, Andy King, Jon Mason, Matt Porter,
stable, linux-pci, linux-mips, linuxppc-dev, linux390, linux-s390,
x86, linux-ide, iss_storagedev, linux-nvme, linux-rdma, netdev,
e1000-devel, linux-driver, Solarflare linux maintainers,
VMware, Inc., linux-scsi
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
---
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
index c73cabd..9425bc6 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
@@ -5732,9 +5732,11 @@ static int enable_msix(struct adapter *adap)
}
for (i = 0; i < want; ++i)
adap->msix_info[i].vec = entries[i].vector;
- } else if (err > 0)
+ } else if (err > 0) {
dev_info(adap->pdev_dev,
"only %d MSI-X vectors left, not using MSI-X\n", err);
+ err = -ENOSPC;
+ }
return err;
}
--
1.7.7.6
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH RFC 27/77] cxgb4vf: Do not call pci_disable_msix() if pci_enable_msix() failed
[not found] <cover.1380703262.git.agordeev@redhat.com>
` (10 preceding siblings ...)
2013-10-02 10:48 ` [PATCH RFC 25/77] cxgb4: " Alexander Gordeev
@ 2013-10-02 10:48 ` Alexander Gordeev
2013-10-02 10:48 ` [PATCH RFC 28/77] cxgb4vf: Return -ENOSPC when not enough MSI-X vectors available Alexander Gordeev
` (23 subsequent siblings)
35 siblings, 0 replies; 49+ messages in thread
From: Alexander Gordeev @ 2013-10-02 10:48 UTC (permalink / raw)
To: linux-kernel
Cc: Alexander Gordeev, Bjorn Helgaas, Ralf Baechle, Michael Ellerman,
Benjamin Herrenschmidt, Martin Schwidefsky, Ingo Molnar,
Tejun Heo, Dan Williams, Andy King, Jon Mason, Matt Porter,
stable, linux-pci, linux-mips, linuxppc-dev, linux390, linux-s390,
x86, linux-ide, iss_storagedev, linux-nvme, linux-rdma, netdev,
e1000-devel, linux-driver, Solarflare linux maintainers,
VMware, Inc., linux-scsi
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
---
.../net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
index 40c22e7..87a82fc 100644
--- a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
@@ -2468,7 +2468,6 @@ static int enable_msix(struct adapter *adapter)
for (i = 0; i < want; ++i)
adapter->msix_info[i].vec = entries[i].vector;
} else if (err > 0) {
- pci_disable_msix(adapter->pdev);
dev_info(adapter->pdev_dev, "only %d MSI-X vectors left,"
" not using MSI-X\n", err);
}
--
1.7.7.6
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH RFC 28/77] cxgb4vf: Return -ENOSPC when not enough MSI-X vectors available
[not found] <cover.1380703262.git.agordeev@redhat.com>
` (11 preceding siblings ...)
2013-10-02 10:48 ` [PATCH RFC 27/77] cxgb4vf: Do not call pci_disable_msix() if pci_enable_msix() failed Alexander Gordeev
@ 2013-10-02 10:48 ` Alexander Gordeev
2013-10-02 10:48 ` [PATCH RFC 30/77] hpsa: Update a misleading comment on interrupt usage Alexander Gordeev
` (22 subsequent siblings)
35 siblings, 0 replies; 49+ messages in thread
From: Alexander Gordeev @ 2013-10-02 10:48 UTC (permalink / raw)
To: linux-kernel
Cc: Alexander Gordeev, Bjorn Helgaas, Ralf Baechle, Michael Ellerman,
Benjamin Herrenschmidt, Martin Schwidefsky, Ingo Molnar,
Tejun Heo, Dan Williams, Andy King, Jon Mason, Matt Porter,
stable, linux-pci, linux-mips, linuxppc-dev, linux390, linux-s390,
x86, linux-ide, iss_storagedev, linux-nvme, linux-rdma, netdev,
e1000-devel, linux-driver, Solarflare linux maintainers,
VMware, Inc., linux-scsi
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
---
.../net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
index 87a82fc..11cbce1 100644
--- a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
@@ -2470,6 +2470,7 @@ static int enable_msix(struct adapter *adapter)
} else if (err > 0) {
dev_info(adapter->pdev_dev, "only %d MSI-X vectors left,"
" not using MSI-X\n", err);
+ err = -ENOSPC;
}
return err;
}
--
1.7.7.6
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH RFC 30/77] hpsa: Update a misleading comment on interrupt usage
[not found] <cover.1380703262.git.agordeev@redhat.com>
` (12 preceding siblings ...)
2013-10-02 10:48 ` [PATCH RFC 28/77] cxgb4vf: Return -ENOSPC when not enough MSI-X vectors available Alexander Gordeev
@ 2013-10-02 10:48 ` Alexander Gordeev
2013-10-02 10:48 ` [PATCH RFC 32/77] hpsa: Fallback to single MSI mode in case MSI-X failed Alexander Gordeev
` (21 subsequent siblings)
35 siblings, 0 replies; 49+ messages in thread
From: Alexander Gordeev @ 2013-10-02 10:48 UTC (permalink / raw)
To: linux-kernel
Cc: Alexander Gordeev, Bjorn Helgaas, Ralf Baechle, Michael Ellerman,
Benjamin Herrenschmidt, Martin Schwidefsky, Ingo Molnar,
Tejun Heo, Dan Williams, Andy King, Jon Mason, Matt Porter,
stable, linux-pci, linux-mips, linuxppc-dev, linux390, linux-s390,
x86, linux-ide, iss_storagedev, linux-nvme, linux-rdma, netdev,
e1000-devel, linux-driver, Solarflare linux maintainers,
VMware, Inc., linux-scsi
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
---
drivers/scsi/hpsa.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 891c86b..393c8db 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -4141,7 +4141,11 @@ static void hpsa_interrupt_mode(struct ctlr_info *h)
}
default_int_mode:
#endif /* CONFIG_PCI_MSI */
- /* if we get here we're going to use the default interrupt mode */
+ /*
+ * If we get here we're going to use either the
+ * default interrupt mode or single MSI mode
+ */
+
h->intr[h->intr_mode] = h->pdev->irq;
}
--
1.7.7.6
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH RFC 32/77] hpsa: Fallback to single MSI mode in case MSI-X failed
[not found] <cover.1380703262.git.agordeev@redhat.com>
` (13 preceding siblings ...)
2013-10-02 10:48 ` [PATCH RFC 30/77] hpsa: Update a misleading comment on interrupt usage Alexander Gordeev
@ 2013-10-02 10:48 ` Alexander Gordeev
2013-10-02 10:48 ` [PATCH RFC 33/77] ioat: Disable MSI-X in case request of IRQ failed Alexander Gordeev
` (20 subsequent siblings)
35 siblings, 0 replies; 49+ messages in thread
From: Alexander Gordeev @ 2013-10-02 10:48 UTC (permalink / raw)
To: linux-kernel
Cc: Alexander Gordeev, Bjorn Helgaas, Ralf Baechle, Michael Ellerman,
Benjamin Herrenschmidt, Martin Schwidefsky, Ingo Molnar,
Tejun Heo, Dan Williams, Andy King, Jon Mason, Matt Porter,
stable, linux-pci, linux-mips, linuxppc-dev, linux390, linux-s390,
x86, linux-ide, iss_storagedev, linux-nvme, linux-rdma, netdev,
e1000-devel, linux-driver, Solarflare linux maintainers,
VMware, Inc., linux-scsi
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
---
drivers/scsi/hpsa.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index eb17b3d..252b65d 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -4112,7 +4112,7 @@ static void hpsa_interrupt_mode(struct ctlr_info *h)
err = pci_msix_table_size(h->pdev);
if (err < ARRAY_SIZE(hpsa_msix_entries))
- goto default_int_mode;
+ goto single_msi_mode;
for (i = 0; i < ARRAY_SIZE(hpsa_msix_entries); i++) {
hpsa_msix_entries[i].vector = 0;
@@ -4128,8 +4128,9 @@ static void hpsa_interrupt_mode(struct ctlr_info *h)
return;
}
dev_warn(&h->pdev->dev, "MSI-X init failed %d\n", err);
- goto default_int_mode;
+ goto single_msi_mode;
}
+single_msi_mode:
if (pci_find_capability(h->pdev, PCI_CAP_ID_MSI)) {
dev_info(&h->pdev->dev, "MSI\n");
if (!pci_enable_msi(h->pdev))
--
1.7.7.6
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH RFC 33/77] ioat: Disable MSI-X in case request of IRQ failed
[not found] <cover.1380703262.git.agordeev@redhat.com>
` (14 preceding siblings ...)
2013-10-02 10:48 ` [PATCH RFC 32/77] hpsa: Fallback to single MSI mode in case MSI-X failed Alexander Gordeev
@ 2013-10-02 10:48 ` Alexander Gordeev
2013-10-02 10:48 ` [PATCH RFC 35/77] ipr: Do not call pci_disable_msi/msix() if pci_enable_msi/msix() failed Alexander Gordeev
` (19 subsequent siblings)
35 siblings, 0 replies; 49+ messages in thread
From: Alexander Gordeev @ 2013-10-02 10:48 UTC (permalink / raw)
To: linux-kernel
Cc: Alexander Gordeev, Bjorn Helgaas, Ralf Baechle, Michael Ellerman,
Benjamin Herrenschmidt, Martin Schwidefsky, Ingo Molnar,
Tejun Heo, Dan Williams, Andy King, Jon Mason, Matt Porter,
stable, linux-pci, linux-mips, linuxppc-dev, linux390, linux-s390,
x86, linux-ide, iss_storagedev, linux-nvme, linux-rdma, netdev,
e1000-devel, linux-driver, Solarflare linux maintainers,
VMware, Inc., linux-scsi
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
---
drivers/dma/ioat/dma.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/dma/ioat/dma.c b/drivers/dma/ioat/dma.c
index 5ff6fc1..acee3b2 100644
--- a/drivers/dma/ioat/dma.c
+++ b/drivers/dma/ioat/dma.c
@@ -937,6 +937,7 @@ msix:
chan = ioat_chan_by_index(device, j);
devm_free_irq(dev, msix->vector, chan);
}
+ pci_disable_msix(pdev);
goto msix_single_vector;
}
}
--
1.7.7.6
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH RFC 35/77] ipr: Do not call pci_disable_msi/msix() if pci_enable_msi/msix() failed
[not found] <cover.1380703262.git.agordeev@redhat.com>
` (15 preceding siblings ...)
2013-10-02 10:48 ` [PATCH RFC 33/77] ioat: Disable MSI-X in case request of IRQ failed Alexander Gordeev
@ 2013-10-02 10:48 ` Alexander Gordeev
2013-10-02 10:48 ` [PATCH RFC 36/77] ipr: Enable MSI-X when IPR_USE_MSIX type is set, not IPR_USE_MSI Alexander Gordeev
` (18 subsequent siblings)
35 siblings, 0 replies; 49+ messages in thread
From: Alexander Gordeev @ 2013-10-02 10:48 UTC (permalink / raw)
To: linux-kernel
Cc: Alexander Gordeev, Bjorn Helgaas, Ralf Baechle, Michael Ellerman,
Benjamin Herrenschmidt, Martin Schwidefsky, Ingo Molnar,
Tejun Heo, Dan Williams, Andy King, Jon Mason, Matt Porter,
stable, linux-pci, linux-mips, linuxppc-dev, linux390, linux-s390,
x86, linux-ide, iss_storagedev, linux-nvme, linux-rdma, netdev,
e1000-devel, linux-driver, Solarflare linux maintainers,
VMware, Inc., linux-scsi
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
---
drivers/scsi/ipr.c | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
index 36ac1c3..fb57e21 100644
--- a/drivers/scsi/ipr.c
+++ b/drivers/scsi/ipr.c
@@ -9255,10 +9255,8 @@ static int ipr_enable_msix(struct ipr_ioa_cfg *ioa_cfg)
while ((err = pci_enable_msix(ioa_cfg->pdev, entries, vectors)) > 0)
vectors = err;
- if (err < 0) {
- pci_disable_msix(ioa_cfg->pdev);
+ if (err < 0)
return err;
- }
if (!err) {
for (i = 0; i < vectors; i++)
@@ -9278,10 +9276,8 @@ static int ipr_enable_msi(struct ipr_ioa_cfg *ioa_cfg)
while ((err = pci_enable_msi_block(ioa_cfg->pdev, vectors)) > 0)
vectors = err;
- if (err < 0) {
- pci_disable_msi(ioa_cfg->pdev);
+ if (err < 0)
return err;
- }
if (!err) {
for (i = 0; i < vectors; i++)
--
1.7.7.6
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH RFC 36/77] ipr: Enable MSI-X when IPR_USE_MSIX type is set, not IPR_USE_MSI
[not found] <cover.1380703262.git.agordeev@redhat.com>
` (16 preceding siblings ...)
2013-10-02 10:48 ` [PATCH RFC 35/77] ipr: Do not call pci_disable_msi/msix() if pci_enable_msi/msix() failed Alexander Gordeev
@ 2013-10-02 10:48 ` Alexander Gordeev
2013-10-02 19:31 ` Brian King
2013-10-02 10:48 ` [PATCH RFC 39/77] ixgbevf: Return -ENOSPC when not enough MSI-X vectors available Alexander Gordeev
` (17 subsequent siblings)
35 siblings, 1 reply; 49+ messages in thread
From: Alexander Gordeev @ 2013-10-02 10:48 UTC (permalink / raw)
To: linux-kernel
Cc: Alexander Gordeev, Bjorn Helgaas, Ralf Baechle, Michael Ellerman,
Benjamin Herrenschmidt, Martin Schwidefsky, Ingo Molnar,
Tejun Heo, Dan Williams, Andy King, Jon Mason, Matt Porter,
stable, linux-pci, linux-mips, linuxppc-dev, linux390, linux-s390,
x86, linux-ide, iss_storagedev, linux-nvme, linux-rdma, netdev,
e1000-devel, linux-driver, Solarflare linux maintainers,
VMware, Inc., linux-scsi
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
---
drivers/scsi/ipr.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
index fb57e21..762a93e 100644
--- a/drivers/scsi/ipr.c
+++ b/drivers/scsi/ipr.c
@@ -9527,7 +9527,7 @@ static int ipr_probe_ioa(struct pci_dev *pdev,
ipr_number_of_msix = IPR_MAX_MSIX_VECTORS;
}
- if (ioa_cfg->ipr_chip->intr_type == IPR_USE_MSI &&
+ if (ioa_cfg->ipr_chip->intr_type == IPR_USE_MSIX &&
ipr_enable_msix(ioa_cfg) == 0)
ioa_cfg->intr_flag = IPR_USE_MSIX;
else if (ioa_cfg->ipr_chip->intr_type == IPR_USE_MSI &&
--
1.7.7.6
^ permalink raw reply related [flat|nested] 49+ messages in thread* Re: [PATCH RFC 36/77] ipr: Enable MSI-X when IPR_USE_MSIX type is set, not IPR_USE_MSI
2013-10-02 10:48 ` [PATCH RFC 36/77] ipr: Enable MSI-X when IPR_USE_MSIX type is set, not IPR_USE_MSI Alexander Gordeev
@ 2013-10-02 19:31 ` Brian King
0 siblings, 0 replies; 49+ messages in thread
From: Brian King @ 2013-10-02 19:31 UTC (permalink / raw)
To: Alexander Gordeev
Cc: linux-kernel, linux-mips, VMware, Inc., linux-nvme, linux-ide,
stable, linux-s390, Andy King, linux-scsi, linux-rdma, x86,
linux-pci, iss_storagedev, linux-driver, Tejun Heo, Bjorn Helgaas,
Dan Williams, Jon Mason, Ingo Molnar,
Solarflare linux maintainers, netdev, Ralf Baechle, e1000-devel,
Martin Schwidefsky, linux390, linuxppc-dev, Wendy Xiong
On 10/02/2013 05:48 AM, Alexander Gordeev wrote:
> Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
> ---
> drivers/scsi/ipr.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
> index fb57e21..762a93e 100644
> --- a/drivers/scsi/ipr.c
> +++ b/drivers/scsi/ipr.c
> @@ -9527,7 +9527,7 @@ static int ipr_probe_ioa(struct pci_dev *pdev,
> ipr_number_of_msix = IPR_MAX_MSIX_VECTORS;
> }
>
> - if (ioa_cfg->ipr_chip->intr_type == IPR_USE_MSI &&
> + if (ioa_cfg->ipr_chip->intr_type == IPR_USE_MSIX &&
> ipr_enable_msix(ioa_cfg) == 0)
> ioa_cfg->intr_flag = IPR_USE_MSIX;
> else if (ioa_cfg->ipr_chip->intr_type == IPR_USE_MSI &&
>
Nack. ioa_cfg->ipr_chip->intr_type gets initialized from the ipr_chip table
at the top of the driver which never sets intr_type to IPR_USE_MSIX, so this
will break MSI-X support for ipr.
We indicate at the chip level only whether we want to force LSI or whether
we want to enable MSI / MSI-X and then try enabling MSI-X and fall back to
MSI if MSI-X is not available or does not work. We then set intr_flag to indicate
what we are actually using on the specific adapter.
Thanks,
Brian
--
Brian King
Power Linux I/O
IBM Linux Technology Center
^ permalink raw reply [flat|nested] 49+ messages in thread
* [PATCH RFC 39/77] ixgbevf: Return -ENOSPC when not enough MSI-X vectors available
[not found] <cover.1380703262.git.agordeev@redhat.com>
` (17 preceding siblings ...)
2013-10-02 10:48 ` [PATCH RFC 36/77] ipr: Enable MSI-X when IPR_USE_MSIX type is set, not IPR_USE_MSI Alexander Gordeev
@ 2013-10-02 10:48 ` Alexander Gordeev
2013-10-02 10:48 ` [PATCH RFC 41/77] lpfc: Do not call pci_disable_msix() if pci_enable_msix() failed Alexander Gordeev
` (16 subsequent siblings)
35 siblings, 0 replies; 49+ messages in thread
From: Alexander Gordeev @ 2013-10-02 10:48 UTC (permalink / raw)
To: linux-kernel
Cc: Alexander Gordeev, Bjorn Helgaas, Ralf Baechle, Michael Ellerman,
Benjamin Herrenschmidt, Martin Schwidefsky, Ingo Molnar,
Tejun Heo, Dan Williams, Andy King, Jon Mason, Matt Porter,
stable, linux-pci, linux-mips, linuxppc-dev, linux390, linux-s390,
x86, linux-ide, iss_storagedev, linux-nvme, linux-rdma, netdev,
e1000-devel, linux-driver, Solarflare linux maintainers,
VMware, Inc., linux-scsi
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
---
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
index 59a62bb..fa0537a 100644
--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
@@ -1773,7 +1773,7 @@ static int ixgbevf_acquire_msix_vectors(struct ixgbevf_adapter *adapter,
}
if (vectors < vector_threshold)
- err = -ENOMEM;
+ err = -ENOSPC;
if (err) {
dev_err(&adapter->pdev->dev,
--
1.7.7.6
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH RFC 41/77] lpfc: Do not call pci_disable_msix() if pci_enable_msix() failed
[not found] <cover.1380703262.git.agordeev@redhat.com>
` (18 preceding siblings ...)
2013-10-02 10:48 ` [PATCH RFC 39/77] ixgbevf: Return -ENOSPC when not enough MSI-X vectors available Alexander Gordeev
@ 2013-10-02 10:48 ` Alexander Gordeev
2013-10-02 10:48 ` [PATCH RFC 43/77] lpfc: Return -ENOSPC when not enough MSI-X vectors available Alexander Gordeev
` (15 subsequent siblings)
35 siblings, 0 replies; 49+ messages in thread
From: Alexander Gordeev @ 2013-10-02 10:48 UTC (permalink / raw)
To: linux-kernel
Cc: Alexander Gordeev, Bjorn Helgaas, Ralf Baechle, Michael Ellerman,
Benjamin Herrenschmidt, Martin Schwidefsky, Ingo Molnar,
Tejun Heo, Dan Williams, Andy King, Jon Mason, Matt Porter,
stable, linux-pci, linux-mips, linuxppc-dev, linux390, linux-s390,
x86, linux-ide, iss_storagedev, linux-nvme, linux-rdma, netdev,
e1000-devel, linux-driver, Solarflare linux maintainers,
VMware, Inc., linux-scsi
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
---
drivers/scsi/lpfc/lpfc_init.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 647f5bf..0803b84 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -8080,7 +8080,7 @@ lpfc_sli_enable_msix(struct lpfc_hba *phba)
if (rc) {
lpfc_printf_log(phba, KERN_INFO, LOG_INIT,
"0420 PCI enable MSI-X failed (%d)\n", rc);
- goto msi_fail_out;
+ goto vec_fail_out;
}
for (i = 0; i < LPFC_MSIX_VECTORS; i++)
lpfc_printf_log(phba, KERN_INFO, LOG_INIT,
@@ -8158,6 +8158,8 @@ irq_fail_out:
msi_fail_out:
/* Unconfigure MSI-X capability structure */
pci_disable_msix(phba->pcidev);
+
+vec_fail_out:
return rc;
}
@@ -8646,7 +8648,7 @@ enable_msix_vectors:
} else if (rc) {
lpfc_printf_log(phba, KERN_INFO, LOG_INIT,
"0484 PCI enable MSI-X failed (%d)\n", rc);
- goto msi_fail_out;
+ goto vec_fail_out;
}
/* Log MSI-X vector assignment */
@@ -8698,9 +8700,10 @@ cfg_fail_out:
&phba->sli4_hba.fcp_eq_hdl[index]);
}
-msi_fail_out:
/* Unconfigure MSI-X capability structure */
pci_disable_msix(phba->pcidev);
+
+vec_fail_out:
return rc;
}
--
1.7.7.6
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH RFC 43/77] lpfc: Return -ENOSPC when not enough MSI-X vectors available
[not found] <cover.1380703262.git.agordeev@redhat.com>
` (19 preceding siblings ...)
2013-10-02 10:48 ` [PATCH RFC 41/77] lpfc: Do not call pci_disable_msix() if pci_enable_msix() failed Alexander Gordeev
@ 2013-10-02 10:48 ` Alexander Gordeev
2013-10-02 10:49 ` [PATCH RFC 44/77] lpfc: Make MSI-X initialization routine more readable Alexander Gordeev
` (14 subsequent siblings)
35 siblings, 0 replies; 49+ messages in thread
From: Alexander Gordeev @ 2013-10-02 10:48 UTC (permalink / raw)
To: linux-kernel
Cc: Alexander Gordeev, Bjorn Helgaas, Ralf Baechle, Michael Ellerman,
Benjamin Herrenschmidt, Martin Schwidefsky, Ingo Molnar,
Tejun Heo, Dan Williams, Andy King, Jon Mason, Matt Porter,
stable, linux-pci, linux-mips, linuxppc-dev, linux390, linux-s390,
x86, linux-ide, iss_storagedev, linux-nvme, linux-rdma, netdev,
e1000-devel, linux-driver, Solarflare linux maintainers,
VMware, Inc., linux-scsi
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
---
drivers/scsi/lpfc/lpfc_init.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index d83a1a3..0ec8008 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -8645,9 +8645,13 @@ lpfc_sli4_enable_msix(struct lpfc_hba *phba)
goto msg_fail_out;
vectors = min(vectors, rc);
- if (vectors > 1)
- rc = pci_enable_msix(phba->pcidev, phba->sli4_hba.msix_entries,
- vectors);
+ if (vectors < 2) {
+ rc = -ENOSPC;
+ goto msg_fail_out;
+ }
+
+ rc = pci_enable_msix(phba->pcidev, phba->sli4_hba.msix_entries,
+ vectors);
if (rc) {
msg_fail_out:
lpfc_printf_log(phba, KERN_INFO, LOG_INIT,
--
1.7.7.6
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH RFC 44/77] lpfc: Make MSI-X initialization routine more readable
[not found] <cover.1380703262.git.agordeev@redhat.com>
` (20 preceding siblings ...)
2013-10-02 10:48 ` [PATCH RFC 43/77] lpfc: Return -ENOSPC when not enough MSI-X vectors available Alexander Gordeev
@ 2013-10-02 10:49 ` Alexander Gordeev
2013-10-02 10:49 ` [PATCH RFC 47/77] mlx5: Fix memory leak in case not enough MSI-X vectors available Alexander Gordeev
` (13 subsequent siblings)
35 siblings, 0 replies; 49+ messages in thread
From: Alexander Gordeev @ 2013-10-02 10:49 UTC (permalink / raw)
To: linux-kernel
Cc: Alexander Gordeev, Bjorn Helgaas, Ralf Baechle, Michael Ellerman,
Benjamin Herrenschmidt, Martin Schwidefsky, Ingo Molnar,
Tejun Heo, Dan Williams, Andy King, Jon Mason, Matt Porter,
stable, linux-pci, linux-mips, linuxppc-dev, linux390, linux-s390,
x86, linux-ide, iss_storagedev, linux-nvme, linux-rdma, netdev,
e1000-devel, linux-driver, Solarflare linux maintainers,
VMware, Inc., linux-scsi
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
---
drivers/scsi/lpfc/lpfc_init.c | 23 +++++++++++------------
1 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 0ec8008..0cfaf20 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -8633,10 +8633,6 @@ lpfc_sli4_enable_msix(struct lpfc_hba *phba)
{
int vectors, rc, index;
- /* Set up MSI-X multi-message vectors */
- for (index = 0; index < phba->cfg_fcp_io_channel; index++)
- phba->sli4_hba.msix_entries[index].entry = index;
-
/* Configure MSI-X capability structure */
vectors = phba->cfg_fcp_io_channel;
@@ -8650,14 +8646,14 @@ lpfc_sli4_enable_msix(struct lpfc_hba *phba)
goto msg_fail_out;
}
+ /* Set up MSI-X multi-message vectors */
+ for (index = 0; index < vectors; index++)
+ phba->sli4_hba.msix_entries[index].entry = index;
+
rc = pci_enable_msix(phba->pcidev, phba->sli4_hba.msix_entries,
vectors);
- if (rc) {
-msg_fail_out:
- lpfc_printf_log(phba, KERN_INFO, LOG_INIT,
- "0484 PCI enable MSI-X failed (%d)\n", rc);
- goto vec_fail_out;
- }
+ if (rc)
+ goto msg_fail_out;
/* Log MSI-X vector assignment */
for (index = 0; index < vectors; index++)
@@ -8697,7 +8693,7 @@ msg_fail_out:
}
lpfc_sli4_set_affinity(phba, vectors);
- return rc;
+ return 0;
cfg_fail_out:
/* free the irq already requested */
@@ -8710,8 +8706,11 @@ cfg_fail_out:
/* Unconfigure MSI-X capability structure */
pci_disable_msix(phba->pcidev);
+ return rc;
-vec_fail_out:
+msg_fail_out:
+ lpfc_printf_log(phba, KERN_INFO, LOG_INIT,
+ "0484 PCI enable MSI-X failed (%d)\n", rc);
return rc;
}
--
1.7.7.6
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH RFC 47/77] mlx5: Fix memory leak in case not enough MSI-X vectors available
[not found] <cover.1380703262.git.agordeev@redhat.com>
` (21 preceding siblings ...)
2013-10-02 10:49 ` [PATCH RFC 44/77] lpfc: Make MSI-X initialization routine more readable Alexander Gordeev
@ 2013-10-02 10:49 ` Alexander Gordeev
2013-10-02 10:49 ` [PATCH RFC 48/77] mlx5: Return -ENOSPC when " Alexander Gordeev
` (12 subsequent siblings)
35 siblings, 0 replies; 49+ messages in thread
From: Alexander Gordeev @ 2013-10-02 10:49 UTC (permalink / raw)
To: linux-kernel
Cc: Alexander Gordeev, Bjorn Helgaas, Ralf Baechle, Michael Ellerman,
Benjamin Herrenschmidt, Martin Schwidefsky, Ingo Molnar,
Tejun Heo, Dan Williams, Andy King, Jon Mason, Matt Porter,
stable, linux-pci, linux-mips, linuxppc-dev, linux390, linux-s390,
x86, linux-ide, iss_storagedev, linux-nvme, linux-rdma, netdev,
e1000-devel, linux-driver, Solarflare linux maintainers,
VMware, Inc., linux-scsi
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
---
drivers/net/ethernet/mellanox/mlx5/core/main.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/main.c b/drivers/net/ethernet/mellanox/mlx5/core/main.c
index b47739b..3573ba4 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c
@@ -142,6 +142,7 @@ retry:
}
mlx5_core_dbg(dev, "received %d MSI vectors out of %d requested\n", err, nvec);
+ kfree(table->msix_arr);
return 0;
}
--
1.7.7.6
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH RFC 48/77] mlx5: Return -ENOSPC when not enough MSI-X vectors available
[not found] <cover.1380703262.git.agordeev@redhat.com>
` (22 preceding siblings ...)
2013-10-02 10:49 ` [PATCH RFC 47/77] mlx5: Fix memory leak in case not enough MSI-X vectors available Alexander Gordeev
@ 2013-10-02 10:49 ` Alexander Gordeev
2013-10-02 10:49 ` [PATCH RFC 49/77] mlx5: Fix minimum number of MSI-Xs Alexander Gordeev
` (11 subsequent siblings)
35 siblings, 0 replies; 49+ messages in thread
From: Alexander Gordeev @ 2013-10-02 10:49 UTC (permalink / raw)
To: linux-kernel
Cc: Alexander Gordeev, Bjorn Helgaas, Ralf Baechle, Michael Ellerman,
Benjamin Herrenschmidt, Martin Schwidefsky, Ingo Molnar,
Tejun Heo, Dan Williams, Andy King, Jon Mason, Matt Porter,
stable, linux-pci, linux-mips, linuxppc-dev, linux390, linux-s390,
x86, linux-ide, iss_storagedev, linux-nvme, linux-rdma, netdev,
e1000-devel, linux-driver, Solarflare linux maintainers,
VMware, Inc., linux-scsi
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
---
drivers/net/ethernet/mellanox/mlx5/core/main.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/main.c b/drivers/net/ethernet/mellanox/mlx5/core/main.c
index 3573ba4..5e5c9a3 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c
@@ -122,7 +122,7 @@ static int mlx5_enable_msix(struct mlx5_core_dev *dev)
nvec = dev->caps.num_ports * num_online_cpus() + MLX5_EQ_VEC_COMP_BASE;
nvec = min_t(int, nvec, num_eqs);
if (nvec <= MLX5_EQ_VEC_COMP_BASE)
- return -ENOMEM;
+ return -ENOSPC;
table->msix_arr = kzalloc(nvec * sizeof(*table->msix_arr), GFP_KERNEL);
if (!table->msix_arr)
@@ -144,7 +144,7 @@ retry:
mlx5_core_dbg(dev, "received %d MSI vectors out of %d requested\n", err, nvec);
kfree(table->msix_arr);
- return 0;
+ return -ENOSPC;
}
static void mlx5_disable_msix(struct mlx5_core_dev *dev)
--
1.7.7.6
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH RFC 49/77] mlx5: Fix minimum number of MSI-Xs
[not found] <cover.1380703262.git.agordeev@redhat.com>
` (23 preceding siblings ...)
2013-10-02 10:49 ` [PATCH RFC 48/77] mlx5: Return -ENOSPC when " Alexander Gordeev
@ 2013-10-02 10:49 ` Alexander Gordeev
2013-10-02 10:49 ` [PATCH RFC 53/77] ntb: Fix missed call to pci_enable_msix() Alexander Gordeev
` (10 subsequent siblings)
35 siblings, 0 replies; 49+ messages in thread
From: Alexander Gordeev @ 2013-10-02 10:49 UTC (permalink / raw)
To: linux-kernel
Cc: Alexander Gordeev, Bjorn Helgaas, Ralf Baechle, Michael Ellerman,
Benjamin Herrenschmidt, Martin Schwidefsky, Ingo Molnar,
Tejun Heo, Dan Williams, Andy King, Jon Mason, Matt Porter,
stable, linux-pci, linux-mips, linuxppc-dev, linux390, linux-s390,
x86, linux-ide, iss_storagedev, linux-nvme, linux-rdma, netdev,
e1000-devel, linux-driver, Solarflare linux maintainers,
VMware, Inc., linux-scsi
The minimum number of MSI-Xs is (MLX5_EQ_VEC_COMP_BASE + 1) in
one check and 2 in another check. Make the checks consistent and
assume the minimum number is (MLX5_EQ_VEC_COMP_BASE + 1).
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
---
drivers/net/ethernet/mellanox/mlx5/core/main.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/main.c b/drivers/net/ethernet/mellanox/mlx5/core/main.c
index 5e5c9a3..adf0e5d 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c
@@ -136,7 +136,7 @@ retry:
err = pci_enable_msix(dev->pdev, table->msix_arr, nvec);
if (err <= 0) {
return err;
- } else if (err > 2) {
+ } else if (err > MLX5_EQ_VEC_COMP_BASE) {
nvec = err;
goto retry;
}
--
1.7.7.6
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH RFC 53/77] ntb: Fix missed call to pci_enable_msix()
[not found] <cover.1380703262.git.agordeev@redhat.com>
` (24 preceding siblings ...)
2013-10-02 10:49 ` [PATCH RFC 49/77] mlx5: Fix minimum number of MSI-Xs Alexander Gordeev
@ 2013-10-02 10:49 ` Alexander Gordeev
2013-10-03 0:49 ` Jon Mason
2013-10-02 10:49 ` [PATCH RFC 54/77] ntb: Ensure number of MSIs on SNB is enough for the link interrupt Alexander Gordeev
` (9 subsequent siblings)
35 siblings, 1 reply; 49+ messages in thread
From: Alexander Gordeev @ 2013-10-02 10:49 UTC (permalink / raw)
To: linux-kernel
Cc: Alexander Gordeev, Bjorn Helgaas, Ralf Baechle, Michael Ellerman,
Benjamin Herrenschmidt, Martin Schwidefsky, Ingo Molnar,
Tejun Heo, Dan Williams, Andy King, Jon Mason, Matt Porter,
stable, linux-pci, linux-mips, linuxppc-dev, linux390, linux-s390,
x86, linux-ide, iss_storagedev, linux-nvme, linux-rdma, netdev,
e1000-devel, linux-driver, Solarflare linux maintainers,
VMware, Inc., linux-scsi
Current MSI-X enablement code assumes MSI-Xs were successfully
allocated in case less than requested vectors were available.
That assumption is wrong, since MSI-Xs should be enabled with
a repeated call to pci_enable_msix(). This update fixes this.
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
---
drivers/ntb/ntb_hw.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/drivers/ntb/ntb_hw.c b/drivers/ntb/ntb_hw.c
index 1cb6e51..de2062c 100644
--- a/drivers/ntb/ntb_hw.c
+++ b/drivers/ntb/ntb_hw.c
@@ -1075,6 +1075,10 @@ static int ntb_setup_msix(struct ntb_device *ndev)
"Only %d MSI-X vectors. Limiting the number of queues to that number.\n",
rc);
msix_entries = rc;
+
+ rc = pci_enable_msix(pdev, ndev->msix_entries, msix_entries);
+ if (rc)
+ goto err1;
}
for (i = 0; i < msix_entries; i++) {
--
1.7.7.6
^ permalink raw reply related [flat|nested] 49+ messages in thread* Re: [PATCH RFC 53/77] ntb: Fix missed call to pci_enable_msix()
2013-10-02 10:49 ` [PATCH RFC 53/77] ntb: Fix missed call to pci_enable_msix() Alexander Gordeev
@ 2013-10-03 0:49 ` Jon Mason
0 siblings, 0 replies; 49+ messages in thread
From: Jon Mason @ 2013-10-03 0:49 UTC (permalink / raw)
To: Alexander Gordeev
Cc: linux-kernel, Bjorn Helgaas, Ralf Baechle, Michael Ellerman,
Benjamin Herrenschmidt, Martin Schwidefsky, Ingo Molnar,
Tejun Heo, Dan Williams, Andy King, Matt Porter, stable,
linux-pci, linux-mips, linuxppc-dev, linux390, linux-s390, x86,
linux-ide, iss_storagedev, linux-nvme, linux-rdma, netdev,
e1000-devel, linux-driver, Solarflare linux maintainers,
VMware, Inc., linux-scsi
On Wed, Oct 02, 2013 at 12:49:09PM +0200, Alexander Gordeev wrote:
> Current MSI-X enablement code assumes MSI-Xs were successfully
> allocated in case less than requested vectors were available.
> That assumption is wrong, since MSI-Xs should be enabled with
> a repeated call to pci_enable_msix(). This update fixes this.
Good catch, I'll pull it in for my next NTB release.
Thanks,
Jon
>
> Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
> ---
> drivers/ntb/ntb_hw.c | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/ntb/ntb_hw.c b/drivers/ntb/ntb_hw.c
> index 1cb6e51..de2062c 100644
> --- a/drivers/ntb/ntb_hw.c
> +++ b/drivers/ntb/ntb_hw.c
> @@ -1075,6 +1075,10 @@ static int ntb_setup_msix(struct ntb_device *ndev)
> "Only %d MSI-X vectors. Limiting the number of queues to that number.\n",
> rc);
> msix_entries = rc;
> +
> + rc = pci_enable_msix(pdev, ndev->msix_entries, msix_entries);
> + if (rc)
> + goto err1;
> }
>
> for (i = 0; i < msix_entries; i++) {
> --
> 1.7.7.6
>
^ permalink raw reply [flat|nested] 49+ messages in thread
* [PATCH RFC 54/77] ntb: Ensure number of MSIs on SNB is enough for the link interrupt
[not found] <cover.1380703262.git.agordeev@redhat.com>
` (25 preceding siblings ...)
2013-10-02 10:49 ` [PATCH RFC 53/77] ntb: Fix missed call to pci_enable_msix() Alexander Gordeev
@ 2013-10-02 10:49 ` Alexander Gordeev
2013-10-03 0:48 ` Jon Mason
2013-10-02 10:49 ` [PATCH RFC 60/77] qlcnic: Return -ENOSPC when not enough MSI-X vectors available Alexander Gordeev
` (8 subsequent siblings)
35 siblings, 1 reply; 49+ messages in thread
From: Alexander Gordeev @ 2013-10-02 10:49 UTC (permalink / raw)
To: linux-kernel
Cc: Alexander Gordeev, Bjorn Helgaas, Ralf Baechle, Michael Ellerman,
Benjamin Herrenschmidt, Martin Schwidefsky, Ingo Molnar,
Tejun Heo, Dan Williams, Andy King, Jon Mason, Matt Porter,
stable, linux-pci, linux-mips, linuxppc-dev, linux390, linux-s390,
x86, linux-ide, iss_storagedev, linux-nvme, linux-rdma, netdev,
e1000-devel, linux-driver, Solarflare linux maintainers,
VMware, Inc., linux-scsi
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
---
drivers/ntb/ntb_hw.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/ntb/ntb_hw.c b/drivers/ntb/ntb_hw.c
index de2062c..eccd5e5 100644
--- a/drivers/ntb/ntb_hw.c
+++ b/drivers/ntb/ntb_hw.c
@@ -1066,7 +1066,7 @@ static int ntb_setup_msix(struct ntb_device *ndev)
/* On SNB, the link interrupt is always tied to 4th vector. If
* we can't get all 4, then we can't use MSI-X.
*/
- if (ndev->hw_type != BWD_HW) {
+ if ((rc < SNB_MSIX_CNT) && (ndev->hw_type != BWD_HW)) {
rc = -EIO;
goto err1;
}
--
1.7.7.6
^ permalink raw reply related [flat|nested] 49+ messages in thread* Re: [PATCH RFC 54/77] ntb: Ensure number of MSIs on SNB is enough for the link interrupt
2013-10-02 10:49 ` [PATCH RFC 54/77] ntb: Ensure number of MSIs on SNB is enough for the link interrupt Alexander Gordeev
@ 2013-10-03 0:48 ` Jon Mason
2013-10-05 21:43 ` Alexander Gordeev
0 siblings, 1 reply; 49+ messages in thread
From: Jon Mason @ 2013-10-03 0:48 UTC (permalink / raw)
To: Alexander Gordeev
Cc: linux-kernel, Bjorn Helgaas, Ralf Baechle, Michael Ellerman,
Benjamin Herrenschmidt, Martin Schwidefsky, Ingo Molnar,
Tejun Heo, Dan Williams, Andy King, Matt Porter, stable,
linux-pci, linux-mips, linuxppc-dev, linux390, linux-s390, x86,
linux-ide, iss_storagedev, linux-nvme, linux-rdma, netdev,
e1000-devel, linux-driver, Solarflare linux maintainers,
VMware, Inc., linux-scsi
On Wed, Oct 02, 2013 at 12:49:10PM +0200, Alexander Gordeev wrote:
> Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
> ---
> drivers/ntb/ntb_hw.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/ntb/ntb_hw.c b/drivers/ntb/ntb_hw.c
> index de2062c..eccd5e5 100644
> --- a/drivers/ntb/ntb_hw.c
> +++ b/drivers/ntb/ntb_hw.c
> @@ -1066,7 +1066,7 @@ static int ntb_setup_msix(struct ntb_device *ndev)
> /* On SNB, the link interrupt is always tied to 4th vector. If
> * we can't get all 4, then we can't use MSI-X.
> */
> - if (ndev->hw_type != BWD_HW) {
> + if ((rc < SNB_MSIX_CNT) && (ndev->hw_type != BWD_HW)) {
Nack, this check is unnecessary.
Also, no comment in the commit on why it could be necessary.
> rc = -EIO;
> goto err1;
> }
> --
> 1.7.7.6
>
^ permalink raw reply [flat|nested] 49+ messages in thread* Re: [PATCH RFC 54/77] ntb: Ensure number of MSIs on SNB is enough for the link interrupt
2013-10-03 0:48 ` Jon Mason
@ 2013-10-05 21:43 ` Alexander Gordeev
2013-10-07 16:50 ` Jon Mason
0 siblings, 1 reply; 49+ messages in thread
From: Alexander Gordeev @ 2013-10-05 21:43 UTC (permalink / raw)
To: Jon Mason
Cc: linux-kernel, Bjorn Helgaas, Ralf Baechle, Michael Ellerman,
Benjamin Herrenschmidt, Martin Schwidefsky, Ingo Molnar,
Tejun Heo, Dan Williams, Andy King, Matt Porter, stable,
linux-pci, linux-mips, linuxppc-dev, linux390, linux-s390, x86,
linux-ide, iss_storagedev, linux-nvme, linux-rdma, netdev,
e1000-devel, linux-driver, Solarflare linux maintainers,
VMware, Inc., linux-scsi
On Wed, Oct 02, 2013 at 05:48:05PM -0700, Jon Mason wrote:
> On Wed, Oct 02, 2013 at 12:49:10PM +0200, Alexander Gordeev wrote:
> > Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
> > ---
> > drivers/ntb/ntb_hw.c | 2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/ntb/ntb_hw.c b/drivers/ntb/ntb_hw.c
> > index de2062c..eccd5e5 100644
> > --- a/drivers/ntb/ntb_hw.c
> > +++ b/drivers/ntb/ntb_hw.c
> > @@ -1066,7 +1066,7 @@ static int ntb_setup_msix(struct ntb_device *ndev)
> > /* On SNB, the link interrupt is always tied to 4th vector. If
> > * we can't get all 4, then we can't use MSI-X.
> > */
> > - if (ndev->hw_type != BWD_HW) {
> > + if ((rc < SNB_MSIX_CNT) && (ndev->hw_type != BWD_HW)) {
>
> Nack, this check is unnecessary.
If SNB can do more than SNB_MSIX_CNT MSI-Xs then this check is needed
to enable less than maximum MSI-Xs in case the maximum was not allocated.
Otherwise SNB will fallback to single MSI instead of multiple MSI-Xs.
--
Regards,
Alexander Gordeev
agordeev@redhat.com
^ permalink raw reply [flat|nested] 49+ messages in thread* Re: [PATCH RFC 54/77] ntb: Ensure number of MSIs on SNB is enough for the link interrupt
2013-10-05 21:43 ` Alexander Gordeev
@ 2013-10-07 16:50 ` Jon Mason
2013-10-07 18:38 ` Alexander Gordeev
0 siblings, 1 reply; 49+ messages in thread
From: Jon Mason @ 2013-10-07 16:50 UTC (permalink / raw)
To: Alexander Gordeev
Cc: linux-kernel, Bjorn Helgaas, Ralf Baechle, Michael Ellerman,
Benjamin Herrenschmidt, Martin Schwidefsky, Ingo Molnar,
Tejun Heo, Dan Williams, Andy King, Matt Porter, stable,
linux-pci, linux-mips, linuxppc-dev, linux390, linux-s390, x86,
linux-ide, iss_storagedev, linux-nvme, linux-rdma, netdev,
e1000-devel, linux-driver, Solarflare linux maintainers,
VMware, Inc., linux-scsi
On Sat, Oct 05, 2013 at 11:43:04PM +0200, Alexander Gordeev wrote:
> On Wed, Oct 02, 2013 at 05:48:05PM -0700, Jon Mason wrote:
> > On Wed, Oct 02, 2013 at 12:49:10PM +0200, Alexander Gordeev wrote:
> > > Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
> > > ---
> > > drivers/ntb/ntb_hw.c | 2 +-
> > > 1 files changed, 1 insertions(+), 1 deletions(-)
> > >
> > > diff --git a/drivers/ntb/ntb_hw.c b/drivers/ntb/ntb_hw.c
> > > index de2062c..eccd5e5 100644
> > > --- a/drivers/ntb/ntb_hw.c
> > > +++ b/drivers/ntb/ntb_hw.c
> > > @@ -1066,7 +1066,7 @@ static int ntb_setup_msix(struct ntb_device *ndev)
> > > /* On SNB, the link interrupt is always tied to 4th vector. If
> > > * we can't get all 4, then we can't use MSI-X.
> > > */
> > > - if (ndev->hw_type != BWD_HW) {
> > > + if ((rc < SNB_MSIX_CNT) && (ndev->hw_type != BWD_HW)) {
> >
> > Nack, this check is unnecessary.
>
> If SNB can do more than SNB_MSIX_CNT MSI-Xs then this check is needed
> to enable less than maximum MSI-Xs in case the maximum was not allocated.
> Otherwise SNB will fallback to single MSI instead of multiple MSI-Xs.
Per the comment in the code snippet above, "If we can't get all 4,
then we can't use MSI-X". There is already a check to see if more
than 4 were acquired. So it's not possible to hit this. Even if it
was, don't use SNB_MSIX_CNT here (limits.msix_cnt is the preferred
variable). Also, the "()" are unnecessary.
Thanks,
Jon
> --
> Regards,
> Alexander Gordeev
> agordeev@redhat.com
^ permalink raw reply [flat|nested] 49+ messages in thread* Re: [PATCH RFC 54/77] ntb: Ensure number of MSIs on SNB is enough for the link interrupt
2013-10-07 16:50 ` Jon Mason
@ 2013-10-07 18:38 ` Alexander Gordeev
2013-10-07 20:31 ` Jon Mason
0 siblings, 1 reply; 49+ messages in thread
From: Alexander Gordeev @ 2013-10-07 18:38 UTC (permalink / raw)
To: Jon Mason
Cc: linux-kernel, Bjorn Helgaas, Ralf Baechle, Michael Ellerman,
Benjamin Herrenschmidt, Martin Schwidefsky, Ingo Molnar,
Tejun Heo, Dan Williams, Andy King, Matt Porter, stable,
linux-pci, linux-mips, linuxppc-dev, linux390, linux-s390, x86,
linux-ide, iss_storagedev, linux-nvme, linux-rdma, netdev,
e1000-devel, linux-driver, Solarflare linux maintainers,
VMware, Inc., linux-scsi
On Mon, Oct 07, 2013 at 09:50:57AM -0700, Jon Mason wrote:
> On Sat, Oct 05, 2013 at 11:43:04PM +0200, Alexander Gordeev wrote:
> > On Wed, Oct 02, 2013 at 05:48:05PM -0700, Jon Mason wrote:
> > > On Wed, Oct 02, 2013 at 12:49:10PM +0200, Alexander Gordeev wrote:
> > > > Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
> > > > ---
> > > > drivers/ntb/ntb_hw.c | 2 +-
> > > > 1 files changed, 1 insertions(+), 1 deletions(-)
> > > >
> > > > diff --git a/drivers/ntb/ntb_hw.c b/drivers/ntb/ntb_hw.c
> > > > index de2062c..eccd5e5 100644
> > > > --- a/drivers/ntb/ntb_hw.c
> > > > +++ b/drivers/ntb/ntb_hw.c
> > > > @@ -1066,7 +1066,7 @@ static int ntb_setup_msix(struct ntb_device *ndev)
> > > > /* On SNB, the link interrupt is always tied to 4th vector. If
> > > > * we can't get all 4, then we can't use MSI-X.
> > > > */
> > > > - if (ndev->hw_type != BWD_HW) {
> > > > + if ((rc < SNB_MSIX_CNT) && (ndev->hw_type != BWD_HW)) {
> > >
> > > Nack, this check is unnecessary.
> >
> > If SNB can do more than SNB_MSIX_CNT MSI-Xs then this check is needed
> > to enable less than maximum MSI-Xs in case the maximum was not allocated.
> > Otherwise SNB will fallback to single MSI instead of multiple MSI-Xs.
>
> Per the comment in the code snippet above, "If we can't get all 4,
> then we can't use MSI-X". There is already a check to see if more
> than 4 were acquired. So it's not possible to hit this. Even if it
> was, don't use SNB_MSIX_CNT here (limits.msix_cnt is the preferred
> variable). Also, the "()" are unnecessary.
The changelog is definitely bogus. I meant here an improvement to the
existing scheme, not a conversion to the new one:
msix_entries = msix_table_size(val);
Getting i.e. 16 vectors here.
if (msix_entries > ndev->limits.msix_cnt) {
rc = -EINVAL;
goto err;
}
Upper limit check i.e. succeeds.
[...]
rc = pci_enable_msix(pdev, ndev->msix_entries, msix_entries);
pci_enable_msix() does not success and returns i.e. 8 here, should retry.
if (rc < 0)
goto err1;
if (rc > 0) {
/* On SNB, the link interrupt is always tied to 4th vector. If
* we can't get all 4, then we can't use MSI-X.
*/
if (ndev->hw_type != BWD_HW) {
On SNB bail out here, although could have continue with 8 vectors.
Can only use SNB_MSIX_CNT here, since limits.msix_cnt is the upper limit.
rc = -EIO;
goto err1;
}
[...]
}
--
Regards,
Alexander Gordeev
agordeev@redhat.com
^ permalink raw reply [flat|nested] 49+ messages in thread* Re: [PATCH RFC 54/77] ntb: Ensure number of MSIs on SNB is enough for the link interrupt
2013-10-07 18:38 ` Alexander Gordeev
@ 2013-10-07 20:31 ` Jon Mason
0 siblings, 0 replies; 49+ messages in thread
From: Jon Mason @ 2013-10-07 20:31 UTC (permalink / raw)
To: Alexander Gordeev
Cc: linux-kernel, Bjorn Helgaas, Ralf Baechle, Michael Ellerman,
Benjamin Herrenschmidt, Martin Schwidefsky, Ingo Molnar,
Tejun Heo, Dan Williams, Andy King, Matt Porter, stable,
linux-pci, linux-mips, linuxppc-dev, linux390, linux-s390, x86,
linux-ide, iss_storagedev, linux-nvme, linux-rdma, netdev,
e1000-devel, linux-driver, Solarflare linux maintainers,
VMware, Inc., linux-scsi
On Mon, Oct 07, 2013 at 08:38:45PM +0200, Alexander Gordeev wrote:
> On Mon, Oct 07, 2013 at 09:50:57AM -0700, Jon Mason wrote:
> > On Sat, Oct 05, 2013 at 11:43:04PM +0200, Alexander Gordeev wrote:
> > > On Wed, Oct 02, 2013 at 05:48:05PM -0700, Jon Mason wrote:
> > > > On Wed, Oct 02, 2013 at 12:49:10PM +0200, Alexander Gordeev wrote:
> > > > > Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
> > > > > ---
> > > > > drivers/ntb/ntb_hw.c | 2 +-
> > > > > 1 files changed, 1 insertions(+), 1 deletions(-)
> > > > >
> > > > > diff --git a/drivers/ntb/ntb_hw.c b/drivers/ntb/ntb_hw.c
> > > > > index de2062c..eccd5e5 100644
> > > > > --- a/drivers/ntb/ntb_hw.c
> > > > > +++ b/drivers/ntb/ntb_hw.c
> > > > > @@ -1066,7 +1066,7 @@ static int ntb_setup_msix(struct ntb_device *ndev)
> > > > > /* On SNB, the link interrupt is always tied to 4th vector. If
> > > > > * we can't get all 4, then we can't use MSI-X.
> > > > > */
> > > > > - if (ndev->hw_type != BWD_HW) {
> > > > > + if ((rc < SNB_MSIX_CNT) && (ndev->hw_type != BWD_HW)) {
> > > >
> > > > Nack, this check is unnecessary.
> > >
> > > If SNB can do more than SNB_MSIX_CNT MSI-Xs then this check is needed
> > > to enable less than maximum MSI-Xs in case the maximum was not allocated.
> > > Otherwise SNB will fallback to single MSI instead of multiple MSI-Xs.
> >
> > Per the comment in the code snippet above, "If we can't get all 4,
> > then we can't use MSI-X". There is already a check to see if more
> > than 4 were acquired. So it's not possible to hit this. Even if it
> > was, don't use SNB_MSIX_CNT here (limits.msix_cnt is the preferred
> > variable). Also, the "()" are unnecessary.
>
> The changelog is definitely bogus. I meant here an improvement to the
> existing scheme, not a conversion to the new one:
>
> msix_entries = msix_table_size(val);
>
> Getting i.e. 16 vectors here.
>
> if (msix_entries > ndev->limits.msix_cnt) {
On SNB HW, limits.msix_cnt is set to SNB_MSIX_CNT (4)
http://lxr.free-electrons.com/source/drivers/ntb/ntb_hw.c#L558
> rc = -EINVAL;
> goto err;
> }
>
> Upper limit check i.e. succeeds.
>
> [...]
>
> rc = pci_enable_msix(pdev, ndev->msix_entries, msix_entries);
>
> pci_enable_msix() does not success and returns i.e. 8 here, should retry.
Per the above, since our upper bound is 4. We will either have this
return 0 for all 4 or a number between 1 and 3 (or an error, but
that's not relevant to this discussion).
> if (rc < 0)
> goto err1;
> if (rc > 0) {
> /* On SNB, the link interrupt is always tied to 4th vector. If
> * we can't get all 4, then we can't use MSI-X.
> */
> if (ndev->hw_type != BWD_HW) {
>
> On SNB bail out here, although could have continue with 8 vectors.
> Can only use SNB_MSIX_CNT here, since limits.msix_cnt is the upper limit.
Since we can guarantee that rc is between 1 and 3 at this point (on
SNB HW), we should error out.
Thanks,
Jon
>
> rc = -EIO;
> goto err1;
> }
>
> [...]
> }
>
> --
> Regards,
> Alexander Gordeev
> agordeev@redhat.com
^ permalink raw reply [flat|nested] 49+ messages in thread
* [PATCH RFC 60/77] qlcnic: Return -ENOSPC when not enough MSI-X vectors available
[not found] <cover.1380703262.git.agordeev@redhat.com>
` (26 preceding siblings ...)
2013-10-02 10:49 ` [PATCH RFC 54/77] ntb: Ensure number of MSIs on SNB is enough for the link interrupt Alexander Gordeev
@ 2013-10-02 10:49 ` Alexander Gordeev
2013-10-02 10:49 ` [PATCH RFC 61/77] qlogic: Return -EINVAL in case MSI-X is not supported Alexander Gordeev
` (7 subsequent siblings)
35 siblings, 0 replies; 49+ messages in thread
From: Alexander Gordeev @ 2013-10-02 10:49 UTC (permalink / raw)
To: linux-kernel
Cc: Alexander Gordeev, Bjorn Helgaas, Ralf Baechle, Michael Ellerman,
Benjamin Herrenschmidt, Martin Schwidefsky, Ingo Molnar,
Tejun Heo, Dan Williams, Andy King, Jon Mason, Matt Porter,
stable, linux-pci, linux-mips, linuxppc-dev, linux390, linux-s390,
x86, linux-ide, iss_storagedev, linux-nvme, linux-rdma, netdev,
e1000-devel, linux-driver, Solarflare linux maintainers,
VMware, Inc., linux-scsi
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
---
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
index c4c5023..c6018bb 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
@@ -620,7 +620,7 @@ int qlcnic_enable_msix(struct qlcnic_adapter *adapter, u32 num_msix)
num_msix);
if (qlcnic_83xx_check(adapter)) {
if (err < (QLC_83XX_MINIMUM_VECTOR - tx_vector))
- return err;
+ return -ENOSPC;
err -= (max_tx_rings + 1);
num_msix = rounddown_pow_of_two(err);
num_msix += (max_tx_rings + 1);
@@ -636,6 +636,7 @@ int qlcnic_enable_msix(struct qlcnic_adapter *adapter, u32 num_msix)
num_msix);
goto enable_msix;
}
+ err = -ENOSPC;
} else {
dev_info(&pdev->dev,
"Unable to allocate %d MSI-X interrupt vectors\n",
--
1.7.7.6
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH RFC 61/77] qlogic: Return -EINVAL in case MSI-X is not supported
[not found] <cover.1380703262.git.agordeev@redhat.com>
` (27 preceding siblings ...)
2013-10-02 10:49 ` [PATCH RFC 60/77] qlcnic: Return -ENOSPC when not enough MSI-X vectors available Alexander Gordeev
@ 2013-10-02 10:49 ` Alexander Gordeev
2013-10-02 10:49 ` [PATCH RFC 62/77] qlcnic: Remove redundant return operator Alexander Gordeev
` (6 subsequent siblings)
35 siblings, 0 replies; 49+ messages in thread
From: Alexander Gordeev @ 2013-10-02 10:49 UTC (permalink / raw)
To: linux-kernel
Cc: Alexander Gordeev, Bjorn Helgaas, Ralf Baechle, Michael Ellerman,
Benjamin Herrenschmidt, Martin Schwidefsky, Ingo Molnar,
Tejun Heo, Dan Williams, Andy King, Jon Mason, Matt Porter,
stable, linux-pci, linux-mips, linuxppc-dev, linux390, linux-s390,
x86, linux-ide, iss_storagedev, linux-nvme, linux-rdma, netdev,
e1000-devel, linux-driver, Solarflare linux maintainers,
VMware, Inc., linux-scsi
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
---
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
index c6018bb..ff6a78b 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
@@ -568,7 +568,7 @@ int qlcnic_enable_msix(struct qlcnic_adapter *adapter, u32 num_msix)
{
struct pci_dev *pdev = adapter->pdev;
int max_tx_rings, max_sds_rings, tx_vector;
- int err = -1, i;
+ int err = -EINVAL, i;
if (adapter->flags & QLCNIC_TX_INTR_SHARED) {
max_tx_rings = 0;
--
1.7.7.6
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH RFC 62/77] qlcnic: Remove redundant return operator
[not found] <cover.1380703262.git.agordeev@redhat.com>
` (28 preceding siblings ...)
2013-10-02 10:49 ` [PATCH RFC 61/77] qlogic: Return -EINVAL in case MSI-X is not supported Alexander Gordeev
@ 2013-10-02 10:49 ` Alexander Gordeev
2013-10-02 10:49 ` [PATCH RFC 65/77] qlge: Remove a redundant assignment Alexander Gordeev
` (5 subsequent siblings)
35 siblings, 0 replies; 49+ messages in thread
From: Alexander Gordeev @ 2013-10-02 10:49 UTC (permalink / raw)
To: linux-kernel
Cc: Alexander Gordeev, Bjorn Helgaas, Ralf Baechle, Michael Ellerman,
Benjamin Herrenschmidt, Martin Schwidefsky, Ingo Molnar,
Tejun Heo, Dan Williams, Andy King, Jon Mason, Matt Porter,
stable, linux-pci, linux-mips, linuxppc-dev, linux390, linux-s390,
x86, linux-ide, iss_storagedev, linux-nvme, linux-rdma, netdev,
e1000-devel, linux-driver, Solarflare linux maintainers,
VMware, Inc., linux-scsi
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
---
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
index ff6a78b..b94e679 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
@@ -613,7 +613,6 @@ int qlcnic_enable_msix(struct qlcnic_adapter *adapter, u32 num_msix)
adapter->max_sds_rings = max_sds_rings;
}
dev_info(&pdev->dev, "using msi-x interrupts\n");
- return err;
} else if (err > 0) {
dev_info(&pdev->dev,
"Unable to allocate %d MSI-X interrupt vectors\n",
--
1.7.7.6
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH RFC 65/77] qlge: Remove a redundant assignment
[not found] <cover.1380703262.git.agordeev@redhat.com>
` (29 preceding siblings ...)
2013-10-02 10:49 ` [PATCH RFC 62/77] qlcnic: Remove redundant return operator Alexander Gordeev
@ 2013-10-02 10:49 ` Alexander Gordeev
2013-10-02 10:49 ` [PATCH RFC 71/77] vmxnet3: Return -EINVAL if number of requested MSI-Xs is not enough Alexander Gordeev
` (4 subsequent siblings)
35 siblings, 0 replies; 49+ messages in thread
From: Alexander Gordeev @ 2013-10-02 10:49 UTC (permalink / raw)
To: linux-kernel
Cc: Alexander Gordeev, Bjorn Helgaas, Ralf Baechle, Michael Ellerman,
Benjamin Herrenschmidt, Martin Schwidefsky, Ingo Molnar,
Tejun Heo, Dan Williams, Andy King, Jon Mason, Matt Porter,
stable, linux-pci, linux-mips, linuxppc-dev, linux390, linux-s390,
x86, linux-ide, iss_storagedev, linux-nvme, linux-rdma, netdev,
e1000-devel, linux-driver, Solarflare linux maintainers,
VMware, Inc., linux-scsi
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
---
drivers/net/ethernet/qlogic/qlge/qlge_main.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/qlogic/qlge/qlge_main.c b/drivers/net/ethernet/qlogic/qlge/qlge_main.c
index 2553cf4..ac54cb0 100644
--- a/drivers/net/ethernet/qlogic/qlge/qlge_main.c
+++ b/drivers/net/ethernet/qlogic/qlge/qlge_main.c
@@ -3287,7 +3287,6 @@ static void ql_enable_msix(struct ql_adapter *qdev)
qdev->msi_x_entry = NULL;
netif_warn(qdev, ifup, qdev->ndev,
"MSI-X Enable failed, trying MSI.\n");
- qdev->intr_count = 1;
qlge_irq_type = MSI_IRQ;
} else if (err == 0) {
set_bit(QL_MSIX_ENABLED, &qdev->flags);
--
1.7.7.6
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH RFC 71/77] vmxnet3: Return -EINVAL if number of requested MSI-Xs is not enough
[not found] <cover.1380703262.git.agordeev@redhat.com>
` (30 preceding siblings ...)
2013-10-02 10:49 ` [PATCH RFC 65/77] qlge: Remove a redundant assignment Alexander Gordeev
@ 2013-10-02 10:49 ` Alexander Gordeev
2013-10-02 10:49 ` [PATCH RFC 72/77] vmxnet3: Fixup a weird loop exit Alexander Gordeev
` (3 subsequent siblings)
35 siblings, 0 replies; 49+ messages in thread
From: Alexander Gordeev @ 2013-10-02 10:49 UTC (permalink / raw)
To: linux-kernel
Cc: Alexander Gordeev, Bjorn Helgaas, Ralf Baechle, Michael Ellerman,
Benjamin Herrenschmidt, Martin Schwidefsky, Ingo Molnar,
Tejun Heo, Dan Williams, Andy King, Jon Mason, Matt Porter,
stable, linux-pci, linux-mips, linuxppc-dev, linux390, linux-s390,
x86, linux-ide, iss_storagedev, linux-nvme, linux-rdma, netdev,
e1000-devel, linux-driver, Solarflare linux maintainers,
VMware, Inc., linux-scsi
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
---
drivers/net/vmxnet3/vmxnet3_drv.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c
index 7e2788c..5b8ea71 100644
--- a/drivers/net/vmxnet3/vmxnet3_drv.c
+++ b/drivers/net/vmxnet3/vmxnet3_drv.c
@@ -2738,7 +2738,7 @@ static int
vmxnet3_acquire_msix_vectors(struct vmxnet3_adapter *adapter,
int vectors)
{
- int err = 0, vector_threshold;
+ int err = -EINVAL, vector_threshold;
vector_threshold = VMXNET3_LINUX_MIN_MSIX_VECT;
while (vectors >= vector_threshold) {
--
1.7.7.6
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH RFC 72/77] vmxnet3: Fixup a weird loop exit
[not found] <cover.1380703262.git.agordeev@redhat.com>
` (31 preceding siblings ...)
2013-10-02 10:49 ` [PATCH RFC 71/77] vmxnet3: Return -EINVAL if number of requested MSI-Xs is not enough Alexander Gordeev
@ 2013-10-02 10:49 ` Alexander Gordeev
2013-10-02 10:49 ` [PATCH RFC 73/77] vmxnet3: Return -ENOSPC when not enough MSI-X vectors available Alexander Gordeev
` (2 subsequent siblings)
35 siblings, 0 replies; 49+ messages in thread
From: Alexander Gordeev @ 2013-10-02 10:49 UTC (permalink / raw)
To: linux-kernel
Cc: Alexander Gordeev, Bjorn Helgaas, Ralf Baechle, Michael Ellerman,
Benjamin Herrenschmidt, Martin Schwidefsky, Ingo Molnar,
Tejun Heo, Dan Williams, Andy King, Jon Mason, Matt Porter,
stable, linux-pci, linux-mips, linuxppc-dev, linux390, linux-s390,
x86, linux-ide, iss_storagedev, linux-nvme, linux-rdma, netdev,
e1000-devel, linux-driver, Solarflare linux maintainers,
VMware, Inc., linux-scsi
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
---
drivers/net/vmxnet3/vmxnet3_drv.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c
index 5b8ea71..3518173 100644
--- a/drivers/net/vmxnet3/vmxnet3_drv.c
+++ b/drivers/net/vmxnet3/vmxnet3_drv.c
@@ -2750,7 +2750,7 @@ vmxnet3_acquire_msix_vectors(struct vmxnet3_adapter *adapter,
} else if (err < 0) {
dev_err(&adapter->netdev->dev,
"Failed to enable MSI-X, error: %d\n", err);
- vectors = 0;
+ return err;
} else if (err < vector_threshold) {
break;
} else {
--
1.7.7.6
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH RFC 73/77] vmxnet3: Return -ENOSPC when not enough MSI-X vectors available
[not found] <cover.1380703262.git.agordeev@redhat.com>
` (32 preceding siblings ...)
2013-10-02 10:49 ` [PATCH RFC 72/77] vmxnet3: Fixup a weird loop exit Alexander Gordeev
@ 2013-10-02 10:49 ` Alexander Gordeev
2013-10-02 10:49 ` [PATCH RFC 74/77] vmxnet3: Limit number of rx queues to 1 if per-queue MSI-Xs failed Alexander Gordeev
2013-10-02 10:49 ` [PATCH RFC 76/77] vxge: Sanitize MSI-X allocation routine error codes Alexander Gordeev
35 siblings, 0 replies; 49+ messages in thread
From: Alexander Gordeev @ 2013-10-02 10:49 UTC (permalink / raw)
To: linux-kernel
Cc: Alexander Gordeev, Bjorn Helgaas, Ralf Baechle, Michael Ellerman,
Benjamin Herrenschmidt, Martin Schwidefsky, Ingo Molnar,
Tejun Heo, Dan Williams, Andy King, Jon Mason, Matt Porter,
stable, linux-pci, linux-mips, linuxppc-dev, linux390, linux-s390,
x86, linux-ide, iss_storagedev, linux-nvme, linux-rdma, netdev,
e1000-devel, linux-driver, Solarflare linux maintainers,
VMware, Inc., linux-scsi
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
---
drivers/net/vmxnet3/vmxnet3_drv.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c
index 3518173..3df7f32 100644
--- a/drivers/net/vmxnet3/vmxnet3_drv.c
+++ b/drivers/net/vmxnet3/vmxnet3_drv.c
@@ -2752,7 +2752,10 @@ vmxnet3_acquire_msix_vectors(struct vmxnet3_adapter *adapter,
"Failed to enable MSI-X, error: %d\n", err);
return err;
} else if (err < vector_threshold) {
- break;
+ dev_info(&adapter->pdev->dev,
+ "Number of MSI-Xs which can be allocated "
+ "is lower than min threshold required.\n");
+ return -ENOSPC;
} else {
/* If fails to enable required number of MSI-x vectors
* try enabling minimum number of vectors required.
@@ -2764,9 +2767,6 @@ vmxnet3_acquire_msix_vectors(struct vmxnet3_adapter *adapter,
}
}
- dev_info(&adapter->pdev->dev,
- "Number of MSI-X interrupts which can be allocated "
- "is lower than min threshold required.\n");
return err;
}
--
1.7.7.6
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH RFC 74/77] vmxnet3: Limit number of rx queues to 1 if per-queue MSI-Xs failed
[not found] <cover.1380703262.git.agordeev@redhat.com>
` (33 preceding siblings ...)
2013-10-02 10:49 ` [PATCH RFC 73/77] vmxnet3: Return -ENOSPC when not enough MSI-X vectors available Alexander Gordeev
@ 2013-10-02 10:49 ` Alexander Gordeev
2013-10-02 10:49 ` [PATCH RFC 76/77] vxge: Sanitize MSI-X allocation routine error codes Alexander Gordeev
35 siblings, 0 replies; 49+ messages in thread
From: Alexander Gordeev @ 2013-10-02 10:49 UTC (permalink / raw)
To: linux-kernel
Cc: Alexander Gordeev, Bjorn Helgaas, Ralf Baechle, Michael Ellerman,
Benjamin Herrenschmidt, Martin Schwidefsky, Ingo Molnar,
Tejun Heo, Dan Williams, Andy King, Jon Mason, Matt Porter,
stable, linux-pci, linux-mips, linuxppc-dev, linux390, linux-s390,
x86, linux-ide, iss_storagedev, linux-nvme, linux-rdma, netdev,
e1000-devel, linux-driver, Solarflare linux maintainers,
VMware, Inc., linux-scsi
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
---
drivers/net/vmxnet3/vmxnet3_drv.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c
index 3df7f32..00dc0d0 100644
--- a/drivers/net/vmxnet3/vmxnet3_drv.c
+++ b/drivers/net/vmxnet3/vmxnet3_drv.c
@@ -2814,12 +2814,14 @@ vmxnet3_alloc_intr_resources(struct vmxnet3_adapter *adapter)
err = vmxnet3_acquire_msix_vectors(adapter,
adapter->intr.num_intrs);
- /* If we cannot allocate one MSIx vector per queue
- * then limit the number of rx queues to 1
- */
- if (err == VMXNET3_LINUX_MIN_MSIX_VECT) {
- if (adapter->share_intr != VMXNET3_INTR_BUDDYSHARE
- || adapter->num_rx_queues != 1) {
+ if (!err) {
+ /* If we cannot allocate one MSIx vector per queue
+ * then limit the number of rx queues to 1
+ */
+ if ((adapter->intr.num_intrs ==
+ VMXNET3_LINUX_MIN_MSIX_VECT) &&
+ ((adapter->share_intr != VMXNET3_INTR_BUDDYSHARE) ||
+ (adapter->num_rx_queues != 1))) {
adapter->share_intr = VMXNET3_INTR_TXSHARE;
netdev_err(adapter->netdev,
"Number of rx queues : 1\n");
@@ -2829,8 +2831,6 @@ vmxnet3_alloc_intr_resources(struct vmxnet3_adapter *adapter)
}
return;
}
- if (!err)
- return;
/* If we cannot allocate MSIx vectors use only one rx queue */
dev_info(&adapter->pdev->dev,
--
1.7.7.6
^ permalink raw reply related [flat|nested] 49+ messages in thread* [PATCH RFC 76/77] vxge: Sanitize MSI-X allocation routine error codes
[not found] <cover.1380703262.git.agordeev@redhat.com>
` (34 preceding siblings ...)
2013-10-02 10:49 ` [PATCH RFC 74/77] vmxnet3: Limit number of rx queues to 1 if per-queue MSI-Xs failed Alexander Gordeev
@ 2013-10-02 10:49 ` Alexander Gordeev
35 siblings, 0 replies; 49+ messages in thread
From: Alexander Gordeev @ 2013-10-02 10:49 UTC (permalink / raw)
To: linux-kernel
Cc: Alexander Gordeev, Bjorn Helgaas, Ralf Baechle, Michael Ellerman,
Benjamin Herrenschmidt, Martin Schwidefsky, Ingo Molnar,
Tejun Heo, Dan Williams, Andy King, Jon Mason, Matt Porter,
stable, linux-pci, linux-mips, linuxppc-dev, linux390, linux-s390,
x86, linux-ide, iss_storagedev, linux-nvme, linux-rdma, netdev,
e1000-devel, linux-driver, Solarflare linux maintainers,
VMware, Inc., linux-scsi
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
---
drivers/net/ethernet/neterion/vxge/vxge-main.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/neterion/vxge/vxge-main.c b/drivers/net/ethernet/neterion/vxge/vxge-main.c
index 5a20eaf..b81ff8b 100644
--- a/drivers/net/ethernet/neterion/vxge/vxge-main.c
+++ b/drivers/net/ethernet/neterion/vxge/vxge-main.c
@@ -2352,7 +2352,7 @@ start:
"%s: MSI-X enable failed for %d vectors, ret: %d",
VXGE_DRIVER_NAME, vdev->intr_cnt, ret);
if ((max_config_vpath != VXGE_USE_DEFAULT) || (ret < 3)) {
- ret = -ENODEV;
+ ret = -ENOSPC;
goto enable_msix_failed;
}
@@ -2365,10 +2365,8 @@ start:
vxge_close_vpaths(vdev, temp);
vdev->no_of_vpath = temp;
goto start;
- } else if (ret < 0) {
- ret = -ENODEV;
+ } else if (ret < 0)
goto enable_msix_failed;
- }
return 0;
enable_msix_failed:
--
1.7.7.6
^ permalink raw reply related [flat|nested] 49+ messages in thread