On Fri, May 18, 2012 at 03:43:10PM -0500, Larry Finger wrote: > On 05/18/2012 02:03 PM, [email protected] wrote: > > > >The patch below does not apply to the 3.3-stable tree. > >If someone wants it applied there, or to any other stable or longterm > >tree, then please email the backport, including the original git commit > >id to<[email protected]>. > > > >thanks, > > > >greg k-h > > > >------------------ original commit in Linus's tree ------------------ > > > >>From 574e02abaf816b582685805f0c1150ca9f1f18ee Mon Sep 17 00:00:00 2001 > >From: Larry Finger<[email protected]> > >Date: Fri, 4 May 2012 08:27:43 -0500 > >Subject: [PATCH] rtlwifi: fix for race condition when firmware is cached > > > >In commit b0302ab, the rtlwifi family of drivers was converted to use > >asynchronous firmware loading. Unfortumately, the implementation was > >racy, and the ieee80211 routines could be started before rtl_init_core() > >was called to setup the data. > > > >This patch fixes the bug noted in > >https://bugzilla.kernel.org/show_bug.cgi?id=43187. > > > >Reported-by: Joshua Roys<[email protected]> > >Tested-by: Neptune Ning<[email protected]> > >Signed-off-by: Larry Finger<[email protected]> > >Cc: Stable<[email protected]> [3.3] > >Signed-off-by: John W. Linville<[email protected]> > > > >diff --git a/drivers/net/wireless/rtlwifi/pci.c > >b/drivers/net/wireless/rtlwifi/pci.c > >index cc15fdb..67f9430 100644 > >--- a/drivers/net/wireless/rtlwifi/pci.c > >+++ b/drivers/net/wireless/rtlwifi/pci.c > >@@ -1851,14 +1851,6 @@ int __devinit rtl_pci_probe(struct pci_dev *pdev, > > /*like read eeprom and so on */ > > rtlpriv->cfg->ops->read_eeprom_info(hw); > > > >- if (rtlpriv->cfg->ops->init_sw_vars(hw)) { > >- RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "Can't init_sw_vars\n"); > >- err = -ENODEV; > >- goto fail3; > >- } > >- > >- rtlpriv->cfg->ops->init_sw_leds(hw); > >- > > /*aspm */ > > rtl_pci_init_aspm(hw); > > > >@@ -1877,6 +1869,14 @@ int __devinit rtl_pci_probe(struct pci_dev *pdev, > > goto fail3; > > } > > > >+ if (rtlpriv->cfg->ops->init_sw_vars(hw)) { > >+ RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "Can't init_sw_vars\n"); > >+ err = -ENODEV; > >+ goto fail3; > >+ } > >+ > >+ rtlpriv->cfg->ops->init_sw_leds(hw); > >+ > > err = sysfs_create_group(&pdev->dev.kobj,&rtl_attribute_group); > > if (err) { > > RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, > >diff --git a/drivers/net/wireless/rtlwifi/usb.c > >b/drivers/net/wireless/rtlwifi/usb.c > >index d04dbda..a6049d7 100644 > >--- a/drivers/net/wireless/rtlwifi/usb.c > >+++ b/drivers/net/wireless/rtlwifi/usb.c > >@@ -971,11 +971,6 @@ int __devinit rtl_usb_probe(struct usb_interface *intf, > > rtlpriv->cfg->ops->read_chip_version(hw); > > /*like read eeprom and so on */ > > rtlpriv->cfg->ops->read_eeprom_info(hw); > >- if (rtlpriv->cfg->ops->init_sw_vars(hw)) { > >- RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "Can't init_sw_vars\n"); > >- goto error_out; > >- } > >- rtlpriv->cfg->ops->init_sw_leds(hw); > > err = _rtl_usb_init(hw); > > if (err) > > goto error_out; > >@@ -987,6 +982,11 @@ int __devinit rtl_usb_probe(struct usb_interface *intf, > > "Can't allocate sw for mac80211\n"); > > goto error_out; > > } > >+ if (rtlpriv->cfg->ops->init_sw_vars(hw)) { > >+ RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "Can't init_sw_vars\n"); > >+ goto error_out; > >+ } > >+ rtlpriv->cfg->ops->init_sw_leds(hw); > > > > return 0; > > error_out: > > The backported version of the patch is attached. The original commit > id in the mainline tree is 574e02abaf816b582685805f0c1150ca9f1f18ee.
Now applied, thanks. greg k-h -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
