Skip to contentSkip to conversation

sky2: netpoll on dual port cards

PATCH Applied Stephen Hemminger 2 participants 2 messages Oct 18, 2006 – Nov 1, 2006

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

PATCH 1/1 sky2: netpoll on dual port cards

The sky2 driver uses a single NAPI poll routine for both ports on dual ported cards (because there is a single IRQ and status ring). Netpoll makes assumptions about the relationship between network device and NAPI that aren't correct on the second port, this will cause the port to never clear work.

Most systems, just have single port, so not a big issue. The easy fix is just make the second port, not netpoll capable.

drivers/net/sky2.c +5 -1
@@ -3255,7 +3255,11 @@
 		dev->poll = sky2_poll;
 	dev->weight = NAPI_WEIGHT;
 #ifdef CONFIG_NET_POLL_CONTROLLER
-	dev->poll_controller = sky2_netpoll;
+	/* Network console (only works on port 0)
+	 * because netpoll makes assumptions about NAPI
+	 */
+	if (port == 0)
+		dev->poll_controller = sky2_netpoll;
 #endif
 
 	sky2 = netdev_priv(dev);
Applied
#1 lore raw
Quoted 9 lines · Stephen Hemminger

The sky2 driver uses a single NAPI poll routine for both ports on dual ported cards (because there is a single IRQ and status ring). Netpoll makes assumptions about the relationship between network device and NAPI that aren't correct on the second port, this will cause the port to never clear work.

Most systems, just have single port, so not a big issue. The easy fix is just make the second port, not netpoll capable.

applied to #upstream-fixes