Netdev List
 help / color / mirror / Atom feed
From: Krzysztof Helt <krzysztof.h1@wp.pl>
To: netdev@vger.kernel.org
Subject: 3c509: PnP resource management fix
Date: Mon, 7 Jan 2008 22:44:06 +0100	[thread overview]
Message-ID: <20080107224406.b7e56ade.krzysztof.h1@wp.pl> (raw)

From: Krzysztof Helt <krzysztof.h1@wp.pl>

In order to release PnP resources a card type must be set to EL3_PNP.
Previously, it was never set hence the PnP resources were not
released and device was left in incorrect state.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>

---

The type value is set only if the card is enabled as PnP device.

--- linux-2.6.24/drivers/net/3c509.c	2007-12-25 23:20:20.000000000 +0100
+++ linux-new/drivers/net/3c509.c	2007-12-26 12:18:08.000000000 +0100
@@ -385,6 +385,7 @@ static int __init el3_probe(int card_idx
 #if defined(__ISAPNP__)
 	static int pnp_cards;
 	struct pnp_dev *idev = NULL;
+	int pnp_found = 0;
 
 	if (nopnp == 1)
 		goto no_pnp;
@@ -430,6 +431,7 @@ __again:
 			pnp_cards++;
 
 			netdev_boot_setup_check(dev);
+			pnp_found = 1;
 			goto found;
 		}
 	}
@@ -560,6 +562,8 @@ no_pnp:
 	lp = netdev_priv(dev);
 #if defined(__ISAPNP__)
 	lp->dev = &idev->dev;
+	if (pnp_found)
+		lp->type = EL3_PNP;
 #endif
 	err = el3_common_init(dev);
 

                 reply	other threads:[~2008-01-07 21:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20080107224406.b7e56ade.krzysztof.h1@wp.pl \
    --to=krzysztof.h1@wp.pl \
    --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