Message ID | 1318410041-2476-1-git-send-email-jpirko@redhat.com |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
On Wed, Oct 12, 2011 at 02:00:41AM -0700, Jiri Pirko wrote: > 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> Introduced by commit 63c3a66fe6c827a731dcbdee181158b295626f83, entitled "tg3: Convert u32 flag,flg2,flg3 uses to bitmap". Acked-by: Matt Carlson <mcarlson@broadcom.com> > --- > 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 4a1374d..c11a2b8 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); > } > -- > 1.7.6.2 > > -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
From: "Matt Carlson" <mcarlson@broadcom.com> Date: Wed, 12 Oct 2011 16:55:01 -0700 > On Wed, Oct 12, 2011 at 02:00:41AM -0700, Jiri Pirko wrote: >> 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> > > Introduced by commit 63c3a66fe6c827a731dcbdee181158b295626f83, entitled > "tg3: Convert u32 flag,flg2,flg3 uses to bitmap". > > Acked-by: Matt Carlson <mcarlson@broadcom.com> Applied and queued up for -stable, thanks! -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 4a1374d..c11a2b8 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); }
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> --- drivers/net/tg3.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)