diff options
author | Jiri Pirko <jpirko@redhat.com> | 2011-10-12 01:00:41 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-10-19 05:59:33 +0200 |
commit | e730c82347b9dc75914da998c44c3f348965db41 (patch) | |
tree | 6a003ecc293961629062530996e9c9fc50e5131f /drivers/net/tg3.c | |
parent | netconsole: enable netconsole can make net_device refcnt incorrent (diff) | |
download | linux-e730c82347b9dc75914da998c44c3f348965db41.tar.xz linux-e730c82347b9dc75914da998c44c3f348965db41.zip |
tg3: negate USE_PHYLIB flag check
USE_PHYLIB flag in tg3_remove_one() is being checked incorrectly. This
results tg3_phy_fini->phy_disconnect is never called and when tg3 module
is removed.
In my case this resulted in panics in phy_state_machine calling function
phydev->adjust_link.
So correct this check.
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Acked-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r-- | drivers/net/tg3.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 4a1374df6084..c11a2b8327f3 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -15577,7 +15577,7 @@ static void __devexit tg3_remove_one(struct pci_dev *pdev) cancel_work_sync(&tp->reset_task); - if (!tg3_flag(tp, USE_PHYLIB)) { + if (tg3_flag(tp, USE_PHYLIB)) { tg3_phy_fini(tp); tg3_mdio_fini(tp); } |