Hello community,
here is the log from the commit of package kernel-source
checked in at Fri Feb 1 18:23:10 CET 2008.
--------
--- kernel-source/kernel-debug.changes 2008-01-29 22:41:22.000000000 +0100
+++ kernel-source/kernel-debug.changes 2008-01-31 16:43:12.000000000 +0100
@@ -1,0 +2,20 @@
+Thu Jan 31 15:26:24 CET 2008 - jbenc@suse.cz
+
+- patches.fixes/mac80211-fix-hw-scan1.patch,
+ patches.fixes/mac80211-fix-hw-scan2.patch: mac80211: hardware
+ scan rework (bnc#307050).
+
+-------------------------------------------------------------------
+Thu Jan 31 07:55:15 CET 2008 - sdietrich@suse.de
+
+- Remove a legacy tweak carried over from the 10.3 Kernel,
+ enable the affinity load-balancing sysctl.
+
+-------------------------------------------------------------------
+Wed Jan 30 04:53:53 CET 2008 - sdietrich@suse.de
+
+- patches.rt/x86-ticket-lock.patch: FIFO ticket lock spinlocks
+ for x86 (RT).
+- patches.rt/rt-mutex-i386.patch: Resolve conflicts.
+
+-------------------------------------------------------------------
kernel-default.changes: same change
kernel-dummy.changes: same change
kernel-kdump.changes: same change
kernel-pae.changes: same change
kernel-ppc64.changes: same change
kernel-ps3.changes: same change
kernel-rt.changes: same change
kernel-rt_debug.changes: same change
kernel-s390.changes: same change
kernel-source.changes: same change
kernel-syms.changes: same change
kernel-vanilla.changes: same change
kernel-xen.changes: same change
kernel-xenpae.changes: same change
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ kernel-debug.spec ++++++
--- /var/tmp/diff_new_pack.TO5478/_old 2008-02-01 18:20:57.000000000 +0100
+++ /var/tmp/diff_new_pack.TO5478/_new 2008-02-01 18:20:57.000000000 +0100
@@ -43,7 +43,7 @@
%endif
Summary: A Debug Version of the Kernel
Version: 2.6.24
-Release: 2
+Release: 4
License: GPL v2 or later
Group: System/Kernel
AutoReqProv: on
@@ -175,7 +175,7 @@
-Source Timestamp: 2008/01/29 09:50:57 UTC
+Source Timestamp: 2008/01/31 14:27:52 UTC
%prep
if ! [ -e %_sourcedir/linux-2.6.24.tar.bz2 ]; then
@@ -560,6 +560,17 @@
%files -f kernel.files
%changelog
+* Thu Jan 31 2008 jbenc@suse.cz
+- patches.fixes/mac80211-fix-hw-scan1.patch,
+ patches.fixes/mac80211-fix-hw-scan2.patch: mac80211: hardware
+ scan rework (bnc#307050).
+* Thu Jan 31 2008 sdietrich@suse.de
+- Remove a legacy tweak carried over from the 10.3 Kernel,
+ enable the affinity load-balancing sysctl.
+* Wed Jan 30 2008 sdietrich@suse.de
+- patches.rt/x86-ticket-lock.patch: FIFO ticket lock spinlocks
+ for x86 (RT).
+- patches.rt/rt-mutex-i386.patch: Resolve conflicts.
* Tue Jan 29 2008 olh@suse.de
- really skip kernel-ps3 in suse_kernel_module_package rpm macro
* Tue Jan 29 2008 jbeulich@novell.com
kernel-default.spec: same change
++++++ kernel-dummy.spec ++++++
--- /var/tmp/diff_new_pack.TO5478/_old 2008-02-01 18:20:57.000000000 +0100
+++ /var/tmp/diff_new_pack.TO5478/_new 2008-02-01 18:20:57.000000000 +0100
@@ -15,7 +15,7 @@
Url: http://www.kernel.org/
Summary: Internal dummy package for synchronizing release numbers
Version: 2.6.24
-Release: 2
+Release: 4
License: GPL v2 or later
Group: System/Kernel
AutoReqProv: off
@@ -28,7 +28,7 @@
--------
Andreas Gruenbacher
-Source Timestamp: 2008/01/29 09:50:57 UTC
+Source Timestamp: 2008/01/31 14:27:52 UTC
%install
rm -rf %buildroot
@@ -39,6 +39,17 @@
%defattr(-, root, root)
/etc/dummy
%changelog
+* Thu Jan 31 2008 jbenc@suse.cz
+- patches.fixes/mac80211-fix-hw-scan1.patch,
+ patches.fixes/mac80211-fix-hw-scan2.patch: mac80211: hardware
+ scan rework (bnc#307050).
+* Thu Jan 31 2008 sdietrich@suse.de
+- Remove a legacy tweak carried over from the 10.3 Kernel,
+ enable the affinity load-balancing sysctl.
+* Wed Jan 30 2008 sdietrich@suse.de
+- patches.rt/x86-ticket-lock.patch: FIFO ticket lock spinlocks
+ for x86 (RT).
+- patches.rt/rt-mutex-i386.patch: Resolve conflicts.
* Tue Jan 29 2008 olh@suse.de
- really skip kernel-ps3 in suse_kernel_module_package rpm macro
* Tue Jan 29 2008 jbeulich@novell.com
++++++ kernel-kdump.spec ++++++
--- /var/tmp/diff_new_pack.TO5478/_old 2008-02-01 18:20:58.000000000 +0100
+++ /var/tmp/diff_new_pack.TO5478/_new 2008-02-01 18:20:58.000000000 +0100
@@ -43,7 +43,7 @@
%endif
Summary: kernel for kdump
Version: 2.6.24
-Release: 2
+Release: 4
License: GPL v2 or later
Group: System/Kernel
AutoReqProv: on
@@ -174,7 +174,7 @@
-Source Timestamp: 2008/01/29 09:50:57 UTC
+Source Timestamp: 2008/01/31 14:27:52 UTC
%prep
if ! [ -e %_sourcedir/linux-2.6.24.tar.bz2 ]; then
@@ -559,6 +559,17 @@
%files -f kernel.files
%changelog
+* Thu Jan 31 2008 jbenc@suse.cz
+- patches.fixes/mac80211-fix-hw-scan1.patch,
+ patches.fixes/mac80211-fix-hw-scan2.patch: mac80211: hardware
+ scan rework (bnc#307050).
+* Thu Jan 31 2008 sdietrich@suse.de
+- Remove a legacy tweak carried over from the 10.3 Kernel,
+ enable the affinity load-balancing sysctl.
+* Wed Jan 30 2008 sdietrich@suse.de
+- patches.rt/x86-ticket-lock.patch: FIFO ticket lock spinlocks
+ for x86 (RT).
+- patches.rt/rt-mutex-i386.patch: Resolve conflicts.
* Tue Jan 29 2008 olh@suse.de
- really skip kernel-ps3 in suse_kernel_module_package rpm macro
* Tue Jan 29 2008 jbeulich@novell.com
kernel-pae.spec: same change
++++++ kernel-ppc64.spec ++++++
--- /var/tmp/diff_new_pack.TO5478/_old 2008-02-01 18:20:58.000000000 +0100
+++ /var/tmp/diff_new_pack.TO5478/_new 2008-02-01 18:20:58.000000000 +0100
@@ -42,7 +42,7 @@
%endif
Summary: Kernel for ppc64 Systems
Version: 2.6.24
-Release: 2
+Release: 4
License: GPL v2 or later; LGPL v2.1 or later
Group: System/Kernel
AutoReqProv: on
@@ -186,7 +186,7 @@
Tom Gall
see /usr/src/linux/CREDITS for more details.
-Source Timestamp: 2008/01/29 09:50:57 UTC
+Source Timestamp: 2008/01/31 14:27:52 UTC
%prep
if ! [ -e %_sourcedir/linux-2.6.24.tar.bz2 ]; then
@@ -571,6 +571,17 @@
%files -f kernel.files
%changelog
+* Thu Jan 31 2008 jbenc@suse.cz
+- patches.fixes/mac80211-fix-hw-scan1.patch,
+ patches.fixes/mac80211-fix-hw-scan2.patch: mac80211: hardware
+ scan rework (bnc#307050).
+* Thu Jan 31 2008 sdietrich@suse.de
+- Remove a legacy tweak carried over from the 10.3 Kernel,
+ enable the affinity load-balancing sysctl.
+* Wed Jan 30 2008 sdietrich@suse.de
+- patches.rt/x86-ticket-lock.patch: FIFO ticket lock spinlocks
+ for x86 (RT).
+- patches.rt/rt-mutex-i386.patch: Resolve conflicts.
* Tue Jan 29 2008 olh@suse.de
- really skip kernel-ps3 in suse_kernel_module_package rpm macro
* Tue Jan 29 2008 jbeulich@novell.com
++++++ kernel-ps3.spec ++++++
--- /var/tmp/diff_new_pack.TO5478/_old 2008-02-01 18:20:59.000000000 +0100
+++ /var/tmp/diff_new_pack.TO5478/_new 2008-02-01 18:20:59.000000000 +0100
@@ -42,7 +42,7 @@
%endif
Summary: kernel for ps3 bootloader
Version: 2.6.24
-Release: 2
+Release: 4
License: GPL v2 or later
Group: System/Kernel
AutoReqProv: on
@@ -172,7 +172,7 @@
-Source Timestamp: 2008/01/29 09:50:57 UTC
+Source Timestamp: 2008/01/31 14:27:52 UTC
%prep
if ! [ -e %_sourcedir/linux-2.6.24.tar.bz2 ]; then
@@ -557,6 +557,17 @@
%files -f kernel.files
%changelog
+* Thu Jan 31 2008 jbenc@suse.cz
+- patches.fixes/mac80211-fix-hw-scan1.patch,
+ patches.fixes/mac80211-fix-hw-scan2.patch: mac80211: hardware
+ scan rework (bnc#307050).
+* Thu Jan 31 2008 sdietrich@suse.de
+- Remove a legacy tweak carried over from the 10.3 Kernel,
+ enable the affinity load-balancing sysctl.
+* Wed Jan 30 2008 sdietrich@suse.de
+- patches.rt/x86-ticket-lock.patch: FIFO ticket lock spinlocks
+ for x86 (RT).
+- patches.rt/rt-mutex-i386.patch: Resolve conflicts.
* Tue Jan 29 2008 olh@suse.de
- really skip kernel-ps3 in suse_kernel_module_package rpm macro
* Tue Jan 29 2008 jbeulich@novell.com
++++++ kernel-rt_debug.spec ++++++
--- /var/tmp/diff_new_pack.TO5478/_old 2008-02-01 18:20:59.000000000 +0100
+++ /var/tmp/diff_new_pack.TO5478/_new 2008-02-01 18:20:59.000000000 +0100
@@ -43,7 +43,7 @@
%endif
Summary: A Debug Version of the Kernel
Version: 2.6.24
-Release: 2
+Release: 4
License: GPL v2 or later
Group: System/Kernel
AutoReqProv: on
@@ -172,7 +172,7 @@
-Source Timestamp: 2008/01/29 09:50:57 UTC
+Source Timestamp: 2008/01/31 14:27:52 UTC
%prep
if ! [ -e %_sourcedir/linux-2.6.24.tar.bz2 ]; then
@@ -557,6 +557,17 @@
%files -f kernel.files
%changelog
+* Thu Jan 31 2008 jbenc@suse.cz
+- patches.fixes/mac80211-fix-hw-scan1.patch,
+ patches.fixes/mac80211-fix-hw-scan2.patch: mac80211: hardware
+ scan rework (bnc#307050).
+* Thu Jan 31 2008 sdietrich@suse.de
+- Remove a legacy tweak carried over from the 10.3 Kernel,
+ enable the affinity load-balancing sysctl.
+* Wed Jan 30 2008 sdietrich@suse.de
+- patches.rt/x86-ticket-lock.patch: FIFO ticket lock spinlocks
+ for x86 (RT).
+- patches.rt/rt-mutex-i386.patch: Resolve conflicts.
* Tue Jan 29 2008 olh@suse.de
- really skip kernel-ps3 in suse_kernel_module_package rpm macro
* Tue Jan 29 2008 jbeulich@novell.com
++++++ kernel-rt.spec ++++++
--- /var/tmp/diff_new_pack.TO5478/_old 2008-02-01 18:20:59.000000000 +0100
+++ /var/tmp/diff_new_pack.TO5478/_new 2008-02-01 18:20:59.000000000 +0100
@@ -43,7 +43,7 @@
%endif
Summary: The Realtime Linux Kernel
Version: 2.6.24
-Release: 2
+Release: 4
License: GPL v2 or later
Group: System/Kernel
AutoReqProv: on
@@ -183,7 +183,7 @@
see /usr/src/linux/CREDITS for more details.
-Source Timestamp: 2008/01/29 09:50:57 UTC
+Source Timestamp: 2008/01/31 14:27:52 UTC
%prep
if ! [ -e %_sourcedir/linux-2.6.24.tar.bz2 ]; then
@@ -568,6 +568,17 @@
%files -f kernel.files
%changelog
+* Thu Jan 31 2008 jbenc@suse.cz
+- patches.fixes/mac80211-fix-hw-scan1.patch,
+ patches.fixes/mac80211-fix-hw-scan2.patch: mac80211: hardware
+ scan rework (bnc#307050).
+* Thu Jan 31 2008 sdietrich@suse.de
+- Remove a legacy tweak carried over from the 10.3 Kernel,
+ enable the affinity load-balancing sysctl.
+* Wed Jan 30 2008 sdietrich@suse.de
+- patches.rt/x86-ticket-lock.patch: FIFO ticket lock spinlocks
+ for x86 (RT).
+- patches.rt/rt-mutex-i386.patch: Resolve conflicts.
* Tue Jan 29 2008 olh@suse.de
- really skip kernel-ps3 in suse_kernel_module_package rpm macro
* Tue Jan 29 2008 jbeulich@novell.com
++++++ kernel-s390.spec ++++++
--- /var/tmp/diff_new_pack.TO5478/_old 2008-02-01 18:20:59.000000000 +0100
+++ /var/tmp/diff_new_pack.TO5478/_new 2008-02-01 18:20:59.000000000 +0100
@@ -43,7 +43,7 @@
%endif
Summary: The Standard Kernel
Version: 2.6.24
-Release: 2
+Release: 3
License: GPL v2 or later
Group: System/Kernel
AutoReqProv: on
@@ -168,7 +168,7 @@
-Source Timestamp: 2008/01/29 09:50:57 UTC
+Source Timestamp: 2008/01/31 14:27:52 UTC
%prep
if ! [ -e %_sourcedir/linux-2.6.24.tar.bz2 ]; then
@@ -553,6 +553,17 @@
%files -f kernel.files
%changelog
+* Thu Jan 31 2008 jbenc@suse.cz
+- patches.fixes/mac80211-fix-hw-scan1.patch,
+ patches.fixes/mac80211-fix-hw-scan2.patch: mac80211: hardware
+ scan rework (bnc#307050).
+* Thu Jan 31 2008 sdietrich@suse.de
+- Remove a legacy tweak carried over from the 10.3 Kernel,
+ enable the affinity load-balancing sysctl.
+* Wed Jan 30 2008 sdietrich@suse.de
+- patches.rt/x86-ticket-lock.patch: FIFO ticket lock spinlocks
+ for x86 (RT).
+- patches.rt/rt-mutex-i386.patch: Resolve conflicts.
* Tue Jan 29 2008 olh@suse.de
- really skip kernel-ps3 in suse_kernel_module_package rpm macro
* Tue Jan 29 2008 jbeulich@novell.com
++++++ kernel-source.spec ++++++
--- /var/tmp/diff_new_pack.TO5478/_old 2008-02-01 18:21:00.000000000 +0100
+++ /var/tmp/diff_new_pack.TO5478/_new 2008-02-01 18:21:00.000000000 +0100
@@ -22,7 +22,7 @@
%endif
Summary: The Linux Kernel Sources
Version: 2.6.24
-Release: 2
+Release: 4
License: GPL v2 only
Group: Development/Sources
AutoReqProv: off
@@ -107,7 +107,7 @@
see /usr/src/linux/CREDITS for more details.
-Source Timestamp: 2008/01/29 09:50:57 UTC
+Source Timestamp: 2008/01/31 14:27:52 UTC
%prep
if ! [ -e %_sourcedir/linux-2.6.24.tar.bz2 ]; then
@@ -282,6 +282,17 @@
%files -f kernel-source.files
%changelog
+* Thu Jan 31 2008 jbenc@suse.cz
+- patches.fixes/mac80211-fix-hw-scan1.patch,
+ patches.fixes/mac80211-fix-hw-scan2.patch: mac80211: hardware
+ scan rework (bnc#307050).
+* Thu Jan 31 2008 sdietrich@suse.de
+- Remove a legacy tweak carried over from the 10.3 Kernel,
+ enable the affinity load-balancing sysctl.
+* Wed Jan 30 2008 sdietrich@suse.de
+- patches.rt/x86-ticket-lock.patch: FIFO ticket lock spinlocks
+ for x86 (RT).
+- patches.rt/rt-mutex-i386.patch: Resolve conflicts.
* Tue Jan 29 2008 olh@suse.de
- really skip kernel-ps3 in suse_kernel_module_package rpm macro
* Tue Jan 29 2008 jbeulich@novell.com
++++++ kernel-syms.spec ++++++
--- /var/tmp/diff_new_pack.TO5478/_old 2008-02-01 18:21:00.000000000 +0100
+++ /var/tmp/diff_new_pack.TO5478/_new 2008-02-01 18:21:00.000000000 +0100
@@ -21,7 +21,7 @@
%endif
Summary: Kernel Symbol Versions (modversions)
Version: 2.6.24
-Release: 2
+Release: 4
License: GPL v2 or later
Group: Development/Sources
AutoReqProv: off
@@ -95,7 +95,7 @@
see /usr/src/linux/CREDITS for more details.
-Source Timestamp: 2008/01/29 09:50:57 UTC
+Source Timestamp: 2008/01/31 14:27:52 UTC
%prep
echo "Architecture symbol(s):" %symbols
@@ -149,6 +149,17 @@
/boot/symsets-*-*.tar.gz
/lib/modules/*/build
%changelog
+* Thu Jan 31 2008 jbenc@suse.cz
+- patches.fixes/mac80211-fix-hw-scan1.patch,
+ patches.fixes/mac80211-fix-hw-scan2.patch: mac80211: hardware
+ scan rework (bnc#307050).
+* Thu Jan 31 2008 sdietrich@suse.de
+- Remove a legacy tweak carried over from the 10.3 Kernel,
+ enable the affinity load-balancing sysctl.
+* Wed Jan 30 2008 sdietrich@suse.de
+- patches.rt/x86-ticket-lock.patch: FIFO ticket lock spinlocks
+ for x86 (RT).
+- patches.rt/rt-mutex-i386.patch: Resolve conflicts.
* Tue Jan 29 2008 olh@suse.de
- really skip kernel-ps3 in suse_kernel_module_package rpm macro
* Tue Jan 29 2008 jbeulich@novell.com
++++++ kernel-vanilla.spec ++++++
--- /var/tmp/diff_new_pack.TO5478/_old 2008-02-01 18:21:00.000000000 +0100
+++ /var/tmp/diff_new_pack.TO5478/_new 2008-02-01 18:21:00.000000000 +0100
@@ -43,7 +43,7 @@
%endif
Summary: The Standard Kernel - without any SUSE patches
Version: 2.6.24
-Release: 2
+Release: 4
License: GPL v2 or later
Group: System/Kernel
AutoReqProv: on
@@ -188,7 +188,7 @@
-Source Timestamp: 2008/01/29 09:50:57 UTC
+Source Timestamp: 2008/01/31 14:27:52 UTC
%prep
if ! [ -e %_sourcedir/linux-2.6.24.tar.bz2 ]; then
@@ -573,6 +573,17 @@
%files -f kernel.files
%changelog
+* Thu Jan 31 2008 jbenc@suse.cz
+- patches.fixes/mac80211-fix-hw-scan1.patch,
+ patches.fixes/mac80211-fix-hw-scan2.patch: mac80211: hardware
+ scan rework (bnc#307050).
+* Thu Jan 31 2008 sdietrich@suse.de
+- Remove a legacy tweak carried over from the 10.3 Kernel,
+ enable the affinity load-balancing sysctl.
+* Wed Jan 30 2008 sdietrich@suse.de
+- patches.rt/x86-ticket-lock.patch: FIFO ticket lock spinlocks
+ for x86 (RT).
+- patches.rt/rt-mutex-i386.patch: Resolve conflicts.
* Tue Jan 29 2008 olh@suse.de
- really skip kernel-ps3 in suse_kernel_module_package rpm macro
* Tue Jan 29 2008 jbeulich@novell.com
kernel-xenpae.spec: same change
kernel-xen.spec: same change
++++++ build-source-timestamp ++++++
--- kernel-source/build-source-timestamp 2008-01-29 22:41:18.000000000 +0100
+++ kernel-source/build-source-timestamp 2008-01-31 16:43:08.000000000 +0100
@@ -1 +1 @@
-2008/01/29 09:50:57 UTC
+2008/01/31 14:27:52 UTC
++++++ needed_space_in_mb ++++++
--- kernel-source/needed_space_in_mb 2008-01-30 04:17:14.000000000 +0100
+++ kernel-source/needed_space_in_mb 2008-01-31 16:43:25.000000000 +0100
@@ -1 +1 @@
-6000
+6144
++++++ patches.addon.tar.bz2 ++++++
++++++ patches.fixes.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/patches.fixes/mac80211-fix-hw-scan1.patch new/patches.fixes/mac80211-fix-hw-scan1.patch
--- old/patches.fixes/mac80211-fix-hw-scan1.patch 1970-01-01 01:00:00.000000000 +0100
+++ new/patches.fixes/mac80211-fix-hw-scan1.patch 2008-01-31 15:27:52.000000000 +0100
@@ -0,0 +1,337 @@
+From: Zhu Yi
+Date: Thu, 22 Nov 2007 02:53:21 +0000 (+0800)
+Subject: mac80211: hardware scan rework
+X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Flinville%2Fwireless-2.6.git;...
+Patch-mainline: yes (2.6.25?)
+References: bnc#307050
+Acked-by: Jiri Benc
+
+mac80211: hardware scan rework
+
+The scan code in mac80211 makes the software scan assumption in various
+places. For example, we stop the Tx queue during a software scan so that
+all the Tx packets will be queued by the stack. We also drop frames not
+related to scan in the software scan process. But these are not true for
+hardware scan.
+
+Some wireless hardwares (for example iwl3945/4965) has the ability to
+perform the whole scan process by hardware and/or firmware. The hardware
+scan is relative powerful in that it tries to maintain normal network
+traffic while doing a scan in the background. Some drivers (i.e iwlwifi)
+do provide a way to tune the hardware scan parameters (for example if the
+STA is associated, what's the max time could the STA leave from the
+associated channel, how long the scans get suspended after returning to
+the service channel, etc). But basically this is transparent to the
+stack. mac80211 should not stop Tx queues or drop Rx packets during a
+hardware scan.
+
+This patch resolves the above problem by spliting the current scan
+indicator local->sta_scanning into local->sta_sw_scanning and
+local->sta_hw_scanning. It then changes the scan related code to be aware
+of hardware scan or software scan in various places. With this patch,
+iwlwifi performs much better in the scan-while-associated condition and
+disable_hw_scan=1 should never be required.
+
+Cc: Mohamed Abbas
+Cc: Ben Cahill
+Signed-off-by: Zhu Yi
+Acked-by: Johannes Berg
+Signed-off-by: John W. Linville
+---
+
+diff --git a/net/mac80211/ieee80211.c b/net/mac80211/ieee80211.c
+index 6378850..4f8b665 100644
+--- a/net/mac80211/ieee80211.c
++++ b/net/mac80211/ieee80211.c
+@@ -350,11 +350,14 @@ static int ieee80211_stop(struct net_device *dev)
+ synchronize_rcu();
+ skb_queue_purge(&sdata->u.sta.skb_queue);
+
+- if (!local->ops->hw_scan &&
+- local->scan_dev == sdata->dev) {
+- local->sta_scanning = 0;
+- cancel_delayed_work(&local->scan_work);
++ if (local->scan_dev == sdata->dev) {
++ if (!local->ops->hw_scan) {
++ local->sta_sw_scanning = 0;
++ cancel_delayed_work(&local->scan_work);
++ } else
++ local->sta_hw_scanning = 0;
+ }
++
+ flush_workqueue(local->hw.workqueue);
+
+ sdata->u.sta.flags &= ~IEEE80211_STA_PRIVACY_INVOKED;
+@@ -526,7 +529,7 @@ int ieee80211_hw_config(struct ieee80211_local *local)
+ struct ieee80211_channel *chan;
+ int ret = 0;
+
+- if (local->sta_scanning) {
++ if (local->sta_sw_scanning) {
+ chan = local->scan_channel;
+ mode = local->scan_hw_mode;
+ } else {
+diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
+index 2be7fce..e910944 100644
+--- a/net/mac80211/ieee80211_i.h
++++ b/net/mac80211/ieee80211_i.h
+@@ -470,7 +470,8 @@ struct ieee80211_local {
+
+ struct list_head interfaces;
+
+- int sta_scanning;
++ bool sta_sw_scanning;
++ bool sta_hw_scanning;
+ int scan_channel_idx;
+ enum { SCAN_SET_CHANNEL, SCAN_SEND_PROBE } scan_state;
+ unsigned long last_scan_completed;
+@@ -745,7 +746,8 @@ int ieee80211_sta_req_scan(struct net_device *dev, u8 *ssid, size_t ssid_len);
+ void ieee80211_sta_req_auth(struct net_device *dev,
+ struct ieee80211_if_sta *ifsta);
+ int ieee80211_sta_scan_results(struct net_device *dev, char *buf, size_t len);
+-void ieee80211_sta_rx_scan(struct net_device *dev, struct sk_buff *skb,
++ieee80211_txrx_result ieee80211_sta_rx_scan(struct net_device *dev,
++ struct sk_buff *skb,
+ struct ieee80211_rx_status *rx_status);
+ void ieee80211_rx_bss_list_init(struct net_device *dev);
+ void ieee80211_rx_bss_list_deinit(struct net_device *dev);
+diff --git a/net/mac80211/ieee80211_ioctl.c b/net/mac80211/ieee80211_ioctl.c
+index bbd9bc5..dc03bd7 100644
+--- a/net/mac80211/ieee80211_ioctl.c
++++ b/net/mac80211/ieee80211_ioctl.c
+@@ -315,7 +315,7 @@ int ieee80211_set_channel(struct ieee80211_local *local, int channel, int freq)
+ }
+
+ if (set) {
+- if (local->sta_scanning)
++ if (local->sta_sw_scanning)
+ ret = 0;
+ else
+ ret = ieee80211_hw_config(local);
+@@ -545,8 +545,10 @@ static int ieee80211_ioctl_giwscan(struct net_device *dev,
+ {
+ int res;
+ struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
+- if (local->sta_scanning)
++
++ if (local->sta_sw_scanning || local->sta_hw_scanning)
+ return -EAGAIN;
++
+ res = ieee80211_sta_scan_results(dev, extra, data->length);
+ if (res >= 0) {
+ data->length = res;
+diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c
+index 4f9be2f..231a663 100644
+--- a/net/mac80211/ieee80211_sta.c
++++ b/net/mac80211/ieee80211_sta.c
+@@ -1483,8 +1483,18 @@ static void ieee80211_rx_bss_info(struct net_device *dev,
+ u32 supp_rates, prev_rates;
+ int i, j;
+
+- mode = local->sta_scanning ?
++ mode = local->sta_sw_scanning ?
+ local->scan_hw_mode : local->oper_hw_mode;
++
++ if (local->sta_hw_scanning) {
++ /* search for the correct mode matches the beacon */
++ list_for_each_entry(mode, &local->modes_list, list)
++ if (mode->mode == rx_status->phymode)
++ break;
++
++ if (mode == NULL)
++ mode = local->oper_hw_mode;
++ }
+ rates = mode->rates;
+ num_rates = mode->num_rates;
+
+@@ -1867,31 +1877,39 @@ static void ieee80211_sta_rx_queued_mgmt(struct net_device *dev,
+ }
+
+
+-void ieee80211_sta_rx_scan(struct net_device *dev, struct sk_buff *skb,
+- struct ieee80211_rx_status *rx_status)
++ieee80211_txrx_result
++ieee80211_sta_rx_scan(struct net_device *dev, struct sk_buff *skb,
++ struct ieee80211_rx_status *rx_status)
+ {
+ struct ieee80211_mgmt *mgmt;
+ u16 fc;
+
+- if (skb->len < 24) {
+- dev_kfree_skb(skb);
+- return;
+- }
++ if (skb->len < 2)
++ return TXRX_DROP;
+
+ mgmt = (struct ieee80211_mgmt *) skb->data;
+ fc = le16_to_cpu(mgmt->frame_control);
+
++ if ((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_CTL)
++ return TXRX_CONTINUE;
++
++ if (skb->len < 24)
++ return TXRX_DROP;
++
+ if ((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_MGMT) {
+ if ((fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_PROBE_RESP) {
+ ieee80211_rx_mgmt_probe_resp(dev, mgmt,
+ skb->len, rx_status);
++ dev_kfree_skb(skb);
++ return TXRX_QUEUED;
+ } else if ((fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_BEACON) {
+ ieee80211_rx_mgmt_beacon(dev, mgmt, skb->len,
+ rx_status);
++ dev_kfree_skb(skb);
++ return TXRX_QUEUED;
+ }
+ }
+-
+- dev_kfree_skb(skb);
++ return TXRX_CONTINUE;
+ }
+
+
+@@ -1981,7 +1999,7 @@ void ieee80211_sta_work(struct work_struct *work)
+ if (!netif_running(dev))
+ return;
+
+- if (local->sta_scanning)
++ if (local->sta_sw_scanning || local->sta_hw_scanning)
+ return;
+
+ if (sdata->type != IEEE80211_IF_TYPE_STA &&
+@@ -2639,9 +2657,15 @@ void ieee80211_scan_completed(struct ieee80211_hw *hw)
+ union iwreq_data wrqu;
+
+ local->last_scan_completed = jiffies;
+- wmb();
+- local->sta_scanning = 0;
++ memset(&wrqu, 0, sizeof(wrqu));
++ wireless_send_event(dev, SIOCGIWSCAN, &wrqu, NULL);
+
++ if (local->sta_hw_scanning) {
++ local->sta_hw_scanning = 0;
++ goto done;
++ }
++
++ local->sta_sw_scanning = 0;
+ if (ieee80211_hw_config(local))
+ printk(KERN_DEBUG "%s: failed to restore operational "
+ "channel after scan\n", dev->name);
+@@ -2657,9 +2681,6 @@ void ieee80211_scan_completed(struct ieee80211_hw *hw)
+
+ netif_tx_unlock_bh(local->mdev);
+
+- memset(&wrqu, 0, sizeof(wrqu));
+- wireless_send_event(dev, SIOCGIWSCAN, &wrqu, NULL);
+-
+ rcu_read_lock();
+ list_for_each_entry_rcu(sdata, &local->interfaces, list) {
+
+@@ -2677,6 +2698,7 @@ void ieee80211_scan_completed(struct ieee80211_hw *hw)
+ }
+ rcu_read_unlock();
+
++done:
+ sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+ if (sdata->type == IEEE80211_IF_TYPE_IBSS) {
+ struct ieee80211_if_sta *ifsta = &sdata->u.sta;
+@@ -2699,7 +2721,7 @@ void ieee80211_sta_scan_work(struct work_struct *work)
+ int skip;
+ unsigned long next_delay = 0;
+
+- if (!local->sta_scanning)
++ if (!local->sta_sw_scanning)
+ return;
+
+ switch (local->scan_state) {
+@@ -2762,7 +2784,7 @@ void ieee80211_sta_scan_work(struct work_struct *work)
+ break;
+ }
+
+- if (local->sta_scanning)
++ if (local->sta_sw_scanning)
+ queue_delayed_work(local->hw.workqueue, &local->scan_work,
+ next_delay);
+ }
+@@ -2794,7 +2816,7 @@ static int ieee80211_sta_start_scan(struct net_device *dev,
+ * ResultCode: SUCCESS, INVALID_PARAMETERS
+ */
+
+- if (local->sta_scanning) {
++ if (local->sta_sw_scanning || local->sta_hw_scanning) {
+ if (local->scan_dev == dev)
+ return 0;
+ return -EBUSY;
+@@ -2802,15 +2824,15 @@ static int ieee80211_sta_start_scan(struct net_device *dev,
+
+ if (local->ops->hw_scan) {
+ int rc = local->ops->hw_scan(local_to_hw(local),
+- ssid, ssid_len);
++ ssid, ssid_len);
+ if (!rc) {
+- local->sta_scanning = 1;
++ local->sta_hw_scanning = 1;
+ local->scan_dev = dev;
+ }
+ return rc;
+ }
+
+- local->sta_scanning = 1;
++ local->sta_sw_scanning = 1;
+
+ rcu_read_lock();
+ list_for_each_entry_rcu(sdata, &local->interfaces, list) {
+@@ -2865,7 +2887,7 @@ int ieee80211_sta_req_scan(struct net_device *dev, u8 *ssid, size_t ssid_len)
+ if (sdata->type != IEEE80211_IF_TYPE_STA)
+ return ieee80211_sta_start_scan(dev, ssid, ssid_len);
+
+- if (local->sta_scanning) {
++ if (local->sta_sw_scanning || local->sta_hw_scanning) {
+ if (local->scan_dev == dev)
+ return 0;
+ return -EBUSY;
+diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
+index 00f908d..c3bb9af 100644
+--- a/net/mac80211/rx.c
++++ b/net/mac80211/rx.c
+@@ -338,8 +338,14 @@ ieee80211_rx_h_passive_scan(struct ieee80211_txrx_data *rx)
+ struct ieee80211_local *local = rx->local;
+ struct sk_buff *skb = rx->skb;
+
+- if (unlikely(local->sta_scanning != 0)) {
+- ieee80211_sta_rx_scan(rx->dev, skb, rx->u.rx.status);
++ if (unlikely(local->sta_hw_scanning))
++ return ieee80211_sta_rx_scan(rx->dev, skb, rx->u.rx.status);
++
++ if (unlikely(local->sta_sw_scanning)) {
++ /* drop all the other packets during a software scan anyway */
++ if (ieee80211_sta_rx_scan(rx->dev, skb, rx->u.rx.status)
++ != TXRX_QUEUED)
++ dev_kfree_skb(skb);
+ return TXRX_QUEUED;
+ }
+
+@@ -1486,7 +1492,7 @@ void __ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb,
+ goto end;
+ }
+
+- if (unlikely(local->sta_scanning))
++ if (unlikely(local->sta_sw_scanning || local->sta_hw_scanning))
+ rx.flags |= IEEE80211_TXRXD_RXIN_SCAN;
+
+ if (__ieee80211_invoke_rx_handlers(local, local->rx_pre_handlers, &rx,
+diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
+index 9ccf4b5..50ab4b2 100644
+--- a/net/mac80211/tx.c
++++ b/net/mac80211/tx.c
+@@ -225,7 +225,7 @@ ieee80211_tx_h_check_assoc(struct ieee80211_txrx_data *tx)
+ if (unlikely(tx->flags & IEEE80211_TXRXD_TX_INJECTED))
+ return TXRX_CONTINUE;
+
+- if (unlikely(tx->local->sta_scanning != 0) &&
++ if (unlikely(tx->local->sta_sw_scanning) &&
+ ((tx->fc & IEEE80211_FCTL_FTYPE) != IEEE80211_FTYPE_MGMT ||
+ (tx->fc & IEEE80211_FCTL_STYPE) != IEEE80211_STYPE_PROBE_REQ))
+ return TXRX_DROP;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/patches.fixes/mac80211-fix-hw-scan2.patch new/patches.fixes/mac80211-fix-hw-scan2.patch
--- old/patches.fixes/mac80211-fix-hw-scan2.patch 1970-01-01 01:00:00.000000000 +0100
+++ new/patches.fixes/mac80211-fix-hw-scan2.patch 2008-01-31 15:27:52.000000000 +0100
@@ -0,0 +1,48 @@
+From: Helmut Schaa
+Date: Fri, 21 Dec 2007 14:16:35 +0000 (+0100)
+Subject: mac80211: Restore rx.fc before every invocation of ieee80211_invoke_rx_handlers
+X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Flinville%2Fwireless-2.6.git;...
+Patch-mainline: yes (2.6.25?)
+References: bnc#307050
+Acked-by: Jiri Benc
+
+mac80211: Restore rx.fc before every invocation of ieee80211_invoke_rx_handlers
+
+This patch fixes a problem with rx handling on multiple interfaces. Especially
+when using hardware-scanning and a wireless driver (i.e. iwlwifi) which is
+able to receive data while scanning.
+
+The rx handlers can modify the skb and the frame control field (see
+ieee80211_rx_h_remove_qos_control) but since every interface gets its own
+copy of the skb each should get its own copy of rx.fc too.
+
+In my case the wlan0-interface did not remove the qos-control from the frame
+because the corresponding flag in rx.fc was already removed while processing
+the frame on the master interface. Therefore somehow corrupted frames were
+passed to the userspace.
+
+Signed-off-by: Helmut Schaa
+Acked-by: Johannes Berg
+Signed-off-by: John W. Linville
+---
+
+diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
+index 9667e49..81f8806 100644
+--- a/net/mac80211/rx.c
++++ b/net/mac80211/rx.c
+@@ -1733,6 +1733,7 @@ void __ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb,
+ prev->dev->name);
+ continue;
+ }
++ rx.fc = le16_to_cpu(hdr->frame_control);
+ rx.skb = skb_new;
+ rx.dev = prev->dev;
+ rx.sdata = prev;
+@@ -1741,6 +1742,7 @@ void __ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb,
+ prev = sdata;
+ }
+ if (prev) {
++ rx.fc = le16_to_cpu(hdr->frame_control);
+ rx.skb = skb;
+ rx.dev = prev->dev;
+ rx.sdata = prev;
++++++ patches.rt.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/patches.rt/rt-mutex-i386.patch new/patches.rt/rt-mutex-i386.patch
--- old/patches.rt/rt-mutex-i386.patch 2008-01-26 18:19:52.000000000 +0100
+++ new/patches.rt/rt-mutex-i386.patch 2008-01-31 16:42:48.000000000 +0100
@@ -15,11 +15,11 @@
include/asm-x86/thread_info_32.h | 3 +
11 files changed, 121 insertions(+), 93 deletions(-)
-Index: linux-2.6.24-rt1/arch/x86/kernel/apm_32.c
+Index: linux-2.6.24-RT/arch/x86/kernel/apm_32.c
===================================================================
---- linux-2.6.24-rt1.orig/arch/x86/kernel/apm_32.c 2008-01-25 15:06:38.000000000 -0500
-+++ linux-2.6.24-rt1/arch/x86/kernel/apm_32.c 2008-01-25 15:07:33.000000000 -0500
-@@ -783,7 +783,7 @@ static int apm_do_idle(void)
+--- linux-2.6.24-RT.orig/arch/x86/kernel/apm_32.c 2008-01-29 18:07:31.198196195 -0800
++++ linux-2.6.24-RT/arch/x86/kernel/apm_32.c 2008-01-29 18:13:32.321786454 -0800
+@@ -784,7 +784,7 @@ static int apm_do_idle(void)
*/
smp_mb();
}
@@ -28,10 +28,10 @@
idled = 1;
ret = apm_bios_call_simple(APM_FUNC_IDLE, 0, 0, &eax);
}
-Index: linux-2.6.24-rt1/arch/x86/kernel/entry_32.S
+Index: linux-2.6.24-RT/arch/x86/kernel/entry_32.S
===================================================================
---- linux-2.6.24-rt1.orig/arch/x86/kernel/entry_32.S 2008-01-25 15:07:13.000000000 -0500
-+++ linux-2.6.24-rt1/arch/x86/kernel/entry_32.S 2008-01-25 15:07:33.000000000 -0500
+--- linux-2.6.24-RT.orig/arch/x86/kernel/entry_32.S 2008-01-29 18:07:31.190196116 -0800
++++ linux-2.6.24-RT/arch/x86/kernel/entry_32.S 2008-01-29 18:13:32.321786454 -0800
@@ -503,7 +503,7 @@ ENDPROC(system_call)
ALIGN
RING0_PTREGS_FRAME # can't unwind into user space anyway
@@ -50,10 +50,10 @@
jnz work_resched
work_notifysig: # deal with pending signals and
-Index: linux-2.6.24-rt1/arch/x86/kernel/i386_ksyms_32.c
+Index: linux-2.6.24-RT/arch/x86/kernel/i386_ksyms_32.c
===================================================================
---- linux-2.6.24-rt1.orig/arch/x86/kernel/i386_ksyms_32.c 2008-01-25 15:06:38.000000000 -0500
-+++ linux-2.6.24-rt1/arch/x86/kernel/i386_ksyms_32.c 2008-01-25 15:07:33.000000000 -0500
+--- linux-2.6.24-RT.orig/arch/x86/kernel/i386_ksyms_32.c 2008-01-29 18:07:31.190196116 -0800
++++ linux-2.6.24-RT/arch/x86/kernel/i386_ksyms_32.c 2008-01-29 18:13:32.321786454 -0800
@@ -4,10 +4,12 @@
#include
#include
@@ -80,10 +80,10 @@
extern void FASTCALL( __write_lock_failed(rwlock_t *rw));
extern void FASTCALL( __read_lock_failed(rwlock_t *rw));
EXPORT_SYMBOL(__write_lock_failed);
-Index: linux-2.6.24-rt1/arch/x86/kernel/process_32.c
+Index: linux-2.6.24-RT/arch/x86/kernel/process_32.c
===================================================================
---- linux-2.6.24-rt1.orig/arch/x86/kernel/process_32.c 2008-01-25 15:07:16.000000000 -0500
-+++ linux-2.6.24-rt1/arch/x86/kernel/process_32.c 2008-01-25 15:07:33.000000000 -0500
+--- linux-2.6.24-RT.orig/arch/x86/kernel/process_32.c 2008-01-29 18:07:31.190196116 -0800
++++ linux-2.6.24-RT/arch/x86/kernel/process_32.c 2008-01-29 18:13:32.321786454 -0800
@@ -113,7 +113,7 @@ void default_idle(void)
smp_mb();
@@ -124,10 +124,10 @@
__mwait(eax, ecx);
}
}
-Index: linux-2.6.24-rt1/arch/x86/lib/semaphore_32.S
+Index: linux-2.6.24-RT/arch/x86/lib/semaphore_32.S
===================================================================
---- linux-2.6.24-rt1.orig/arch/x86/lib/semaphore_32.S 2008-01-25 15:06:38.000000000 -0500
-+++ linux-2.6.24-rt1/arch/x86/lib/semaphore_32.S 2008-01-25 15:07:33.000000000 -0500
+--- linux-2.6.24-RT.orig/arch/x86/lib/semaphore_32.S 2008-01-29 18:07:31.190196116 -0800
++++ linux-2.6.24-RT/arch/x86/lib/semaphore_32.S 2008-01-29 18:13:32.321786454 -0800
@@ -30,7 +30,7 @@
* value or just clobbered..
*/
@@ -218,10 +218,10 @@
/*
* rw spinlock fallbacks
-Index: linux-2.6.24-rt1/include/asm-x86/rwsem.h
+Index: linux-2.6.24-RT/include/asm-x86/rwsem.h
===================================================================
---- linux-2.6.24-rt1.orig/include/asm-x86/rwsem.h 2008-01-25 15:06:38.000000000 -0500
-+++ linux-2.6.24-rt1/include/asm-x86/rwsem.h 2008-01-25 15:07:33.000000000 -0500
+--- linux-2.6.24-RT.orig/include/asm-x86/rwsem.h 2008-01-29 18:07:31.186196076 -0800
++++ linux-2.6.24-RT/include/asm-x86/rwsem.h 2008-01-29 18:13:32.325786494 -0800
@@ -44,15 +44,15 @@
struct rwsem_waiter;
@@ -355,10 +355,10 @@
{
return (sem->count != 0);
}
-Index: linux-2.6.24-rt1/include/asm-x86/semaphore_32.h
+Index: linux-2.6.24-RT/include/asm-x86/semaphore_32.h
===================================================================
---- linux-2.6.24-rt1.orig/include/asm-x86/semaphore_32.h 2008-01-25 15:06:38.000000000 -0500
-+++ linux-2.6.24-rt1/include/asm-x86/semaphore_32.h 2008-01-25 15:07:33.000000000 -0500
+--- linux-2.6.24-RT.orig/include/asm-x86/semaphore_32.h 2008-01-29 18:07:31.186196076 -0800
++++ linux-2.6.24-RT/include/asm-x86/semaphore_32.h 2008-01-29 18:13:32.325786494 -0800
@@ -3,8 +3,6 @@
#include
@@ -525,10 +525,10 @@
+#include
+
#endif
-Index: linux-2.6.24-rt1/include/asm-x86/spinlock_32.h
+Index: linux-2.6.24-RT/include/asm-x86/spinlock_32.h
===================================================================
---- linux-2.6.24-rt1.orig/include/asm-x86/spinlock_32.h 2008-01-25 15:06:38.000000000 -0500
-+++ linux-2.6.24-rt1/include/asm-x86/spinlock_32.h 2008-01-25 15:07:33.000000000 -0500
+--- linux-2.6.24-RT.orig/include/asm-x86/spinlock_32.h 2008-01-29 18:07:31.186196076 -0800
++++ linux-2.6.24-RT/include/asm-x86/spinlock_32.h 2008-01-29 18:13:32.325786494 -0800
@@ -27,12 +27,12 @@
* (the type definitions are in asm/spinlock_types.h)
*/
@@ -664,10 +664,10 @@
+#define __raw_write_relax(lock) cpu_relax()
#endif /* __ASM_SPINLOCK_H */
-Index: linux-2.6.24-rt1/include/asm-x86/spinlock_types.h
+Index: linux-2.6.24-RT/include/asm-x86/spinlock_types.h
===================================================================
---- linux-2.6.24-rt1.orig/include/asm-x86/spinlock_types.h 2008-01-25 15:06:38.000000000 -0500
-+++ linux-2.6.24-rt1/include/asm-x86/spinlock_types.h 2008-01-25 15:07:33.000000000 -0500
+--- linux-2.6.24-RT.orig/include/asm-x86/spinlock_types.h 2008-01-29 18:07:31.186196076 -0800
++++ linux-2.6.24-RT/include/asm-x86/spinlock_types.h 2008-01-29 18:13:43.329895896 -0800
@@ -7,13 +7,13 @@
typedef struct {
@@ -675,7 +675,7 @@
-} raw_spinlock_t;
+} __raw_spinlock_t;
- #define __RAW_SPIN_LOCK_UNLOCKED { 1 }
+ #define __RAW_SPIN_LOCK_UNLOCKED { 0 }
typedef struct {
unsigned int lock;
@@ -684,10 +684,10 @@
#define __RAW_RW_LOCK_UNLOCKED { RW_LOCK_BIAS }
-Index: linux-2.6.24-rt1/include/asm-x86/thread_info_32.h
+Index: linux-2.6.24-RT/include/asm-x86/thread_info_32.h
===================================================================
---- linux-2.6.24-rt1.orig/include/asm-x86/thread_info_32.h 2008-01-25 15:06:38.000000000 -0500
-+++ linux-2.6.24-rt1/include/asm-x86/thread_info_32.h 2008-01-25 15:07:33.000000000 -0500
+--- linux-2.6.24-RT.orig/include/asm-x86/thread_info_32.h 2008-01-29 18:07:31.182196036 -0800
++++ linux-2.6.24-RT/include/asm-x86/thread_info_32.h 2008-01-29 18:13:32.325786494 -0800
@@ -132,15 +132,18 @@ static inline struct thread_info *curren
#define TIF_SYSCALL_AUDIT 6 /* syscall auditing active */
#define TIF_SECCOMP 7 /* secure computing */
@@ -707,10 +707,10 @@
#define _TIF_SINGLESTEP (1<
+
+Introduce ticket lock spinlocks for x86 which are FIFO. The implementation
+is described in the comments. The straight-line lock/unlock instruction
+sequence is slightly slower than the dec based locks on modern x86 CPUs,
+however the difference is quite small on Core2 and Opteron when working out of
+cache, and becomes almost insignificant even on P4 when the lock misses cache.
+trylock is more significantly slower, but they are relatively rare.
+
+On an 8 core (2 socket) Opteron, spinlock unfairness is extremely noticable,
+with a userspace test having a difference of up to 2x runtime per thread, and
+some threads are starved or "unfairly" granted the lock up to 1 000 000 (!)
+times. After this patch, all threads appear to finish at exactly the same
+time.
+
+The memory ordering of the lock does conform to x86 standards, and the
+implementation has been reviewed by Intel and AMD engineers.
+
+The algorithm also tells us how many CPUs are contending the lock, so
+lockbreak becomes trivial and we no longer have to waste 4 bytes per
+spinlock for it.
+
+After this, we can no longer spin on any locks with preempt enabled
+and cannot reenable interrupts when spinning on an irq safe lock, because
+at that point we have already taken a ticket and the would deadlock if
+the same CPU tries to take the lock again. These are questionable anyway:
+if the lock happens to be called under a preempt or interrupt disabled section,
+then it will just have the same latency problems. The real fix is to keep
+critical sections short, and ensure locks are reasonably fair (which this
+patch does).
+
+Signed-off-by: Nick Piggin
+---
+
+ include/asm-x86/spinlock.h | 225 ++++++++++++++++++++++++++++++++++++++
+ include/asm-x86/spinlock_32.h | 221 -------------------------------------
+ include/asm-x86/spinlock_64.h | 167 ----------------------------
+ include/asm-x86/spinlock_types.h | 2
+ 4 files changed, 224 insertions(+), 391 deletions(-)
+
+Index: linux-2.6.24-RT/include/asm-x86/spinlock.h
+===================================================================
+--- linux-2.6.24-RT.orig/include/asm-x86/spinlock.h 2008-01-28 18:42:25.000000000 -0800
++++ linux-2.6.24-RT/include/asm-x86/spinlock.h 2008-01-28 19:34:29.104898973 -0800
+@@ -1,5 +1,226 @@
++#ifndef _X86_SPINLOCK_H_
++#define _X86_SPINLOCK_H_
++
++#include
++#include
++#include
++#include
++#include
++
++/*
++ * Your basic SMP spinlocks, allowing only a single CPU anywhere
++ *
++ * Simple spin lock operations. There are two variants, one clears IRQ's
++ * on the local processor, one does not.
++ *
++ * These are fair FIFO ticket locks, which are currently limited to 256
++ * CPUs.
++ *
++ * (the type definitions are in asm/spinlock_types.h)
++ */
++
+ #ifdef CONFIG_X86_32
+-# include "spinlock_32.h"
++typedef char _slock_t;
++# define LOCK_INS_DEC "decb"
++# define LOCK_INS_XCH "xchgb"
++# define LOCK_INS_MOV "movb"
++# define LOCK_INS_CMP "cmpb"
++# define LOCK_PTR_REG "a"
+ #else
+-# include "spinlock_64.h"
++typedef int _slock_t;
++# define LOCK_INS_DEC "decl"
++# define LOCK_INS_XCH "xchgl"
++# define LOCK_INS_MOV "movl"
++# define LOCK_INS_CMP "cmpl"
++# define LOCK_PTR_REG "D"
++#endif
++
++#if (NR_CPUS > 256)
++#error spinlock supports a maximum of 256 CPUs
++#endif
++
++static inline int __raw_spin_is_locked(__raw_spinlock_t *lock)
++{
++ int tmp = *(volatile signed int *)(&(lock)->slock);
++
++ return (((tmp >> 8) & 0xff) != (tmp & 0xff));
++}
++
++static inline int __raw_spin_is_contended(__raw_spinlock_t *lock)
++{
++ int tmp = *(volatile signed int *)(&(lock)->slock);
++
++ return (((tmp >> 8) & 0xff) - (tmp & 0xff)) > 1;
++}
++
++static inline void __raw_spin_lock(__raw_spinlock_t *lock)
++{
++ short inc = 0x0100;
++
++ /*
++ * Ticket locks are conceptually two bytes, one indicating the current
++ * head of the queue, and the other indicating the current tail. The
++ * lock is acquired by atomically noting the tail and incrementing it
++ * by one (thus adding ourself to the queue and noting our position),
++ * then waiting until the head becomes equal to the the initial value
++ * of the tail.
++ *
++ * This uses a 16-bit xadd to increment the tail and also load the
++ * position of the head, which takes care of memory ordering issues
++ * and should be optimal for the uncontended case. Note the tail must
++ * be in the high byte, otherwise the 16-bit wide increment of the low
++ * byte would carry up and contaminate the high byte.
++ */
++
++ __asm__ __volatile__ (
++ LOCK_PREFIX "xaddw %w0, %1\n"
++ "1:\t"
++ "cmpb %h0, %b0\n\t"
++ "je 2f\n\t"
++ "rep ; nop\n\t"
++ "movb %1, %b0\n\t"
++ /* don't need lfence here, because loads are in-order */
++ "jmp 1b\n"
++ "2:"
++ :"+Q" (inc), "+m" (lock->slock)
++ :
++ :"memory", "cc");
++}
++
++#define __raw_spin_lock_flags(lock, flags) __raw_spin_lock(lock)
++
++static inline int __raw_spin_trylock(__raw_spinlock_t *lock)
++{
++ int tmp;
++ short new;
++
++ asm volatile(
++ "movw %2,%w0\n\t"
++ "cmpb %h0,%b0\n\t"
++ "jne 1f\n\t"
++ "movw %w0,%w1\n\t"
++ "incb %h1\n\t"
++ "lock ; cmpxchgw %w1,%2\n\t"
++ "1:"
++ "sete %b1\n\t"
++ "movzbl %b1,%0\n\t"
++ :"=&a" (tmp), "=Q" (new), "+m" (lock->slock)
++ :
++ : "memory", "cc");
++
++ return tmp;
++}
++
++#if defined(CONFIG_X86_32) && \
++ (defined(CONFIG_X86_OOSTORE) || defined(CONFIG_X86_PPRO_FENCE))
++/*
++ * On PPro SMP or if we are using OOSTORE, we use a locked operation to unlock
++ * (PPro errata 66, 92)
++ */
++# define UNLOCK_LOCK_PREFIX LOCK_PREFIX
++#else
++# define UNLOCK_LOCK_PREFIX
++#endif
++
++static inline void __raw_spin_unlock(__raw_spinlock_t *lock)
++{
++ __asm__ __volatile__(
++ UNLOCK_LOCK_PREFIX "incb %0"
++ :"+m" (lock->slock)
++ :
++ :"memory", "cc");
++}
++
++static inline void __raw_spin_unlock_wait(__raw_spinlock_t *lock)
++{
++ while (__raw_spin_is_locked(lock))
++ cpu_relax();
++}
++
++/*
++ * Read-write spinlocks, allowing multiple readers
++ * but only one writer.
++ *
++ * NOTE! it is quite common to have readers in interrupts
++ * but no interrupt writers. For those circumstances we
++ * can "mix" irq-safe locks - any writer needs to get a
++ * irq-safe write-lock, but readers can get non-irqsafe
++ * read-locks.
++ *
++ * On x86, we implement read-write locks as a 32-bit counter
++ * with the high bit (sign) being the "contended" bit.
++ */
++
++/**
++ * read_can_lock - would read_trylock() succeed?
++ * @lock: the rwlock in question.
++ */
++static inline int __raw_read_can_lock(__raw_rwlock_t *lock)
++{
++ return (int)(lock)->lock > 0;
++}
++
++/**
++ * write_can_lock - would write_trylock() succeed?
++ * @lock: the rwlock in question.
++ */
++static inline int __raw_write_can_lock(__raw_rwlock_t *lock)
++{
++ return (lock)->lock == RW_LOCK_BIAS;
++}
++
++static inline void __raw_read_lock(__raw_rwlock_t *rw)
++{
++ asm volatile(LOCK_PREFIX " subl $1,(%0)\n\t"
++ "jns 1f\n"
++ "call __read_lock_failed\n\t"
++ "1:\n"
++ ::LOCK_PTR_REG (rw) : "memory");
++}
++
++static inline void __raw_write_lock(__raw_rwlock_t *rw)
++{
++ asm volatile(LOCK_PREFIX " subl %1,(%0)\n\t"
++ "jz 1f\n"
++ "call __write_lock_failed\n\t"
++ "1:\n"
++ ::LOCK_PTR_REG (rw), "i" (RW_LOCK_BIAS) : "memory");
++}
++
++static inline int __raw_read_trylock(__raw_rwlock_t *lock)
++{
++ atomic_t *count = (atomic_t *)lock;
++
++ atomic_dec(count);
++ if (atomic_read(count) >= 0)
++ return 1;
++ atomic_inc(count);
++ return 0;
++}
++
++static inline int __raw_write_trylock(__raw_rwlock_t *lock)
++{
++ atomic_t *count = (atomic_t *)lock;
++
++ if (atomic_sub_and_test(RW_LOCK_BIAS, count))
++ return 1;
++ atomic_add(RW_LOCK_BIAS, count);
++ return 0;
++}
++
++static inline void __raw_read_unlock(__raw_rwlock_t *rw)
++{
++ asm volatile(LOCK_PREFIX "incl %0" :"+m" (rw->lock) : : "memory");
++}
++
++static inline void __raw_write_unlock(__raw_rwlock_t *rw)
++{
++ asm volatile(LOCK_PREFIX "addl %1, %0"
++ : "+m" (rw->lock) : "i" (RW_LOCK_BIAS) : "memory");
++}
++
++#define _raw_spin_relax(lock) cpu_relax()
++#define _raw_read_relax(lock) cpu_relax()
++#define _raw_write_relax(lock) cpu_relax()
++
+ #endif
+Index: linux-2.6.24-RT/include/asm-x86/spinlock_types.h
+===================================================================
+--- linux-2.6.24-RT.orig/include/asm-x86/spinlock_types.h 2008-01-28 18:42:25.000000000 -0800
++++ linux-2.6.24-RT/include/asm-x86/spinlock_types.h 2008-01-28 19:34:29.104898973 -0800
+@@ -9,7 +9,7 @@ typedef struct {
+ unsigned int slock;
+ } raw_spinlock_t;
+
+-#define __RAW_SPIN_LOCK_UNLOCKED { 1 }
++#define __RAW_SPIN_LOCK_UNLOCKED { 0 }
+
+ typedef struct {
+ unsigned int lock;
++++++ series.conf ++++++
--- kernel-source/series.conf 2008-01-29 22:41:03.000000000 +0100
+++ kernel-source/series.conf 2008-01-31 16:42:59.000000000 +0100
@@ -77,7 +77,7 @@
patches.suse/parser-match_string.diff
patches.suse/smtnice-disable
patches.suse/setuid-dumpable-wrongdir
--RT patches.suse/sysctl-add-affinity_load_balancing
+ patches.suse/sysctl-add-affinity_load_balancing
patches.fixes/seccomp-disable-tsc-option
########################################################
@@ -361,6 +361,8 @@
# Wireless Networking
########################################################
patches.suse/wireless-no-aes-select
+ patches.fixes/mac80211-fix-hw-scan1.patch
+ patches.fixes/mac80211-fix-hw-scan2.patch
########################################################
# iSCSI
@@ -609,6 +611,8 @@
-RT patches.xen/xen-sections
# RT
++RT patches.rt/x86-ticket-lock.patch
+
# RT KDB Fixes
+RT patches.rt/redeclare_kdb_lock_as_raw.patch
+RT patches.rt/kdb-memmap-cmd-fixups
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org