netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@osdl.org>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: netdev@vger.kernel.org
Subject: [PATCH 5/7] sky2: NAPI suspend/resume of dual port cards
Date: Wed, 12 Jul 2006 15:23:46 -0700	[thread overview]
Message-ID: <20060712222646.467993013@localhost.localdomain> (raw)
In-Reply-To: 20060712222341.686007133@localhost.localdomain

[-- Attachment #1: sky2-suspend-dev0-poll.patch --]
[-- Type: text/plain, Size: 1138 bytes --]

The changes to handle suspend/resume didn't handle the case where
a dual port card has the first port down, but the second is running.
In this driver, all NAPI polling is done on the primary port.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>

--- sky2.orig/drivers/net/sky2.c	2006-07-07 16:31:29.000000000 -0700
+++ sky2/drivers/net/sky2.c	2006-07-07 16:35:29.000000000 -0700
@@ -3437,17 +3437,14 @@
 		return -EINVAL;
 
 	del_timer_sync(&hw->idle_timer);
+	netif_poll_disable(hw->dev[0]);
 
 	for (i = 0; i < hw->ports; i++) {
 		struct net_device *dev = hw->dev[i];
 
-		if (dev) {
-			if (!netif_running(dev))
-				continue;
-
+		if (netif_running(dev)) {
 			sky2_down(dev);
 			netif_device_detach(dev);
-			netif_poll_disable(dev);
 		}
 	}
 
@@ -3474,9 +3471,8 @@
 
 	for (i = 0; i < hw->ports; i++) {
 		struct net_device *dev = hw->dev[i];
-		if (dev && netif_running(dev)) {
+		if (netif_running(dev)) {
 			netif_device_attach(dev);
-			netif_poll_enable(dev);
 
 			err = sky2_up(dev);
 			if (err) {
@@ -3488,6 +3484,7 @@
 		}
 	}
 
+	netif_poll_enable(hw->dev[0]);
 	sky2_idle_start(hw);
 out:
 	return err;

--


  parent reply	other threads:[~2006-07-12 22:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-12 22:23 [PATCH 0/7] Marvell SysKonnect related driver fixes Stephen Hemminger
2006-07-12 22:23 ` [PATCH 1/7] sky2: fix truncated collision threshold mask Stephen Hemminger
2006-07-12 22:23 ` [PATCH 2/7] skge: " Stephen Hemminger
2006-07-12 22:23 ` [PATCH 3/7] sk98lin: " Stephen Hemminger
2006-07-12 22:23 ` [PATCH 4/7] sky2: sky2_reset section mismatch Stephen Hemminger
2006-07-12 22:23 ` Stephen Hemminger [this message]
2006-07-12 22:23 ` [PATCH 6/7] sky2: PHY power on delays Stephen Hemminger
2006-07-12 22:23 ` [PATCH 7/7] sky2: optimize receive restart Stephen Hemminger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060712222646.467993013@localhost.localdomain \
    --to=shemminger@osdl.org \
    --cc=jgarzik@pobox.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).