From: Jiri Pirko Date: Tue, 11 Oct 2011 23:00:41 +0000 (+0000) Subject: tg3: negate USE_PHYLIB flag check X-Git-Tag: v2.6.39-400.9.0~823^2~272 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=0f2d4270d0f1944627e9b76fb01a176e14052689;p=users%2Fjedix%2Flinux-maple.git tg3: negate USE_PHYLIB flag check [ Upstream commit e730c82347b9dc75914da998c44c3f348965db41 ] 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 Acked-by: Matt Carlson Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 135c8b7690e4..27722fd6d4e9 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -15285,7 +15285,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); }