Message ID | CANUX_P3p3mqUjJrynivna5Fu4iv8DDdH-rY53Y36tHRVewSSuQ@mail.gmail.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
On top of my previous patch of course (which actually fixed the previous bug, but added the one you are facing now...). Thanks, Emmanuel > -----Original Message----- > From: Emmanuel Grumbach [mailto:egrumbach@gmail.com] > Sent: Saturday, August 06, 2011 10:44 PM > To: Guy, Wey-Yi W > Cc: Pavel Roskin; Grumbach, Emmanuel; Daniel Halperin; > linville@tuxdriver.com; linux-wireless@vger.kernel.org > Subject: Re: [PATCH wireless-3.1] iwlagn: sysfs couldn't find the priv > pointer > > Can you please try that one ? > I don't have my machine near me, and don't want to crash it remotely, so I > didn't test it. I will test in on Sunday. > > > diff --git a/drivers/net/wireless/iwlwifi/iwl-pci.c > b/drivers/net/wireless/iwlwifi/iwl-pci.c > index 69d4ec4..2fdbffa 100644 > --- a/drivers/net/wireless/iwlwifi/iwl-pci.c > +++ b/drivers/net/wireless/iwlwifi/iwl-pci.c > @@ -478,27 +478,22 @@ out_no_pci: > return err; > } > > -static void iwl_pci_down(struct iwl_bus *bus) -{ > - struct iwl_pci_bus *pci_bus = (struct iwl_pci_bus *) bus- > >bus_specific; > - > - pci_disable_msi(pci_bus->pci_dev); > - pci_iounmap(pci_bus->pci_dev, pci_bus->hw_base); > - pci_release_regions(pci_bus->pci_dev); > - pci_disable_device(pci_bus->pci_dev); > - pci_set_drvdata(pci_bus->pci_dev, NULL); > - > - kfree(bus); > -} > - > static void __devexit iwl_pci_remove(struct pci_dev *pdev) { > struct iwl_priv *priv = pci_get_drvdata(pdev); > - void *bus_specific = priv->bus->bus_specific; > + struct iwl_bus *bus = priv->bus; > + struct iwl_pci_bus *pci_bus = IWL_BUS_GET_PCI_BUS(bus); > + struct pci_dev *pci_dev = IWL_BUS_GET_PCI_DEV(bus); > > iwl_remove(priv); > > - iwl_pci_down(bus_specific); > + pci_disable_msi(pci_dev); > + pci_iounmap(pci_dev, pci_bus->hw_base); > + pci_release_regions(pci_dev); > + pci_disable_device(pci_dev); > + pci_set_drvdata(pci_dev, NULL); > + > + kfree(bus); > } > > #ifdef CONFIG_PM --------------------------------------------------------------------- Intel Israel (74) Limited This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
FWIW, the patch below solved the problem on my system. Dan, please confirm you are happy with it. The bug was introduced by the patch that fixed the sysfs issue. Wey, John, do you think it would be better to revert my previous fix and send a combined patch that solves the sysfs issue and doesn't add the bug ? Or another patch on top of the buggy sysfs fix ? Thanks, Emmanuel > -----Original Message----- > From: Grumbach, Emmanuel > Sent: Saturday, August 06, 2011 10:46 PM > To: Emmanuel Grumbach; Guy, Wey-Yi W > Cc: Pavel Roskin; Daniel Halperin; linville@tuxdriver.com; linux- > wireless@vger.kernel.org > Subject: RE: [PATCH wireless-3.1] iwlagn: sysfs couldn't find the priv > pointer > > On top of my previous patch of course (which actually fixed the previous > bug, but added the one you are facing now...). > > Thanks, > Emmanuel > > > > -----Original Message----- > > From: Emmanuel Grumbach [mailto:egrumbach@gmail.com] > > Sent: Saturday, August 06, 2011 10:44 PM > > To: Guy, Wey-Yi W > > Cc: Pavel Roskin; Grumbach, Emmanuel; Daniel Halperin; > > linville@tuxdriver.com; linux-wireless@vger.kernel.org > > Subject: Re: [PATCH wireless-3.1] iwlagn: sysfs couldn't find the priv > > pointer > > > > Can you please try that one ? > > I don't have my machine near me, and don't want to crash it remotely, so > I > > didn't test it. I will test in on Sunday. > > > > > > diff --git a/drivers/net/wireless/iwlwifi/iwl-pci.c > > b/drivers/net/wireless/iwlwifi/iwl-pci.c > > index 69d4ec4..2fdbffa 100644 > > --- a/drivers/net/wireless/iwlwifi/iwl-pci.c > > +++ b/drivers/net/wireless/iwlwifi/iwl-pci.c > > @@ -478,27 +478,22 @@ out_no_pci: > > return err; > > } > > > > -static void iwl_pci_down(struct iwl_bus *bus) -{ > > - struct iwl_pci_bus *pci_bus = (struct iwl_pci_bus *) bus- > > >bus_specific; > > - > > - pci_disable_msi(pci_bus->pci_dev); > > - pci_iounmap(pci_bus->pci_dev, pci_bus->hw_base); > > - pci_release_regions(pci_bus->pci_dev); > > - pci_disable_device(pci_bus->pci_dev); > > - pci_set_drvdata(pci_bus->pci_dev, NULL); > > - > > - kfree(bus); > > -} > > - > > static void __devexit iwl_pci_remove(struct pci_dev *pdev) { > > struct iwl_priv *priv = pci_get_drvdata(pdev); > > - void *bus_specific = priv->bus->bus_specific; > > + struct iwl_bus *bus = priv->bus; > > + struct iwl_pci_bus *pci_bus = IWL_BUS_GET_PCI_BUS(bus); > > + struct pci_dev *pci_dev = IWL_BUS_GET_PCI_DEV(bus); > > > > iwl_remove(priv); > > > > - iwl_pci_down(bus_specific); > > + pci_disable_msi(pci_dev); > > + pci_iounmap(pci_dev, pci_bus->hw_base); > > + pci_release_regions(pci_dev); > > + pci_disable_device(pci_dev); > > + pci_set_drvdata(pci_dev, NULL); > > + > > + kfree(bus); > > } > > > > #ifdef CONFIG_PM --------------------------------------------------------------------- Intel Israel (74) Limited This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
I will like to combine the patches if it's ok for John. Wey -----Original Message----- From: Grumbach, Emmanuel Sent: Sunday, August 07, 2011 8:09 AM To: Grumbach, Emmanuel; Emmanuel Grumbach; Guy, Wey-Yi W Cc: Pavel Roskin; Daniel Halperin; linville@tuxdriver.com; linux-wireless@vger.kernel.org Subject: RE: [PATCH wireless-3.1] iwlagn: sysfs couldn't find the priv pointer FWIW, the patch below solved the problem on my system. Dan, please confirm you are happy with it. The bug was introduced by the patch that fixed the sysfs issue. Wey, John, do you think it would be better to revert my previous fix and send a combined patch that solves the sysfs issue and doesn't add the bug ? Or another patch on top of the buggy sysfs fix ? Thanks, Emmanuel > -----Original Message----- > From: Grumbach, Emmanuel > Sent: Saturday, August 06, 2011 10:46 PM > To: Emmanuel Grumbach; Guy, Wey-Yi W > Cc: Pavel Roskin; Daniel Halperin; linville@tuxdriver.com; linux- > wireless@vger.kernel.org > Subject: RE: [PATCH wireless-3.1] iwlagn: sysfs couldn't find the priv > pointer > > On top of my previous patch of course (which actually fixed the previous > bug, but added the one you are facing now...). > > Thanks, > Emmanuel > > > > -----Original Message----- > > From: Emmanuel Grumbach [mailto:egrumbach@gmail.com] > > Sent: Saturday, August 06, 2011 10:44 PM > > To: Guy, Wey-Yi W > > Cc: Pavel Roskin; Grumbach, Emmanuel; Daniel Halperin; > > linville@tuxdriver.com; linux-wireless@vger.kernel.org > > Subject: Re: [PATCH wireless-3.1] iwlagn: sysfs couldn't find the priv > > pointer > > > > Can you please try that one ? > > I don't have my machine near me, and don't want to crash it remotely, so > I > > didn't test it. I will test in on Sunday. > > > > > > diff --git a/drivers/net/wireless/iwlwifi/iwl-pci.c > > b/drivers/net/wireless/iwlwifi/iwl-pci.c > > index 69d4ec4..2fdbffa 100644 > > --- a/drivers/net/wireless/iwlwifi/iwl-pci.c > > +++ b/drivers/net/wireless/iwlwifi/iwl-pci.c > > @@ -478,27 +478,22 @@ out_no_pci: > > return err; > > } > > > > -static void iwl_pci_down(struct iwl_bus *bus) -{ > > - struct iwl_pci_bus *pci_bus = (struct iwl_pci_bus *) bus- > > >bus_specific; > > - > > - pci_disable_msi(pci_bus->pci_dev); > > - pci_iounmap(pci_bus->pci_dev, pci_bus->hw_base); > > - pci_release_regions(pci_bus->pci_dev); > > - pci_disable_device(pci_bus->pci_dev); > > - pci_set_drvdata(pci_bus->pci_dev, NULL); > > - > > - kfree(bus); > > -} > > - > > static void __devexit iwl_pci_remove(struct pci_dev *pdev) { > > struct iwl_priv *priv = pci_get_drvdata(pdev); > > - void *bus_specific = priv->bus->bus_specific; > > + struct iwl_bus *bus = priv->bus; > > + struct iwl_pci_bus *pci_bus = IWL_BUS_GET_PCI_BUS(bus); > > + struct pci_dev *pci_dev = IWL_BUS_GET_PCI_DEV(bus); > > > > iwl_remove(priv); > > > > - iwl_pci_down(bus_specific); > > + pci_disable_msi(pci_dev); > > + pci_iounmap(pci_dev, pci_bus->hw_base); > > + pci_release_regions(pci_dev); > > + pci_disable_device(pci_dev); > > + pci_set_drvdata(pci_dev, NULL); > > + > > + kfree(bus); > > } > > > > #ifdef CONFIG_PM -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Sure, that sounds great. On Sat, Aug 06, 2011 at 11:21:42PM -0700, Guy, Wey-Yi W wrote: > I will like to combine the patches if it's ok for John. > > Wey > > -----Original Message----- > From: Grumbach, Emmanuel > Sent: Sunday, August 07, 2011 8:09 AM > To: Grumbach, Emmanuel; Emmanuel Grumbach; Guy, Wey-Yi W > Cc: Pavel Roskin; Daniel Halperin; linville@tuxdriver.com; linux-wireless@vger.kernel.org > Subject: RE: [PATCH wireless-3.1] iwlagn: sysfs couldn't find the priv pointer > > FWIW, the patch below solved the problem on my system. > Dan, please confirm you are happy with it. > > The bug was introduced by the patch that fixed the sysfs issue. > > Wey, John, do you think it would be better to revert my previous fix and send a combined patch that solves the sysfs issue and doesn't add the bug ? Or another patch on top of the buggy sysfs fix ? > > Thanks, > Emmanuel > > > > -----Original Message----- > > From: Grumbach, Emmanuel > > Sent: Saturday, August 06, 2011 10:46 PM > > To: Emmanuel Grumbach; Guy, Wey-Yi W > > Cc: Pavel Roskin; Daniel Halperin; linville@tuxdriver.com; linux- > > wireless@vger.kernel.org > > Subject: RE: [PATCH wireless-3.1] iwlagn: sysfs couldn't find the priv > > pointer > > > > On top of my previous patch of course (which actually fixed the previous > > bug, but added the one you are facing now...). > > > > Thanks, > > Emmanuel > > > > > > > -----Original Message----- > > > From: Emmanuel Grumbach [mailto:egrumbach@gmail.com] > > > Sent: Saturday, August 06, 2011 10:44 PM > > > To: Guy, Wey-Yi W > > > Cc: Pavel Roskin; Grumbach, Emmanuel; Daniel Halperin; > > > linville@tuxdriver.com; linux-wireless@vger.kernel.org > > > Subject: Re: [PATCH wireless-3.1] iwlagn: sysfs couldn't find the priv > > > pointer > > > > > > Can you please try that one ? > > > I don't have my machine near me, and don't want to crash it remotely, so > > I > > > didn't test it. I will test in on Sunday. > > > > > > > > > diff --git a/drivers/net/wireless/iwlwifi/iwl-pci.c > > > b/drivers/net/wireless/iwlwifi/iwl-pci.c > > > index 69d4ec4..2fdbffa 100644 > > > --- a/drivers/net/wireless/iwlwifi/iwl-pci.c > > > +++ b/drivers/net/wireless/iwlwifi/iwl-pci.c > > > @@ -478,27 +478,22 @@ out_no_pci: > > > return err; > > > } > > > > > > -static void iwl_pci_down(struct iwl_bus *bus) -{ > > > - struct iwl_pci_bus *pci_bus = (struct iwl_pci_bus *) bus- > > > >bus_specific; > > > - > > > - pci_disable_msi(pci_bus->pci_dev); > > > - pci_iounmap(pci_bus->pci_dev, pci_bus->hw_base); > > > - pci_release_regions(pci_bus->pci_dev); > > > - pci_disable_device(pci_bus->pci_dev); > > > - pci_set_drvdata(pci_bus->pci_dev, NULL); > > > - > > > - kfree(bus); > > > -} > > > - > > > static void __devexit iwl_pci_remove(struct pci_dev *pdev) { > > > struct iwl_priv *priv = pci_get_drvdata(pdev); > > > - void *bus_specific = priv->bus->bus_specific; > > > + struct iwl_bus *bus = priv->bus; > > > + struct iwl_pci_bus *pci_bus = IWL_BUS_GET_PCI_BUS(bus); > > > + struct pci_dev *pci_dev = IWL_BUS_GET_PCI_DEV(bus); > > > > > > iwl_remove(priv); > > > > > > - iwl_pci_down(bus_specific); > > > + pci_disable_msi(pci_dev); > > > + pci_iounmap(pci_dev, pci_bus->hw_base); > > > + pci_release_regions(pci_dev); > > > + pci_disable_device(pci_dev); > > > + pci_set_drvdata(pci_dev, NULL); > > > + > > > + kfree(bus); > > > } > > > > > > #ifdef CONFIG_PM > -- > To unsubscribe from this list: send the line "unsubscribe linux-wireless" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >
> > Sure, that sounds great. Ok, I am OOO tomorrow, so it will wait until Wednesday. > > On Sat, Aug 06, 2011 at 11:21:42PM -0700, Guy, Wey-Yi W wrote: > > I will like to combine the patches if it's ok for John. > > > > Wey > > > > -----Original Message----- > > From: Grumbach, Emmanuel > > Sent: Sunday, August 07, 2011 8:09 AM > > To: Grumbach, Emmanuel; Emmanuel Grumbach; Guy, Wey-Yi W > > Cc: Pavel Roskin; Daniel Halperin; linville@tuxdriver.com; linux- > wireless@vger.kernel.org > > Subject: RE: [PATCH wireless-3.1] iwlagn: sysfs couldn't find the priv > pointer > > > > FWIW, the patch below solved the problem on my system. > > Dan, please confirm you are happy with it. > > > > The bug was introduced by the patch that fixed the sysfs issue. > > > > Wey, John, do you think it would be better to revert my previous fix and > send a combined patch that solves the sysfs issue and doesn't add the bug ? > Or another patch on top of the buggy sysfs fix ? > > > > Thanks, > > Emmanuel --------------------------------------------------------------------- Intel Israel (74) Limited This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Sun, Aug 7, 2011 at 1:13 AM, Emmanuel Grumbach <egrumbach@gmail.com> wrote: > Can you please try that one ? > I don't have my machine near me, and don't want to crash it remotely, > so I didn't test it. I will test in on Sunday. Hi Emmanuel, I also got the same kernel panic when unloading the iwlagn module for my inbuilt laptop card and i tried the attached patch and it seems to fix it. > > > diff --git a/drivers/net/wireless/iwlwifi/iwl-pci.c > b/drivers/net/wireless/iwlwifi/iwl-pci.c > index 69d4ec4..2fdbffa 100644 > --- a/drivers/net/wireless/iwlwifi/iwl-pci.c > +++ b/drivers/net/wireless/iwlwifi/iwl-pci.c > @@ -478,27 +478,22 @@ out_no_pci: > return err; > } > > -static void iwl_pci_down(struct iwl_bus *bus) > -{ > - struct iwl_pci_bus *pci_bus = (struct iwl_pci_bus *) bus->bus_specific; > - > - pci_disable_msi(pci_bus->pci_dev); > - pci_iounmap(pci_bus->pci_dev, pci_bus->hw_base); > - pci_release_regions(pci_bus->pci_dev); > - pci_disable_device(pci_bus->pci_dev); > - pci_set_drvdata(pci_bus->pci_dev, NULL); > - > - kfree(bus); > -} > - > static void __devexit iwl_pci_remove(struct pci_dev *pdev) > { > struct iwl_priv *priv = pci_get_drvdata(pdev); > - void *bus_specific = priv->bus->bus_specific; > + struct iwl_bus *bus = priv->bus; > + struct iwl_pci_bus *pci_bus = IWL_BUS_GET_PCI_BUS(bus); > + struct pci_dev *pci_dev = IWL_BUS_GET_PCI_DEV(bus); > > iwl_remove(priv); > > - iwl_pci_down(bus_specific); > + pci_disable_msi(pci_dev); > + pci_iounmap(pci_dev, pci_bus->hw_base); > + pci_release_regions(pci_dev); > + pci_disable_device(pci_dev); > + pci_set_drvdata(pci_dev, NULL); > + > + kfree(bus); > } > > #ifdef CONFIG_PM >
> > On Sun, Aug 7, 2011 at 1:13 AM, Emmanuel Grumbach <egrumbach@gmail.com> > wrote: > > Can you please try that one ? > > I don't have my machine near me, and don't want to crash it remotely, > > so I didn't test it. I will test in on Sunday. > > Hi Emmanuel, > > I also got the same kernel panic when unloading the iwlagn module for > my inbuilt laptop card and i tried the attached patch and it seems to > fix it. > > Hi Mohammed, Thanks for your time testing it. The final fix will be sent through the regular channel very soon. --------------------------------------------------------------------- Intel Israel (74) Limited This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" 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/wireless/iwlwifi/iwl-pci.c b/drivers/net/wireless/iwlwifi/iwl-pci.c index 69d4ec4..2fdbffa 100644 --- a/drivers/net/wireless/iwlwifi/iwl-pci.c +++ b/drivers/net/wireless/iwlwifi/iwl-pci.c @@ -478,27 +478,22 @@ out_no_pci: return err; } -static void iwl_pci_down(struct iwl_bus *bus) -{ - struct iwl_pci_bus *pci_bus = (struct iwl_pci_bus *) bus->bus_specific; - - pci_disable_msi(pci_bus->pci_dev); - pci_iounmap(pci_bus->pci_dev, pci_bus->hw_base); - pci_release_regions(pci_bus->pci_dev); - pci_disable_device(pci_bus->pci_dev); - pci_set_drvdata(pci_bus->pci_dev, NULL); - - kfree(bus); -} - static void __devexit iwl_pci_remove(struct pci_dev *pdev) { struct iwl_priv *priv = pci_get_drvdata(pdev); - void *bus_specific = priv->bus->bus_specific; + struct iwl_bus *bus = priv->bus; + struct iwl_pci_bus *pci_bus = IWL_BUS_GET_PCI_BUS(bus); + struct pci_dev *pci_dev = IWL_BUS_GET_PCI_DEV(bus); iwl_remove(priv); - iwl_pci_down(bus_specific); + pci_disable_msi(pci_dev); + pci_iounmap(pci_dev, pci_bus->hw_base); + pci_release_regions(pci_dev); + pci_disable_device(pci_dev); + pci_set_drvdata(pci_dev, NULL); + + kfree(bus); } #ifdef CONFIG_PM