All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] mlxsw: convert to pci_alloc_irq_vectors
@ 2017-04-06 12:23 Christoph Hellwig
  2017-04-06 12:43 ` Ido Schimmel
  2017-04-06 12:59 ` Jiri Pirko
  0 siblings, 2 replies; 8+ messages in thread
From: Christoph Hellwig @ 2017-04-06 12:23 UTC (permalink / raw)
  To: jiri, idosch; +Cc: netdev

Trivial conversion as only one vector is supported, but at least we
lose the useless msix_entry member in the per-device structure.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---

Changes since V1:
 - rebase due to a trivial conflict in net-next

 drivers/net/ethernet/mellanox/mlxsw/pci.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlxsw/pci.c b/drivers/net/ethernet/mellanox/mlxsw/pci.c
index eaa3e3bf5a2b..23f7d828cf67 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/pci.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/pci.c
@@ -136,7 +136,6 @@ struct mlxsw_pci {
 	u8 __iomem *hw_addr;
 	struct mlxsw_pci_queue_type_group queues[MLXSW_PCI_QUEUE_TYPE_COUNT];
 	u32 doorbell_offset;
-	struct msix_entry msix_entry;
 	struct mlxsw_core *core;
 	struct {
 		struct mlxsw_pci_mem_item *items;
@@ -1409,7 +1408,7 @@ static int mlxsw_pci_init(void *bus_priv, struct mlxsw_core *mlxsw_core,
 	if (err)
 		goto err_aqs_init;
 
-	err = request_irq(mlxsw_pci->msix_entry.vector,
+	err = request_irq(pci_irq_vector(pdev, 0),
 			  mlxsw_pci_eq_irq_handler, 0,
 			  mlxsw_pci->bus_info.device_kind, mlxsw_pci);
 	if (err) {
@@ -1442,7 +1441,7 @@ static void mlxsw_pci_fini(void *bus_priv)
 {
 	struct mlxsw_pci *mlxsw_pci = bus_priv;
 
-	free_irq(mlxsw_pci->msix_entry.vector, mlxsw_pci);
+	free_irq(pci_irq_vector(mlxsw_pci->pdev, 0), mlxsw_pci);
 	mlxsw_pci_aqs_fini(mlxsw_pci);
 	mlxsw_pci_fw_area_fini(mlxsw_pci);
 	mlxsw_pci_mbox_free(mlxsw_pci, &mlxsw_pci->cmd.out_mbox);
@@ -1717,8 +1716,8 @@ static int mlxsw_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 		goto err_sw_reset;
 	}
 
-	err = pci_enable_msix_exact(pdev, &mlxsw_pci->msix_entry, 1);
-	if (err) {
+	err = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_MSIX);
+	if (err < 0) {
 		dev_err(&pdev->dev, "MSI-X init failed\n");
 		goto err_msix_init;
 	}
@@ -1737,7 +1736,7 @@ static int mlxsw_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 	return 0;
 
 err_bus_device_register:
-	pci_disable_msix(mlxsw_pci->pdev);
+	pci_free_irq_vectors(mlxsw_pci->pdev);
 err_msix_init:
 err_sw_reset:
 	iounmap(mlxsw_pci->hw_addr);
@@ -1757,7 +1756,7 @@ static void mlxsw_pci_remove(struct pci_dev *pdev)
 	struct mlxsw_pci *mlxsw_pci = pci_get_drvdata(pdev);
 
 	mlxsw_core_bus_device_unregister(mlxsw_pci->core);
-	pci_disable_msix(mlxsw_pci->pdev);
+	pci_free_irq_vectors(mlxsw_pci->pdev);
 	iounmap(mlxsw_pci->hw_addr);
 	pci_release_regions(mlxsw_pci->pdev);
 	pci_disable_device(mlxsw_pci->pdev);
-- 
2.11.0

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

* Re: [PATCH v2] mlxsw: convert to pci_alloc_irq_vectors
  2017-04-06 12:23 [PATCH v2] mlxsw: convert to pci_alloc_irq_vectors Christoph Hellwig
@ 2017-04-06 12:43 ` Ido Schimmel
  2017-04-07 13:08   ` Ido Schimmel
  2017-04-06 12:59 ` Jiri Pirko
  1 sibling, 1 reply; 8+ messages in thread
From: Ido Schimmel @ 2017-04-06 12:43 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: jiri, idosch, netdev

On Thu, Apr 06, 2017 at 02:23:03PM +0200, Christoph Hellwig wrote:
> Trivial conversion as only one vector is supported, but at least we
> lose the useless msix_entry member in the per-device structure.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>

For net-next:

Reviewed-by: Ido Schimmel <idosch@mellanox.com>
Tested-by: Ido Schimmel <idosch@mellanox.com>

Thanks!

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

* Re: [PATCH v2] mlxsw: convert to pci_alloc_irq_vectors
  2017-04-06 12:23 [PATCH v2] mlxsw: convert to pci_alloc_irq_vectors Christoph Hellwig
  2017-04-06 12:43 ` Ido Schimmel
@ 2017-04-06 12:59 ` Jiri Pirko
  1 sibling, 0 replies; 8+ messages in thread
From: Jiri Pirko @ 2017-04-06 12:59 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: jiri, idosch, netdev

Thu, Apr 06, 2017 at 02:23:03PM CEST, hch@lst.de wrote:
>Trivial conversion as only one vector is supported, but at least we
>lose the useless msix_entry member in the per-device structure.
>
>Signed-off-by: Christoph Hellwig <hch@lst.de>

Acked-by: Jiri Pirko <jiri@mellanox.com>

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

* Re: [PATCH v2] mlxsw: convert to pci_alloc_irq_vectors
  2017-04-06 12:43 ` Ido Schimmel
@ 2017-04-07 13:08   ` Ido Schimmel
  2017-04-07 14:14     ` David Miller
  0 siblings, 1 reply; 8+ messages in thread
From: Ido Schimmel @ 2017-04-07 13:08 UTC (permalink / raw)
  To: Christoph Hellwig, davem; +Cc: jiri, idosch, netdev

Hi Dave,

On Thu, Apr 06, 2017 at 03:43:20PM +0300, Ido Schimmel wrote:
> On Thu, Apr 06, 2017 at 02:23:03PM +0200, Christoph Hellwig wrote:
> > Trivial conversion as only one vector is supported, but at least we
> > lose the useless msix_entry member in the per-device structure.
> > 
> > Signed-off-by: Christoph Hellwig <hch@lst.de>
> 
> For net-next:

I noticed this is marked as "Not Applicable" in patchwork:
https://patchwork.ozlabs.org/patch/747723/

But I'm not quite sure why. Maybe you meant to mark only v1?
https://patchwork.ozlabs.org/patch/747674/

Thanks

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

* Re: [PATCH v2] mlxsw: convert to pci_alloc_irq_vectors
  2017-04-07 13:08   ` Ido Schimmel
@ 2017-04-07 14:14     ` David Miller
  2017-04-10  7:35       ` Christoph Hellwig
  0 siblings, 1 reply; 8+ messages in thread
From: David Miller @ 2017-04-07 14:14 UTC (permalink / raw)
  To: idosch; +Cc: hch, jiri, idosch, netdev

From: Ido Schimmel <idosch@idosch.org>
Date: Fri, 7 Apr 2017 16:08:08 +0300

> Hi Dave,
> 
> On Thu, Apr 06, 2017 at 03:43:20PM +0300, Ido Schimmel wrote:
>> On Thu, Apr 06, 2017 at 02:23:03PM +0200, Christoph Hellwig wrote:
>> > Trivial conversion as only one vector is supported, but at least we
>> > lose the useless msix_entry member in the per-device structure.
>> > 
>> > Signed-off-by: Christoph Hellwig <hch@lst.de>
>> 
>> For net-next:
> 
> I noticed this is marked as "Not Applicable" in patchwork:
> https://patchwork.ozlabs.org/patch/747723/
> 
> But I'm not quite sure why. Maybe you meant to mark only v1?
> https://patchwork.ozlabs.org/patch/747674/

If the last patch of his series removes a kernel global API,
it shouldn't go via my tree.  He can send it directly to Linus
or via the PCI maintainer.

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

* Re: [PATCH v2] mlxsw: convert to pci_alloc_irq_vectors
  2017-04-07 14:14     ` David Miller
@ 2017-04-10  7:35       ` Christoph Hellwig
  2017-04-10 14:06         ` David Miller
  0 siblings, 1 reply; 8+ messages in thread
From: Christoph Hellwig @ 2017-04-10  7:35 UTC (permalink / raw)
  To: David Miller; +Cc: idosch, hch, jiri, idosch, netdev

On Fri, Apr 07, 2017 at 07:14:05AM -0700, David Miller wrote:
> >> For net-next:
> > 
> > I noticed this is marked as "Not Applicable" in patchwork:
> > https://patchwork.ozlabs.org/patch/747723/
> > 
> > But I'm not quite sure why. Maybe you meant to mark only v1?
> > https://patchwork.ozlabs.org/patch/747674/
> 
> If the last patch of his series removes a kernel global API,
> it shouldn't go via my tree.  He can send it directly to Linus
> or via the PCI maintainer.

This is a single patch that does not remove anything.

For the different series I explicitly asked if it's okay if the whole
thing goes in through the net tree and Bjorn was fine it.  If you're
not it would be nice if you could state that in the series so that
the submitter can act on it.

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

* Re: [PATCH v2] mlxsw: convert to pci_alloc_irq_vectors
  2017-04-10  7:35       ` Christoph Hellwig
@ 2017-04-10 14:06         ` David Miller
  2017-04-10 14:37           ` Christoph Hellwig
  0 siblings, 1 reply; 8+ messages in thread
From: David Miller @ 2017-04-10 14:06 UTC (permalink / raw)
  To: hch; +Cc: idosch, jiri, idosch, netdev

From: Christoph Hellwig <hch@lst.de>
Date: Mon, 10 Apr 2017 09:35:51 +0200

> On Fri, Apr 07, 2017 at 07:14:05AM -0700, David Miller wrote:
>> >> For net-next:
>> > 
>> > I noticed this is marked as "Not Applicable" in patchwork:
>> > https://patchwork.ozlabs.org/patch/747723/
>> > 
>> > But I'm not quite sure why. Maybe you meant to mark only v1?
>> > https://patchwork.ozlabs.org/patch/747674/
>> 
>> If the last patch of his series removes a kernel global API,
>> it shouldn't go via my tree.  He can send it directly to Linus
>> or via the PCI maintainer.
> 
> This is a single patch that does not remove anything.
> 
> For the different series I explicitly asked if it's okay if the whole
> thing goes in through the net tree and Bjorn was fine it.  If you're
> not it would be nice if you could state that in the series so that
> the submitter can act on it.

My bad I thought this was part of that series.

Could you do me a favor and repost that series, with this mlxsw
patch added to it.  I will apply it to net-next.

Thanks!

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

* Re: [PATCH v2] mlxsw: convert to pci_alloc_irq_vectors
  2017-04-10 14:06         ` David Miller
@ 2017-04-10 14:37           ` Christoph Hellwig
  0 siblings, 0 replies; 8+ messages in thread
From: Christoph Hellwig @ 2017-04-10 14:37 UTC (permalink / raw)
  To: David Miller; +Cc: hch, idosch, jiri, idosch, netdev

On Mon, Apr 10, 2017 at 07:06:16AM -0700, David Miller wrote:
> My bad I thought this was part of that series.
> 
> Could you do me a favor and repost that series, with this mlxsw
> patch added to it.  I will apply it to net-next.

Note that mlxsw uses pci_enable_msix_exact which isn't going away
with the other series, only pci_enable_msix goes away for now.

But if you still want them together I'll happily repost.

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

end of thread, other threads:[~2017-04-10 14:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-06 12:23 [PATCH v2] mlxsw: convert to pci_alloc_irq_vectors Christoph Hellwig
2017-04-06 12:43 ` Ido Schimmel
2017-04-07 13:08   ` Ido Schimmel
2017-04-07 14:14     ` David Miller
2017-04-10  7:35       ` Christoph Hellwig
2017-04-10 14:06         ` David Miller
2017-04-10 14:37           ` Christoph Hellwig
2017-04-06 12:59 ` Jiri Pirko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.