All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 0/2] net: bgmac: Couple of small bgmac changes
@ 2018-03-27 23:20 Florian Fainelli
  2018-03-27 23:20 ` [PATCH net-next 1/2] net: bgmac: Use interface name to request interrupt Florian Fainelli
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Florian Fainelli @ 2018-03-27 23:20 UTC (permalink / raw)
  To: netdev
  Cc: Florian Fainelli, David S. Miller, Scott Branden, Abhishek Shah,
	Florian Westphal, open list, bcm-kernel-feedback-list

Hi all,

This patch series addresses two minor issues with the bgmac driver:

- provides the interface name through /proc/interrupts rather than "bgmac"
- makes sure the interrupts are masked during probe, in case the block was
  not properly reset

Florian Fainelli (2):
  net: bgmac: Use interface name to request interrupt
  net: bgmac: Mask interrupts during probe

 drivers/net/ethernet/broadcom/bgmac.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

-- 
2.14.1

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

* [PATCH net-next 1/2] net: bgmac: Use interface name to request interrupt
  2018-03-27 23:20 [PATCH net-next 0/2] net: bgmac: Couple of small bgmac changes Florian Fainelli
@ 2018-03-27 23:20 ` Florian Fainelli
  2018-03-27 23:20 ` [PATCH net-next 2/2] net: bgmac: Mask interrupts during probe Florian Fainelli
  2018-03-29 16:06 ` [PATCH net-next 0/2] net: bgmac: Couple of small bgmac changes David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Florian Fainelli @ 2018-03-27 23:20 UTC (permalink / raw)
  To: netdev
  Cc: Florian Fainelli, David S. Miller, Scott Branden, Abhishek Shah,
	Florian Westphal, open list, bcm-kernel-feedback-list

When the system contains several BGMAC adapters, it is nice to be able
to tell which one is which by looking at /proc/interrupts. Use the
network device name as a name to request_irq() with.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 drivers/net/ethernet/broadcom/bgmac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/broadcom/bgmac.c b/drivers/net/ethernet/broadcom/bgmac.c
index 8eef9fb6b1fe..46d7b8068425 100644
--- a/drivers/net/ethernet/broadcom/bgmac.c
+++ b/drivers/net/ethernet/broadcom/bgmac.c
@@ -1190,7 +1190,7 @@ static int bgmac_open(struct net_device *net_dev)
 	bgmac_chip_init(bgmac);
 
 	err = request_irq(bgmac->irq, bgmac_interrupt, IRQF_SHARED,
-			  KBUILD_MODNAME, net_dev);
+			  net_dev->name, net_dev);
 	if (err < 0) {
 		dev_err(bgmac->dev, "IRQ request error: %d!\n", err);
 		bgmac_dma_cleanup(bgmac);
-- 
2.14.1

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

* [PATCH net-next 2/2] net: bgmac: Mask interrupts during probe
  2018-03-27 23:20 [PATCH net-next 0/2] net: bgmac: Couple of small bgmac changes Florian Fainelli
  2018-03-27 23:20 ` [PATCH net-next 1/2] net: bgmac: Use interface name to request interrupt Florian Fainelli
@ 2018-03-27 23:20 ` Florian Fainelli
  2018-03-29 16:06 ` [PATCH net-next 0/2] net: bgmac: Couple of small bgmac changes David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Florian Fainelli @ 2018-03-27 23:20 UTC (permalink / raw)
  To: netdev
  Cc: Florian Fainelli, David S. Miller, Scott Branden, Abhishek Shah,
	Florian Westphal, open list, bcm-kernel-feedback-list

We can have interrupts left enabled form e.g: the bootloader which used
the network device for network boot. Make sure we have those disabled as
early as possible to avoid spurious interrupts.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 drivers/net/ethernet/broadcom/bgmac.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/broadcom/bgmac.c b/drivers/net/ethernet/broadcom/bgmac.c
index 46d7b8068425..2326cc219c46 100644
--- a/drivers/net/ethernet/broadcom/bgmac.c
+++ b/drivers/net/ethernet/broadcom/bgmac.c
@@ -1492,6 +1492,8 @@ int bgmac_enet_probe(struct bgmac *bgmac)
 	struct net_device *net_dev = bgmac->net_dev;
 	int err;
 
+	bgmac_chip_intrs_off(bgmac);
+
 	net_dev->irq = bgmac->irq;
 	SET_NETDEV_DEV(net_dev, bgmac->dev);
 	dev_set_drvdata(bgmac->dev, bgmac);
-- 
2.14.1

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

* Re: [PATCH net-next 0/2] net: bgmac: Couple of small bgmac changes
  2018-03-27 23:20 [PATCH net-next 0/2] net: bgmac: Couple of small bgmac changes Florian Fainelli
  2018-03-27 23:20 ` [PATCH net-next 1/2] net: bgmac: Use interface name to request interrupt Florian Fainelli
  2018-03-27 23:20 ` [PATCH net-next 2/2] net: bgmac: Mask interrupts during probe Florian Fainelli
@ 2018-03-29 16:06 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2018-03-29 16:06 UTC (permalink / raw)
  To: f.fainelli
  Cc: netdev, scott.branden, abhishek.shah, fw, linux-kernel,
	bcm-kernel-feedback-list

From: Florian Fainelli <f.fainelli@gmail.com>
Date: Tue, 27 Mar 2018 16:20:00 -0700

> This patch series addresses two minor issues with the bgmac driver:
> 
> - provides the interface name through /proc/interrupts rather than "bgmac"
> - makes sure the interrupts are masked during probe, in case the block was
>   not properly reset

Series applied, thanks Florian.

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

end of thread, other threads:[~2018-03-29 16:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-27 23:20 [PATCH net-next 0/2] net: bgmac: Couple of small bgmac changes Florian Fainelli
2018-03-27 23:20 ` [PATCH net-next 1/2] net: bgmac: Use interface name to request interrupt Florian Fainelli
2018-03-27 23:20 ` [PATCH net-next 2/2] net: bgmac: Mask interrupts during probe Florian Fainelli
2018-03-29 16:06 ` [PATCH net-next 0/2] net: bgmac: Couple of small bgmac changes David Miller

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.