Skip to content

Commit

Permalink
tg3: negate USE_PHYLIB flag check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jiri Pirko authored and David S. Miller committed Oct 19, 2011
1 parent d512348 commit e730c82
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/tg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit e730c82

Please sign in to comment.