tg3: negate USE_PHYLIB flag check
Subsystems (2)
PATCH 1/1 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.
--- drivers/net/tg3.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/tg3.c +1 -1
@@ -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); }
Signature · 1 line
1.7.6.2
Quoted 10 lines · Jiri Pirko
USE_PHYLIBflag intg3_remove_one()is being checked incorrectly. This resultstg3_phy_fini->phy_disconnectis never called and when tg3 module is removed.In my case this resulted in panics in
phy_state_machinecalling functionphydev->adjust_link.So correct this check.
Signed-off-by Jiri Pirko <[email protected]>
Introduced by commit 63c3a66fe6c827a731dcbdee181158b295626f83, entitled "tg3: Convert u32 flag,flg2,flg3 uses to bitmap".
Quoted 21 lines
--- drivers/net/tg3.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/net/tg3.c +1
-1@@ -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); }Signature · 1 line
1.7.6.2
David Miller
maintainerFrom: "Matt Carlson" <[email protected]>
Date: Wed, 12 Oct 2011 16:55:01 -0700
Quoted 8 lines · Jiri Pirko
Quoted 7 lines
USE_PHYLIBflag intg3_remove_one()is being checked incorrectly. This resultstg3_phy_fini->phy_disconnectis never called and when tg3 module is removed.In my case this resulted in panics in
phy_state_machinecalling functionphydev->adjust_link.
Quoted 8 lines
Quoted 3 lines
So correct this check.
Signed-off-by Jiri Pirko <[email protected]>Introduced by commit
63c3a66fe6c827a731dcbdee181158b295626f83, entitled "tg3: Convert u32 flag,flg2,flg3 uses to bitmap".Acked-by Matt Carlson <[email protected]>
Applied and queued up for -stable, thanks!