[PATCH net-next] amd-xgbe: Use system workqueue for device restart

Subsystems: amd xgbe driver, networking drivers, the rest

STALE3980d

2 messages, 2 authors, 2015-10-15 · open the first message on its own page

[PATCH net-next] amd-xgbe: Use system workqueue for device restart

From: Tom Lendacky <thomas.lendacky@amd.com>
Date: 2015-10-14 17:37:38

A previous patch switched from using the system workqueue to the device
workqueue for various operations. During a device restart the device
workqueue is flushed so the restart cannot use this workqueue or else
a deadlock results.  Move the device restart back to using the system
workqueue.

Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
---
 drivers/net/ethernet/amd/xgbe/xgbe-drv.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
index 14bad8c..49f796a 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
+++ b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
@@ -365,7 +365,7 @@ static irqreturn_t xgbe_isr(int irq, void *data)
 
 		/* Restart the device on a Fatal Bus Error */
 		if (XGMAC_GET_BITS(dma_ch_isr, DMA_CH_SR, FBE))
-			queue_work(pdata->dev_workqueue, &pdata->restart_work);
+			schedule_work(&pdata->restart_work);
 
 		/* Clear all interrupt signals */
 		XGMAC_DMA_IOWRITE(channel, DMA_CH_SR, dma_ch_isr);
@@ -1537,7 +1537,7 @@ static void xgbe_tx_timeout(struct net_device *netdev)
 	struct xgbe_prv_data *pdata = netdev_priv(netdev);
 
 	netdev_warn(netdev, "tx timeout, device restarting\n");
-	queue_work(pdata->dev_workqueue, &pdata->restart_work);
+	schedule_work(&pdata->restart_work);
 }
 
 static struct rtnl_link_stats64 *xgbe_get_stats64(struct net_device *netdev,

Re: [PATCH net-next] amd-xgbe: Use system workqueue for device restart

From: David Miller <davem@davemloft.net>
Date: 2015-10-15 12:57:58

From: Tom Lendacky <thomas.lendacky@amd.com>
Date: Wed, 14 Oct 2015 12:37:32 -0500
A previous patch switched from using the system workqueue to the device
workqueue for various operations. During a device restart the device
workqueue is flushed so the restart cannot use this workqueue or else
a deadlock results.  Move the device restart back to using the system
workqueue.

Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Applied, thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help