浏览代码

sky2: dual port NAPI problem

Shutting down port 0 disables the NAPI poll used by both ports.
The long term fix will be to separate NAPI object from net device
until then just reenable if needed.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Stephen Hemminger 18 年之前
父节点
当前提交
25d82d7a2f
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7 0
      drivers/net/sky2.c

+ 7 - 0
drivers/net/sky2.c

@@ -1511,6 +1511,13 @@ static int sky2_down(struct net_device *dev)
 	imask &= ~portirq_msk[port];
 	imask &= ~portirq_msk[port];
 	sky2_write32(hw, B0_IMSK, imask);
 	sky2_write32(hw, B0_IMSK, imask);
 
 
+	/*
+	 * Both ports share the NAPI poll on port 0, so if necessary undo the
+	 * the disable that is done in dev_close.
+	 */
+	if (sky2->port == 0 && hw->ports > 1)
+		netif_poll_enable(dev);
+
 	sky2_gmac_reset(hw, port);
 	sky2_gmac_reset(hw, port);
 
 
 	/* Stop transmitter */
 	/* Stop transmitter */