Skip to content

Commit

Permalink
3c509: PnP resource management fix
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
  • Loading branch information
Krzysztof Helt authored and Jeff Garzik committed Jan 12, 2008
1 parent 5dc1626 commit 9ca20eb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/net/3c509.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -430,6 +431,7 @@ static int __init el3_probe(int card_idx)
pnp_cards++;

netdev_boot_setup_check(dev);
pnp_found = 1;
goto found;
}
}
Expand Down Expand Up @@ -560,6 +562,8 @@ static int __init el3_probe(int card_idx)
lp = netdev_priv(dev);
#if defined(__ISAPNP__)
lp->dev = &idev->dev;
if (pnp_found)
lp->type = EL3_PNP;
#endif
err = el3_common_init(dev);

Expand Down

0 comments on commit 9ca20eb

Please sign in to comment.