From: Shannon Nelson Date: Tue, 14 Mar 2017 17:24:43 +0000 (-0700) Subject: sunvnet: xoff not needed when removing port link X-Git-Tag: v4.1.12-98.0.20170517_2143~33^2~27 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=ec31345958fb55ae8d472541ccb33dc0f926d7b6;p=users%2Fjedix%2Flinux-maple.git sunvnet: xoff not needed when removing port link The sunvnet netdev is connected to the controlling ldom's vswitch for network bridging. However, for higher performance between ldoms, there also is a channel between each client ldom. These connections are represented in the sunvnet driver by a queue for each ldom. The driver uses select_queue to tell the stack which queue to use by tracking the mac addresses on the other end of each port. When a connected ldom shuts down, the driver receives an LDC_EVENT_RESET and the port is removed from the driver, thus a queue with no ldom on the other end will never be selected for Tx. The driver was trying to reinforce the "don't use this queue" notion with netif_tx_stop_queue() and netif_tx_wake_queue(), which really should only be used to signal a Tx queue is full (aka XOFF). This misuse of queue state resulted in NETDEV WATCHDOG messages and lots of unnecessary calls into the driver's tx_timeout handler. Simply removing these takes care of the problem. Orabug: 25190537 Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller (cherry-picked from commit 9c5a3a1f9388100d4b03e85faf0cce8264985302) Signed-off-by: Allen Pais --- diff --git a/drivers/net/ethernet/sun/sunvnet_common.c b/drivers/net/ethernet/sun/sunvnet_common.c index 8998960d7db9c..896c0a2df1a8f 100644 --- a/drivers/net/ethernet/sun/sunvnet_common.c +++ b/drivers/net/ethernet/sun/sunvnet_common.c @@ -1785,16 +1785,12 @@ void sunvnet_port_add_txq_common(struct vnet_port *port) vp->nports++; vp->q_used[smallest]++; port->q_index = smallest; - netif_tx_wake_queue(netdev_get_tx_queue(VNET_PORT_TO_NET_DEVICE(port), - port->q_index)); } EXPORT_SYMBOL_GPL(sunvnet_port_add_txq_common); void sunvnet_port_rm_txq_common(struct vnet_port *port) { port->vp->nports--; - netif_tx_stop_queue(netdev_get_tx_queue(VNET_PORT_TO_NET_DEVICE(port), - port->q_index)); port->vp->q_used[port->q_index]--; port->q_index = 0; }