[kernel] r16987 - in dists/squeeze/linux-2.6/debian: . patches/bugfix/all patches/series
Ben Hutchings
benh at alioth.debian.org
Sat Mar 5 13:46:53 UTC 2011
Author: benh
Date: Sat Mar 5 13:46:51 2011
New Revision: 16987
Log:
brcm80211: Fix the obvious bugs
Apply patches from 2.6.37.1 and 2.6.37.3-rc1 which appear to address all
the open bugs on this driver.
Added:
dists/squeeze/linux-2.6/debian/patches/bugfix/all/brcm80211-bugfix-for-softmac-crash-on-multi-cpu-configurations.patch
dists/squeeze/linux-2.6/debian/patches/bugfix/all/brcm80211-fix-suspend-resume-issue-in-brcmsmac.patch
Modified:
dists/squeeze/linux-2.6/debian/changelog
dists/squeeze/linux-2.6/debian/patches/series/31
Modified: dists/squeeze/linux-2.6/debian/changelog
==============================================================================
--- dists/squeeze/linux-2.6/debian/changelog Sat Mar 5 13:19:06 2011 (r16986)
+++ dists/squeeze/linux-2.6/debian/changelog Sat Mar 5 13:46:51 2011 (r16987)
@@ -36,6 +36,9 @@
* iowarrior: Don't trust report_size for buffer size (CVE-2010-4656)
* drm: Fix unsigned vs signed comparison issue in modeset ctl ioctl
(CVE-2011-1013)
+ * brcm80211: Fix suspend/resume in brcmsmac (Closes: #600769, #604802)
+ * brcm80211: Fix race between scanning and calibration on SMP
+ (Closes: 602444)
[ dann frazier ]
* xfs: Fix information leak using stale NFS handle (CVE-2010-2943)
Added: dists/squeeze/linux-2.6/debian/patches/bugfix/all/brcm80211-bugfix-for-softmac-crash-on-multi-cpu-configurations.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ dists/squeeze/linux-2.6/debian/patches/bugfix/all/brcm80211-bugfix-for-softmac-crash-on-multi-cpu-configurations.patch Sat Mar 5 13:46:51 2011 (r16987)
@@ -0,0 +1,112 @@
+From arend at broadcom.com Thu Feb 24 17:23:22 2011
+From: "Arend van Spriel" <arend at broadcom.com>
+Date: Thu, 24 Feb 2011 21:42:19 +0100
+Subject: staging: brcm80211: bugfix for softmac crash on multi cpu configurations
+To: gregkh at suse.de
+Cc: rvossen at broadcom.com, stable at kernel.org
+Message-ID: <1298580139-3695-2-git-send-email-arend at broadcom.com>
+
+
+From: Roland Vossen <rvossen at broadcom.com>
+
+commit 6a3be6e6e7feb4cb35275475d6a863b748d59cc3 upstream
+
+Solved a locking issue that resulted in driver crashes with the 43224 and 43225
+chips. The problem has been reported on several fora. Root cause was two fold:
+hardware was being manipulated by two unsynchronized threads, and a scan
+operation could interfere with an ongoing dynamic calibration process. Fix was
+to invoke a lock on wl_ops_config() operation and to set internal flags when a
+scan operation is started and stopped.
+
+Please add this to the staging-linus branch.
+
+Reviewed-by: Arend van Spriel <arend at broadcom.com>
+Signed-off-by: Roland Vossen <rvossen at broadcom.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh at suse.de>
+---
+ drivers/staging/brcm80211/sys/wl_mac80211.c | 14 ++++++++++----
+ drivers/staging/brcm80211/sys/wlc_mac80211.c | 13 +++++++++++++
+ drivers/staging/brcm80211/sys/wlc_pub.h | 2 ++
+ 3 files changed, 25 insertions(+), 4 deletions(-)
+
+--- a/drivers/staging/brcm80211/sys/wl_mac80211.c
++++ b/drivers/staging/brcm80211/sys/wl_mac80211.c
+@@ -353,9 +353,7 @@ ieee_set_channel(struct ieee80211_hw *hw
+ switch (type) {
+ case NL80211_CHAN_HT20:
+ case NL80211_CHAN_NO_HT:
+- WL_LOCK(wl);
+ err = wlc_set(wl->wlc, WLC_SET_CHANNEL, chan->hw_value);
+- WL_UNLOCK(wl);
+ break;
+ case NL80211_CHAN_HT40MINUS:
+ case NL80211_CHAN_HT40PLUS:
+@@ -376,6 +374,7 @@ static int wl_ops_config(struct ieee8021
+ int err = 0;
+ int new_int;
+
++ WL_LOCK(wl);
+ if (changed & IEEE80211_CONF_CHANGE_LISTEN_INTERVAL) {
+ WL_NONE(("%s: Setting listen interval to %d\n",
+ __func__, conf->listen_interval));
+@@ -431,6 +430,7 @@ static int wl_ops_config(struct ieee8021
+ }
+
+ config_out:
++ WL_UNLOCK(wl);
+ return err;
+ }
+
+@@ -559,14 +559,20 @@ wl_ops_set_tim(struct ieee80211_hw *hw,
+
+ static void wl_ops_sw_scan_start(struct ieee80211_hw *hw)
+ {
++ struct wl_info *wl = hw->priv;
+ WL_NONE(("Scan Start\n"));
+- return;
++ WL_LOCK(wl);
++ wlc_scan_start(wl->wlc);
++ WL_UNLOCK(wl);
+ }
+
+ static void wl_ops_sw_scan_complete(struct ieee80211_hw *hw)
+ {
++ struct wl_info *wl = hw->priv;
+ WL_NONE(("Scan Complete\n"));
+- return;
++ WL_LOCK(wl);
++ wlc_scan_stop(wl->wlc);
++ WL_UNLOCK(wl);
+ }
+
+ static void wl_ops_set_tsf(struct ieee80211_hw *hw, u64 tsf)
+--- a/drivers/staging/brcm80211/sys/wlc_mac80211.c
++++ b/drivers/staging/brcm80211/sys/wlc_mac80211.c
+@@ -8672,3 +8672,16 @@ static void wlc_txq_free(wlc_info_t *wlc
+
+ kfree(qi);
+ }
++
++/*
++ * Flag 'scan in progress' to withold dynamic phy calibration
++ */
++void wlc_scan_start(struct wlc_info *wlc)
++{
++ wlc_phy_hold_upd(wlc->band->pi, PHY_HOLD_FOR_SCAN, true);
++}
++
++void wlc_scan_stop(struct wlc_info *wlc)
++{
++ wlc_phy_hold_upd(wlc->band->pi, PHY_HOLD_FOR_SCAN, false);
++}
+--- a/drivers/staging/brcm80211/sys/wlc_pub.h
++++ b/drivers/staging/brcm80211/sys/wlc_pub.h
+@@ -568,6 +568,8 @@ extern void wlc_enable_mac(struct wlc_in
+ extern u16 wlc_rate_shm_offset(struct wlc_info *wlc, u8 rate);
+ extern u32 wlc_get_rspec_history(struct wlc_bsscfg *cfg);
+ extern u32 wlc_get_current_highest_rate(struct wlc_bsscfg *cfg);
++extern void wlc_scan_start(struct wlc_info *wlc);
++extern void wlc_scan_stop(struct wlc_info *wlc);
+
+ static inline int wlc_iovar_getuint(struct wlc_info *wlc, const char *name,
+ uint *arg)
Added: dists/squeeze/linux-2.6/debian/patches/bugfix/all/brcm80211-fix-suspend-resume-issue-in-brcmsmac.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ dists/squeeze/linux-2.6/debian/patches/bugfix/all/brcm80211-fix-suspend-resume-issue-in-brcmsmac.patch Sat Mar 5 13:46:51 2011 (r16987)
@@ -0,0 +1,128 @@
+From: Arend van Spriel <arend at broadcom.com>
+Date: Fri, 21 Jan 2011 13:36:44 +0100
+Subject: [PATCH] staging: brcm80211: fix suspend/resume issue in brcmsmac
+
+commit 4032ec639af9b735fdd903fab09de567bd73eaa0 upstream.
+
+PCI PM suspend callback took down the interface and resume brought
+it back up. In the mac80211 context this is done in subsequent calls.
+Rework implementation so that suspend only stores config, and sets
+PCI power state. The resume return to full power state (D0), restores
+the config, and brings hardware back up. Full bringup is done by
+subsequent mac80211 calls.
+
+Reviewed-by: Brett Rudley <brudley at broadcom.com>
+Signed-off-by: Arend van Spriel <arend at broadcom.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh at suse.de>
+[bwh: Adjust context for Debian's 2.6.32]
+---
+--- a/drivers/staging/brcm80211/sys/wl_mac80211.c
++++ b/drivers/staging/brcm80211/sys/wl_mac80211.c
+@@ -299,11 +299,8 @@ static void wl_ops_stop(struct ieee80211_hw *hw)
+ wl_info_t *wl = hw->priv;
+ ASSERT(wl);
+ WL_LOCK(wl);
+- wl_down(wl);
+ ieee80211_stop_queues(hw);
+ WL_UNLOCK(wl);
+-
+- return;
+ }
+
+ static int
+@@ -336,7 +333,14 @@ wl_ops_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
+ static void
+ wl_ops_remove_interface(struct ieee80211_hw *hw, struct ieee80211_if_init_conf *conf)
+ {
+- return;
++ struct wl_info *wl;
++
++ wl = HW_TO_WL(hw);
++
++ /* put driver in down state */
++ WL_LOCK(wl);
++ wl_down(wl);
++ WL_UNLOCK(wl);
+ }
+
+ static int
+@@ -972,7 +976,7 @@ static wl_info_t *wl_attach(u16 vendor, u16 device, unsigned long regs,
+ wl_found++;
+ return wl;
+
+- fail:
++fail:
+ wl_free(wl);
+ fail1:
+ return NULL;
+@@ -1356,7 +1360,6 @@ wl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
+ return 0;
+ }
+
+-#ifdef LINUXSTA_PS
+ static int wl_suspend(struct pci_dev *pdev, pm_message_t state)
+ {
+ wl_info_t *wl;
+@@ -1371,11 +1374,12 @@ static int wl_suspend(struct pci_dev *pdev, pm_message_t state)
+ return -ENODEV;
+ }
+
++ /* only need to flag hw is down for proper resume */
+ WL_LOCK(wl);
+- wl_down(wl);
+ wl->pub->hw_up = false;
+ WL_UNLOCK(wl);
+- pci_save_state(pdev, wl->pci_psstate);
++
++ pci_save_state(pdev);
+ pci_disable_device(pdev);
+ return pci_set_power_state(pdev, PCI_D3hot);
+ }
+@@ -1399,7 +1403,7 @@ static int wl_resume(struct pci_dev *pdev)
+ if (err)
+ return err;
+
+- pci_restore_state(pdev, wl->pci_psstate);
++ pci_restore_state(pdev);
+
+ err = pci_enable_device(pdev);
+ if (err)
+@@ -1411,13 +1415,12 @@ static int wl_resume(struct pci_dev *pdev)
+ if ((val & 0x0000ff00) != 0)
+ pci_write_config_dword(pdev, 0x40, val & 0xffff00ff);
+
+- WL_LOCK(wl);
+- err = wl_up(wl);
+- WL_UNLOCK(wl);
+-
++ /*
++ * done. driver will be put in up state
++ * in wl_ops_add_interface() call.
++ */
+ return err;
+ }
+-#endif /* LINUXSTA_PS */
+
+ static void wl_remove(struct pci_dev *pdev)
+ {
+@@ -1450,14 +1453,12 @@ static void wl_remove(struct pci_dev *pdev)
+ }
+
+ static struct pci_driver wl_pci_driver = {
+- .name = "brcm80211",
+- .probe = wl_pci_probe,
+-#ifdef LINUXSTA_PS
+- .suspend = wl_suspend,
+- .resume = wl_resume,
+-#endif /* LINUXSTA_PS */
+- .remove = __devexit_p(wl_remove),
+- .id_table = wl_id_table,
++ .name = "brcm80211",
++ .probe = wl_pci_probe,
++ .suspend = wl_suspend,
++ .resume = wl_resume,
++ .remove = __devexit_p(wl_remove),
++ .id_table = wl_id_table,
+ };
+ #endif /* !BCMSDIO */
+
Modified: dists/squeeze/linux-2.6/debian/patches/series/31
==============================================================================
--- dists/squeeze/linux-2.6/debian/patches/series/31 Sat Mar 5 13:19:06 2011 (r16986)
+++ dists/squeeze/linux-2.6/debian/patches/series/31 Sat Mar 5 13:46:51 2011 (r16987)
@@ -49,3 +49,5 @@
+ bugfix/all/drm-radeon-kms-fix-s-r-issues-with-bios-scratch-regs.patch
+ bugfix/all/drm-radeon-kms-make-the-mac-rv630-quirk-generic.patch
+ bugfix/all/drm-radeon-remove-0x4243-pci-id.patch
++ bugfix/all/brcm80211-fix-suspend-resume-issue-in-brcmsmac.patch
++ bugfix/all/brcm80211-bugfix-for-softmac-crash-on-multi-cpu-configurations.patch
More information about the Kernel-svn-changes
mailing list