Skip to contentSkip to conversation

gpio: mlxbf2: Introduce proper interrupt handling

PATCH In review Asmaa Mnebhi 5 participants 14 messages Oct 15, 2021 – Dec 6, 2022

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

v5 cover gpio: mlxbf2: Introduce proper interrupt handling

This is a follow up on a discussion regarding
proper handling of GPIO interrupts within the
gpio-mlxbf2.c driver.

Link to discussion:
https://lore.kernel.org/netdev/[email protected]/T/

Patch 1 adds support to a GPIO IRQ handler in gpio-mlxbf2.c. Patch 2 is a follow up removal of custom GPIO IRQ handling from the mlxbf_gige driver and replacing it with a simple IRQ request. The ACPI table for the mlxbf_gige driver is responsible for instantiating the PHY GPIO interrupt via GpioInt.

Andy Shevchenko, could you please review this patch series. David Miller, could you please ack the changes in the mlxbf_gige driver.

v5 vs. v4 patch:
- Remove a fix which check if bgpio_init has failed. This fix should in a separate patch targeting the stable branch.

Asmaa Mnebhi (2):
gpio: mlxbf2: Introduce IRQ support
net: mellanox: mlxbf_gige: Replace non-standard interrupt handling

 drivers/gpio/gpio-mlxbf2.c                    | 142 +++++++++++-
 .../net/ethernet/mellanox/mlxbf_gige/Makefile |   1 -
 .../ethernet/mellanox/mlxbf_gige/mlxbf_gige.h |  12 -
 .../mellanox/mlxbf_gige/mlxbf_gige_gpio.c     | 212 ------------------
 .../mellanox/mlxbf_gige/mlxbf_gige_main.c     |  22 +-
 5 files changed, 149 insertions(+), 240 deletions(-)
 delete mode 100644 drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_gpio.c
Signature · 1 line
2.30.1
#1 lore raw

PATCH v5 1/2 gpio: mlxbf2: Introduce IRQ support

Introduce standard IRQ handling in the gpio-mlxbf2.c driver.

---
 drivers/gpio/gpio-mlxbf2.c | 142 ++++++++++++++++++++++++++++++++++++-
 1 file changed, 140 insertions(+), 2 deletions(-)
drivers/gpio/gpio-mlxbf2.c +140 -2
index 177d03ef4529..88ac2ade948d 100644
@@ -1,9 +1,14 @@
 // SPDX-License-Identifier: GPL-2.0
 
+/*
+ * Copyright (C) 2020-2021 NVIDIA CORPORATION & AFFILIATES
+ */
+
 #include <linux/bitfield.h>
 #include <linux/bitops.h>
 #include <linux/device.h>
 #include <linux/gpio/driver.h>
+#include <linux/interrupt.h>
 #include <linux/io.h>
 #include <linux/ioport.h>
 #include <linux/kernel.h>
@@ -43,9 +48,14 @@
 #define YU_GPIO_MODE0			0x0c
 #define YU_GPIO_DATASET			0x14
 #define YU_GPIO_DATACLEAR		0x18
+#define YU_GPIO_CAUSE_RISE_EN		0x44
+#define YU_GPIO_CAUSE_FALL_EN		0x48
 #define YU_GPIO_MODE1_CLEAR		0x50
 #define YU_GPIO_MODE0_SET		0x54
 #define YU_GPIO_MODE0_CLEAR		0x58
+#define YU_GPIO_CAUSE_OR_CAUSE_EVTEN0	0x80
+#define YU_GPIO_CAUSE_OR_EVTEN0		0x94
+#define YU_GPIO_CAUSE_OR_CLRCAUSE	0x98
 
 struct mlxbf2_gpio_context_save_regs {
 	u32 gpio_mode0;
@@ -55,6 +65,7 @@ struct mlxbf2_gpio_context_save_regs {
 /* BlueField-2 gpio block context structure. */
 struct mlxbf2_gpio_context {
 	struct gpio_chip gc;
+	struct irq_chip irq_chip;
 
 	/* YU GPIO blocks address */
 	void __iomem *gpio_io;
@@ -218,15 +229,114 @@ static int mlxbf2_gpio_direction_output(struct gpio_chip *chip,
 	return ret;
 }
 
+static void mlxbf2_gpio_irq_enable(struct irq_data *irqd)
+{
+	struct gpio_chip *gc = irq_data_get_irq_chip_data(irqd);
+	struct mlxbf2_gpio_context *gs = gpiochip_get_data(gc);
+	int offset = irqd_to_hwirq(irqd);
+	unsigned long flags;
+	u32 val;
+
+	spin_lock_irqsave(&gs->gc.bgpio_lock, flags);
+	val = readl(gs->gpio_io + YU_GPIO_CAUSE_OR_CLRCAUSE);
+	val |= BIT(offset);
+	writel(val, gs->gpio_io + YU_GPIO_CAUSE_OR_CLRCAUSE);
+
+	val = readl(gs->gpio_io + YU_GPIO_CAUSE_OR_EVTEN0);
+	val |= BIT(offset);
+	writel(val, gs->gpio_io + YU_GPIO_CAUSE_OR_EVTEN0);
+	spin_unlock_irqrestore(&gs->gc.bgpio_lock, flags);
+}
+
+static void mlxbf2_gpio_irq_disable(struct irq_data *irqd)
+{
+	struct gpio_chip *gc = irq_data_get_irq_chip_data(irqd);
+	struct mlxbf2_gpio_context *gs = gpiochip_get_data(gc);
+	int offset = irqd_to_hwirq(irqd);
+	unsigned long flags;
+	u32 val;
+
+	spin_lock_irqsave(&gs->gc.bgpio_lock, flags);
+	val = readl(gs->gpio_io + YU_GPIO_CAUSE_OR_EVTEN0);
+	val &= ~BIT(offset);
+	writel(val, gs->gpio_io + YU_GPIO_CAUSE_OR_EVTEN0);
+	spin_unlock_irqrestore(&gs->gc.bgpio_lock, flags);
+}
+
+static irqreturn_t mlxbf2_gpio_irq_handler(int irq, void *ptr)
+{
+	struct mlxbf2_gpio_context *gs = ptr;
+	struct gpio_chip *gc = &gs->gc;
+	unsigned long pending;
+	u32 level;
+
+	pending = readl(gs->gpio_io + YU_GPIO_CAUSE_OR_CAUSE_EVTEN0);
+	writel(pending, gs->gpio_io + YU_GPIO_CAUSE_OR_CLRCAUSE);
+
+	for_each_set_bit(level, &pending, gc->ngpio) {
+		int gpio_irq = irq_find_mapping(gc->irq.domain, level);
+		generic_handle_irq(gpio_irq);
+	}
+
+	return IRQ_RETVAL(pending);
+}
+
+static int
+mlxbf2_gpio_irq_set_type(struct irq_data *irqd, unsigned int type)
+{
+	struct gpio_chip *gc = irq_data_get_irq_chip_data(irqd);
+	struct mlxbf2_gpio_context *gs = gpiochip_get_data(gc);
+	int offset = irqd_to_hwirq(irqd);
+	unsigned long flags;
+	bool fall = false;
+	bool rise = false;
+	u32 val;
+
+	switch (type & IRQ_TYPE_SENSE_MASK) {
+	case IRQ_TYPE_EDGE_BOTH:
+		fall = true;
+		rise = true;
+		break;
+	case IRQ_TYPE_EDGE_RISING:
+		rise = true;
+		break;
+	case IRQ_TYPE_EDGE_FALLING:
+		fall = true;
+		break;
+	default:
+		return -EINVAL;
+	}
+
+	spin_lock_irqsave(&gs->gc.bgpio_lock, flags);
+	if (fall) {
+		val = readl(gs->gpio_io + YU_GPIO_CAUSE_FALL_EN);
+		val |= BIT(offset);
+		writel(val, gs->gpio_io + YU_GPIO_CAUSE_FALL_EN);
+	}
+
+	if (rise) {
+		val = readl(gs->gpio_io + YU_GPIO_CAUSE_RISE_EN);
+		val |= BIT(offset);
+		writel(val, gs->gpio_io + YU_GPIO_CAUSE_RISE_EN);
+	}
+	spin_unlock_irqrestore(&gs->gc.bgpio_lock, flags);
+
+	return 0;
+}
+
 /* BlueField-2 GPIO driver initialization routine. */
 static int
 mlxbf2_gpio_probe(struct platform_device *pdev)
 {
 	struct mlxbf2_gpio_context *gs;
 	struct device *dev = &pdev->dev;
+	struct gpio_irq_chip *girq;
 	struct gpio_chip *gc;
 	unsigned int npins;
-	int ret;
+	const char *name;
+	int ret, irq;
+
+	name = dev_name(dev);
 
 	gs = devm_kzalloc(dev, sizeof(*gs), GFP_KERNEL);
 	if (!gs)
@@ -261,6 +371,34 @@ mlxbf2_gpio_probe(struct platform_device *pdev)
 	gc->ngpio = npins;
 	gc->owner = THIS_MODULE;
 
+	irq = platform_get_irq(pdev, 0);
+	if (irq >= 0) {
+		gs->irq_chip.name = name;
+		gs->irq_chip.irq_set_type = mlxbf2_gpio_irq_set_type;
+		gs->irq_chip.irq_enable = mlxbf2_gpio_irq_enable;
+		gs->irq_chip.irq_disable = mlxbf2_gpio_irq_disable;
+
+		girq = &gs->gc.irq;
+		girq->chip = &gs->irq_chip;
+		girq->handler = handle_simple_irq;
+		girq->default_type = IRQ_TYPE_NONE;
+		/* This will let us handle the parent IRQ in the driver */
+		girq->num_parents = 0;
+		girq->parents = NULL;
+		girq->parent_handler = NULL;
+
+		/*
+		 * Directly request the irq here instead of passing
+		 * a flow-handler because the irq is shared.
+		 */
+		ret = devm_request_irq(dev, irq, mlxbf2_gpio_irq_handler,
+				       IRQF_SHARED, name, gs);
+		if (ret) {
+			dev_err(dev, "failed to request IRQ");
+			return ret;
+		}
+	}
+
 	platform_set_drvdata(pdev, gs);
 
 	ret = devm_gpiochip_add_data(dev, &gs->gc, gs);
@@ -315,5 +453,5 @@ static struct platform_driver mlxbf2_gpio_driver = {
 module_platform_driver(mlxbf2_gpio_driver);
 
 MODULE_DESCRIPTION("Mellanox BlueField-2 GPIO Driver");
-MODULE_AUTHOR("Mellanox Technologies");
+MODULE_AUTHOR("Asmaa Mnebhi <[email protected]>");
 MODULE_LICENSE("GPL v2");
Signature · 1 line
2.30.1
#4 lore raw

Re: [PATCH v5 1/2] gpio: mlxbf2: Introduce IRQ support

Quoted 6 lines · Andy Shevchenko
Quoted 5 lines · Linus Walleij
Quoted 3 lines · Asmaa Mnebhi

Introduce standard IRQ handling in the gpio-mlxbf2.c driver.

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

Looks good to me!

It was more than a year ago :-)

:D

Searched my inbox in some weird way.

Yours,
Linus Walleij

#5 lore raw

PATCH v5 2/2 net: mellanox: mlxbf_gige: Replace non-standard interrupt handling

In reply to Asmaa Mnebhi

Since the GPIO driver (gpio-mlxbf2.c) supports interrupt handling, replace the custom routine with simple IRQ request.

---
 .../net/ethernet/mellanox/mlxbf_gige/Makefile |   1 -
 .../ethernet/mellanox/mlxbf_gige/mlxbf_gige.h |  12 -
 .../mellanox/mlxbf_gige/mlxbf_gige_gpio.c     | 212 ------------------
 .../mellanox/mlxbf_gige/mlxbf_gige_main.c     |  22 +-
 4 files changed, 9 insertions(+), 238 deletions(-)
 delete mode 100644 drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_gpio.c
drivers/net/ethernet/mellanox/mlxbf_gige/Makefile +0 -1
index e57c1375f236..a97c2bef846b 100644
@@ -3,7 +3,6 @@
 obj-$(CONFIG_MLXBF_GIGE) += mlxbf_gige.o
 
 mlxbf_gige-y := mlxbf_gige_ethtool.o \
-		mlxbf_gige_gpio.o \
 		mlxbf_gige_intr.o \
 		mlxbf_gige_main.o \
 		mlxbf_gige_mdio.o \
drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige.h +0 -12
index e3509e69ed1c..86826a70f9dd 100644
@@ -51,11 +51,6 @@
 #define MLXBF_GIGE_ERROR_INTR_IDX       0
 #define MLXBF_GIGE_RECEIVE_PKT_INTR_IDX 1
 #define MLXBF_GIGE_LLU_PLU_INTR_IDX     2
-#define MLXBF_GIGE_PHY_INT_N            3
-
-#define MLXBF_GIGE_MDIO_DEFAULT_PHY_ADDR 0x3
-
-#define MLXBF_GIGE_DEFAULT_PHY_INT_GPIO 12
 
 struct mlxbf_gige_stats {
 	u64 hw_access_errors;
@@ -81,11 +76,7 @@ struct mlxbf_gige {
 	struct platform_device *pdev;
 	void __iomem *mdio_io;
 	struct mii_bus *mdiobus;
-	void __iomem *gpio_io;
-	struct irq_domain *irqdomain;
-	u32 phy_int_gpio_mask;
 	spinlock_t lock;      /* for packet processing indices */
-	spinlock_t gpio_lock; /* for GPIO bus access */
 	u16 rx_q_entries;
 	u16 tx_q_entries;
 	u64 *tx_wqe_base;
@@ -184,7 +175,4 @@ int mlxbf_gige_poll(struct napi_struct *napi, int budget);
 extern const struct ethtool_ops mlxbf_gige_ethtool_ops;
 void mlxbf_gige_update_tx_wqe_next(struct mlxbf_gige *priv);
 
-int mlxbf_gige_gpio_init(struct platform_device *pdev, struct mlxbf_gige *priv);
-void mlxbf_gige_gpio_free(struct mlxbf_gige *priv);
-
 #endif /* !defined(__MLXBF_GIGE_H__) */
drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_gpio.c deleted +0 -212

212 lines not on this page · raw message

drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c +9 -13
index 3e85b17f5857..4382ec8f7d64 100644
@@ -273,8 +273,8 @@ static int mlxbf_gige_probe(struct platform_device *pdev)
 	void __iomem *llu_base;
 	void __iomem *plu_base;
 	void __iomem *base;
+	int addr, phy_irq;
 	u64 control;
-	int addr;
 	int err;
 
 	base = devm_platform_ioremap_resource(pdev, MLXBF_GIGE_RES_MAC);
@@ -309,20 +309,12 @@ static int mlxbf_gige_probe(struct platform_device *pdev)
 	priv->pdev = pdev;
 
 	spin_lock_init(&priv->lock);
-	spin_lock_init(&priv->gpio_lock);
 
 	/* Attach MDIO device */
 	err = mlxbf_gige_mdio_probe(pdev, priv);
 	if (err)
 		return err;
 
-	err = mlxbf_gige_gpio_init(pdev, priv);
-	if (err) {
-		dev_err(&pdev->dev, "PHY IRQ initialization failed\n");
-		mlxbf_gige_mdio_remove(priv);
-		return -ENODEV;
-	}
-
 	priv->base = base;
 	priv->llu_base = llu_base;
 	priv->plu_base = plu_base;
@@ -343,6 +335,12 @@ static int mlxbf_gige_probe(struct platform_device *pdev)
 	priv->rx_irq = platform_get_irq(pdev, MLXBF_GIGE_RECEIVE_PKT_INTR_IDX);
 	priv->llu_plu_irq = platform_get_irq(pdev, MLXBF_GIGE_LLU_PLU_INTR_IDX);
 
+	phy_irq = acpi_dev_gpio_irq_get_by(ACPI_COMPANION(&pdev->dev), "phy-gpios", 0);
+	if (phy_irq < 0) {
+		dev_err(&pdev->dev, "Error getting PHY irq. Use polling instead");
+		phy_irq = PHY_POLL;
+	}
+
 	phydev = phy_find_first(priv->mdiobus);
 	if (!phydev) {
 		err = -ENODEV;
@@ -350,8 +348,8 @@ static int mlxbf_gige_probe(struct platform_device *pdev)
 	}
 
 	addr = phydev->mdio.addr;
-	priv->mdiobus->irq[addr] = priv->phy_irq;
-	phydev->irq = priv->phy_irq;
+	priv->mdiobus->irq[addr] = phy_irq;
+	phydev->irq = phy_irq;
 
 	err = phy_connect_direct(netdev, phydev,
 				 mlxbf_gige_adjust_link,
@@ -387,7 +385,6 @@ static int mlxbf_gige_probe(struct platform_device *pdev)
 	return 0;
 
 out:
-	mlxbf_gige_gpio_free(priv);
 	mlxbf_gige_mdio_remove(priv);
 	return err;
 }
@@ -398,7 +395,6 @@ static int mlxbf_gige_remove(struct platform_device *pdev)
 
 	unregister_netdev(priv->netdev);
 	phy_disconnect(priv->netdev->phydev);
-	mlxbf_gige_gpio_free(priv);
 	mlxbf_gige_mdio_remove(priv);
 	platform_set_drvdata(pdev, NULL);
 
Signature · 1 line
2.30.1
#6 lore raw

Re: [PATCH v5 2/2] net: mellanox: mlxbf_gige: Replace non-standard interrupt handling

Quoted 4 lines · Asmaa Mnebhi

Since the GPIO driver (gpio-mlxbf2.c) supports interrupt handling, replace the custom routine with simple IRQ request.

Should this also be merged into the GPIO tree with patch 1?

Yours,
Linus Walleij

#7 lore raw

Re: [PATCH v5 2/2] net: mellanox: mlxbf_gige: Replace non-standard interrupt handling

Quoted 9 lines · Linus Walleij
Quoted 4 lines · Asmaa Mnebhi

Since the GPIO driver (gpio-mlxbf2.c) supports interrupt handling, replace the custom routine with simple IRQ request.

Should this also be merged into the GPIO tree with patch 1?

Blast from the past?

Signature · 2 lines
With Best Regards,
Andy Shevchenko
maintainer Acked-by on the v5 series
#8 lore raw
In reply to Asmaa Mnebhi

From: Asmaa Mnebhi <[email protected]>
Date: Fri, 15 Oct 2021 12:48:07 -0400

Quoted 14 lines

This is a follow up on a discussion regarding
proper handling of GPIO interrupts within the
gpio-mlxbf2.c driver.

Link to discussion:
https://lore.kernel.org/netdev/[email protected]/T/

Patch 1 adds support to a GPIO IRQ handler in gpio-mlxbf2.c. Patch 2 is a follow up removal of custom GPIO IRQ handling from the mlxbf_gige driver and replacing it with a simple IRQ request. The ACPI table for the mlxbf_gige driver is responsible for instantiating the PHY GPIO interrupt via GpioInt.

Quoted 3 lines

Andy Shevchenko, could you please review this patch series. David Miller, could you please ack the changes in the mlxbf_gige driver.

#9 lore raw
In reply to Asmaa Mnebhi
Quoted 15 lines · Asmaa Mnebhi

This is a follow up on a discussion regarding
proper handling of GPIO interrupts within the
gpio-mlxbf2.c driver.

Link to discussion:
https://lore.kernel.org/netdev/[email protected]/T/

Patch 1 adds support to a GPIO IRQ handler in gpio-mlxbf2.c. Patch 2 is a follow up removal of custom GPIO IRQ handling from the mlxbf_gige driver and replacing it with a simple IRQ request. The ACPI table for the mlxbf_gige driver is responsible for instantiating the PHY GPIO interrupt via GpioInt.

Quoted 9 lines

Andy Shevchenko, could you please review this patch series. David Miller, could you please ack the changes in the mlxbf_gige driver.

v5 vs. v4 patch:
- Remove a fix which check if bgpio_init has failed. This fix should in a separate patch targeting the stable branch.

Hi Asmaa! Did you send this fix? I can't find it in my inbox or on patchwork.

Bart

#10 lore raw
Quoted 14 lines · Asmaa Mnebhi

This is a follow up on a discussion regarding proper handling of GPIO interrupts within the gpio-mlxbf2.c driver.

Link to discussion:
https://lore.kernel.org/netdev/20210816115953.72533-7-andriy.shevchenk
[email protected]/T/

Patch 1 adds support to a GPIO IRQ handler in gpio-mlxbf2.c. Patch 2 is a follow up removal of custom GPIO IRQ handling from the mlxbf_gige driver and replacing it with a simple IRQ request. The ACPI table for the mlxbf_gige driver is responsible for instantiating the PHY GPIO interrupt via GpioInt.

Quoted 9 lines

Andy Shevchenko, could you please review this patch series. David Miller, could you please ack the changes in the mlxbf_gige driver.

v5 vs. v4 patch:
- Remove a fix which check if bgpio_init has failed. This fix should in a separate patch targeting the stable branch.

Hi Asmaa! Did you send this fix? I can't find it in my inbox or on patchwork.

Hi Bart! I haven't that separate patch yet. I will send it shortly.

#11 lore raw
In reply to Bartosz Golaszewski

Hi Bart,

I was just wondering what is the status for this series of patches?

Thank you.
Asmaa

-----Original Message-----
From: Bartosz Golaszewski <[email protected]>
Sent: Thursday, October 21, 2021 2:01 PM
To: Asmaa Mnebhi <[email protected]>
Cc: Andy Shevchenko <[email protected]>; open list:GPIO SUBSYSTEM <[email protected]>; netdev <[email protected]>; Linux Kernel Mailing List <[email protected]>; ACPI Devel Maling List <[email protected]>; Andrew Lunn <[email protected]>; Jakub Kicinski <[email protected]>; Linus Walleij <[email protected]>; Bartosz Golaszewski <[email protected]>; David S . Miller <[email protected]>; Rafael J . Wysocki <[email protected]>; David Thompson <[email protected]>
Subject: Re: [PATCH v5 0/2] gpio: mlxbf2: Introduce proper interrupt handling
Importance: High

Quoted 14 lines · Asmaa Mnebhi

This is a follow up on a discussion regarding proper handling of GPIO interrupts within the gpio-mlxbf2.c driver.

Link to discussion:
https://lore.kernel.org/netdev/20210816115953.72533-7-andriy.shevchenk
[email protected]/T/

Patch 1 adds support to a GPIO IRQ handler in gpio-mlxbf2.c. Patch 2 is a follow up removal of custom GPIO IRQ handling from the mlxbf_gige driver and replacing it with a simple IRQ request. The ACPI table for the mlxbf_gige driver is responsible for instantiating the PHY GPIO interrupt via GpioInt.

Quoted 9 lines

Andy Shevchenko, could you please review this patch series. David Miller, could you please ack the changes in the mlxbf_gige driver.

v5 vs. v4 patch:
- Remove a fix which check if bgpio_init has failed. This fix should in a separate patch targeting the stable branch.

Hi Asmaa! Did you send this fix? I can't find it in my inbox or on patchwork.

Bart

#12 lore raw
Quoted 41 lines · Asmaa Mnebhi

Hi Bart,

I was just wondering what is the status for this series of patches?

Thank you.
Asmaa

-----Original Message-----
From: Bartosz Golaszewski <[email protected]>
Sent: Thursday, October 21, 2021 2:01 PM
To: Asmaa Mnebhi <[email protected]>
Cc: Andy Shevchenko <[email protected]>; open list:GPIO SUBSYSTEM <[email protected]>; netdev <[email protected]>; Linux Kernel Mailing List <[email protected]>; ACPI Devel Maling List <[email protected]>; Andrew Lunn <[email protected]>; Jakub Kicinski <[email protected]>; Linus Walleij <[email protected]>; Bartosz Golaszewski <[email protected]>; David S . Miller <[email protected]>; Rafael J . Wysocki <[email protected]>; David Thompson <[email protected]>
Subject: Re: [PATCH v5 0/2] gpio: mlxbf2: Introduce proper interrupt handling
Importance: High

Quoted 14 lines · Asmaa Mnebhi

This is a follow up on a discussion regarding proper handling of GPIO interrupts within the gpio-mlxbf2.c driver.

Link to discussion:
https://lore.kernel.org/netdev/20210816115953.72533-7-andriy.shevchenk
[email protected]/T/

Patch 1 adds support to a GPIO IRQ handler in gpio-mlxbf2.c. Patch 2 is a follow up removal of custom GPIO IRQ handling from the mlxbf_gige driver and replacing it with a simple IRQ request. The ACPI table for the mlxbf_gige driver is responsible for instantiating the PHY GPIO interrupt via GpioInt.

Quoted 9 lines

Andy Shevchenko, could you please review this patch series. David Miller, could you please ack the changes in the mlxbf_gige driver.

v5 vs. v4 patch:
- Remove a fix which check if bgpio_init has failed. This fix should in a separate patch targeting the stable branch.

Quoted 3 lines

Hi Asmaa! Did you send this fix? I can't find it in my inbox or on patchwork.

Bart

Now both applied (with David's Acks). Sorry for the delay.

Bart

#13 lore raw
In reply to Asmaa Mnebhi
Quoted 13 lines · Asmaa Mnebhi
Quoted 13 lines

This is a follow up on a discussion regarding proper handling of GPIO interrupts within the gpio-mlxbf2.c driver.

Link to discussion:
https://lore.kernel.org/netdev/20210816115953.72533-7-andriy.shevchenk
[email protected]/T/

Patch 1 adds support to a GPIO IRQ handler in gpio-mlxbf2.c. Patch 2 is a follow up removal of custom GPIO IRQ handling from the mlxbf_gige driver and replacing it with a simple IRQ request. The ACPI table for the mlxbf_gige driver is responsible for instantiating the PHY GPIO interrupt via GpioInt.

Quoted 3 lines
Quoted 3 lines

Andy Shevchenko, could you please review this patch series. David Miller, could you please ack the changes in the mlxbf_gige driver.

It looks nice! Thank you for fixing this code and making it right!

Signature · 2 lines
With Best Regards,
Andy Shevchenko