Skip to contentSkip to conversation

net: bgmac: Start transmit queue in bgmac_open

PATCH In review Florian Fainelli 1 participant 2 messages Jun 23, 2016

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

PATCH 2/3 net: bgmac: Start transmit queue in bgmac_open

The driver does not start the transmit queue in bgmac_open(). If the queue was stopped prior to closing then re-opening the interface, we would never be able to wake-up again.

Fixes dd4544f05469 ("bgmac: driver for GBit MAC core on BCMA bus")
---
 drivers/net/ethernet/broadcom/bgmac.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/net/ethernet/broadcom/bgmac.c +3 -0
index 70926c611f25..85cd07f72ffb 100644
@@ -1314,6 +1314,9 @@ static int bgmac_open(struct net_device *net_dev)
 	phy_start(bgmac->phy_dev);
 
 	netif_carrier_on(net_dev);
+
+	netif_start_queue(net_dev);
+
 	return 0;
 }
 
Signature · 1 line
2.7.4
#1 lore raw

PATCH 3/3 net: bgmac: Remove superflous netif_carrier_on()

bgmac_open() calls phy_start() to initialize the PHY state machine, which will set the interface's carrier state accordingly, no need to force that as this could be conflicting with the PHY state determined by PHYLIB.

Fixes dd4544f05469 ("bgmac: driver for GBit MAC core on BCMA bus")
---
 drivers/net/ethernet/broadcom/bgmac.c | 2 --
 1 file changed, 2 deletions(-)
drivers/net/ethernet/broadcom/bgmac.c +0 -2
index 85cd07f72ffb..a6333d38ecc0 100644
@@ -1313,8 +1313,6 @@ static int bgmac_open(struct net_device *net_dev)
 
 	phy_start(bgmac->phy_dev);
 
-	netif_carrier_on(net_dev);
-
 	netif_start_queue(net_dev);
 
 	return 0;
Signature · 1 line
2.7.4