--- /dev/null
+From gregkh@mini.kroah.org Wed Mar 7 09:06:10 2007
+Message-Id: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:01:23 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk
+Subject: [patch 000/101] 2.6.20-stable review
+Status: RO
+Content-Length: 822
+Lines: 22
+
+After many weeks of backlogs, I've finally flushed out all of the
+pending -stable patches, bringing this series to a whopping 101 patches
+pending for the next 2.6.20.2 release.
+
+If everyone could please take the time to review them and let me know if
+there are any issues with any of these being applied.
+
+Also, if there are any patches that I am somehow missing that should go
+into the 2.6.20-stable tree, please forward them on to the
+stable@kernel.org alias.
+
+These patches are sent out with a number of different people on the Cc:
+line. If you wish to be a reviewer, please email stable@kernel.org to
+add your name to the list. If you want to be off the reviewer list,
+also email us.
+
+Responses should be made by Friday March 9, 17:00:00 UTC. Anything
+received after that time might be too late.
+
+thanks,
+
+greg k-h
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:10 2007
+Message-Id: <20070307170610.531145296@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:01:24 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Mark Fasheh <mark.fasheh@oracle.com>,
+ Chris Wright <chrisw@sous-sol.org>
+Subject: [patch 001/101] ocfs2: ocfs2_link() journal credits update
+Content-Disposition: inline; filename=ocfs2-ocfs2_link-journal-credits-update.patch
+Content-Length: 1129
+Lines: 27
+
+Commit 592282cf2eaa33409c6511ddd3f3ecaa57daeaaa fixed some missing directory
+c/mtime updates in part by introducing a dinode update in ocfs2_add_entry().
+Unfortunately, ocfs2_link() (which didn't update the directory inode before)
+is now missing a single journal credit. Fix this by doubling the number of
+inode updates expected during hard link creation.
+
+Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
+Signed-off-by: Chris Wright <chrisw@sous-sol.org>
+---
+ fs/ocfs2/journal.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- linux-2.6.20.1.orig/fs/ocfs2/journal.h
++++ linux-2.6.20.1/fs/ocfs2/journal.h
+@@ -306,8 +306,8 @@ int ocfs2_journal_dirty
+ * for the dinode, one for the new block. */
+ #define OCFS2_SIMPLE_DIR_EXTEND_CREDITS (2)
+
+-/* file update (nlink, etc) + dir entry block */
+-#define OCFS2_LINK_CREDITS (OCFS2_INODE_UPDATE_CREDITS + 1)
++/* file update (nlink, etc) + directory mtime/ctime + dir entry block */
++#define OCFS2_LINK_CREDITS (2*OCFS2_INODE_UPDATE_CREDITS + 1)
+
+ /* inode + dir inode (if we unlink a dir), + dir entry block + orphan
+ * dir inode link */
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:10 2007
+Message-Id: <20070307170610.662438762@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:01:25 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org,
+ Andrew Morton <akpm@osdl.org>
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Jeff Dike <jdike@addtoit.com>,
+ Andi Kleen <ak@suse.de>,
+ user-mode-linux-devel@lists.sourceforge.net,
+ Paolo Blaisorblade Giarrusso <blaisorblade@yahoo.it>
+Subject: [patch 002/101] x86_64: fix 2.6.18 regression - PTRACE_OLDSETOPTIONS should be accepted
+Content-Disposition: inline; filename=x86_64-fix-2.6.18-regression-ptrace_oldsetoptions-should-be-accepted.patch
+Content-Length: 1292
+Lines: 42
+
+
+Also PTRACE_OLDSETOPTIONS should be accepted, as done by kernel/ptrace.c and
+forced by binary compatibility. UML/32bit breaks because of this - since it is wise
+enough to use PTRACE_OLDSETOPTIONS to be binary compatible with 2.4 host
+kernels.
+
+Until 2.6.17 (commit f0f2d6536e3515b5b1b7ae97dc8f176860c8c2ce) we had:
+
+ default:
+ return sys_ptrace(request, pid, addr, data);
+
+Instead here we have:
+ case PTRACE_GET_THREAD_AREA:
+ case ...:
+ return sys_ptrace(request, pid, addr, data);
+
+ default:
+ return -EINVAL;
+
+This change was a style change - when a case is added, it must be explicitly
+tested this way. In this case, not enough testing was done.
+
+Cc: Andi Kleen <ak@suse.de>
+Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/x86_64/ia32/ptrace32.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- linux-2.6.20.1.orig/arch/x86_64/ia32/ptrace32.c
++++ linux-2.6.20.1/arch/x86_64/ia32/ptrace32.c
+@@ -243,6 +243,7 @@ asmlinkage long sys32_ptrace(long reques
+ case PTRACE_SINGLESTEP:
+ case PTRACE_DETACH:
+ case PTRACE_SYSCALL:
++ case PTRACE_OLDSETOPTIONS:
+ case PTRACE_SETOPTIONS:
+ case PTRACE_SET_THREAD_AREA:
+ case PTRACE_GET_THREAD_AREA:
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:10 2007
+Message-Id: <20070307170610.794616138@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:01:26 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org,
+ akpm@linux-foundation.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ jean-baptiste.maneyrol@teamlog.com,
+ a.zummo@towertech.it,
+ dbrownell@users.sourceforge.net,
+ Atsushi Nemoto <anemo@mba.ocn.ne.jp>
+Subject: [patch 003/101] rtc-pcf8563: detect polarity of century bit automatically
+Content-Disposition: inline; filename=rtc-pcf8563-detect-polarity-of-century-bit-automatically.patch
+Content-Length: 4808
+Lines: 139
+
+
+From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
+
+The usage of the century bit was inverted on 2.6.19 following to PCF8563's
+description, but it was not match to usage suggested by RTC8564's
+datasheet. Anyway what MO_C=1 means can vary on each platform. This patch
+is to detect its polarity in get_datetime routine. The default value of
+c_polarity is 0 (MO_C=1 means 19xx) so that this patch does not change
+current behavior even if get_datetime was not called before set_datetime.
+
+Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
+Cc: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@teamlog.com>
+Cc: David Brownell <dbrownell@users.sourceforge.net>
+Cc: Alessandro Zummo <a.zummo@towertech.it>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/rtc/rtc-pcf8563.c | 40 ++++++++++++++++++++++++++++++++++------
+ 1 file changed, 34 insertions(+), 6 deletions(-)
+
+--- linux-2.6.20.1.orig/drivers/rtc/rtc-pcf8563.c
++++ linux-2.6.20.1/drivers/rtc/rtc-pcf8563.c
+@@ -53,6 +53,25 @@ I2C_CLIENT_INSMOD;
+ #define PCF8563_SC_LV 0x80 /* low voltage */
+ #define PCF8563_MO_C 0x80 /* century */
+
++struct pcf8563 {
++ struct i2c_client client;
++ /*
++ * The meaning of MO_C bit varies by the chip type.
++ * From PCF8563 datasheet: this bit is toggled when the years
++ * register overflows from 99 to 00
++ * 0 indicates the century is 20xx
++ * 1 indicates the century is 19xx
++ * From RTC8564 datasheet: this bit indicates change of
++ * century. When the year digit data overflows from 99 to 00,
++ * this bit is set. By presetting it to 0 while still in the
++ * 20th century, it will be set in year 2000, ...
++ * There seems no reliable way to know how the system use this
++ * bit. So let's do it heuristically, assuming we are live in
++ * 1970...2069.
++ */
++ int c_polarity; /* 0: MO_C=1 means 19xx, otherwise MO_C=1 means 20xx */
++};
++
+ static int pcf8563_probe(struct i2c_adapter *adapter, int address, int kind);
+ static int pcf8563_detach(struct i2c_client *client);
+
+@@ -62,6 +81,7 @@ static int pcf8563_detach(struct i2c_cli
+ */
+ static int pcf8563_get_datetime(struct i2c_client *client, struct rtc_time *tm)
+ {
++ struct pcf8563 *pcf8563 = container_of(client, struct pcf8563, client);
+ unsigned char buf[13] = { PCF8563_REG_ST1 };
+
+ struct i2c_msg msgs[] = {
+@@ -94,8 +114,12 @@ static int pcf8563_get_datetime(struct i
+ tm->tm_mday = BCD2BIN(buf[PCF8563_REG_DM] & 0x3F);
+ tm->tm_wday = buf[PCF8563_REG_DW] & 0x07;
+ tm->tm_mon = BCD2BIN(buf[PCF8563_REG_MO] & 0x1F) - 1; /* rtc mn 1-12 */
+- tm->tm_year = BCD2BIN(buf[PCF8563_REG_YR])
+- + (buf[PCF8563_REG_MO] & PCF8563_MO_C ? 0 : 100);
++ tm->tm_year = BCD2BIN(buf[PCF8563_REG_YR]);
++ if (tm->tm_year < 70)
++ tm->tm_year += 100; /* assume we are in 1970...2069 */
++ /* detect the polarity heuristically. see note above. */
++ pcf8563->c_polarity = (buf[PCF8563_REG_MO] & PCF8563_MO_C) ?
++ (tm->tm_year >= 100) : (tm->tm_year < 100);
+
+ dev_dbg(&client->dev, "%s: tm is secs=%d, mins=%d, hours=%d, "
+ "mday=%d, mon=%d, year=%d, wday=%d\n",
+@@ -114,6 +138,7 @@ static int pcf8563_get_datetime(struct i
+
+ static int pcf8563_set_datetime(struct i2c_client *client, struct rtc_time *tm)
+ {
++ struct pcf8563 *pcf8563 = container_of(client, struct pcf8563, client);
+ int i, err;
+ unsigned char buf[9];
+
+@@ -135,7 +160,7 @@ static int pcf8563_set_datetime(struct i
+
+ /* year and century */
+ buf[PCF8563_REG_YR] = BIN2BCD(tm->tm_year % 100);
+- if (tm->tm_year < 100)
++ if (pcf8563->c_polarity ? (tm->tm_year >= 100) : (tm->tm_year < 100))
+ buf[PCF8563_REG_MO] |= PCF8563_MO_C;
+
+ buf[PCF8563_REG_DW] = tm->tm_wday & 0x07;
+@@ -248,6 +273,7 @@ static struct i2c_driver pcf8563_driver
+
+ static int pcf8563_probe(struct i2c_adapter *adapter, int address, int kind)
+ {
++ struct pcf8563 *pcf8563;
+ struct i2c_client *client;
+ struct rtc_device *rtc;
+
+@@ -260,11 +286,12 @@ static int pcf8563_probe(struct i2c_adap
+ goto exit;
+ }
+
+- if (!(client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL))) {
++ if (!(pcf8563 = kzalloc(sizeof(struct pcf8563), GFP_KERNEL))) {
+ err = -ENOMEM;
+ goto exit;
+ }
+
++ client = &pcf8563->client;
+ client->addr = address;
+ client->driver = &pcf8563_driver;
+ client->adapter = adapter;
+@@ -301,7 +328,7 @@ exit_detach:
+ i2c_detach_client(client);
+
+ exit_kfree:
+- kfree(client);
++ kfree(pcf8563);
+
+ exit:
+ return err;
+@@ -309,6 +336,7 @@ exit:
+
+ static int pcf8563_detach(struct i2c_client *client)
+ {
++ struct pcf8563 *pcf8563 = container_of(client, struct pcf8563, client);
+ int err;
+ struct rtc_device *rtc = i2c_get_clientdata(client);
+
+@@ -318,7 +346,7 @@ static int pcf8563_detach(struct i2c_cli
+ if ((err = i2c_detach_client(client)))
+ return err;
+
+- kfree(client);
++ kfree(pcf8563);
+
+ return 0;
+ }
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:11 2007
+Message-Id: <20070307170610.924156309@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:01:27 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Dan Williams <dcbw@redhat.com>
+Subject: [patch 004/101] prism54: correct assignment of DOT1XENABLE in WE-19 codepaths
+Content-Disposition: inline; filename=prism54-correct-assignment-of-dot1xenable-in-we-19-codepaths.patch
+Content-Length: 1483
+Lines: 49
+
+
+Correct assignment of DOT1XENABLE in WE-19 codepaths.
+RX_UNENCRYPTED_EAPOL = 1 really means setting DOT1XENABLE _off_, and
+vice versa. The original WE-19 patch erroneously reversed that. This
+patch fixes association with unencrypted and WEP networks when using
+wpa_supplicant.
+
+It also adds two missing break statements that, left out, could result
+in incorrect card configuration.
+
+Applies to (I think) 2.6.19 and later.
+
+Signed-off-by: Dan Williams <dcbw@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/net/wireless/prism54/isl_ioctl.c | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+--- linux-2.6.20.1.orig/drivers/net/wireless/prism54/isl_ioctl.c
++++ linux-2.6.20.1/drivers/net/wireless/prism54/isl_ioctl.c
+@@ -1395,11 +1395,16 @@ static int prism54_set_auth(struct net_d
+ break;
+
+ case IW_AUTH_RX_UNENCRYPTED_EAPOL:
+- dot1x = param->value ? 1 : 0;
++ /* dot1x should be the opposite of RX_UNENCRYPTED_EAPOL;
++ * turn off dot1x when allowing recepit of unencrypted eapol
++ * frames, turn on dot1x when we disallow receipt
++ */
++ dot1x = param->value ? 0x00 : 0x01;
+ break;
+
+ case IW_AUTH_PRIVACY_INVOKED:
+ privinvoked = param->value ? 1 : 0;
++ break;
+
+ case IW_AUTH_DROP_UNENCRYPTED:
+ exunencrypt = param->value ? 1 : 0;
+@@ -1589,6 +1594,7 @@ static int prism54_set_encodeext(struct
+ }
+ key.type = DOT11_PRIV_TKIP;
+ key.length = KEY_SIZE_TKIP;
++ break;
+ default:
+ return -EINVAL;
+ }
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:11 2007
+Message-Id: <20070307170611.060014600@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:01:28 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org,
+ Jeff Garzik <jeff@garzik.org>,
+ Alan Cox <alan@lxorguk.ukuu.org.uk>,
+ linux-ide@vger.kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ Tejun Heo <htejun@gmail.com>
+Subject: [patch 005/101] pata_amd: fix an obvious bug in cable detection
+Content-Disposition: inline; filename=pata_amd-fix-an-obvious-bug-in-cable-detection.patch
+Content-Length: 994
+Lines: 33
+
+
+80c test mask is at bits 18 and 19 of EIDE Controller Configuration
+not 22 and 23. Fix it.
+
+Signed-off-by: Tejun Heo <htejun@gmail.com>
+Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
+
+---
+ drivers/ata/pata_amd.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- linux-2.6.20.1.orig/drivers/ata/pata_amd.c
++++ linux-2.6.20.1/drivers/ata/pata_amd.c
+@@ -128,7 +128,7 @@ static void timing_setup(struct ata_port
+
+ static int amd_pre_reset(struct ata_port *ap)
+ {
+- static const u32 bitmask[2] = {0x03, 0xC0};
++ static const u32 bitmask[2] = {0x03, 0x0C};
+ static const struct pci_bits amd_enable_bits[] = {
+ { 0x40, 1, 0x02, 0x02 },
+ { 0x40, 1, 0x01, 0x01 }
+@@ -247,7 +247,7 @@ static void amd133_set_dmamode(struct at
+ */
+
+ static int nv_pre_reset(struct ata_port *ap) {
+- static const u8 bitmask[2] = {0x03, 0xC0};
++ static const u8 bitmask[2] = {0x03, 0x0C};
+ static const struct pci_bits nv_enable_bits[] = {
+ { 0x50, 1, 0x02, 0x02 },
+ { 0x50, 1, 0x01, 0x01 }
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:11 2007
+Message-Id: <20070307170611.193900293@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:01:29 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org,
+ Andrew Morton <akpm@osdl.org>
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ nfs@lists.sourceforge.net,
+ Neil Brown <neilb@suse.de>
+Subject: [patch 006/101] knfsd: Fix a race in closing NFSd connections.
+Content-Disposition: inline; filename=knfsd-fix-a-race-in-closing-nfsd-connections.patch
+Content-Length: 6430
+Lines: 201
+
+If you lose this race, it can iput a socket inode twice and you
+get a BUG in fs/inode.c
+
+When I added the option for user-space to close a socket,
+I added some cruft to svc_delete_socket so that I could call
+that function when closing a socket per user-space request.
+
+This was the wrong thing to do. I should have just set SK_CLOSE
+and let normal mechanisms do the work.
+
+Not only wrong, but buggy. The locking is all wrong and it openned
+up a race where-by a socket could be closed twice.
+
+So this patch:
+ Introduces svc_close_socket which sets SK_CLOSE then either leave
+ the close up to a thread, or calls svc_delete_socket if it can
+ get SK_BUSY.
+
+ Adds a bias to sk_busy which is removed when SK_DEAD is set,
+ This avoid races around shutting down the socket.
+
+ Changes several 'spin_lock' to 'spin_lock_bh' where the _bh
+ was missing.
+
+Bugzilla-url: http://bugzilla.kernel.org/show_bug.cgi?id=7916
+
+Signed-off-by: Neil Brown <neilb@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+
+---
+ include/linux/sunrpc/svcsock.h | 2 -
+ net/sunrpc/svc.c | 4 +--
+ net/sunrpc/svcsock.c | 52 +++++++++++++++++++++++++++++------------
+ 3 files changed, 41 insertions(+), 17 deletions(-)
+
+--- linux-2.6.20.1.orig/include/linux/sunrpc/svcsock.h
++++ linux-2.6.20.1/include/linux/sunrpc/svcsock.h
+@@ -63,7 +63,7 @@ struct svc_sock {
+ * Function prototypes.
+ */
+ int svc_makesock(struct svc_serv *, int, unsigned short);
+-void svc_delete_socket(struct svc_sock *);
++void svc_close_socket(struct svc_sock *);
+ int svc_recv(struct svc_rqst *, long);
+ int svc_send(struct svc_rqst *);
+ void svc_drop(struct svc_rqst *);
+--- linux-2.6.20.1.orig/net/sunrpc/svc.c
++++ linux-2.6.20.1/net/sunrpc/svc.c
+@@ -386,7 +386,7 @@ svc_destroy(struct svc_serv *serv)
+ svsk = list_entry(serv->sv_tempsocks.next,
+ struct svc_sock,
+ sk_list);
+- svc_delete_socket(svsk);
++ svc_close_socket(svsk);
+ }
+ if (serv->sv_shutdown)
+ serv->sv_shutdown(serv);
+@@ -395,7 +395,7 @@ svc_destroy(struct svc_serv *serv)
+ svsk = list_entry(serv->sv_permsocks.next,
+ struct svc_sock,
+ sk_list);
+- svc_delete_socket(svsk);
++ svc_close_socket(svsk);
+ }
+
+ cache_clean_deferred(serv);
+--- linux-2.6.20.1.orig/net/sunrpc/svcsock.c
++++ linux-2.6.20.1/net/sunrpc/svcsock.c
+@@ -62,6 +62,12 @@
+ * after a clear, the socket must be read/accepted
+ * if this succeeds, it must be set again.
+ * SK_CLOSE can set at any time. It is never cleared.
++ * sk_inuse contains a bias of '1' until SK_DEAD is set.
++ * so when sk_inuse hits zero, we know the socket is dead
++ * and no-one is using it.
++ * SK_DEAD can only be set while SK_BUSY is held which ensures
++ * no other thread will be using the socket or will try to
++ * set SK_DEAD.
+ *
+ */
+
+@@ -70,6 +76,7 @@
+
+ static struct svc_sock *svc_setup_socket(struct svc_serv *, struct socket *,
+ int *errp, int pmap_reg);
++static void svc_delete_socket(struct svc_sock *svsk);
+ static void svc_udp_data_ready(struct sock *, int);
+ static int svc_udp_recvfrom(struct svc_rqst *);
+ static int svc_udp_sendto(struct svc_rqst *);
+@@ -329,8 +336,9 @@ void svc_reserve(struct svc_rqst *rqstp,
+ static inline void
+ svc_sock_put(struct svc_sock *svsk)
+ {
+- if (atomic_dec_and_test(&svsk->sk_inuse) &&
+- test_bit(SK_DEAD, &svsk->sk_flags)) {
++ if (atomic_dec_and_test(&svsk->sk_inuse)) {
++ BUG_ON(! test_bit(SK_DEAD, &svsk->sk_flags));
++
+ dprintk("svc: releasing dead socket\n");
+ if (svsk->sk_sock->file)
+ sockfd_put(svsk->sk_sock);
+@@ -520,7 +528,7 @@ svc_sock_names(char *buf, struct svc_ser
+
+ if (!serv)
+ return 0;
+- spin_lock(&serv->sv_lock);
++ spin_lock_bh(&serv->sv_lock);
+ list_for_each_entry(svsk, &serv->sv_permsocks, sk_list) {
+ int onelen = one_sock_name(buf+len, svsk);
+ if (toclose && strcmp(toclose, buf+len) == 0)
+@@ -528,12 +536,12 @@ svc_sock_names(char *buf, struct svc_ser
+ else
+ len += onelen;
+ }
+- spin_unlock(&serv->sv_lock);
++ spin_unlock_bh(&serv->sv_lock);
+ if (closesk)
+ /* Should unregister with portmap, but you cannot
+ * unregister just one protocol...
+ */
+- svc_delete_socket(closesk);
++ svc_close_socket(closesk);
+ else if (toclose)
+ return -ENOENT;
+ return len;
+@@ -683,6 +691,11 @@ svc_udp_recvfrom(struct svc_rqst *rqstp)
+ return svc_deferred_recv(rqstp);
+ }
+
++ if (test_bit(SK_CLOSE, &svsk->sk_flags)) {
++ svc_delete_socket(svsk);
++ return 0;
++ }
++
+ clear_bit(SK_DATA, &svsk->sk_flags);
+ while ((skb = skb_recv_datagram(svsk->sk_sk, 0, 1, &err)) == NULL) {
+ if (err == -EAGAIN) {
+@@ -1176,7 +1189,8 @@ svc_tcp_sendto(struct svc_rqst *rqstp)
+ rqstp->rq_sock->sk_server->sv_name,
+ (sent<0)?"got error":"sent only",
+ sent, xbufp->len);
+- svc_delete_socket(rqstp->rq_sock);
++ set_bit(SK_CLOSE, &rqstp->rq_sock->sk_flags);
++ svc_sock_enqueue(rqstp->rq_sock);
+ sent = -EAGAIN;
+ }
+ return sent;
+@@ -1495,7 +1509,7 @@ svc_setup_socket(struct svc_serv *serv,
+ svsk->sk_odata = inet->sk_data_ready;
+ svsk->sk_owspace = inet->sk_write_space;
+ svsk->sk_server = serv;
+- atomic_set(&svsk->sk_inuse, 0);
++ atomic_set(&svsk->sk_inuse, 1);
+ svsk->sk_lastrecv = get_seconds();
+ spin_lock_init(&svsk->sk_defer_lock);
+ INIT_LIST_HEAD(&svsk->sk_deferred);
+@@ -1618,7 +1632,7 @@ bummer:
+ /*
+ * Remove a dead socket
+ */
+-void
++static void
+ svc_delete_socket(struct svc_sock *svsk)
+ {
+ struct svc_serv *serv;
+@@ -1644,16 +1658,26 @@ svc_delete_socket(struct svc_sock *svsk)
+ * while still attached to a queue, the queue itself
+ * is about to be destroyed (in svc_destroy).
+ */
+- if (!test_and_set_bit(SK_DEAD, &svsk->sk_flags))
++ if (!test_and_set_bit(SK_DEAD, &svsk->sk_flags)) {
++ BUG_ON(atomic_read(&svsk->sk_inuse)<2);
++ atomic_dec(&svsk->sk_inuse);
+ if (test_bit(SK_TEMP, &svsk->sk_flags))
+ serv->sv_tmpcnt--;
++ }
+
+- /* This atomic_inc should be needed - svc_delete_socket
+- * should have the semantic of dropping a reference.
+- * But it doesn't yet....
+- */
+- atomic_inc(&svsk->sk_inuse);
+ spin_unlock_bh(&serv->sv_lock);
++}
++
++void svc_close_socket(struct svc_sock *svsk)
++{
++ set_bit(SK_CLOSE, &svsk->sk_flags);
++ if (test_and_set_bit(SK_BUSY, &svsk->sk_flags))
++ /* someone else will have to effect the close */
++ return;
++
++ atomic_inc(&svsk->sk_inuse);
++ svc_delete_socket(svsk);
++ clear_bit(SK_BUSY, &svsk->sk_flags);
+ svc_sock_put(svsk);
+ }
+
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:11 2007
+Message-Id: <20070307170611.330628526@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:01:30 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ David Howells <dhowells@redhat.com>
+Subject: [patch 007/101] Keys: Fix key serial number collision handling
+Content-Disposition: inline; filename=keys-fix-key-serial-number-collision-handling.patch
+Content-Length: 2817
+Lines: 93
+
+From: David Howells <dhowells@redhat.com>
+
+[PATCH] Keys: Fix key serial number collision handling
+
+Fix the key serial number collision avoidance code in key_alloc_serial().
+
+This didn't use to be so much of a problem as the key serial numbers were
+allocated from a simple incremental counter, and it would have to go through
+two billion keys before it could possibly encounter a collision. However, now
+that random numbers are used instead, collisions are much more likely.
+
+This is fixed by finding a hole in the rbtree where the next unused serial
+number ought to be and using that by going almost back to the top of the
+insertion routine and redoing the insertion with the new serial number rather
+than trying to be clever and attempting to work out the insertion point
+pointer directly.
+
+This fixes kernel BZ #7727.
+
+Signed-off-by: David Howells <dhowells@redhat.com>
+Cc: Chuck Ebbert <cebbert@redhat.com>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ security/keys/key.c | 33 ++++++++++++++-------------------
+ 1 file changed, 14 insertions(+), 19 deletions(-)
+
+--- linux-2.6.20.1.orig/security/keys/key.c
++++ linux-2.6.20.1/security/keys/key.c
+@@ -188,6 +188,7 @@ static inline void key_alloc_serial(stru
+
+ spin_lock(&key_serial_lock);
+
++attempt_insertion:
+ parent = NULL;
+ p = &key_serial_tree.rb_node;
+
+@@ -202,39 +203,33 @@ static inline void key_alloc_serial(stru
+ else
+ goto serial_exists;
+ }
+- goto insert_here;
++
++ /* we've found a suitable hole - arrange for this key to occupy it */
++ rb_link_node(&key->serial_node, parent, p);
++ rb_insert_color(&key->serial_node, &key_serial_tree);
++
++ spin_unlock(&key_serial_lock);
++ return;
+
+ /* we found a key with the proposed serial number - walk the tree from
+ * that point looking for the next unused serial number */
+ serial_exists:
+ for (;;) {
+ key->serial++;
+- if (key->serial < 2)
+- key->serial = 2;
+-
+- if (!rb_parent(parent))
+- p = &key_serial_tree.rb_node;
+- else if (rb_parent(parent)->rb_left == parent)
+- p = &(rb_parent(parent)->rb_left);
+- else
+- p = &(rb_parent(parent)->rb_right);
++ if (key->serial < 3) {
++ key->serial = 3;
++ goto attempt_insertion;
++ }
+
+ parent = rb_next(parent);
+ if (!parent)
+- break;
++ goto attempt_insertion;
+
+ xkey = rb_entry(parent, struct key, serial_node);
+ if (key->serial < xkey->serial)
+- goto insert_here;
++ goto attempt_insertion;
+ }
+
+- /* we've found a suitable hole - arrange for this key to occupy it */
+-insert_here:
+- rb_link_node(&key->serial_node, parent, p);
+- rb_insert_color(&key->serial_node, &key_serial_tree);
+-
+- spin_unlock(&key_serial_lock);
+-
+ } /* end key_alloc_serial() */
+
+ /*****************************************************************************/
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:11 2007
+Message-Id: <20070307170611.456270996@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:01:31 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org,
+ Alan <alan@lxorguk.ukuu.org.uk>
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ linux-ide@vger.kernel.org,
+ bzolnier@gmail.com,
+ Tejun Heo <htejun@gmail.com>
+Subject: [patch 008/101] ide: fix drive side 80c cable check
+Content-Disposition: inline; filename=ide-fix-drive-side-80c-cable-check.patch
+Content-Length: 802
+Lines: 28
+
+
+eighty_ninty_three() had word 93 validitity check but not the 80c bit
+test itself (bit 12). This increases the chance of incorrect wire
+detection especially because host side cable detection is often
+unreliable and we sometimes soley depend on drive side cable
+detection. Fix it.
+
+Signed-off-by: Tejun Heo <htejun@gmail.com>
+Acked-by: Alan <alan@lxorguk.ukuu.org.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/ide/ide-iops.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- linux-2.6.20.1.orig/drivers/ide/ide-iops.c
++++ linux-2.6.20.1/drivers/ide/ide-iops.c
+@@ -607,6 +607,8 @@ u8 eighty_ninty_three (ide_drive_t *driv
+ if(!(drive->id->hw_config & 0x4000))
+ return 0;
+ #endif /* CONFIG_IDEDMA_IVB */
++ if (!(drive->id->hw_config & 0x2000))
++ return 0;
+ return 1;
+ }
+
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:11 2007
+Message-Id: <20070307170611.586849567@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:01:32 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Larry Finger <Larry.Finger@lwfinger.net>
+Subject: [patch 009/101] bcm43xx: Fix for oops on resume
+Content-Disposition: inline; filename=bcm43xx-fix-for-oops-on-resume.patch
+Content-Length: 638
+Lines: 23
+
+
+There is a kernel oops on bcm43xx when resuming due to an overly tight timeout loop.
+
+Signed-off-by: Larry Finger<Larry.Finger@lwfinger.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/net/wireless/bcm43xx/bcm43xx.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- linux-2.6.20.1.orig/drivers/net/wireless/bcm43xx/bcm43xx.h
++++ linux-2.6.20.1/drivers/net/wireless/bcm43xx/bcm43xx.h
+@@ -21,7 +21,7 @@
+ #define PFX KBUILD_MODNAME ": "
+
+ #define BCM43xx_SWITCH_CORE_MAX_RETRIES 50
+-#define BCM43xx_IRQWAIT_MAX_RETRIES 50
++#define BCM43xx_IRQWAIT_MAX_RETRIES 100
+
+ #define BCM43xx_IO_SIZE 8192
+
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:11 2007
+Message-Id: <20070307170611.718039667@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:01:33 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Michael Buesch <mb@bu3sch.de>,
+ Larry Finger <Larry.Finger@lwfinger.net>
+Subject: [patch 010/101] bcm43xx: Fix for oops on ampdu status
+Content-Disposition: inline; filename=bcm43xx-fix-for-oops-on-ampdu-status.patch
+Content-Length: 1930
+Lines: 54
+
+
+From: Michael Buesch <mb@bu3sch.de>
+
+If bcm43xx were to process an afterburner (ampdu) status response, Linux would oops. The
+ampdu and intermediate status bits are properly named.
+
+Signed-off-by: Michael Buesch <mb@bu3sch.de>
+Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/net/wireless/bcm43xx/bcm43xx_main.c | 8 +++-----
+ drivers/net/wireless/bcm43xx/bcm43xx_xmit.h | 10 ++--------
+ 2 files changed, 5 insertions(+), 13 deletions(-)
+
+--- linux-2.6.20.1.orig/drivers/net/wireless/bcm43xx/bcm43xx_main.c
++++ linux-2.6.20.1/drivers/net/wireless/bcm43xx/bcm43xx_main.c
+@@ -1453,12 +1453,10 @@ static void handle_irq_transmit_status(s
+
+ bcm43xx_debugfs_log_txstat(bcm, &stat);
+
+- if (stat.flags & BCM43xx_TXSTAT_FLAG_IGNORE)
++ if (stat.flags & BCM43xx_TXSTAT_FLAG_AMPDU)
++ continue;
++ if (stat.flags & BCM43xx_TXSTAT_FLAG_INTER)
+ continue;
+- if (!(stat.flags & BCM43xx_TXSTAT_FLAG_ACK)) {
+- //TODO: packet was not acked (was lost)
+- }
+- //TODO: There are more (unknown) flags to test. see bcm43xx_main.h
+
+ if (bcm43xx_using_pio(bcm))
+ bcm43xx_pio_handle_xmitstatus(bcm, &stat);
+--- linux-2.6.20.1.orig/drivers/net/wireless/bcm43xx/bcm43xx_xmit.h
++++ linux-2.6.20.1/drivers/net/wireless/bcm43xx/bcm43xx_xmit.h
+@@ -137,14 +137,8 @@ struct bcm43xx_xmitstatus {
+ u16 unknown; //FIXME
+ };
+
+-#define BCM43xx_TXSTAT_FLAG_ACK 0x01
+-//TODO #define BCM43xx_TXSTAT_FLAG_??? 0x02
+-//TODO #define BCM43xx_TXSTAT_FLAG_??? 0x04
+-//TODO #define BCM43xx_TXSTAT_FLAG_??? 0x08
+-//TODO #define BCM43xx_TXSTAT_FLAG_??? 0x10
+-#define BCM43xx_TXSTAT_FLAG_IGNORE 0x20
+-//TODO #define BCM43xx_TXSTAT_FLAG_??? 0x40
+-//TODO #define BCM43xx_TXSTAT_FLAG_??? 0x80
++#define BCM43xx_TXSTAT_FLAG_AMPDU 0x10
++#define BCM43xx_TXSTAT_FLAG_INTER 0x20
+
+ u8 bcm43xx_plcp_get_ratecode_cck(const u8 bitrate);
+ u8 bcm43xx_plcp_get_ratecode_ofdm(const u8 bitrate);
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:11 2007
+Message-Id: <20070307170611.843281807@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:01:34 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org,
+ Eric Piel <Eric.Piel@tremplin-utc.net>
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Wang Zhenyu <zhenyu.z.wang@intel.com>,
+ Adrian Bunk <bunk@stusta.de>
+Subject: [patch 011/101] AGP: intel-agp bugfix
+Content-Disposition: inline; filename=agp-intel-agp-bugfix.patch
+Content-Length: 2650
+Lines: 69
+
+From: Dave Jones <davej@redhat.com>
+
+On Sun, Feb 04, 2007 at 04:51:38PM +0100, Eric Piel wrote:
+ > Hello,
+ >
+ > I've got a regression in 2.6.20-rc7 (-rc6 was fine) due to commit
+ > 4b95320fc4d21b0ff2f8604305dd6c851aff6096 ([AGPGART] intel_agp: restore
+ > graphics device's pci space early in resume).
+
+I think the key to this failure is the last line here ..
+
+ > agpgart-intel 0000:00:00.0: resuming
+ > PM: Writing back config space on device 0000:00:02.0 at offset f (was 10b, writing 0)
+ > PM: Writing back config space on device 0000:00:02.0 at offset d (was dc, writing 0)
+ > PM: Writing back config space on device 0000:00:02.0 at offset b (was 10161025, writing 0)
+ > PM: Writing back config space on device 0000:00:02.0 at offset 5 (was f4000000, writing 0)
+ > PM: Writing back config space on device 0000:00:02.0 at offset 4 (was f8000008, writing 0)
+ > PM: Writing back config space on device 0000:00:02.0 at offset 2 (was 3000011, writing 0)
+ > PM: Writing back config space on device 0000:00:02.0 at offset 1 (was 2b00007, writing 0)
+ > PM: Writing back config space on device 0000:00:02.0 at offset 0 (was 11328086, writing 0)
+ > agpgart: Unable to remap memory.
+
+This then blows up the next access to intel_i810_private.registers, which happens to
+be intel_i810_insert_entries.
+
+Either we need .suspend methods which unmap these regions, or we need
+to skip trying to map them a second time on resume.
+
+There's an ugly patch below which does the latter. Give it a try?
+
+The intel-agp suspend/resume code has really grown into something
+of a monster, and could use some refactoring in a big way.
+
+ Dave
+
+
+From: Dave Jones <davej@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/char/agp/intel-agp.c | 14 ++++++++------
+ 1 file changed, 8 insertions(+), 6 deletions(-)
+
+--- linux-2.6.20.1.orig/drivers/char/agp/intel-agp.c
++++ linux-2.6.20.1/drivers/char/agp/intel-agp.c
+@@ -117,13 +117,15 @@ static int intel_i810_configure(void)
+
+ current_size = A_SIZE_FIX(agp_bridge->current_size);
+
+- pci_read_config_dword(intel_i810_private.i810_dev, I810_MMADDR, &temp);
+- temp &= 0xfff80000;
+-
+- intel_i810_private.registers = ioremap(temp, 128 * 4096);
+ if (!intel_i810_private.registers) {
+- printk(KERN_ERR PFX "Unable to remap memory.\n");
+- return -ENOMEM;
++ pci_read_config_dword(intel_i810_private.i810_dev, I810_MMADDR, &temp);
++ temp &= 0xfff80000;
++
++ intel_i810_private.registers = ioremap(temp, 128 * 4096);
++ if (!intel_i810_private.registers) {
++ printk(KERN_ERR PFX "Unable to remap memory.\n");
++ return -ENOMEM;
++ }
+ }
+
+ if ((readl(intel_i810_private.registers+I810_DRAM_CTL)
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:12 2007
+Message-Id: <20070307170611.973927704@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:01:35 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ discuss@x86-64.org,
+ Jan Beulich <jbeulich@novell.com>,
+ David Moore <dcm@MIT.EDU>,
+ linux1394-devel <linux1394-devel@lists.sourceforge.net>,
+ David Moore <dcm@acm.org>,
+ Stefan Richter <stefanr@s5r6.in-berlin.de>
+Subject: [patch 012/101] Missing critical phys_to_virt in lib/swiotlb.c
+Content-Disposition: inline; filename=missing-critical-phys_to_virt-in-lib-swiotlb.c.patch
+Content-Length: 974
+Lines: 31
+
+From: David Moore <dcm@acm.org>
+
+Missing critical phys_to_virt in lib/swiotlb.c
+
+Adds missing call to phys_to_virt() in the
+lib/swiotlb.c:swiotlb_sync_sg() function. Without this change, a kernel
+panic will always occur whenever a SWIOTLB bounce buffer from a
+scatter-gather list gets synced. Affected are especially Intel x86_64
+machines with more than about 3 GB RAM.
+
+Signed-off-by: David Moore <dcm@acm.org>
+Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ lib/swiotlb.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- linux-2.6.20.1.orig/lib/swiotlb.c
++++ linux-2.6.20.1/lib/swiotlb.c
+@@ -750,7 +750,7 @@ swiotlb_sync_sg(struct device *hwdev, st
+
+ for (i = 0; i < nelems; i++, sg++)
+ if (sg->dma_address != SG_ENT_PHYS_ADDRESS(sg))
+- sync_single(hwdev, (void *) sg->dma_address,
++ sync_single(hwdev, phys_to_virt(sg->dma_address),
+ sg->dma_length, dir, target);
+ }
+
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:12 2007
+Message-Id: <20070307170612.107455810@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:01:36 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org,
+ Greg KH <greg@kroah.com>
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ USB development list <linux-usb-devel@lists.sourceforge.net>,
+ Adrian Bunk <bunk@stusta.de>,
+ Alan Stern <stern@rowland.harvard.edu>
+Subject: [patch 013/101] USB: fix concurrent buffer access in the hub driver
+Content-Disposition: inline; filename=usb-fix-concurrent-buffer-access-in-the-hub-driver.patch
+Content-Length: 1819
+Lines: 65
+
+
+This patch (as849) fixes a bug in the USB hub driver. A single
+pre-allocated buffer is used for all port status reads, but nothing
+guarantees exclusive use of the buffer. A mutex is added to provide
+this guarantee.
+
+Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/core/hub.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+--- linux-2.6.20.1.orig/drivers/usb/core/hub.c
++++ linux-2.6.20.1/drivers/usb/core/hub.c
+@@ -44,6 +44,7 @@ struct usb_hub {
+ struct usb_hub_status hub;
+ struct usb_port_status port;
+ } *status; /* buffer for status reports */
++ struct mutex status_mutex; /* for the status buffer */
+
+ int error; /* last reported error */
+ int nerrors; /* track consecutive errors */
+@@ -538,6 +539,7 @@ static int hub_hub_status(struct usb_hub
+ {
+ int ret;
+
++ mutex_lock(&hub->status_mutex);
+ ret = get_hub_status(hub->hdev, &hub->status->hub);
+ if (ret < 0)
+ dev_err (hub->intfdev,
+@@ -547,6 +549,7 @@ static int hub_hub_status(struct usb_hub
+ *change = le16_to_cpu(hub->status->hub.wHubChange);
+ ret = 0;
+ }
++ mutex_unlock(&hub->status_mutex);
+ return ret;
+ }
+
+@@ -620,6 +623,7 @@ static int hub_configure(struct usb_hub
+ ret = -ENOMEM;
+ goto fail;
+ }
++ mutex_init(&hub->status_mutex);
+
+ hub->descriptor = kmalloc(sizeof(*hub->descriptor), GFP_KERNEL);
+ if (!hub->descriptor) {
+@@ -1418,6 +1422,7 @@ static int hub_port_status(struct usb_hu
+ {
+ int ret;
+
++ mutex_lock(&hub->status_mutex);
+ ret = get_port_status(hub->hdev, port1, &hub->status->port);
+ if (ret < 4) {
+ dev_err (hub->intfdev,
+@@ -1429,6 +1434,7 @@ static int hub_port_status(struct usb_hu
+ *change = le16_to_cpu(hub->status->port.wPortChange);
+ ret = 0;
+ }
++ mutex_unlock(&hub->status_mutex);
+ return ret;
+ }
+
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:12 2007
+Message-Id: <20070307170612.262729971@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:01:37 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Gregor Jasny <gjasny@web.de>,
+ Takashi Iwai <tiwai@suse.de>,
+ Jaroslav Kysela <perex@suse.cz>
+Subject: [patch 014/101] USB audio fixes 1
+Content-Disposition: inline; filename=usb-audio-fixes-1.patch
+Content-Length: 1467
+Lines: 47
+
+From: Takashi Iwai <tiwai@suse.de>
+
+[PATCH] usbaudio - Fix Oops with broken usb descriptors
+
+This is a patch for ALSA Bug #2724. Some webcams provide bogus
+settings with no valid rates. With this patch those are skipped.
+
+Signed-off-by: Gregor Jasny <gjasny@web.de>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Jaroslav Kysela <perex@suse.cz>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ sound/usb/usbaudio.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+--- linux-2.6.20.1.orig/sound/usb/usbaudio.c
++++ linux-2.6.20.1/sound/usb/usbaudio.c
+@@ -2456,6 +2456,7 @@ static int parse_audio_format_rates(stru
+ * build the rate table and bitmap flags
+ */
+ int r, idx, c;
++ unsigned int nonzero_rates = 0;
+ /* this table corresponds to the SNDRV_PCM_RATE_XXX bit */
+ static unsigned int conv_rates[] = {
+ 5512, 8000, 11025, 16000, 22050, 32000, 44100, 48000,
+@@ -2478,6 +2479,7 @@ static int parse_audio_format_rates(stru
+ fp->altsetting == 5 && fp->maxpacksize == 392)
+ rate = 96000;
+ fp->rate_table[r] = rate;
++ nonzero_rates |= rate;
+ if (rate < fp->rate_min)
+ fp->rate_min = rate;
+ else if (rate > fp->rate_max)
+@@ -2493,6 +2495,10 @@ static int parse_audio_format_rates(stru
+ if (!found)
+ fp->needs_knot = 1;
+ }
++ if (!nonzero_rates) {
++ hwc_debug("All rates were zero. Skipping format!\n");
++ return -1;
++ }
+ if (fp->needs_knot)
+ fp->rates |= SNDRV_PCM_RATE_KNOT;
+ } else {
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:12 2007
+Message-Id: <20070307170612.374647516@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:01:38 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Takashi Iwai <tiwai@suse.de>
+Subject: [patch 015/101] USB audio fixes 2
+Content-Disposition: inline; filename=usb-audio-fixes-2.patch
+Content-Length: 2519
+Lines: 87
+
+From: Takashi Iwai <tiwai@suse.de>
+
+[PATCH] usbaudio - Fix Oops with unconventional sample rates
+
+The patch fixes the memory corruption by the support of unconventional
+sample rates. Also, it avoids the too restrictive constraints if
+any of usb descriptions contain continuous rates.
+
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ sound/usb/usbaudio.c | 43 +++++++++++++++++++++++++------------------
+ 1 file changed, 25 insertions(+), 18 deletions(-)
+
+--- linux-2.6.20.1.orig/sound/usb/usbaudio.c
++++ linux-2.6.20.1/sound/usb/usbaudio.c
+@@ -186,6 +186,7 @@ struct snd_usb_substream {
+ u64 formats; /* format bitmasks (all or'ed) */
+ unsigned int num_formats; /* number of supported audio formats (list) */
+ struct list_head fmt_list; /* format list */
++ struct snd_pcm_hw_constraint_list rate_list; /* limited rates */
+ spinlock_t lock;
+
+ struct snd_urb_ops ops; /* callbacks (must be filled at init) */
+@@ -1810,28 +1811,33 @@ static int check_hw_params_convention(st
+ static int snd_usb_pcm_check_knot(struct snd_pcm_runtime *runtime,
+ struct snd_usb_substream *subs)
+ {
+- struct list_head *p;
+- struct snd_pcm_hw_constraint_list constraints_rates;
++ struct audioformat *fp;
++ int count = 0, needs_knot = 0;
+ int err;
+
+- list_for_each(p, &subs->fmt_list) {
+- struct audioformat *fp;
+- fp = list_entry(p, struct audioformat, list);
+-
+- if (!fp->needs_knot)
+- continue;
+-
+- constraints_rates.count = fp->nr_rates;
+- constraints_rates.list = fp->rate_table;
+- constraints_rates.mask = 0;
+-
+- err = snd_pcm_hw_constraint_list(runtime, 0,
+- SNDRV_PCM_HW_PARAM_RATE,
+- &constraints_rates);
++ list_for_each_entry(fp, &subs->fmt_list, list) {
++ if (fp->rates & SNDRV_PCM_RATE_CONTINUOUS)
++ return 0;
++ count += fp->nr_rates;
++ if (fp->needs_knot)
++ needs_knot = 1;
++ }
++ if (!needs_knot)
++ return 0;
+
+- if (err < 0)
+- return err;
++ subs->rate_list.count = count;
++ subs->rate_list.list = kmalloc(sizeof(int) * count, GFP_KERNEL);
++ subs->rate_list.mask = 0;
++ count = 0;
++ list_for_each_entry(fp, &subs->fmt_list, list) {
++ int i;
++ for (i = 0; i < fp->nr_rates; i++)
++ subs->rate_list.list[count++] = fp->rate_table[i];
+ }
++ err = snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE,
++ &subs->rate_list);
++ if (err < 0)
++ return err;
+
+ return 0;
+ }
+@@ -2231,6 +2237,7 @@ static void free_substream(struct snd_us
+ kfree(fp->rate_table);
+ kfree(fp);
+ }
++ kfree(subs->rate_list.list);
+ }
+
+
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:12 2007
+Message-Id: <20070307170612.498003382@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:01:39 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Takashi Iwai <tiwai@suse.de>,
+ Jaroslav Kysela <perex@suse.cz>
+Subject: [patch 016/101] hda-intel - Dont try to probe invalid codecs
+Content-Disposition: inline; filename=hda-intel-don-t-try-to-probe-invalid-codecs.patch
+Content-Length: 881
+Lines: 30
+
+From: Takashi Iwai <tiwai@suse.de>
+
+[ALSA] hda-intel - Don't try to probe invalid codecs
+
+Fix the max number of codecs detected by HD-intel (and compatible)
+controllers to 3. Some hardware reports extra bits as if
+connected, and the driver gets confused to probe unexisting codecs.
+
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Jaroslav Kysela <perex@suse.cz>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+
+---
+ sound/pci/hda/hda_intel.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- linux-2.6.20.1.orig/sound/pci/hda/hda_intel.c
++++ linux-2.6.20.1/sound/pci/hda/hda_intel.c
+@@ -199,7 +199,7 @@ enum { SDI0, SDI1, SDI2, SDI3, SDO0, SDO
+
+ /* STATESTS int mask: SD2,SD1,SD0 */
+ #define STATESTS_INT_MASK 0x07
+-#define AZX_MAX_CODECS 4
++#define AZX_MAX_CODECS 3
+
+ /* SD_CTL bits */
+ #define SD_CTL_STREAM_RESET 0x01 /* stream reset bit */
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:12 2007
+Message-Id: <20070307170612.646730623@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:01:40 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org,
+ "Kai" <epimetreus@fastmail.fm>,
+ Andrew Morton <akpm@linux-foundation.org>
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Jens Axboe <jens.axboe@oracle.com>,
+ Neil Brown <neilb@suse.de>
+Subject: [patch 017/101] Fix various bugs with aligned reads in RAID5.
+Content-Disposition: inline; filename=fix-various-bugs-with-aligned-reads-in-raid5.patch
+Content-Length: 3276
+Lines: 110
+
+From: Neil Brown <neilb@suse.de>
+
+Fix various bugs with aligned reads in RAID5.
+
+It is possible for raid5 to be sent a bio that is too big
+for an underlying device. So if it is a READ that we
+pass stright down to a device, it will fail and confuse
+RAID5.
+
+So in 'chunk_aligned_read' we check that the bio fits within the
+parameters for the target device and if it doesn't fit, fall back
+on reading through the stripe cache and making lots of one-page
+requests.
+
+Note that this is the earliest time we can check against the device
+because earlier we don't have a lock on the device, so it could change
+underneath us.
+
+Also, the code for handling a retry through the cache when a read
+fails has not been tested and was badly broken. This patch fixes that
+code.
+
+Signed-off-by: Neil Brown <neilb@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/md/raid5.c | 42 +++++++++++++++++++++++++++++++++++++++---
+ 1 file changed, 39 insertions(+), 3 deletions(-)
+
+--- linux-2.6.20.1.orig/drivers/md/raid5.c
++++ linux-2.6.20.1/drivers/md/raid5.c
+@@ -2620,7 +2620,7 @@ static struct bio *remove_bio_from_retry
+ }
+ bi = conf->retry_read_aligned_list;
+ if(bi) {
+- conf->retry_read_aligned = bi->bi_next;
++ conf->retry_read_aligned_list = bi->bi_next;
+ bi->bi_next = NULL;
+ bi->bi_phys_segments = 1; /* biased count of active stripes */
+ bi->bi_hw_segments = 0; /* count of processed stripes */
+@@ -2669,6 +2669,27 @@ static int raid5_align_endio(struct bio
+ return 0;
+ }
+
++static int bio_fits_rdev(struct bio *bi)
++{
++ request_queue_t *q = bdev_get_queue(bi->bi_bdev);
++
++ if ((bi->bi_size>>9) > q->max_sectors)
++ return 0;
++ blk_recount_segments(q, bi);
++ if (bi->bi_phys_segments > q->max_phys_segments ||
++ bi->bi_hw_segments > q->max_hw_segments)
++ return 0;
++
++ if (q->merge_bvec_fn)
++ /* it's too hard to apply the merge_bvec_fn at this stage,
++ * just just give up
++ */
++ return 0;
++
++ return 1;
++}
++
++
+ static int chunk_aligned_read(request_queue_t *q, struct bio * raid_bio)
+ {
+ mddev_t *mddev = q->queuedata;
+@@ -2715,6 +2736,13 @@ static int chunk_aligned_read(request_qu
+ align_bi->bi_flags &= ~(1 << BIO_SEG_VALID);
+ align_bi->bi_sector += rdev->data_offset;
+
++ if (!bio_fits_rdev(align_bi)) {
++ /* too big in some way */
++ bio_put(align_bi);
++ rdev_dec_pending(rdev, mddev);
++ return 0;
++ }
++
+ spin_lock_irq(&conf->device_lock);
+ wait_event_lock_irq(conf->wait_for_stripe,
+ conf->quiesce == 0,
+@@ -3107,7 +3135,9 @@ static int retry_aligned_read(raid5_con
+ last_sector = raid_bio->bi_sector + (raid_bio->bi_size>>9);
+
+ for (; logical_sector < last_sector;
+- logical_sector += STRIPE_SECTORS, scnt++) {
++ logical_sector += STRIPE_SECTORS,
++ sector += STRIPE_SECTORS,
++ scnt++) {
+
+ if (scnt < raid_bio->bi_hw_segments)
+ /* already done this stripe */
+@@ -3123,7 +3153,13 @@ static int retry_aligned_read(raid5_con
+ }
+
+ set_bit(R5_ReadError, &sh->dev[dd_idx].flags);
+- add_stripe_bio(sh, raid_bio, dd_idx, 0);
++ if (!add_stripe_bio(sh, raid_bio, dd_idx, 0)) {
++ release_stripe(sh);
++ raid_bio->bi_hw_segments = scnt;
++ conf->retry_read_aligned = raid_bio;
++ return handled;
++ }
++
+ handle_stripe(sh, NULL);
+ release_stripe(sh);
+ handled++;
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:12 2007
+Message-Id: <20070307170612.752732614@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:01:41 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ bunk@stusta.de,
+ Daniel Walker <dwalker@mvista.com>,
+ "David S. Miller" <davem@davemloft.net>
+Subject: [patch 018/101] Fix ATM initcall ordering.
+Content-Disposition: inline; filename=fix-atm-initcall-ordering.patch
+Content-Length: 1057
+Lines: 40
+
+From: Daniel Walker <dwalker@mvista.com>
+
+[ATM]: Fix for crash in adummy_init()
+
+This was reported by Ingo Molnar here,
+
+http://lkml.org/lkml/2006/12/18/119
+
+The problem is that adummy_init() depends on atm_init() , but adummy_init()
+is called first.
+
+So I put atm_init() into subsys_initcall which seems appropriate, and it
+will still get module_init() if it becomes a module.
+
+Interesting to note that you could crash your system here if you just load
+the modules in the wrong order.
+
+Signed-off-by: Daniel Walker <dwalker@mvista.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ net/atm/common.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- linux-2.6.20.1.orig/net/atm/common.c
++++ linux-2.6.20.1/net/atm/common.c
+@@ -816,7 +816,8 @@ static void __exit atm_exit(void)
+ proto_unregister(&vcc_proto);
+ }
+
+-module_init(atm_init);
++subsys_initcall(atm_init);
++
+ module_exit(atm_exit);
+
+ MODULE_LICENSE("GPL");
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:13 2007
+Message-Id: <20070307170612.890693963@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:01:42 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ bunk@stusta.de,
+ John Heffner <jheffner@psc.edu>,
+ "David S. Miller" <davem@davemloft.net>
+Subject: [patch 019/101] Fix TCP FIN handling
+Content-Disposition: inline; filename=fix-tcp-fin-handling.patch
+Content-Length: 886
+Lines: 29
+
+From: John Heffner <jheffner@psc.edu>
+
+We can accidently spit out a huge burst of packets with TSO
+when the FIN back is piggybacked onto the final packet.
+
+[TCP]: Don't apply FIN exception to full TSO segments.
+
+Signed-off-by: John Heffner <jheffner@psc.edu>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ net/ipv4/tcp_output.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- linux-2.6.20.1.orig/net/ipv4/tcp_output.c
++++ linux-2.6.20.1/net/ipv4/tcp_output.c
+@@ -965,7 +965,8 @@ static inline unsigned int tcp_cwnd_test
+ u32 in_flight, cwnd;
+
+ /* Don't be strict about the congestion window for the final FIN. */
+- if (TCP_SKB_CB(skb)->flags & TCPCB_FLAG_FIN)
++ if ((TCP_SKB_CB(skb)->flags & TCPCB_FLAG_FIN) &&
++ tcp_skb_pcount(skb) == 1)
+ return 1;
+
+ in_flight = tcp_packets_in_flight(tp);
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:13 2007
+Message-Id: <20070307170613.018724166@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:01:43 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ bunk@stusta.de,
+ Alexey Dobriyan <adobriyan@openvz.org>,
+ "David S. Miller" <davem@davemloft.net>
+Subject: [patch 020/101] Fix allocation failure handling in multicast
+Content-Disposition: inline; filename=fix-allocation-failure-handling-in-multicast.patch
+Content-Length: 1154
+Lines: 40
+
+From: Alexey Dobriyan <adobriyan@openvz.org>
+
+[IPV4/IPV6] multicast: Check add_grhead() return value
+
+add_grhead() allocates memory with GFP_ATOMIC and in at least two places skb
+from it passed to skb_put() without checking.
+
+Signed-off-by: Alexey Dobriyan <adobriyan@openvz.org>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ net/ipv4/igmp.c | 2 ++
+ net/ipv6/mcast.c | 2 ++
+ 2 files changed, 4 insertions(+)
+
+--- linux-2.6.20.1.orig/net/ipv4/igmp.c
++++ linux-2.6.20.1/net/ipv4/igmp.c
+@@ -455,6 +455,8 @@ static struct sk_buff *add_grec(struct s
+ skb = add_grhead(skb, pmc, type, &pgr);
+ first = 0;
+ }
++ if (!skb)
++ return NULL;
+ psrc = (__be32 *)skb_put(skb, sizeof(__be32));
+ *psrc = psf->sf_inaddr;
+ scount++; stotal++;
+--- linux-2.6.20.1.orig/net/ipv6/mcast.c
++++ linux-2.6.20.1/net/ipv6/mcast.c
+@@ -1582,6 +1582,8 @@ static struct sk_buff *add_grec(struct s
+ skb = add_grhead(skb, pmc, type, &pgr);
+ first = 0;
+ }
++ if (!skb)
++ return NULL;
+ psrc = (struct in6_addr *)skb_put(skb, sizeof(*psrc));
+ *psrc = psf->sf_addr;
+ scount++; stotal++;
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:13 2007
+Message-Id: <20070307170613.142342637@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:01:44 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org,
+ akpm@linux-foundation.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ linux-raid@vger.kernel.org,
+ Neil Brown <neilb@suse.de>
+Subject: [patch 021/101] md: Avoid possible BUG_ON in md bitmap handling.
+Content-Disposition: inline; filename=md-avoid-possible-bug_on-in-md-bitmap-handling.patch
+Content-Length: 2846
+Lines: 95
+
+From: Neil Brown <neilb@suse.de>
+
+md/bitmap tracks how many active write requests are pending on blocks
+associated with each bit in the bitmap, so that it knows when it can
+clear the bit (when count hits zero).
+
+The counter has 14 bits of space, so if there are ever more than 16383,
+we cannot cope.
+
+Currently the code just calles BUG_ON as "all" drivers have request queue
+limits much smaller than this.
+
+However is seems that some don't. Apparently some multipath configurations
+can allow more than 16383 concurrent write requests.
+
+So, in this unlikely situation, instead of calling BUG_ON we now wait
+for the count to drop down a bit. This requires a new wait_queue_head,
+some waiting code, and a wakeup call.
+
+Tested by limiting the counter to 20 instead of 16383 (writes go a lot slower
+in that case...).
+
+Signed-off-by: Neil Brown <neilb@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+diff .prev/drivers/md/bitmap.c ./drivers/md/bitmap.c
+---
+ drivers/md/bitmap.c | 22 +++++++++++++++++++++-
+ include/linux/raid/bitmap.h | 1 +
+ 2 files changed, 22 insertions(+), 1 deletion(-)
+
+--- linux-2.6.20.1.orig/drivers/md/bitmap.c
++++ linux-2.6.20.1/drivers/md/bitmap.c
+@@ -1160,6 +1160,22 @@ int bitmap_startwrite(struct bitmap *bit
+ return 0;
+ }
+
++ if (unlikely((*bmc & COUNTER_MAX) == COUNTER_MAX)) {
++ DEFINE_WAIT(__wait);
++ /* note that it is safe to do the prepare_to_wait
++ * after the test as long as we do it before dropping
++ * the spinlock.
++ */
++ prepare_to_wait(&bitmap->overflow_wait, &__wait,
++ TASK_UNINTERRUPTIBLE);
++ spin_unlock_irq(&bitmap->lock);
++ bitmap->mddev->queue
++ ->unplug_fn(bitmap->mddev->queue);
++ schedule();
++ finish_wait(&bitmap->overflow_wait, &__wait);
++ continue;
++ }
++
+ switch(*bmc) {
+ case 0:
+ bitmap_file_set_bit(bitmap, offset);
+@@ -1169,7 +1185,7 @@ int bitmap_startwrite(struct bitmap *bit
+ case 1:
+ *bmc = 2;
+ }
+- BUG_ON((*bmc & COUNTER_MAX) == COUNTER_MAX);
++
+ (*bmc)++;
+
+ spin_unlock_irq(&bitmap->lock);
+@@ -1207,6 +1223,9 @@ void bitmap_endwrite(struct bitmap *bitm
+ if (!success && ! (*bmc & NEEDED_MASK))
+ *bmc |= NEEDED_MASK;
+
++ if ((*bmc & COUNTER_MAX) == COUNTER_MAX)
++ wake_up(&bitmap->overflow_wait);
++
+ (*bmc)--;
+ if (*bmc <= 2) {
+ set_page_attr(bitmap,
+@@ -1431,6 +1450,7 @@ int bitmap_create(mddev_t *mddev)
+ spin_lock_init(&bitmap->lock);
+ atomic_set(&bitmap->pending_writes, 0);
+ init_waitqueue_head(&bitmap->write_wait);
++ init_waitqueue_head(&bitmap->overflow_wait);
+
+ bitmap->mddev = mddev;
+
+--- linux-2.6.20.1.orig/include/linux/raid/bitmap.h
++++ linux-2.6.20.1/include/linux/raid/bitmap.h
+@@ -247,6 +247,7 @@ struct bitmap {
+
+ atomic_t pending_writes; /* pending writes to the bitmap file */
+ wait_queue_head_t write_wait;
++ wait_queue_head_t overflow_wait;
+
+ };
+
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:13 2007
+Message-Id: <20070307170613.294748556@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:01:45 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ imr@rtschenk.de,
+ linuxppc-embedded@ozlabs.org,
+ Kumar Gala <galak@kernel.crashing.org>
+Subject: [patch 022/101] Fix compile error for e500 core based processors
+Content-Disposition: inline; filename=fix-compile-error-for-e500-core-based-processors.patch
+Content-Length: 1269
+Lines: 34
+
+From: Rojhalat Ibrahim <imr@rtschenk.de>
+
+We get the following compiler error:
+
+ CC arch/ppc/kernel/ppc_ksyms.o
+arch/ppc/kernel/ppc_ksyms.c:275: error: '__mtdcr' undeclared here (not in a function)
+arch/ppc/kernel/ppc_ksyms.c:275: warning: type defaults to 'int' in declaration of '__mtdcr'
+arch/ppc/kernel/ppc_ksyms.c:276: error: '__mfdcr' undeclared here (not in a function)
+arch/ppc/kernel/ppc_ksyms.c:276: warning: type defaults to 'int' in declaration of '__mfdcr'
+make[1]: *** [arch/ppc/kernel/ppc_ksyms.o] Error 1
+
+This is due to the EXPORT_SYMBOL for __mtdcr/__mfdcr not having the proper CONFIG protection
+
+Signed-off-by: Rojhalat Ibrahim <imr@rtschenk.de>
+Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/ppc/kernel/ppc_ksyms.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- linux-2.6.20.1.orig/arch/ppc/kernel/ppc_ksyms.c
++++ linux-2.6.20.1/arch/ppc/kernel/ppc_ksyms.c
+@@ -270,7 +270,7 @@ EXPORT_SYMBOL(mmu_hash_lock); /* For MOL
+ extern long *intercept_table;
+ EXPORT_SYMBOL(intercept_table);
+ #endif /* CONFIG_PPC_STD_MMU */
+-#if defined(CONFIG_40x) || defined(CONFIG_BOOKE)
++#ifdef CONFIG_PPC_DCR_NATIVE
+ EXPORT_SYMBOL(__mtdcr);
+ EXPORT_SYMBOL(__mfdcr);
+ #endif
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:13 2007
+Message-Id: <20070307170613.395535918@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:01:46 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ linux1394-devel@lists.sourceforge.net,
+ Stefan Richter <stefanr@s5r6.in-berlin.de>,
+ David Moore <dcm@acm.org>
+Subject: [patch 023/101] ieee1394: video1394: DMA fix
+Content-Disposition: inline; filename=ieee1394-video1394-dma-fix.patch
+Content-Length: 1633
+Lines: 48
+
+From: David Moore <dcm@acm.org>
+
+This together with the phys_to_virt fix in lib/swiotlb.c::swiotlb_sync_sg
+fixes video1394 DMA on machines with DMA bounce buffers, especially Intel
+x86-64 machines with > 3GB RAM.
+
+Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
+Signed-off-by: David Moore <dcm@acm.org>
+Tested-by: Nicolas Turro <Nicolas.Turro@inrialpes.fr>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/ieee1394/video1394.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+--- linux-2.6.20.1.orig/drivers/ieee1394/video1394.c
++++ linux-2.6.20.1/drivers/ieee1394/video1394.c
+@@ -489,6 +489,9 @@ static void wakeup_dma_ir_ctx(unsigned l
+ reset_ir_status(d, i);
+ d->buffer_status[d->buffer_prg_assignment[i]] = VIDEO1394_BUFFER_READY;
+ do_gettimeofday(&d->buffer_time[d->buffer_prg_assignment[i]]);
++ dma_region_sync_for_cpu(&d->dma,
++ d->buffer_prg_assignment[i] * d->buf_size,
++ d->buf_size);
+ }
+ }
+
+@@ -1096,6 +1099,8 @@ static long video1394_ioctl(struct file
+ DBGMSG(ohci->host->id, "Starting iso transmit DMA ctx=%d",
+ d->ctx);
+ put_timestamp(ohci, d, d->last_buffer);
++ dma_region_sync_for_device(&d->dma,
++ v.buffer * d->buf_size, d->buf_size);
+
+ /* Tell the controller where the first program is */
+ reg_write(ohci, d->cmdPtr,
+@@ -1111,6 +1116,9 @@ static long video1394_ioctl(struct file
+ "Waking up iso transmit dma ctx=%d",
+ d->ctx);
+ put_timestamp(ohci, d, d->last_buffer);
++ dma_region_sync_for_device(&d->dma,
++ v.buffer * d->buf_size, d->buf_size);
++
+ reg_write(ohci, d->ctrlSet, 0x1000);
+ }
+ }
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:13 2007
+Message-Id: <20070307170613.527416889@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:01:47 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ linux1394-devel@lists.sourceforge.net,
+ Stefan Richter <stefanr@s5r6.in-berlin.de>
+Subject: [patch 024/101] ieee1394: fix host device registering when nodemgr disabled
+Content-Disposition: inline; filename=ieee1394-fix-host-device-registering-when-nodemgr-disabled.patch
+Content-Length: 1855
+Lines: 67
+
+From: Stefan Richter <stefanr@s5r6.in-berlin.de>
+
+Since my commit 8252bbb1363b7fe963a3eb6f8a36da619a6f5a65 in 2.6.20-rc1,
+host devices have a dummy driver attached. Alas the driver was not
+registered before use if ieee1394 was loaded with disable_nodemgr=1.
+
+This resulted in non-functional FireWire drivers or kernel lockup.
+http://bugzilla.kernel.org/show_bug.cgi?id=7942
+
+Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/ieee1394/nodemgr.c | 24 ++++++++++++++++--------
+ 1 file changed, 16 insertions(+), 8 deletions(-)
+
+--- linux-2.6.20.1.orig/drivers/ieee1394/nodemgr.c
++++ linux-2.6.20.1/drivers/ieee1394/nodemgr.c
+@@ -274,7 +274,6 @@ static struct device_driver nodemgr_mid_
+ struct device nodemgr_dev_template_host = {
+ .bus = &ieee1394_bus_type,
+ .release = nodemgr_release_host,
+- .driver = &nodemgr_mid_layer_driver,
+ };
+
+
+@@ -1889,22 +1888,31 @@ int init_ieee1394_nodemgr(void)
+
+ error = class_register(&nodemgr_ne_class);
+ if (error)
+- return error;
+-
++ goto fail_ne;
+ error = class_register(&nodemgr_ud_class);
+- if (error) {
+- class_unregister(&nodemgr_ne_class);
+- return error;
+- }
++ if (error)
++ goto fail_ud;
+ error = driver_register(&nodemgr_mid_layer_driver);
++ if (error)
++ goto fail_ml;
++ /* This driver is not used if nodemgr is off (disable_nodemgr=1). */
++ nodemgr_dev_template_host.driver = &nodemgr_mid_layer_driver;
++
+ hpsb_register_highlevel(&nodemgr_highlevel);
+ return 0;
++
++fail_ml:
++ class_unregister(&nodemgr_ud_class);
++fail_ud:
++ class_unregister(&nodemgr_ne_class);
++fail_ne:
++ return error;
+ }
+
+ void cleanup_ieee1394_nodemgr(void)
+ {
+ hpsb_unregister_highlevel(&nodemgr_highlevel);
+-
++ driver_unregister(&nodemgr_mid_layer_driver);
+ class_unregister(&nodemgr_ud_class);
+ class_unregister(&nodemgr_ne_class);
+ }
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:13 2007
+Message-Id: <20070307170613.654016184@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:01:48 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ len.brown@intel.com,
+ cappaberra@gmail.com,
+ Michael Hanselmann <linux-kernel@hansmi.ch>
+Subject: [patch 025/101] Fix null pointer dereference in appledisplay driver
+Content-Disposition: inline; filename=fix-null-pointer-dereference-in-appledisplay-driver.patch
+Content-Length: 994
+Lines: 29
+
+From: Michael Hanselmann <linux-kernel@hansmi.ch>
+
+Commit 40b20c257a13c5a526ac540bc5e43d0fdf29792a by Len Brown introduced
+a null pointer dereference in the appledisplay driver. This patch fixes
+it.
+
+Signed-off-by: Michael Hanselmann <linux-kernel@hansmi.ch>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+
+---
+ drivers/usb/misc/appledisplay.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- linux-2.6.20.1.orig/drivers/usb/misc/appledisplay.c
++++ linux-2.6.20.1/drivers/usb/misc/appledisplay.c
+@@ -281,8 +281,8 @@ static int appledisplay_probe(struct usb
+ /* Register backlight device */
+ snprintf(bl_name, sizeof(bl_name), "appledisplay%d",
+ atomic_inc_return(&count_displays) - 1);
+- pdata->bd = backlight_device_register(bl_name, NULL, NULL,
+- &appledisplay_bl_data);
++ pdata->bd = backlight_device_register(bl_name, NULL,
++ pdata, &appledisplay_bl_data);
+ if (IS_ERR(pdata->bd)) {
+ err("appledisplay: Backlight registration failed");
+ goto error;
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:13 2007
+Message-Id: <20070307170613.810740248@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:01:49 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Julien BLACHE <jb@jblache.org>,
+ Jiri Kosina <jkosina@suse.cz>
+Subject: [patch 026/101] USB HID: Fix USB vendor and product IDs endianness for USB HID devices
+Content-Disposition: inline; filename=usb-hid-fix-usb-vendor-and-product-ids-endianness-for-usb-hid-devices.patch
+Content-Length: 1078
+Lines: 32
+
+From: Julien BLACHE <jb@jblache.org>
+
+[PATCH] USB HID: Fix USB vendor and product IDs endianness for USB HID devices
+
+The USB vendor and product IDs are not byteswapped appropriately, and
+thus come out in the wrong endianness when fetched through the evdev
+using ioctl() on big endian platforms.
+
+Signed-off-by: Julien BLACHE <jb@jblache.org>
+Signed-off-by: Jiri Kosina <jkosina@suse.cz>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+
+---
+ drivers/usb/input/hid-core.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- linux-2.6.20.1.orig/drivers/usb/input/hid-core.c
++++ linux-2.6.20.1/drivers/usb/input/hid-core.c
+@@ -1212,8 +1212,8 @@ static struct hid_device *usb_hid_config
+ le16_to_cpu(dev->descriptor.idProduct));
+
+ hid->bus = BUS_USB;
+- hid->vendor = dev->descriptor.idVendor;
+- hid->product = dev->descriptor.idProduct;
++ hid->vendor = le16_to_cpu(dev->descriptor.idVendor);
++ hid->product = le16_to_cpu(dev->descriptor.idProduct);
+
+ usb_make_path(dev, hid->phys, sizeof(hid->phys));
+ strlcat(hid->phys, "/input", sizeof(hid->phys));
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:14 2007
+Message-Id: <20070307170613.912981985@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:01:50 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org,
+ Andrew Morton <akpm@osdl.org>
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Paolo Blaisorblade Giarrusso <blaisorblade@yahoo.it>
+Subject: [patch 027/101] Kconfig: FAULT_INJECTION can be selected only if LOCKDEP is enabled.
+Content-Disposition: inline; filename=kconfig-fault_injection-can-be-selected-only-if-lockdep-is-enabled.patch
+Content-Length: 789
+Lines: 26
+
+From: "Paolo 'Blaisorblade' Giarrusso" <blaisorblade@yahoo.it>
+
+There is no prompt for STACKTRACE, so it is enabled only when 'select'ed.
+FAULT_INJECTION depends on it, while LOCKDEP selects it. So FAULT_INJECTION
+becomes visible in Kconfig only when LOCKDEP is enabled.
+
+Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ lib/Kconfig.debug | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- linux-2.6.20.1.orig/lib/Kconfig.debug
++++ linux-2.6.20.1/lib/Kconfig.debug
+@@ -400,7 +400,7 @@ config LKDTM
+ config FAULT_INJECTION
+ bool "Fault-injection framework"
+ depends on DEBUG_KERNEL
+- depends on STACKTRACE
++ select STACKTRACE
+ select FRAME_POINTER
+ help
+ Provide fault-injection framework.
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:14 2007
+Message-Id: <20070307170614.038888455@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:01:51 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Andrew Morton <akpm@osdl.org>,
+ David Woodhouse <dwmw2@infradead.org>,
+ Martin Michlmayr <tbm@cyrius.com>,
+ Yoshinori Sato <ysato@users.sourceforge.jp>,
+ Rod Whitby <rod@whitby.id.au>
+Subject: [patch 028/101] MTD: Fatal regression in drivers/mtd/redboot.c in 2.6.20
+Content-Disposition: inline; filename=mtd-fatal-regression-in-drivers-mtd-redboot.c-in-2.6.20.patch
+Content-Length: 2161
+Lines: 60
+
+From: David Woodhouse <dwmw2@infradead.org>
+
+[MTD] Fix regression in RedBoot partition scanning
+
+This fixes a regression introduced by the attempt to handle RedBoot FIS
+tables which are smaller than an eraseblock, in commit
+0b47d654089c5ce3f2ea26a4485db9bcead1e515
+
+It moves the recalculation of the number of slots in the table to the
+correct place, and improves the heuristic for when we think we need to
+byte-swap what we read from the flash.
+
+Signed-off-by: David Woodhouse <dwmw2@infradead.org>
+Cc: Rod Whitby <rod@whitby.id.au>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/mtd/redboot.c | 19 +++++++++++++++----
+ 1 file changed, 15 insertions(+), 4 deletions(-)
+
+--- linux-2.6.20.1.orig/drivers/mtd/redboot.c
++++ linux-2.6.20.1/drivers/mtd/redboot.c
+@@ -94,8 +94,19 @@ static int parse_redboot_partitions(stru
+ * (NOTE: this is 'size' not 'data_length'; size is
+ * the full size of the entry.)
+ */
+- if (swab32(buf[i].size) == master->erasesize) {
++
++ /* RedBoot can combine the FIS directory and
++ config partitions into a single eraseblock;
++ we assume wrong-endian if either the swapped
++ 'size' matches the eraseblock size precisely,
++ or if the swapped size actually fits in an
++ eraseblock while the unswapped size doesn't. */
++ if (swab32(buf[i].size) == master->erasesize ||
++ (buf[i].size > master->erasesize
++ && swab32(buf[i].size) < master->erasesize)) {
+ int j;
++ /* Update numslots based on actual FIS directory size */
++ numslots = swab32(buf[i].size) / sizeof (struct fis_image_desc);
+ for (j = 0; j < numslots; ++j) {
+
+ /* A single 0xff denotes a deleted entry.
+@@ -120,11 +131,11 @@ static int parse_redboot_partitions(stru
+ swab32s(&buf[j].desc_cksum);
+ swab32s(&buf[j].file_cksum);
+ }
++ } else if (buf[i].size < master->erasesize) {
++ /* Update numslots based on actual FIS directory size */
++ numslots = buf[i].size / sizeof(struct fis_image_desc);
+ }
+ break;
+- } else {
+- /* re-calculate of real numslots */
+- numslots = buf[i].size / sizeof(struct fis_image_desc);
+ }
+ }
+ if (i == numslots) {
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:14 2007
+Message-Id: <20070307170614.168292296@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:01:52 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org,
+ davem@davemloft.net
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ yoshfuji@linux-ipv6.org,
+ netdev@vger.kernel.org,
+ handat@pm.nttdata.co.jp
+Subject: [patch 029/101] IPV6: HASHTABLES: Use appropriate seed for caluculating ehash index.
+Content-Disposition: inline; filename=ipv6-hashtables-use-appropriate-seed-for-caluculating-ehash-index.patch
+Content-Length: 1212
+Lines: 30
+
+From: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
+
+Tetsuo Handa <handat@pm.nttdata.co.jp> told me that connect(2) with TCPv6
+socket almost always took a few minutes to return when we did not have any
+ports available in the range of net.ipv4.ip_local_port_range.
+
+The reason was that we used incorrect seed for calculating index of
+hash when we check established sockets in __inet6_check_established().
+
+Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ net/ipv6/inet6_hashtables.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- linux-2.6.20.1.orig/net/ipv6/inet6_hashtables.c
++++ linux-2.6.20.1/net/ipv6/inet6_hashtables.c
+@@ -172,7 +172,7 @@ static int __inet6_check_established(str
+ const struct in6_addr *saddr = &np->daddr;
+ const int dif = sk->sk_bound_dev_if;
+ const __portpair ports = INET_COMBINED_PORTS(inet->dport, lport);
+- const unsigned int hash = inet6_ehashfn(daddr, inet->num, saddr,
++ const unsigned int hash = inet6_ehashfn(daddr, lport, saddr,
+ inet->dport);
+ struct inet_ehash_bucket *head = inet_ehash_bucket(hinfo, hash);
+ struct sock *sk2;
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:14 2007
+Message-Id: <20070307170614.302656541@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:01:53 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Alan Stern <stern@rowland.harvard.edu>
+Subject: [patch 030/101] EHCI: turn off remote wakeup during shutdown
+Content-Disposition: inline; filename=ehci-turn-off-remote-wakeup-during-shutdown.patch
+Content-Length: 1709
+Lines: 51
+
+From: Alan Stern <stern@rowland.harvard.edu>
+
+This patch (as850b) disables remote wakeup (and everything else!) on
+all EHCI ports when the shutdown() method is called. If remote wakeup
+is left active then some systems will reboot instead of powering off.
+This fixes Bugzilla #7828.
+
+Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/host/ehci-hcd.c | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+--- linux-2.6.20.1.orig/drivers/usb/host/ehci-hcd.c
++++ linux-2.6.20.1/drivers/usb/host/ehci-hcd.c
+@@ -296,6 +296,18 @@ static void ehci_watchdog (unsigned long
+ spin_unlock_irqrestore (&ehci->lock, flags);
+ }
+
++/* On some systems, leaving remote wakeup enabled prevents system shutdown.
++ * The firmware seems to think that powering off is a wakeup event!
++ * This routine turns off remote wakeup and everything else, on all ports.
++ */
++static void ehci_turn_off_all_ports(struct ehci_hcd *ehci)
++{
++ int port = HCS_N_PORTS(ehci->hcs_params);
++
++ while (port--)
++ writel(PORT_RWC_BITS, &ehci->regs->port_status[port]);
++}
++
+ /* ehci_shutdown kick in for silicon on any bus (not just pci, etc).
+ * This forcibly disables dma and IRQs, helping kexec and other cases
+ * where the next system software may expect clean state.
+@@ -307,9 +319,13 @@ ehci_shutdown (struct usb_hcd *hcd)
+
+ ehci = hcd_to_ehci (hcd);
+ (void) ehci_halt (ehci);
++ ehci_turn_off_all_ports(ehci);
+
+ /* make BIOS/etc use companion controller during reboot */
+ writel (0, &ehci->regs->configured_flag);
++
++ /* unblock posted writes */
++ readl(&ehci->regs->configured_flag);
+ }
+
+ static void ehci_port_power (struct ehci_hcd *ehci, int is_on)
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:14 2007
+Message-Id: <20070307170614.426024980@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:01:54 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Neil Brown <neilb@suse.de>
+Subject: [patch 031/101] Avoid using nfsd process pools on SMP machines.
+Content-Disposition: inline; filename=avoid-using-nfsd-process-pools-on-smp-machines.patch
+Content-Length: 1021
+Lines: 34
+
+From: NeilBrown <neilb@suse.de>
+
+
+process-pools have real benefits for NUMA, but on SMP
+machines they only work if network interface interrupts
+go to all CPUs (via round-robin or multiple nics). This is
+not always the case, so disable the pools in this case until
+a better solution is developped.
+
+Signed-off-by: Neil Brown <neilb@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+diff .prev/net/sunrpc/svc.c ./net/sunrpc/svc.c
+---
+ net/sunrpc/svc.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+--- linux-2.6.20.1.orig/net/sunrpc/svc.c
++++ linux-2.6.20.1/net/sunrpc/svc.c
+@@ -79,7 +79,11 @@ svc_pool_map_choose_mode(void)
+ * x86_64 kernel on Xeons. In this case we
+ * want to divide the pools on cpu boundaries.
+ */
+- return SVC_POOL_PERCPU;
++ /* actually, unless your IRQs round-robin nicely,
++ * this turns out to be really bad, so just
++ * go GLOBAL for now until a better fix can be developped
++ */
++ return SVC_POOL_GLOBAL;
+ }
+
+ /* default: one global pool */
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:14 2007
+Message-Id: <20070307170614.574735180@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:01:55 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Neil Brown <neilb@suse.de>
+Subject: [patch 032/101] Fix recently introduced problem with shutting down a busy NFS server.
+Content-Disposition: inline; filename=fix-recently-introduced-problem-with-shutting-down-a-busy-nfs-server.patch
+Content-Length: 3715
+Lines: 121
+
+From: NeilBrown <neilb@suse.de>
+
+
+When the last thread of nfsd exits, it shuts down all related sockets.
+It currently uses svc_close_socket to do this, but that only is
+immediately effective if the socket is not SK_BUSY.
+
+If the socket is busy - i.e. if a request has arrived that has not yet
+been processes - svc_close_socket is not effective and the shutdown
+process spins.
+
+So create a new svc_force_close_socket which removes the SK_BUSY flag
+is set and then calls svc_close_socket.
+
+Also change some open-codes loops in svc_destroy to use
+list_for_each_entry_safe.
+
+Signed-off-by: Neil Brown <neilb@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+
+---
+ include/linux/sunrpc/svcsock.h | 2 +-
+ net/sunrpc/svc.c | 23 ++++++++++-------------
+ net/sunrpc/svcsock.c | 16 +++++++++++++++-
+ 3 files changed, 26 insertions(+), 15 deletions(-)
+
+--- linux-2.6.20.1.orig/include/linux/sunrpc/svcsock.h
++++ linux-2.6.20.1/include/linux/sunrpc/svcsock.h
+@@ -63,7 +63,7 @@ struct svc_sock {
+ * Function prototypes.
+ */
+ int svc_makesock(struct svc_serv *, int, unsigned short);
+-void svc_close_socket(struct svc_sock *);
++void svc_force_close_socket(struct svc_sock *);
+ int svc_recv(struct svc_rqst *, long);
+ int svc_send(struct svc_rqst *);
+ void svc_drop(struct svc_rqst *);
+--- linux-2.6.20.1.orig/net/sunrpc/svc.c
++++ linux-2.6.20.1/net/sunrpc/svc.c
+@@ -371,6 +371,7 @@ void
+ svc_destroy(struct svc_serv *serv)
+ {
+ struct svc_sock *svsk;
++ struct svc_sock *tmp;
+
+ dprintk("RPC: svc_destroy(%s, %d)\n",
+ serv->sv_program->pg_name,
+@@ -386,22 +387,18 @@ svc_destroy(struct svc_serv *serv)
+
+ del_timer_sync(&serv->sv_temptimer);
+
+- while (!list_empty(&serv->sv_tempsocks)) {
+- svsk = list_entry(serv->sv_tempsocks.next,
+- struct svc_sock,
+- sk_list);
+- svc_close_socket(svsk);
+- }
++ list_for_each_entry_safe(svsk, tmp, &serv->sv_tempsocks, sk_list)
++ svc_force_close_socket(svsk);
++
+ if (serv->sv_shutdown)
+ serv->sv_shutdown(serv);
+
+- while (!list_empty(&serv->sv_permsocks)) {
+- svsk = list_entry(serv->sv_permsocks.next,
+- struct svc_sock,
+- sk_list);
+- svc_close_socket(svsk);
+- }
+-
++ list_for_each_entry_safe(svsk, tmp, &serv->sv_permsocks, sk_list)
++ svc_force_close_socket(svsk);
++
++ BUG_ON(!list_empty(&serv->sv_permsocks));
++ BUG_ON(!list_empty(&serv->sv_tempsocks));
++
+ cache_clean_deferred(serv);
+
+ /* Unregister service with the portmapper */
+--- linux-2.6.20.1.orig/net/sunrpc/svcsock.c
++++ linux-2.6.20.1/net/sunrpc/svcsock.c
+@@ -80,6 +80,7 @@ static void svc_delete_socket(struct sv
+ static void svc_udp_data_ready(struct sock *, int);
+ static int svc_udp_recvfrom(struct svc_rqst *);
+ static int svc_udp_sendto(struct svc_rqst *);
++static void svc_close_socket(struct svc_sock *svsk);
+
+ static struct svc_deferred_req *svc_deferred_dequeue(struct svc_sock *svsk);
+ static int svc_deferred_recv(struct svc_rqst *rqstp);
+@@ -1668,7 +1669,7 @@ svc_delete_socket(struct svc_sock *svsk)
+ spin_unlock_bh(&serv->sv_lock);
+ }
+
+-void svc_close_socket(struct svc_sock *svsk)
++static void svc_close_socket(struct svc_sock *svsk)
+ {
+ set_bit(SK_CLOSE, &svsk->sk_flags);
+ if (test_and_set_bit(SK_BUSY, &svsk->sk_flags))
+@@ -1681,6 +1682,19 @@ void svc_close_socket(struct svc_sock *s
+ svc_sock_put(svsk);
+ }
+
++void svc_force_close_socket(struct svc_sock *svsk)
++{
++ set_bit(SK_CLOSE, &svsk->sk_flags);
++ if (test_bit(SK_BUSY, &svsk->sk_flags)) {
++ /* Waiting to be processed, but no threads left,
++ * So just remove it from the waiting list
++ */
++ list_del_init(&svsk->sk_ready);
++ clear_bit(SK_BUSY, &svsk->sk_flags);
++ }
++ svc_close_socket(svsk);
++}
++
+ /*
+ * Make a socket for nfsd and lockd
+ */
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:14 2007
+Message-Id: <20070307170614.683134122@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:01:56 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org,
+ Greg KH <greg@kroah.com>
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Guilherme Salgado <gsalgado@gmail.com>,
+ USB development list <linux-usb-devel@lists.sourceforge.net>,
+ Alan Stern <stern@rowland.harvard.edu>
+Subject: [patch 033/101] UHCI: fix port resume problem
+Content-Disposition: inline; filename=uhci-fix-port-resume-problem.patch
+Content-Length: 2096
+Lines: 59
+
+From: Alan Stern <stern@rowland.harvard.edu>
+
+This patch (as863) fixes a problem encountered sometimes when resuming
+a port on a UHCI controller. The hardware may turn off the
+Resume-Detect bit before turning off the Suspend bit, leading usbcore
+to think that the port is still suspended and the resume has failed.
+The patch makes uhci_finish_suspend() wait until both bits are safely
+off.
+
+Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/host/uhci-hub.c | 11 +++++++----
+ 1 file changed, 7 insertions(+), 4 deletions(-)
+
+--- linux-2.6.20.1.orig/drivers/usb/host/uhci-hub.c
++++ linux-2.6.20.1/drivers/usb/host/uhci-hub.c
+@@ -33,6 +33,9 @@ static __u8 root_hub_hub_des[] =
+ /* status change bits: nonzero writes will clear */
+ #define RWC_BITS (USBPORTSC_OCC | USBPORTSC_PEC | USBPORTSC_CSC)
+
++/* suspend/resume bits: port suspended or port resuming */
++#define SUSPEND_BITS (USBPORTSC_SUSP | USBPORTSC_RD)
++
+ /* A port that either is connected or has a changed-bit set will prevent
+ * us from AUTO_STOPPING.
+ */
+@@ -96,8 +99,8 @@ static void uhci_finish_suspend(struct u
+ int status;
+ int i;
+
+- if (inw(port_addr) & (USBPORTSC_SUSP | USBPORTSC_RD)) {
+- CLR_RH_PORTSTAT(USBPORTSC_SUSP | USBPORTSC_RD);
++ if (inw(port_addr) & SUSPEND_BITS) {
++ CLR_RH_PORTSTAT(SUSPEND_BITS);
+ if (test_bit(port, &uhci->resuming_ports))
+ set_bit(port, &uhci->port_c_suspend);
+
+@@ -107,7 +110,7 @@ static void uhci_finish_suspend(struct u
+ * Experiments show that some controllers take longer, so
+ * we'll poll for completion. */
+ for (i = 0; i < 10; ++i) {
+- if (!(inw(port_addr) & USBPORTSC_RD))
++ if (!(inw(port_addr) & SUSPEND_BITS))
+ break;
+ udelay(1);
+ }
+@@ -289,7 +292,7 @@ static int uhci_hub_control(struct usb_h
+ wPortStatus |= USB_PORT_STAT_CONNECTION;
+ if (status & USBPORTSC_PE) {
+ wPortStatus |= USB_PORT_STAT_ENABLE;
+- if (status & (USBPORTSC_SUSP | USBPORTSC_RD))
++ if (status & SUSPEND_BITS)
+ wPortStatus |= USB_PORT_STAT_SUSPEND;
+ }
+ if (status & USBPORTSC_OC)
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:14 2007
+Message-Id: <20070307170614.809212680@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:01:57 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ bunk@stusta.de,
+ "David S. Miller" <davem@davemloft.net>
+Subject: [patch 034/101] Fix atmarp.h for userspace
+Content-Disposition: inline; filename=fix-atmarp.h-for-userspace.patch
+Content-Length: 631
+Lines: 30
+
+
+From: David Miller <davem@davemloft.net>
+
+[ATM]: atmarp.h needs to always include linux/types.h
+
+To provide the __be* types, even for userspace includes.
+
+Reported by Andrew Walrond.
+
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ include/linux/atmarp.h | 2 --
+ 1 file changed, 2 deletions(-)
+
+--- linux-2.6.20.1.orig/include/linux/atmarp.h
++++ linux-2.6.20.1/include/linux/atmarp.h
+@@ -6,9 +6,7 @@
+ #ifndef _LINUX_ATMARP_H
+ #define _LINUX_ATMARP_H
+
+-#ifdef __KERNEL__
+ #include <linux/types.h>
+-#endif
+ #include <linux/atmapi.h>
+ #include <linux/atmioc.h>
+
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:15 2007
+Message-Id: <20070307170614.990847447@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:01:58 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ bunk@stusta.de,
+ Herbert Xu <herbert@gondor.apana.org.au>,
+ "David S. Miller" <davem@davemloft.net>
+Subject: [patch 035/101] Clear TCP segmentation offload state in ipt_REJECT
+Content-Disposition: inline; filename=clear-tcp-segmentation-offload-state-in-ipt_reject.patch
+Content-Length: 950
+Lines: 33
+
+From: Herbert Xu <herbert@gondor.apana.org.au>
+
+[NETFILTER]: Clear GSO bits for TCP reset packet
+
+The TCP reset packet is copied from the original. This
+includes all the GSO bits which do not apply to the new
+packet. So we should clear those bits.
+
+Spotted by Patrick McHardy.
+
+Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ net/ipv4/netfilter/ipt_REJECT.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- linux-2.6.20.1.orig/net/ipv4/netfilter/ipt_REJECT.c
++++ linux-2.6.20.1/net/ipv4/netfilter/ipt_REJECT.c
+@@ -79,6 +79,10 @@ static void send_reset(struct sk_buff *o
+ nskb->mark = 0;
+ skb_init_secmark(nskb);
+
++ skb_shinfo(nskb)->gso_size = 0;
++ skb_shinfo(nskb)->gso_segs = 0;
++ skb_shinfo(nskb)->gso_type = 0;
++
+ tcph = (struct tcphdr *)((u_int32_t*)nskb->nh.iph + nskb->nh.iph->ihl);
+
+ /* Swap source and dest */
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:15 2007
+Message-Id: <20070307170615.069330025@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:01:59 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ bunk@stusta.de,
+ Jiri Bohac <jbohac@suse.cz>,
+ "David S. Miller" <davem@davemloft.net>
+Subject: [patch 036/101] Fix IPX module unload
+Content-Disposition: inline; filename=fix-ipx-module-unload.patch
+Content-Length: 1573
+Lines: 59
+
+From: Jiri Bohac <jbohac@suse.cz>
+
+[IPX]: Fix NULL pointer dereference on ipx unload
+
+Fixes a null pointer dereference when unloading the ipx module.
+
+On initialization of the ipx module, registering certain packet
+types can fail. When this happens, unloading the module later
+dereferences NULL pointers. This patch fixes that. Please apply.
+
+Signed-off-by: Jiri Bohac <jbohac@suse.cz>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ net/ipx/af_ipx.c | 26 +++++++++++++++++---------
+ 1 file changed, 17 insertions(+), 9 deletions(-)
+
+--- linux-2.6.20.1.orig/net/ipx/af_ipx.c
++++ linux-2.6.20.1/net/ipx/af_ipx.c
+@@ -2035,19 +2035,27 @@ static void __exit ipx_proto_finito(void
+
+ ipxitf_cleanup();
+
+- unregister_snap_client(pSNAP_datalink);
+- pSNAP_datalink = NULL;
+-
+- unregister_8022_client(p8022_datalink);
+- p8022_datalink = NULL;
++ if (pSNAP_datalink) {
++ unregister_snap_client(pSNAP_datalink);
++ pSNAP_datalink = NULL;
++ }
++
++ if (p8022_datalink) {
++ unregister_8022_client(p8022_datalink);
++ p8022_datalink = NULL;
++ }
+
+ dev_remove_pack(&ipx_8023_packet_type);
+- destroy_8023_client(p8023_datalink);
+- p8023_datalink = NULL;
++ if (p8023_datalink) {
++ destroy_8023_client(p8023_datalink);
++ p8023_datalink = NULL;
++ }
+
+ dev_remove_pack(&ipx_dix_packet_type);
+- destroy_EII_client(pEII_datalink);
+- pEII_datalink = NULL;
++ if (pEII_datalink) {
++ destroy_EII_client(pEII_datalink);
++ pEII_datalink = NULL;
++ }
+
+ proto_unregister(&ipx_proto);
+ sock_unregister(ipx_family_ops.family);
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:15 2007
+Message-Id: <20070307170615.204525102@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:02:00 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ =?ISO-8859-15?q?Ilpo=20J=C3=A4rvinen?= <ilpo.jarvinen@helsinki.fi>,
+ "David S. Miller" <davem@davemloft.net>
+Subject: [patch 037/101] : Prevent pseudo garbage in SYNs advertized window
+Content-Disposition: inline; filename=prevent-pseudo-garbage-in-syn-s-advertized-window.patch
+Content-Length: 1996
+Lines: 54
+
+From: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
+
+TCP may advertize up to 16-bits window in SYN packets (no window
+scaling allowed). At the same time, TCP may have rcv_wnd
+(32-bits) that does not fit to 16-bits without window scaling
+resulting in pseudo garbage into advertized window from the
+low-order bits of rcv_wnd. This can happen at least when
+mss <= (1<<wscale) (see tcp_select_initial_window). This patch
+fixes the handling of SYN advertized windows (compile tested
+only).
+
+In worst case (which is unlikely to occur though), the receiver
+advertized window could be just couple of bytes. I'm not sure
+that such situation would be handled very well at all by the
+receiver!? Fortunately, the situation normalizes after the
+first non-SYN ACK is received because it has the correct,
+scaled window.
+
+Alternatively, tcp_select_initial_window could be changed to
+prevent too large rcv_wnd in the first place.
+
+[ tcp_make_synack() has the same bug, and I've added a fix for
+ that to this patch -DaveM ]
+
+Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ net/ipv4/tcp_output.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- linux-2.6.20.1.orig/net/ipv4/tcp_output.c
++++ linux-2.6.20.1/net/ipv4/tcp_output.c
+@@ -481,7 +481,7 @@ static int tcp_transmit_skb(struct sock
+ /* RFC1323: The window in SYN & SYN/ACK segments
+ * is never scaled.
+ */
+- th->window = htons(tp->rcv_wnd);
++ th->window = htons(min(tp->rcv_wnd, 65535U));
+ } else {
+ th->window = htons(tcp_select_window(sk));
+ }
+@@ -2160,7 +2160,7 @@ struct sk_buff * tcp_make_synack(struct
+ }
+
+ /* RFC1323: The window in SYN & SYN/ACK segments is never scaled. */
+- th->window = htons(req->rcv_wnd);
++ th->window = htons(min(req->rcv_wnd, 65535U));
+
+ TCP_SKB_CB(skb)->when = tcp_time_stamp;
+ tcp_syn_build_options((__be32 *)(th + 1), dst_metric(dst, RTAX_ADVMSS), ireq->tstamp_ok,
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:15 2007
+Message-Id: <20070307170615.335613514@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:02:01 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ bunk@stusta.de,
+ "David S. Miller" <davem@davemloft.net>
+Subject: [patch 038/101] Fix oops in xfrm_audit_log()
+Content-Disposition: inline; filename=fix-oops-in-xfrm_audit_log.patch
+Content-Length: 2661
+Lines: 92
+
+From: David Miller <davem@davemloft.net>
+
+[XFRM]: Fix OOPSes in xfrm_audit_log().
+
+Make sure that this function is called correctly, and
+add BUG() checking to ensure the arguments are sane.
+
+Based upon a patch by Joy Latten.
+
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ net/key/af_key.c | 11 ++++++-----
+ net/xfrm/xfrm_policy.c | 7 ++++++-
+ net/xfrm/xfrm_user.c | 12 +++++++-----
+ 3 files changed, 19 insertions(+), 11 deletions(-)
+
+--- linux-2.6.20.1.orig/net/key/af_key.c
++++ linux-2.6.20.1/net/key/af_key.c
+@@ -2297,16 +2297,17 @@ static int pfkey_spddelete(struct sock *
+ &sel, tmp.security, 1);
+ security_xfrm_policy_free(&tmp);
+
+- xfrm_audit_log(audit_get_loginuid(current->audit_context), 0,
+- AUDIT_MAC_IPSEC_DELSPD, (xp) ? 1 : 0, xp, NULL);
+-
+ if (xp == NULL)
+ return -ENOENT;
+
+- err = 0;
++ err = security_xfrm_policy_delete(xp);
+
+- if ((err = security_xfrm_policy_delete(xp)))
++ xfrm_audit_log(audit_get_loginuid(current->audit_context), 0,
++ AUDIT_MAC_IPSEC_DELSPD, err ? 0 : 1, xp, NULL);
++
++ if (err)
+ goto out;
++
+ c.seq = hdr->sadb_msg_seq;
+ c.pid = hdr->sadb_msg_pid;
+ c.event = XFRM_MSG_DELPOLICY;
+--- linux-2.6.20.1.orig/net/xfrm/xfrm_policy.c
++++ linux-2.6.20.1/net/xfrm/xfrm_policy.c
+@@ -1997,9 +1997,14 @@ void xfrm_audit_log(uid_t auid, u32 sid,
+ if (audit_enabled == 0)
+ return;
+
++ BUG_ON((type == AUDIT_MAC_IPSEC_ADDSA ||
++ type == AUDIT_MAC_IPSEC_DELSA) && !x);
++ BUG_ON((type == AUDIT_MAC_IPSEC_ADDSPD ||
++ type == AUDIT_MAC_IPSEC_DELSPD) && !xp);
++
+ audit_buf = audit_log_start(current->audit_context, GFP_ATOMIC, type);
+ if (audit_buf == NULL)
+- return;
++ return;
+
+ switch(type) {
+ case AUDIT_MAC_IPSEC_ADDSA:
+--- linux-2.6.20.1.orig/net/xfrm/xfrm_user.c
++++ linux-2.6.20.1/net/xfrm/xfrm_user.c
+@@ -1273,10 +1273,6 @@ static int xfrm_get_policy(struct sk_buf
+ xp = xfrm_policy_bysel_ctx(type, p->dir, &p->sel, tmp.security, delete);
+ security_xfrm_policy_free(&tmp);
+ }
+- if (delete)
+- xfrm_audit_log(NETLINK_CB(skb).loginuid, NETLINK_CB(skb).sid,
+- AUDIT_MAC_IPSEC_DELSPD, (xp) ? 1 : 0, xp, NULL);
+-
+ if (xp == NULL)
+ return -ENOENT;
+
+@@ -1292,8 +1288,14 @@ static int xfrm_get_policy(struct sk_buf
+ MSG_DONTWAIT);
+ }
+ } else {
+- if ((err = security_xfrm_policy_delete(xp)) != 0)
++ err = security_xfrm_policy_delete(xp);
++
++ xfrm_audit_log(NETLINK_CB(skb).loginuid, NETLINK_CB(skb).sid,
++ AUDIT_MAC_IPSEC_DELSPD, err ? 0 : 1, xp, NULL);
++
++ if (err != 0)
+ goto out;
++
+ c.data.byid = p->index;
+ c.event = nlh->nlmsg_type;
+ c.seq = nlh->nlmsg_seq;
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:15 2007
+Message-Id: <20070307170615.465996809@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:02:02 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Stephen Hemminger <shemminger@linux-foundation.org>
+Subject: [patch 039/101] sky2: dont flush good pause frames
+Content-Disposition: inline; filename=sky2-pause-flush.patch
+Content-Length: 781
+Lines: 26
+
+From: Stephen Hemminger <shemminger@linux-foundation.org>
+
+Don't mark pause frames as errors. This problem caused transmitter not
+to pause and would effectively take out a gigabit switch because the
+it can't handle overrun.
+
+Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/net/sky2.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- linux-2.6.20.1.orig/drivers/net/sky2.h
++++ linux-2.6.20.1/drivers/net/sky2.h
+@@ -1579,7 +1579,7 @@ enum {
+
+ GMR_FS_ANY_ERR = GMR_FS_RX_FF_OV | GMR_FS_CRC_ERR |
+ GMR_FS_FRAGMENT | GMR_FS_LONG_ERR |
+- GMR_FS_MII_ERR | GMR_FS_GOOD_FC | GMR_FS_BAD_FC |
++ GMR_FS_MII_ERR | GMR_FS_BAD_FC |
+ GMR_FS_UN_SIZE | GMR_FS_JABBER,
+ };
+
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:15 2007
+Message-Id: <20070307170615.591501552@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:02:03 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Stephen Hemminger <shemminger@linux-foundation.org>
+Subject: [patch 040/101] sky2: transmit timeout deadlock
+Content-Disposition: inline; filename=sky2-tx-timeout-deadlock.patch
+Content-Length: 1309
+Lines: 43
+
+From: Stephen Hemminger <shemminger@linux-foundation.org>
+
+The code in transmit timeout incorrectly assumed that netif_tx_lock
+was not set.
+
+Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/net/sky2.c | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+--- linux-2.6.20.1.orig/drivers/net/sky2.c
++++ linux-2.6.20.1/drivers/net/sky2.c
+@@ -1796,6 +1796,7 @@ out:
+
+ /* Transmit timeout is only called if we are running, carries is up
+ * and tx queue is full (stopped).
++ * Called with netif_tx_lock held.
+ */
+ static void sky2_tx_timeout(struct net_device *dev)
+ {
+@@ -1821,17 +1822,14 @@ static void sky2_tx_timeout(struct net_d
+ sky2_write8(hw, STAT_TX_TIMER_CTRL, TIM_START);
+ } else if (report != sky2->tx_cons) {
+ printk(KERN_INFO PFX "status report lost?\n");
+-
+- netif_tx_lock_bh(dev);
+ sky2_tx_complete(sky2, report);
+- netif_tx_unlock_bh(dev);
+ } else {
+ printk(KERN_INFO PFX "hardware hung? flushing\n");
+
+ sky2_write32(hw, Q_ADDR(txq, Q_CSR), BMU_STOP);
+ sky2_write32(hw, Y2_QADDR(txq, PREF_UNIT_CTRL), PREF_UNIT_RST_SET);
+
+- sky2_tx_clean(dev);
++ sky2_tx_complete(sky2, sky2->tx_prod);
+
+ sky2_qset(hw, txq);
+ sky2_prefetch_init(hw, txq, sky2->tx_le_map, TX_RING_SIZE - 1);
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:15 2007
+Message-Id: <20070307170615.725538381@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:02:04 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Andi Kleen <ak@suse.de>
+Subject: [patch 041/101] x86_64: Fix wrong gcc check in bitops.h
+Content-Disposition: inline; filename=x86_64-fix-wrong-gcc-check-in-bitops.h.patch
+Content-Length: 622
+Lines: 25
+
+
+
+gcc 5.0 will likely not have the constraint problem
+
+Signed-off-by: Andi Kleen <ak@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+
+---
+ include/asm-x86_64/bitops.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- linux-2.6.20.1.orig/include/asm-x86_64/bitops.h
++++ linux-2.6.20.1/include/asm-x86_64/bitops.h
+@@ -7,7 +7,7 @@
+
+ #include <asm/alternative.h>
+
+-#if __GNUC__ < 4 || __GNUC_MINOR__ < 1
++#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 1)
+ /* Technically wrong, but this avoids compilation errors on some gcc
+ versions. */
+ #define ADDR "=m" (*(volatile long *) addr)
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:15 2007
+Message-Id: <20070307170615.854330133@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:02:05 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Andi Kleen <ak@suse.de>
+Subject: [patch 042/101] x86: Dont require the vDSO for handling a.out signals
+Content-Disposition: inline; filename=x86-don-t-require-the-vdso-for-handling-a.out-signals.patch
+Content-Length: 2693
+Lines: 87
+
+From: Andi Kleen <ak@suse.de>
+
+x86: Don't require the vDSO for handling a.out signals
+
+and in other strange binfmts. vDSO is not necessarily mapped there.
+
+This fixes signals in a.out programs
+
+Signed-off-by: Andi Kleen <ak@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/i386/kernel/signal.c | 6 +++++-
+ arch/x86_64/ia32/ia32_signal.c | 7 ++++++-
+ fs/binfmt_elf.c | 3 ++-
+ include/linux/binfmts.h | 1 +
+ 4 files changed, 14 insertions(+), 3 deletions(-)
+
+--- linux-2.6.20.1.orig/arch/i386/kernel/signal.c
++++ linux-2.6.20.1/arch/i386/kernel/signal.c
+@@ -21,6 +21,7 @@
+ #include <linux/suspend.h>
+ #include <linux/ptrace.h>
+ #include <linux/elf.h>
++#include <linux/binfmts.h>
+ #include <asm/processor.h>
+ #include <asm/ucontext.h>
+ #include <asm/uaccess.h>
+@@ -349,7 +350,10 @@ static int setup_frame(int sig, struct k
+ goto give_sigsegv;
+ }
+
+- restorer = (void *)VDSO_SYM(&__kernel_sigreturn);
++ if (current->binfmt->hasvdso)
++ restorer = (void *)VDSO_SYM(&__kernel_sigreturn);
++ else
++ restorer = (void *)&frame->retcode;
+ if (ka->sa.sa_flags & SA_RESTORER)
+ restorer = ka->sa.sa_restorer;
+
+--- linux-2.6.20.1.orig/arch/x86_64/ia32/ia32_signal.c
++++ linux-2.6.20.1/arch/x86_64/ia32/ia32_signal.c
+@@ -21,6 +21,7 @@
+ #include <linux/stddef.h>
+ #include <linux/personality.h>
+ #include <linux/compat.h>
++#include <linux/binfmts.h>
+ #include <asm/ucontext.h>
+ #include <asm/uaccess.h>
+ #include <asm/i387.h>
+@@ -449,7 +450,11 @@ int ia32_setup_frame(int sig, struct k_s
+
+ /* Return stub is in 32bit vsyscall page */
+ {
+- void __user *restorer = VSYSCALL32_SIGRETURN;
++ void __user *restorer;
++ if (current->binfmt->hasvdso)
++ restorer = VSYSCALL32_SIGRETURN;
++ else
++ restorer = (void *)&frame->retcode;
+ if (ka->sa.sa_flags & SA_RESTORER)
+ restorer = ka->sa.sa_restorer;
+ err |= __put_user(ptr_to_compat(restorer), &frame->pretcode);
+--- linux-2.6.20.1.orig/fs/binfmt_elf.c
++++ linux-2.6.20.1/fs/binfmt_elf.c
+@@ -76,7 +76,8 @@ static struct linux_binfmt elf_format =
+ .load_binary = load_elf_binary,
+ .load_shlib = load_elf_library,
+ .core_dump = elf_core_dump,
+- .min_coredump = ELF_EXEC_PAGESIZE
++ .min_coredump = ELF_EXEC_PAGESIZE,
++ .hasvdso = 1
+ };
+
+ #define BAD_ADDR(x) ((unsigned long)(x) >= TASK_SIZE)
+--- linux-2.6.20.1.orig/include/linux/binfmts.h
++++ linux-2.6.20.1/include/linux/binfmts.h
+@@ -59,6 +59,7 @@ struct linux_binfmt {
+ int (*load_shlib)(struct file *);
+ int (*core_dump)(long signr, struct pt_regs * regs, struct file * file);
+ unsigned long min_coredump; /* minimal dump size */
++ int hasvdso;
+ };
+
+ extern int register_binfmt(struct linux_binfmt *);
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:16 2007
+Message-Id: <20070307170616.036012112@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:02:06 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Jan Beulich <jbeulich@novell.com>,
+ Andi Kleen <ak@suse.de>
+Subject: [patch 043/101] i386: Fix broken CONFIG_COMPAT_VDSO on i386
+Content-Disposition: inline; filename=i386-fix-broken-config_compat_vdso-on-i386.patch
+Content-Length: 1367
+Lines: 37
+
+From: "Jan Beulich" <jbeulich@novell.com>
+
+After updating several machines to 2.6.20, I can't boot anymore the single
+one of them that supports the NX bit and is configured as a 32-bit system.
+
+My understanding is that the VDSO changes in 2.6.20-rc7 were not fully
+cooked, in that with that config option enabled VDSO_SYM(x) now equals
+x, meaning that an address in the fixmap area is now being passed to
+apps via AT_SYSINFO. However, the page is mapped with PAGE_READONLY
+rather than PAGE_READONLY_EXEC.
+
+I'm not certain whether having app code go through the fixmap area is
+intended, but in case it is here is the simple patch that makes things work
+again.
+
+Cc: Theodore Tso <tytso@mit.edu>
+Signed-off-by: Jan Beulich <jbeulich@novell.com>
+Signed-off-by: Andi Kleen <ak@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/i386/kernel/sysenter.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- linux-2.6.20.1.orig/arch/i386/kernel/sysenter.c
++++ linux-2.6.20.1/arch/i386/kernel/sysenter.c
+@@ -77,7 +77,7 @@ int __init sysenter_setup(void)
+ syscall_page = (void *)get_zeroed_page(GFP_ATOMIC);
+
+ #ifdef CONFIG_COMPAT_VDSO
+- __set_fixmap(FIX_VDSO, __pa(syscall_page), PAGE_READONLY);
++ __set_fixmap(FIX_VDSO, __pa(syscall_page), PAGE_READONLY_EXEC);
+ printk("Compat vDSO mapped to %08lx.\n", __fix_to_virt(FIX_VDSO));
+ #endif
+
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:16 2007
+Message-Id: <20070307170616.110605929@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:02:07 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ John Linville <linville@tuxdriver.com>,
+ Stefano Brivio <stefano.brivio@polimi.it>,
+ Larry Finger <larry.finger@lwfinger.net>,
+ Michael Buesch <mb@bu3sch.de>
+Subject: [patch 044/101] bcm43xx: fix for 4309
+Content-Disposition: inline; filename=bcm43xx-fix-for-4309.patch
+Content-Length: 1071
+Lines: 30
+
+From: Stefano Brivio <stefano.brivio@polimi.it>
+
+BCM4309 devices aren't working properly as A PHYs aren't supported yet, but
+we probe 802.11a cores anyway. This fixes it, while still allowing for A PHY code
+to be developed in the future.
+
+Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
+Cc: Michael Buesch <mb@bu3sch.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/net/wireless/bcm43xx/bcm43xx_main.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+--- linux-2.6.20.1.orig/drivers/net/wireless/bcm43xx/bcm43xx_main.c
++++ linux-2.6.20.1/drivers/net/wireless/bcm43xx/bcm43xx_main.c
+@@ -2736,8 +2736,9 @@ static int bcm43xx_probe_cores(struct bc
+ * dangling pins on the second core. Be careful
+ * and ignore these cores here.
+ */
+- if (bcm->pci_dev->device != 0x4324) {
+- dprintk(KERN_INFO PFX "Ignoring additional 802.11 core.\n");
++ if (1 /*bcm->pci_dev->device != 0x4324*/ ) {
++ /* TODO: A PHY */
++ dprintk(KERN_INFO PFX "Ignoring additional 802.11a core.\n");
+ continue;
+ }
+ }
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:16 2007
+Message-Id: <20070307170616.237061071@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:02:08 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org,
+ Andrew Morton <akpm@linux-foundation.org>
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ linux-raid@vger.kernel.org,
+ Neil Brown <neilb@suse.de>
+Subject: [patch 045/101] md: Fix raid10 recovery problem.
+Content-Disposition: inline; filename=md-fix-raid10-recovery-problem.patch
+Content-Length: 3576
+Lines: 111
+
+From: NeilBrown <neilb@suse.de>
+
+There are two errors that can lead to recovery problems with raid10
+when used in 'far' more (not the default).
+
+Due to a '>' instead of '>=' the wrong block is located which would
+result in garbage being written to some random location, quite
+possible outside the range of the device, causing the newly
+reconstructed device to fail.
+
+The device size calculation had some rounding errors (it didn't round
+when it should) and so recovery would go a few blocks too far which
+would again cause a write to a random block address and probably
+a device error.
+
+The code for working with device sizes was fairly confused and spread
+out, so this has been tided up a bit.
+
+Signed-off-by: Neil Brown <neilb@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+
+---
+ drivers/md/raid10.c | 38 ++++++++++++++++++++------------------
+ 1 file changed, 20 insertions(+), 18 deletions(-)
+
+--- linux-2.6.20.1.orig/drivers/md/raid10.c
++++ linux-2.6.20.1/drivers/md/raid10.c
+@@ -429,7 +429,7 @@ static sector_t raid10_find_virt(conf_t
+ if (dev < 0)
+ dev += conf->raid_disks;
+ } else {
+- while (sector > conf->stride) {
++ while (sector >= conf->stride) {
+ sector -= conf->stride;
+ if (dev < conf->near_copies)
+ dev += conf->raid_disks - conf->near_copies;
+@@ -1801,6 +1801,7 @@ static sector_t sync_request(mddev_t *md
+ for (k=0; k<conf->copies; k++)
+ if (r10_bio->devs[k].devnum == i)
+ break;
++ BUG_ON(k == conf->copies);
+ bio = r10_bio->devs[1].bio;
+ bio->bi_next = biolist;
+ biolist = bio;
+@@ -2021,19 +2022,30 @@ static int run(mddev_t *mddev)
+ if (!conf->tmppage)
+ goto out_free_conf;
+
++ conf->mddev = mddev;
++ conf->raid_disks = mddev->raid_disks;
+ conf->near_copies = nc;
+ conf->far_copies = fc;
+ conf->copies = nc*fc;
+ conf->far_offset = fo;
+ conf->chunk_mask = (sector_t)(mddev->chunk_size>>9)-1;
+ conf->chunk_shift = ffz(~mddev->chunk_size) - 9;
++ size = mddev->size >> (conf->chunk_shift-1);
++ sector_div(size, fc);
++ size = size * conf->raid_disks;
++ sector_div(size, nc);
++ /* 'size' is now the number of chunks in the array */
++ /* calculate "used chunks per device" in 'stride' */
++ stride = size * conf->copies;
++ sector_div(stride, conf->raid_disks);
++ mddev->size = stride << (conf->chunk_shift-1);
++
+ if (fo)
+- conf->stride = 1 << conf->chunk_shift;
+- else {
+- stride = mddev->size >> (conf->chunk_shift-1);
++ stride = 1;
++ else
+ sector_div(stride, fc);
+- conf->stride = stride << conf->chunk_shift;
+- }
++ conf->stride = stride << conf->chunk_shift;
++
+ conf->r10bio_pool = mempool_create(NR_RAID10_BIOS, r10bio_pool_alloc,
+ r10bio_pool_free, conf);
+ if (!conf->r10bio_pool) {
+@@ -2063,8 +2075,6 @@ static int run(mddev_t *mddev)
+
+ disk->head_position = 0;
+ }
+- conf->raid_disks = mddev->raid_disks;
+- conf->mddev = mddev;
+ spin_lock_init(&conf->device_lock);
+ INIT_LIST_HEAD(&conf->retry_list);
+
+@@ -2106,16 +2116,8 @@ static int run(mddev_t *mddev)
+ /*
+ * Ok, everything is just fine now
+ */
+- if (conf->far_offset) {
+- size = mddev->size >> (conf->chunk_shift-1);
+- size *= conf->raid_disks;
+- size <<= conf->chunk_shift;
+- sector_div(size, conf->far_copies);
+- } else
+- size = conf->stride * conf->raid_disks;
+- sector_div(size, conf->near_copies);
+- mddev->array_size = size/2;
+- mddev->resync_max_sectors = size;
++ mddev->array_size = size << (conf->chunk_shift-1);
++ mddev->resync_max_sectors = size << conf->chunk_shift;
+
+ mddev->queue->unplug_fn = raid10_unplug;
+ mddev->queue->issue_flush_fn = raid10_issue_flush;
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:16 2007
+Message-Id: <20070307170616.365407516@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:02:09 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ v4l-dvb maintainer list <v4l-dvb-maintainer@linuxtv.org>,
+ Marcel Siegert <mws@linuxtv.org>,
+ Mauro Carvalho Chehab <mchehab@infradead.org>
+Subject: [patch 046/101] dvbdev: fix illegal re-usage of fileoperations struct
+Content-Disposition: inline; filename=dvbdev-fix-illegal-re-usage-of-fileoperations-struct.patch
+Content-Length: 1922
+Lines: 66
+
+From: Marcel Siegert <mws@linuxtv.org>
+
+Arjan van de Ven <arjan@infradead.org> reported an illegal re-usage of
+the fileoperations struct if more than one dvb device (e.g. frontend) is
+present.
+
+This patch fixes this issue.
+
+It allocates a new fileoperations struct each time a device is
+registered and copies the default template fileops.
+
+(backported from commit b61901024776b25ce7b8edc31bb1757c7382a88e)
+
+Signed-off-by: Marcel Siegert <mws@linuxtv.org>
+Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
+Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/media/dvb/dvb-core/dvbdev.c | 13 +++++++++++++
+ 1 file changed, 13 insertions(+)
+
+--- linux-2.6.20.1.orig/drivers/media/dvb/dvb-core/dvbdev.c
++++ linux-2.6.20.1/drivers/media/dvb/dvb-core/dvbdev.c
+@@ -200,6 +200,8 @@ int dvb_register_device(struct dvb_adapt
+ const struct dvb_device *template, void *priv, int type)
+ {
+ struct dvb_device *dvbdev;
++ struct file_operations *dvbdevfops;
++
+ int id;
+
+ if (mutex_lock_interruptible(&dvbdev_register_lock))
+@@ -219,12 +221,22 @@ int dvb_register_device(struct dvb_adapt
+ return -ENOMEM;
+ }
+
++ dvbdevfops = kzalloc(sizeof(struct file_operations), GFP_KERNEL);
++
++ if (!dvbdevfops) {
++ kfree (dvbdev);
++ mutex_unlock(&dvbdev_register_lock);
++ return -ENOMEM;
++ }
++
+ memcpy(dvbdev, template, sizeof(struct dvb_device));
+ dvbdev->type = type;
+ dvbdev->id = id;
+ dvbdev->adapter = adap;
+ dvbdev->priv = priv;
++ dvbdev->fops = dvbdevfops;
+
++ memcpy(dvbdev->fops, template->fops, sizeof(struct file_operations));
+ dvbdev->fops->owner = adap->module;
+
+ list_add_tail (&dvbdev->list_head, &adap->device_list);
+@@ -252,6 +264,7 @@ void dvb_unregister_device(struct dvb_de
+ dvbdev->type, dvbdev->id)));
+
+ list_del (&dvbdev->list_head);
++ kfree (dvbdev->fops);
+ kfree (dvbdev);
+ }
+ EXPORT_SYMBOL(dvb_unregister_device);
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:16 2007
+Message-Id: <20070307170616.547905240@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:02:10 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ v4l-dvb maintainer list <v4l-dvb-maintainer@linuxtv.org>,
+ Mike Isely <isely@pobox.com>
+Subject: [patch 047/101] V4L: pvrusb2: Fix video corruption on stream start
+Content-Disposition: inline; filename=v4l-pvrusb2-fix-video-corruption-on-stream-start.patch
+Content-Length: 2643
+Lines: 79
+
+From: Mike Isely <isely@pobox.com>
+
+This introduces some extra cx23416 commands when streaming is
+started. The addition of these commands fix random sporadic video
+corruption that can take place when the video stream is temporarily
+disrupted through loss of signal (e.g. changing the channel in the RF
+tuner).
+
+This fix is already in the upstream driver source and has proven
+itself there; this is a backport for the 2.6.20.y kernel series.
+
+(backported from commit 6fe7d2c4660174110c6872cacc4fc2acb6e00acf)
+
+Signed-off-by: Mike Isely <isely@pobox.com>
+Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/media/video/pvrusb2/pvrusb2-encoder.c | 40 ++++++++++++++++++++++++++
+ 1 file changed, 40 insertions(+)
+
+--- linux-2.6.20.1.orig/drivers/media/video/pvrusb2/pvrusb2-encoder.c
++++ linux-2.6.20.1/drivers/media/video/pvrusb2/pvrusb2-encoder.c
+@@ -288,6 +288,44 @@ static int pvr2_encoder_vcmd(struct pvr2
+ return pvr2_encoder_cmd(hdw,cmd,args,0,data);
+ }
+
++
++/* This implements some extra setup for the encoder that seems to be
++ specific to the PVR USB2 hardware. */
++int pvr2_encoder_prep_config(struct pvr2_hdw *hdw)
++{
++ int ret = 0;
++ int encMisc3Arg = 0;
++
++ /* Mike Isely <isely@pobox.com> 22-Feb-2007 The windows driver
++ sends the following list of ENC_MISC commands (for both
++ 24xxx and 29xxx devices). Meanings are not entirely clear,
++ however without the ENC_MISC(3,encMisc3Arg) command then we risk
++ random perpetual video corruption whenever the video input
++ breaks up for a moment (like when switching channels). */
++
++
++ /* This ENC_MISC(3,encMisc3Arg) command is critical - without
++ it there will eventually be video corruption. Also, the
++ 29xxx case is strange - the Windows driver is passing 1
++ regardless of device type but if we have 1 for 29xxx device
++ the video turns sluggish. */
++ switch (hdw->hdw_type) {
++ case PVR2_HDW_TYPE_24XXX: encMisc3Arg = 1; break;
++ case PVR2_HDW_TYPE_29XXX: encMisc3Arg = 0; break;
++ default: break;
++ }
++ ret |= pvr2_encoder_vcmd(hdw, CX2341X_ENC_MISC,4, 3,
++ encMisc3Arg,0,0);
++
++ ret |= pvr2_encoder_vcmd(hdw, CX2341X_ENC_MISC,4, 8,0,0,0);
++
++ ret |= pvr2_encoder_vcmd(hdw, CX2341X_ENC_MISC,4, 0,3,0,0);
++ ret |= pvr2_encoder_vcmd(hdw, CX2341X_ENC_MISC,4,15,0,0,0);
++
++ return ret;
++}
++
++
+ int pvr2_encoder_configure(struct pvr2_hdw *hdw)
+ {
+ int ret;
+@@ -302,6 +340,8 @@ int pvr2_encoder_configure(struct pvr2_h
+
+ ret = 0;
+
++ ret |= pvr2_encoder_prep_config(hdw);
++
+ if (!ret) ret = pvr2_encoder_vcmd(
+ hdw,CX2341X_ENC_SET_NUM_VSYNC_LINES, 2,
+ 0xf0, 0xf0);
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:16 2007
+Message-Id: <20070307170616.625139336@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:02:11 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ v4l-dvb maintainer list <v4l-dvb-maintainer@linuxtv.org>,
+ Mike Isely <isely@pobox.com>
+Subject: [patch 048/101] V4L: pvrusb2: Handle larger cx2341x firmware images
+Content-Disposition: inline; filename=v4l-pvrusb2-handle-larger-cx2341x-firmware-images.patch
+Content-Length: 2856
+Lines: 82
+
+From: Mike Isely <isely@pobox.com>
+
+Rework the cx23416 firmware loader so that it longer requires the
+firmware size to be a multiple of 8KB. Until recently all cx2341x
+firmware images were exactly 256KB, but newer firmware is larger than
+that and also appears to have arbitrary size. We still must check
+against a multiple of 4 bytes (because the cx23416 itself uses a 32
+bit word size).
+
+This fix is already in the upstream driver source and has proven
+itself there; this is a backport for the 2.6.20.y kernel series.
+
+(backported from commit 90060d32ca0a941b158994f78e60d0381871c84b)
+
+Signed-off-by: Mike Isely <isely@pobox.com>
+Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/media/video/pvrusb2/pvrusb2-hdw.c | 31 ++++++++++++++++--------------
+ 1 file changed, 17 insertions(+), 14 deletions(-)
+
+--- linux-2.6.20.1.orig/drivers/media/video/pvrusb2/pvrusb2-hdw.c
++++ linux-2.6.20.1/drivers/media/video/pvrusb2/pvrusb2-hdw.c
+@@ -1041,7 +1041,7 @@ int pvr2_upload_firmware2(struct pvr2_hd
+ {
+ const struct firmware *fw_entry = NULL;
+ void *fw_ptr;
+- unsigned int pipe, fw_len, fw_done;
++ unsigned int pipe, fw_len, fw_done, bcnt, icnt;
+ int actual_length;
+ int ret = 0;
+ int fwidx;
+@@ -1093,11 +1093,11 @@ int pvr2_upload_firmware2(struct pvr2_hd
+
+ fw_len = fw_entry->size;
+
+- if (fw_len % FIRMWARE_CHUNK_SIZE) {
++ if (fw_len % sizeof(u32)) {
+ pvr2_trace(PVR2_TRACE_ERROR_LEGS,
+ "size of %s firmware"
+- " must be a multiple of 8192B",
+- fw_files[fwidx]);
++ " must be a multiple of %zu bytes",
++ fw_files[fwidx],sizeof(u32));
+ release_firmware(fw_entry);
+ return -1;
+ }
+@@ -1112,18 +1112,21 @@ int pvr2_upload_firmware2(struct pvr2_hd
+
+ pipe = usb_sndbulkpipe(hdw->usb_dev, PVR2_FIRMWARE_ENDPOINT);
+
+- for (fw_done = 0 ; (fw_done < fw_len) && !ret ;
+- fw_done += FIRMWARE_CHUNK_SIZE ) {
+- int i;
+- memcpy(fw_ptr, fw_entry->data + fw_done, FIRMWARE_CHUNK_SIZE);
+- /* Usbsnoop log shows that we must swap bytes... */
+- for (i = 0; i < FIRMWARE_CHUNK_SIZE/4 ; i++)
+- ((u32 *)fw_ptr)[i] = ___swab32(((u32 *)fw_ptr)[i]);
++ fw_done = 0;
++ for (fw_done = 0; fw_done < fw_len;) {
++ bcnt = fw_len - fw_done;
++ if (bcnt > FIRMWARE_CHUNK_SIZE) bcnt = FIRMWARE_CHUNK_SIZE;
++ memcpy(fw_ptr, fw_entry->data + fw_done, bcnt);
++ /* Usbsnoop log shows that we must swap bytes... */
++ for (icnt = 0; icnt < bcnt/4 ; icnt++)
++ ((u32 *)fw_ptr)[icnt] =
++ ___swab32(((u32 *)fw_ptr)[icnt]);
+
+- ret |= usb_bulk_msg(hdw->usb_dev, pipe, fw_ptr,
+- FIRMWARE_CHUNK_SIZE,
++ ret |= usb_bulk_msg(hdw->usb_dev, pipe, fw_ptr,bcnt,
+ &actual_length, HZ);
+- ret |= (actual_length != FIRMWARE_CHUNK_SIZE);
++ ret |= (actual_length != bcnt);
++ if (ret) break;
++ fw_done += bcnt;
+ }
+
+ trace_firmware("upload of %s : %i / %i ",
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:16 2007
+Message-Id: <20070307170616.758873614@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:02:12 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ v4l-dvb maintainer list <v4l-dvb-maintainer@linuxtv.org>,
+ Jin-Bong lee <jinbong.lee@samsung.com>,
+ Mauro Carvalho Chehab <mchehab@infradead.org>
+Subject: [patch 049/101] DVB: cxusb: fix firmware patch for big endian systems
+Content-Disposition: inline; filename=dvb-cxusb-fix-firmware-patch-for-big-endian-systems.patch
+Content-Length: 1102
+Lines: 33
+
+
+From: Jin-Bong lee <jinbong.lee@samsung.com>
+
+Without this patch, the device will not be detected after firmware download
+on big endian systems.
+
+(cherry picked from commit 1d1370a48ca285ebe197ecd3197a8d5f161bc291)
+
+Signed-off-by: Jin-Bong lee <jinbong.lee@samsung.com>
+Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
+Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/media/dvb/dvb-usb/cxusb.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- linux-2.6.20.1.orig/drivers/media/dvb/dvb-usb/cxusb.c
++++ linux-2.6.20.1/drivers/media/dvb/dvb-usb/cxusb.c
+@@ -469,9 +469,9 @@ static int bluebird_patch_dvico_firmware
+ fw->data[BLUEBIRD_01_ID_OFFSET + 1] == USB_VID_DVICO >> 8) {
+
+ fw->data[BLUEBIRD_01_ID_OFFSET + 2] =
+- udev->descriptor.idProduct + 1;
++ le16_to_cpu(udev->descriptor.idProduct) + 1;
+ fw->data[BLUEBIRD_01_ID_OFFSET + 3] =
+- udev->descriptor.idProduct >> 8;
++ le16_to_cpu(udev->descriptor.idProduct) >> 8;
+
+ return usb_cypress_load_firmware(udev, fw, CYPRESS_FX2);
+ }
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:17 2007
+Message-Id: <20070307170616.890408171@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:02:13 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ v4l-dvb maintainer list <v4l-dvb-maintainer@linuxtv.org>,
+ Mauro Carvalho Chehab <mchehab@infradead.org>
+Subject: [patch 050/101] DVB: digitv: open nxt6000 i2c_gate for TDED4 tuner handling
+Content-Disposition: inline; filename=dvb-digitv-open-nxt6000-i2c_gate-for-tded4-tuner-handling.patch
+Content-Length: 1054
+Lines: 30
+
+From: Michael Krufky <mkrufky@linuxtv.org>
+
+dvb-pll normally opens the i2c gate before attempting to communicate with
+the pll, but the code for this device is not using dvb-pll. This should
+be cleaned up in the future, but for now, just open the i2c gate at the
+appropriate place in order to fix this driver bug.
+
+(cherry picked from commit 2fe22dcdc79b8dd34e61a3f1231caffd6180a626)
+
+Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
+Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/media/dvb/dvb-usb/digitv.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- linux-2.6.20.1.orig/drivers/media/dvb/dvb-usb/digitv.c
++++ linux-2.6.20.1/drivers/media/dvb/dvb-usb/digitv.c
+@@ -119,6 +119,8 @@ static int digitv_nxt6000_tuner_set_para
+ struct dvb_usb_adapter *adap = fe->dvb->priv;
+ u8 b[5];
+ dvb_usb_tuner_calc_regs(fe,fep,b, 5);
++ if (fe->ops.i2c_gate_ctrl)
++ fe->ops.i2c_gate_ctrl(fe, 1);
+ return digitv_ctrl_msg(adap->dev, USB_WRITE_TUNER, 0, &b[1], 4, NULL, 0);
+ }
+
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:17 2007
+Message-Id: <20070307170617.018552355@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:02:14 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ v4l-dvb maintainer list <v4l-dvb-maintainer@linuxtv.org>,
+ Hans Verkuil <hverkuil@xs4all.nl>,
+ Mike Isely <isely@pobox.com>,
+ Mauro Carvalho Chehab <mchehab@infradead.org>
+Subject: [patch 051/101] V4L: fix cx25840 firmware loading
+Content-Disposition: inline; filename=v4l-fix-cx25840-firmware-loading.patch
+Content-Length: 1589
+Lines: 54
+
+
+From: Hans Verkuil <hverkuil@xs4all.nl>
+Date: Thu, 15 Feb 2007 03:40:34 -0300
+Subject: [patch 051/101] [PATCH] V4L: fix cx25840 firmware loading
+
+Due to changes in the i2c handling in 2.6.20 this cx25840 bug surfaced,
+causing the firmware load to fail for the ivtv driver. The correct
+sequence is to first attach the i2c client, then use the client's
+device to load the firmware.
+
+(cherry picked from commit d55c7aec666658495e5b57a6b194c8c2a1ac255f)
+
+Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
+Acked-by: Mike Isely <isely@pobox.com>
+Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
+Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/media/video/cx25840/cx25840-core.c | 4 ++--
+ drivers/media/video/cx25840/cx25840-firmware.c | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+--- linux-2.6.20.1.orig/drivers/media/video/cx25840/cx25840-core.c
++++ linux-2.6.20.1/drivers/media/video/cx25840/cx25840-core.c
+@@ -907,13 +907,13 @@ static int cx25840_detect_client(struct
+ state->vbi_line_offset = 8;
+ state->id = id;
+
++ i2c_attach_client(client);
++
+ if (state->is_cx25836)
+ cx25836_initialize(client);
+ else
+ cx25840_initialize(client, 1);
+
+- i2c_attach_client(client);
+-
+ return 0;
+ }
+
+--- linux-2.6.20.1.orig/drivers/media/video/cx25840/cx25840-firmware.c
++++ linux-2.6.20.1/drivers/media/video/cx25840/cx25840-firmware.c
+@@ -37,7 +37,7 @@
+ */
+ #define FWSEND 48
+
+-#define FWDEV(x) &((x)->adapter->dev)
++#define FWDEV(x) &((x)->dev)
+
+ static char *firmware = FWFILE;
+
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:17 2007
+Message-Id: <20070307170617.148880056@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:02:15 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ v4l-dvb maintainer list <v4l-dvb-maintainer@linuxtv.org>,
+ Mauro Carvalho Chehab <mchehab@infradead.org>
+Subject: [patch 052/101] V4L: cx88-blackbird: allow usage of 376836 and 262144 sized firmware images
+Content-Disposition: inline; filename=v4l-cx88-blackbird-allow-usage-of-376836-and-262144-sized-firmware-images.patch
+Content-Length: 2529
+Lines: 71
+
+
+From: Michael Krufky <mkrufky@linuxtv.org>
+
+This updates the cx88-blackbird driver to be able to use the new cx23416
+firmware image released by Hauppauge Computer Works, while retaining
+compatibility with the older firmware images.
+cx2341x firmware can be downloaded at: http://dl.ivtvdriver.org/ivtv/firmware/
+
+(cherry picked from commit af70dbd3346999570db73b3bc3d4f7b7c004f2ea)
+
+Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
+Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/media/video/cx88/cx88-blackbird.c | 14 +++++++++-----
+ drivers/media/video/cx88/cx88.h | 1 +
+ 2 files changed, 10 insertions(+), 5 deletions(-)
+
+--- linux-2.6.20.1.orig/drivers/media/video/cx88/cx88-blackbird.c
++++ linux-2.6.20.1/drivers/media/video/cx88/cx88-blackbird.c
+@@ -53,7 +53,8 @@ MODULE_PARM_DESC(debug,"enable debug mes
+
+ /* ------------------------------------------------------------------ */
+
+-#define BLACKBIRD_FIRM_IMAGE_SIZE 256*1024
++#define OLD_BLACKBIRD_FIRM_IMAGE_SIZE 262144
++#define BLACKBIRD_FIRM_IMAGE_SIZE 376836
+
+ /* defines below are from ivtv-driver.h */
+
+@@ -401,7 +402,7 @@ static int blackbird_find_mailbox(struct
+ u32 value;
+ int i;
+
+- for (i = 0; i < BLACKBIRD_FIRM_IMAGE_SIZE; i++) {
++ for (i = 0; i < dev->fw_size; i++) {
+ memory_read(dev->core, i, &value);
+ if (value == signature[signaturecnt])
+ signaturecnt++;
+@@ -449,12 +450,15 @@ static int blackbird_load_firmware(struc
+ return -1;
+ }
+
+- if (firmware->size != BLACKBIRD_FIRM_IMAGE_SIZE) {
+- dprintk(0, "ERROR: Firmware size mismatch (have %zd, expected %d)\n",
+- firmware->size, BLACKBIRD_FIRM_IMAGE_SIZE);
++ if ((firmware->size != BLACKBIRD_FIRM_IMAGE_SIZE) &&
++ (firmware->size != OLD_BLACKBIRD_FIRM_IMAGE_SIZE)) {
++ dprintk(0, "ERROR: Firmware size mismatch (have %zd, expected %d or %d)\n",
++ firmware->size, BLACKBIRD_FIRM_IMAGE_SIZE,
++ OLD_BLACKBIRD_FIRM_IMAGE_SIZE);
+ release_firmware(firmware);
+ return -1;
+ }
++ dev->fw_size = firmware->size;
+
+ if (0 != memcmp(firmware->data, magic, 8)) {
+ dprintk(0, "ERROR: Firmware magic mismatch, wrong file?\n");
+--- linux-2.6.20.1.orig/drivers/media/video/cx88/cx88.h
++++ linux-2.6.20.1/drivers/media/video/cx88/cx88.h
+@@ -459,6 +459,7 @@ struct cx8802_dev {
+ u32 mailbox;
+ int width;
+ int height;
++ int fw_size;
+
+ /* for dvb only */
+ struct videobuf_dvb dvb;
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:17 2007
+Message-Id: <20070307170617.306770749@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:02:16 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org,
+ Andrew Morton <akpm@linux-foundation.org>
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Ingo Molnar <mingo@elte.hu>,
+ john stultz <johnstul@us.ibm.com>,
+ Roman Zippel <zippel@linux-m68k.org>,
+ Mike Galbraith <efault@gmx.de>,
+ Ken Chen <kenneth.w.chen@intel.com>,
+ balducci@units.it,
+ Greg KH <greg@kroah.com>,
+ Thomas Gleixner <tglx@linutronix.de>
+Subject: [patch 053/101] Fix posix-cpu-timer breakage caused by stale p->last_ran value
+Content-Disposition: inline; filename=fix-posix-cpu-timer-breakage-caused-by-stale-p-last_ran-value.patch
+Content-Length: 1047
+Lines: 35
+
+From: Thomas Gleixner <tglx@linutronix.de>
+
+Problem description at:
+http://bugzilla.kernel.org/show_bug.cgi?id=8048
+
+Commit b18ec80396834497933d77b81ec0918519f4e2a7
+ [PATCH] sched: improve migration accuracy
+optimized the scheduler time calculations, but broke posix-cpu-timers.
+
+The problem is that the p->last_ran value is not updated after a context
+switch. So a subsequent call to current_sched_time() calculates with a
+stale p->last_ran value, i.e. accounts the full time, which the task was
+scheduled away.
+
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Acked-by: Ingo Molnar <mingo@elte.hu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ kernel/sched.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- linux-2.6.20.1.orig/kernel/sched.c
++++ linux-2.6.20.1/kernel/sched.c
+@@ -3547,7 +3547,7 @@ switch_tasks:
+
+ sched_info_switch(prev, next);
+ if (likely(prev != next)) {
+- next->timestamp = now;
++ next->timestamp = next->last_ran = now;
+ rq->nr_switches++;
+ rq->curr = next;
+ ++*switch_count;
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:17 2007
+Message-Id: <20070307170617.410426352@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:02:17 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Stefan Seyfried <seife@suse.de>,
+ Pavel Machek <pavel@ucw.cz>,
+ "Rafael J. Wysocki" <rjw@sisk.pl>
+Subject: [patch 054/101] swsusp: Fix possible oops in userland interface
+Content-Disposition: inline; filename=swsusp-fix-possible-oops-in-userland-interface.patch
+Content-Length: 1684
+Lines: 68
+
+From: Stefan Seyfried <seife@suse.de>
+
+Fix the Oops occuring when SNAPSHOT_PMOPS or SNAPSHOT_S2RAM ioctl is called on
+a system without pm_ops defined (eg. a non-ACPI kernel on x86 PC).
+
+Signed-off-by: Stefan Seyfried <seife@suse.de>
+Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
+Acked-by: Pavel Machek <pavel@ucw.cz>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+
+---
+ kernel/power/user.c | 19 ++++++++++++-------
+ 1 file changed, 12 insertions(+), 7 deletions(-)
+
+--- linux-2.6.20.1.orig/kernel/power/user.c
++++ linux-2.6.20.1/kernel/power/user.c
+@@ -292,7 +292,7 @@ static int snapshot_ioctl(struct inode *
+ break;
+ }
+
+- if (pm_ops->prepare) {
++ if (pm_ops && pm_ops->prepare) {
+ error = pm_ops->prepare(PM_SUSPEND_MEM);
+ if (error)
+ goto OutS3;
+@@ -311,7 +311,7 @@ static int snapshot_ioctl(struct inode *
+ device_resume();
+ }
+ resume_console();
+- if (pm_ops->finish)
++ if (pm_ops && pm_ops->finish)
+ pm_ops->finish(PM_SUSPEND_MEM);
+
+ OutS3:
+@@ -322,20 +322,25 @@ static int snapshot_ioctl(struct inode *
+ switch (arg) {
+
+ case PMOPS_PREPARE:
+- if (pm_ops->prepare) {
++ if (pm_ops && pm_ops->prepare)
+ error = pm_ops->prepare(PM_SUSPEND_DISK);
+- }
++ else
++ error = -ENOSYS;
+ break;
+
+ case PMOPS_ENTER:
+ kernel_shutdown_prepare(SYSTEM_SUSPEND_DISK);
+- error = pm_ops->enter(PM_SUSPEND_DISK);
++ if (pm_ops && pm_ops->enter)
++ error = pm_ops->enter(PM_SUSPEND_DISK);
++ else
++ error = -ENOSYS;
+ break;
+
+ case PMOPS_FINISH:
+- if (pm_ops && pm_ops->finish) {
++ if (pm_ops && pm_ops->finish)
+ pm_ops->finish(PM_SUSPEND_DISK);
+- }
++ else
++ error = -ENOSYS;
+ break;
+
+ default:
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:17 2007
+Message-Id: <20070307170617.546647259@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:02:18 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org,
+ Jeff Garzik <jeff@garzik.org>,
+ <linux-ide@vger.kernel.org>
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Tejun Heo <htejun@gmail.com>
+Subject: [patch 055/101] sata_sil: ignore and clear spurious IRQs while executing commands by polling
+Content-Disposition: inline; filename=sata_sil-ignore-and-clear-spurious-irqs-while-executing-commands-by-polling.patch
+Content-Length: 1157
+Lines: 39
+
+
+sata_sil used to trigger HSM error if IRQ occurs during polling
+command. This didn't matter because polling wasn't used in sata_sil.
+However, as of 2.6.20, all IDENTIFYs are performed by polling and
+device detection sometimes fails due to spurious IRQ. This patch
+makes sata_sil ignore and clear spurious IRQ while executing commands
+by polling.
+
+This fixes bug#7996 and IMHO should also be included in -stable.
+
+Signed-off-by: Tejun Heo <htejun@gmail.com>
+Cc: Jeff Garzik <jeff@garzik.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/ata/sata_sil.c | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+--- linux-2.6.20.1.orig/drivers/ata/sata_sil.c
++++ linux-2.6.20.1/drivers/ata/sata_sil.c
+@@ -383,9 +383,15 @@ static void sil_host_intr(struct ata_por
+ goto freeze;
+ }
+
+- if (unlikely(!qc || qc->tf.ctl & ATA_NIEN))
++ if (unlikely(!qc))
+ goto freeze;
+
++ if (unlikely(qc->tf.flags & ATA_TFLAG_POLLING)) {
++ /* this sometimes happens, just clear IRQ */
++ ata_chk_status(ap);
++ return;
++ }
++
+ /* Check whether we are expecting interrupt in this state */
+ switch (ap->hsm_task_state) {
+ case HSM_ST_FIRST:
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:17 2007
+Message-Id: <20070307170617.670702935@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:02:19 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org,
+ Greg KH <greg@kroah.com>
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Chris Wright <chrisw@sous-sol.org>,
+ Tigran Aivazian <tigran@aivazian.fsnet.co.uk>,
+ Andreas Gruenbacher <agruen@suse.de>,
+ Hugh Dickins <hugh@veritas.com>
+Subject: [patch 056/101] fix umask when noACL kernel meets extN tuned for ACLs
+Content-Disposition: inline; filename=fix-umask-when-noacl-kernel-meets-extn-tuned-for-acls.patch
+Content-Length: 3339
+Lines: 84
+
+From: Hugh Dickins <hugh@veritas.com>
+
+Fix insecure default behaviour reported by Tigran Aivazian: if an ext2
+or ext3 or ext4 filesystem is tuned to mount with "acl", but mounted by
+a kernel built without ACL support, then umask was ignored when creating
+inodes - though root or user has umask 022, touch creates files as 0666,
+and mkdir creates directories as 0777.
+
+This appears to have worked right until 2.6.11, when a fix to the default
+mode on symlinks (always 0777) assumed VFS applies umask: which it does,
+unless the mount is marked for ACLs; but ext[234] set MS_POSIXACL in
+s_flags according to s_mount_opt set according to def_mount_opts.
+
+We could revert to the 2.6.10 ext[234]_init_acl (adding an S_ISLNK test);
+but other filesystems only set MS_POSIXACL when ACLs are configured. We
+could fix this at another level; but it seems most robust to avoid setting
+the s_mount_opt flag in the first place (at the expense of more ifdefs).
+
+Likewise don't set the XATTR_USER flag when built without XATTR support.
+
+Signed-off-by: Hugh Dickins <hugh@veritas.com>
+Acked-by: Andreas Gruenbacher <agruen@suse.de>
+Cc: Tigran Aivazian <tigran@aivazian.fsnet.co.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ fs/ext2/super.c | 4 ++++
+ fs/ext3/super.c | 4 ++++
+ fs/ext4/super.c | 4 ++++
+ 3 files changed, 12 insertions(+)
+
+--- linux-2.6.20.1.orig/fs/ext2/super.c
++++ linux-2.6.20.1/fs/ext2/super.c
+@@ -708,10 +708,14 @@ static int ext2_fill_super(struct super_
+ set_opt(sbi->s_mount_opt, GRPID);
+ if (def_mount_opts & EXT2_DEFM_UID16)
+ set_opt(sbi->s_mount_opt, NO_UID32);
++#ifdef CONFIG_EXT2_FS_XATTR
+ if (def_mount_opts & EXT2_DEFM_XATTR_USER)
+ set_opt(sbi->s_mount_opt, XATTR_USER);
++#endif
++#ifdef CONFIG_EXT2_FS_POSIX_ACL
+ if (def_mount_opts & EXT2_DEFM_ACL)
+ set_opt(sbi->s_mount_opt, POSIX_ACL);
++#endif
+
+ if (le16_to_cpu(sbi->s_es->s_errors) == EXT2_ERRORS_PANIC)
+ set_opt(sbi->s_mount_opt, ERRORS_PANIC);
+--- linux-2.6.20.1.orig/fs/ext3/super.c
++++ linux-2.6.20.1/fs/ext3/super.c
+@@ -1459,10 +1459,14 @@ static int ext3_fill_super (struct super
+ set_opt(sbi->s_mount_opt, GRPID);
+ if (def_mount_opts & EXT3_DEFM_UID16)
+ set_opt(sbi->s_mount_opt, NO_UID32);
++#ifdef CONFIG_EXT3_FS_XATTR
+ if (def_mount_opts & EXT3_DEFM_XATTR_USER)
+ set_opt(sbi->s_mount_opt, XATTR_USER);
++#endif
++#ifdef CONFIG_EXT3_FS_POSIX_ACL
+ if (def_mount_opts & EXT3_DEFM_ACL)
+ set_opt(sbi->s_mount_opt, POSIX_ACL);
++#endif
+ if ((def_mount_opts & EXT3_DEFM_JMODE) == EXT3_DEFM_JMODE_DATA)
+ sbi->s_mount_opt |= EXT3_MOUNT_JOURNAL_DATA;
+ else if ((def_mount_opts & EXT3_DEFM_JMODE) == EXT3_DEFM_JMODE_ORDERED)
+--- linux-2.6.20.1.orig/fs/ext4/super.c
++++ linux-2.6.20.1/fs/ext4/super.c
+@@ -1518,10 +1518,14 @@ static int ext4_fill_super (struct super
+ set_opt(sbi->s_mount_opt, GRPID);
+ if (def_mount_opts & EXT4_DEFM_UID16)
+ set_opt(sbi->s_mount_opt, NO_UID32);
++#ifdef CONFIG_EXT4DEV_FS_XATTR
+ if (def_mount_opts & EXT4_DEFM_XATTR_USER)
+ set_opt(sbi->s_mount_opt, XATTR_USER);
++#endif
++#ifdef CONFIG_EXT4DEV_FS_POSIX_ACL
+ if (def_mount_opts & EXT4_DEFM_ACL)
+ set_opt(sbi->s_mount_opt, POSIX_ACL);
++#endif
+ if ((def_mount_opts & EXT4_DEFM_JMODE) == EXT4_DEFM_JMODE_DATA)
+ sbi->s_mount_opt |= EXT4_MOUNT_JOURNAL_DATA;
+ else if ((def_mount_opts & EXT4_DEFM_JMODE) == EXT4_DEFM_JMODE_ORDERED)
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:17 2007
+Message-Id: <20070307170617.796260198@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:02:20 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Blaisorblade <blaisorblade@yahoo.it>,
+ user-mode-linux-devel@lists.sourceforge.net,
+ Jeff Dike <jdike@addtoit.com>
+Subject: [patch 057/101] UML - Fix 2.6.20 hang
+Content-Disposition: inline; filename=uml-fix-2.6.20-hang.patch
+Content-Length: 3370
+Lines: 112
+
+From: Jeff Dike <jdike@addtoit.com>
+
+A previous cleanup misused need_poll, which had a fairly broken
+interface. It implemented a growable array, changing the used
+elements count itself, but leaving it up to the caller to fill in the
+actual elements, including the entire array if the array had to be
+reallocated. This worked because the previous users were switching
+between two such structures, and the elements were copied from the
+inactive array to the active array after making sure the active array
+had enough room.
+
+maybe_sigio_broken was made to use need_poll, but it was operating on
+a single array, so when the buffer was reallocated, the previous
+contents were lost.
+
+This patch makes need_poll implement more sane semantics. It merely
+assures that the array is of the proper size and that the contents are
+preserved. It is up to the caller to adjust the used elements count
+and to ensure that the proper elements are resent.
+
+This manifested itself as a hang in 2.6.20 as the uninitialized buffer
+convinced UML that one of its own file descriptors didn't support
+SIGIO and needed to be watched by poll in a separate thread. The
+result was an interrupt flood as control traffic over this descriptor
+sparked interrupts, which resulted in more control traffic, ad nauseum.
+
+Signed-off-by: Jeff Dike <jdike@addtoit.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/um/os-Linux/sigio.c | 38 ++++++++++++++++++++------------------
+ 1 file changed, 20 insertions(+), 18 deletions(-)
+
+--- linux-2.6.20.1.orig/arch/um/os-Linux/sigio.c
++++ linux-2.6.20.1/arch/um/os-Linux/sigio.c
+@@ -97,20 +97,22 @@ static int write_sigio_thread(void *unus
+
+ static int need_poll(struct pollfds *polls, int n)
+ {
+- if(n <= polls->size){
+- polls->used = n;
++ struct pollfd *new;
++
++ if(n <= polls->size)
+ return 0;
+- }
+- kfree(polls->poll);
+- polls->poll = um_kmalloc_atomic(n * sizeof(struct pollfd));
+- if(polls->poll == NULL){
++
++ new = um_kmalloc_atomic(n * sizeof(struct pollfd));
++ if(new == NULL){
+ printk("need_poll : failed to allocate new pollfds\n");
+- polls->size = 0;
+- polls->used = 0;
+ return -ENOMEM;
+ }
++
++ memcpy(new, polls->poll, polls->used * sizeof(struct pollfd));
++ kfree(polls->poll);
++
++ polls->poll = new;
+ polls->size = n;
+- polls->used = n;
+ return 0;
+ }
+
+@@ -171,15 +173,15 @@ int add_sigio_fd(int fd)
+ goto out;
+ }
+
+- n = current_poll.used + 1;
+- err = need_poll(&next_poll, n);
++ n = current_poll.used;
++ err = need_poll(&next_poll, n + 1);
+ if(err)
+ goto out;
+
+- for(i = 0; i < current_poll.used; i++)
+- next_poll.poll[i] = current_poll.poll[i];
+-
+- next_poll.poll[n - 1] = *p;
++ memcpy(next_poll.poll, current_poll.poll,
++ current_poll.used * sizeof(struct pollfd));
++ next_poll.poll[n] = *p;
++ next_poll.used = n + 1;
+ update_thread();
+ out:
+ sigio_unlock();
+@@ -214,6 +216,7 @@ int ignore_sigio_fd(int fd)
+ if(p->fd != fd)
+ next_poll.poll[n++] = *p;
+ }
++ next_poll.used = current_poll.used - 1;
+
+ update_thread();
+ out:
+@@ -331,10 +334,9 @@ void maybe_sigio_broken(int fd, int read
+
+ sigio_lock();
+ err = need_poll(&all_sigio_fds, all_sigio_fds.used + 1);
+- if(err){
+- printk("maybe_sigio_broken - failed to add pollfd\n");
++ if(err)
+ goto out;
+- }
++
+ all_sigio_fds.poll[all_sigio_fds.used++] =
+ ((struct pollfd) { .fd = fd,
+ .events = read ? POLLIN : POLLOUT,
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:18 2007
+Message-Id: <20070307170617.925538604@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:02:21 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Darren Salt <linux@youmustbejoking.demon.co.uk>,
+ Pierre Ossman <drzeus@drzeus.cx>
+Subject: [patch 058/101] mmc: Power quirk for ENE controllers
+Content-Disposition: inline; filename=mmc-power-quirk-for-ene-controllers.patch
+Content-Length: 2802
+Lines: 83
+
+From: Darren Salt <linux@youmustbejoking.demon.co.uk>
+
+mmc: Power quirk for ENE controllers
+
+Support for these devices was broken for 2.6.18-rc1 and later by commit
+146ad66eac836c0b976c98f428d73e1f6a75270d, which added voltage level support.
+
+This restores the previous behaviour for these devices by ensuring that when
+the voltage is changed, only one write to set the voltage is performed.
+
+It may be that both writes are needed if the voltage is being changed between
+two non-zero values or that it's safe to ensure that only one write is done
+if the hardware only supports one voltage; I don't know whether either is the
+case nor can I test since I have only the one SD reader (1524:0550), and it
+supports just the one voltage.
+
+Signed-off-by: Darren Salt <linux@youmustbejoking.demon.co.uk>
+Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/mmc/sdhci.c | 22 +++++++++++++++++++---
+ include/linux/pci_ids.h | 1 +
+ 2 files changed, 20 insertions(+), 3 deletions(-)
+
+--- linux-2.6.20.1.orig/drivers/mmc/sdhci.c
++++ linux-2.6.20.1/drivers/mmc/sdhci.c
+@@ -37,6 +37,7 @@ static unsigned int debug_quirks = 0;
+ #define SDHCI_QUIRK_FORCE_DMA (1<<1)
+ /* Controller doesn't like some resets when there is no card inserted. */
+ #define SDHCI_QUIRK_NO_CARD_NO_RESET (1<<2)
++#define SDHCI_QUIRK_SINGLE_POWER_WRITE (1<<3)
+
+ static const struct pci_device_id pci_ids[] __devinitdata = {
+ {
+@@ -65,6 +66,14 @@ static const struct pci_device_id pci_id
+ .driver_data = SDHCI_QUIRK_FORCE_DMA,
+ },
+
++ {
++ .vendor = PCI_VENDOR_ID_ENE,
++ .device = PCI_DEVICE_ID_ENE_CB712_SD,
++ .subvendor = PCI_ANY_ID,
++ .subdevice = PCI_ANY_ID,
++ .driver_data = SDHCI_QUIRK_SINGLE_POWER_WRITE,
++ },
++
+ { /* Generic SD host controller */
+ PCI_DEVICE_CLASS((PCI_CLASS_SYSTEM_SDHCI << 8), 0xFFFF00)
+ },
+@@ -674,10 +683,17 @@ static void sdhci_set_power(struct sdhci
+ if (host->power == power)
+ return;
+
+- writeb(0, host->ioaddr + SDHCI_POWER_CONTROL);
+-
+- if (power == (unsigned short)-1)
++ if (power == (unsigned short)-1) {
++ writeb(0, host->ioaddr + SDHCI_POWER_CONTROL);
+ goto out;
++ }
++
++ /*
++ * Spec says that we should clear the power reg before setting
++ * a new value. Some controllers don't seem to like this though.
++ */
++ if (!(host->chip->quirks & SDHCI_QUIRK_SINGLE_POWER_WRITE))
++ writeb(0, host->ioaddr + SDHCI_POWER_CONTROL);
+
+ pwr = SDHCI_POWER_ON;
+
+--- linux-2.6.20.1.orig/include/linux/pci_ids.h
++++ linux-2.6.20.1/include/linux/pci_ids.h
+@@ -1971,6 +1971,7 @@
+ #define PCI_DEVICE_ID_TOPIC_TP560 0x0000
+
+ #define PCI_VENDOR_ID_ENE 0x1524
++#define PCI_DEVICE_ID_ENE_CB712_SD 0x0550
+ #define PCI_DEVICE_ID_ENE_1211 0x1211
+ #define PCI_DEVICE_ID_ENE_1225 0x1225
+ #define PCI_DEVICE_ID_ENE_1410 0x1410
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:18 2007
+Message-Id: <20070307170618.054231181@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:02:22 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ linux-wireless@vger.kernel.org,
+ Bcm43xx-dev@lists.berlios.de,
+ Michael Buesch <mb@bu3sch.de>,
+ Pavel Roskin <proski@gnu.org>,
+ Larry Finger <Larry.Finger@lwfinger.net>
+Subject: [patch 059/101] bcm43xx: Fix assertion failures in interrupt handler
+Content-Disposition: inline; filename=bcm43xx-fix-assertion-failures-in-interrupt-handler.patch
+Content-Length: 1282
+Lines: 38
+
+
+From: Pavel Roskin <proski@gnu.org>
+
+In the bcm43xx interrupt handler, sanity checks are wrongly done before the
+verification that the interrupt is for the bcm43xx.
+
+Signed-off-by: Pavel Roskin <proski@gnu.org>
+Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/net/wireless/bcm43xx/bcm43xx_main.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- linux-2.6.20.1.orig/drivers/net/wireless/bcm43xx/bcm43xx_main.c
++++ linux-2.6.20.1/drivers/net/wireless/bcm43xx/bcm43xx_main.c
+@@ -1864,9 +1864,6 @@ static irqreturn_t bcm43xx_interrupt_han
+
+ spin_lock(&bcm->irq_lock);
+
+- assert(bcm43xx_status(bcm) == BCM43xx_STAT_INITIALIZED);
+- assert(bcm->current_core->id == BCM43xx_COREID_80211);
+-
+ reason = bcm43xx_read32(bcm, BCM43xx_MMIO_GEN_IRQ_REASON);
+ if (reason == 0xffffffff) {
+ /* irq not for us (shared irq) */
+@@ -1877,6 +1874,9 @@ static irqreturn_t bcm43xx_interrupt_han
+ if (!reason)
+ goto out;
+
++ assert(bcm43xx_status(bcm) == BCM43xx_STAT_INITIALIZED);
++ assert(bcm->current_core->id == BCM43xx_COREID_80211);
++
+ bcm->dma_reason[0] = bcm43xx_read32(bcm, BCM43xx_MMIO_DMA0_REASON)
+ & 0x0001DC00;
+ bcm->dma_reason[1] = bcm43xx_read32(bcm, BCM43xx_MMIO_DMA1_REASON)
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:18 2007
+Message-Id: <20070307170618.186348774@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:02:23 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org,
+ Guennadi Liakhovetski <g.liakhovetski@gmx.de>
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ <jgarzik@pobox.com>,
+ Tejun Heo <htejun@gmail.com>
+Subject: [patch 060/101] libata: add missing PM callbacks
+Content-Disposition: inline; filename=libata-add-missing-pm-callbacks.patch
+Content-Length: 1254
+Lines: 41
+
+From: Tejun Heo <htejun@gmail.com>
+
+Some LLDs were missing scsi device PM callbacks while having host/port
+suspend support. Add missing ones.
+
+Signed-off-by: Tejun Heo <htejun@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/ata/pata_jmicron.c | 4 ++++
+ drivers/ata/pata_sil680.c | 4 ++++
+ 2 files changed, 8 insertions(+)
+
+--- linux-2.6.20.1.orig/drivers/ata/pata_jmicron.c
++++ linux-2.6.20.1/drivers/ata/pata_jmicron.c
+@@ -137,6 +137,10 @@ static struct scsi_host_template jmicron
+ .slave_destroy = ata_scsi_slave_destroy,
+ /* Use standard CHS mapping rules */
+ .bios_param = ata_std_bios_param,
++#ifdef CONFIG_PM
++ .suspend = ata_scsi_device_suspend,
++ .resume = ata_scsi_device_resume,
++#endif
+ };
+
+ static const struct ata_port_operations jmicron_ops = {
+--- linux-2.6.20.1.orig/drivers/ata/pata_sil680.c
++++ linux-2.6.20.1/drivers/ata/pata_sil680.c
+@@ -226,6 +226,10 @@ static struct scsi_host_template sil680_
+ .slave_configure = ata_scsi_slave_config,
+ .slave_destroy = ata_scsi_slave_destroy,
+ .bios_param = ata_std_bios_param,
++#ifdef CONFIG_PM
++ .suspend = ata_scsi_device_suspend,
++ .resume = ata_scsi_device_resume,
++#endif
+ };
+
+ static struct ata_port_operations sil680_port_ops = {
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:18 2007
+Message-Id: <20070307170618.321127597@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:02:24 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org,
+ Guennadi Liakhovetski <g.liakhovetski@gmx.de>
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ <jgarzik@pobox.com>,
+ Tejun Heo <htejun@gmail.com>
+Subject: [patch 061/101] libata: add missing CONFIG_PM in LLDs
+Content-Disposition: inline; filename=libata-add-missing-config_pm-in-llds.patch
+Content-Length: 33126
+Lines: 1088
+
+From: Tejun Heo <htejun@gmail.com>
+
+Add missing #ifdef CONFIG_PM conditionals around all PM related parts
+in libata LLDs.
+
+Signed-off-by: Tejun Heo <htejun@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/ata/ahci.c | 14 ++++++++++++++
+ drivers/ata/ata_generic.c | 4 ++++
+ drivers/ata/ata_piix.c | 4 ++++
+ drivers/ata/pata_ali.c | 6 ++++++
+ drivers/ata/pata_amd.c | 6 ++++++
+ drivers/ata/pata_atiixp.c | 4 ++++
+ drivers/ata/pata_cmd64x.c | 6 ++++++
+ drivers/ata/pata_cs5520.c | 7 +++++++
+ drivers/ata/pata_cs5530.c | 6 ++++++
+ drivers/ata/pata_cs5535.c | 4 ++++
+ drivers/ata/pata_cypress.c | 4 ++++
+ drivers/ata/pata_efar.c | 4 ++++
+ drivers/ata/pata_hpt366.c | 7 ++++++-
+ drivers/ata/pata_hpt3x3.c | 6 ++++++
+ drivers/ata/pata_it821x.c | 6 ++++++
+ drivers/ata/pata_jmicron.c | 4 ++++
+ drivers/ata/pata_marvell.c | 4 ++++
+ drivers/ata/pata_mpiix.c | 4 ++++
+ drivers/ata/pata_netcell.c | 4 ++++
+ drivers/ata/pata_ns87410.c | 4 ++++
+ drivers/ata/pata_oldpiix.c | 4 ++++
+ drivers/ata/pata_opti.c | 4 ++++
+ drivers/ata/pata_optidma.c | 4 ++++
+ drivers/ata/pata_pdc202xx_old.c | 4 ++++
+ drivers/ata/pata_radisys.c | 4 ++++
+ drivers/ata/pata_rz1000.c | 6 ++++++
+ drivers/ata/pata_sc1200.c | 4 ++++
+ drivers/ata/pata_serverworks.c | 6 ++++++
+ drivers/ata/pata_sil680.c | 4 ++++
+ drivers/ata/pata_sis.c | 4 ++++
+ drivers/ata/pata_triflex.c | 4 ++++
+ drivers/ata/pata_via.c | 6 ++++++
+ drivers/ata/sata_sil.c | 2 ++
+ drivers/ata/sata_sil24.c | 2 ++
+ 34 files changed, 165 insertions(+), 1 deletion(-)
+
+--- linux-2.6.20.1.orig/drivers/ata/ahci.c
++++ linux-2.6.20.1/drivers/ata/ahci.c
+@@ -225,10 +225,12 @@ static void ahci_thaw(struct ata_port *a
+ static void ahci_error_handler(struct ata_port *ap);
+ static void ahci_vt8251_error_handler(struct ata_port *ap);
+ static void ahci_post_internal_cmd(struct ata_queued_cmd *qc);
++#ifdef CONFIG_PM
+ static int ahci_port_suspend(struct ata_port *ap, pm_message_t mesg);
+ static int ahci_port_resume(struct ata_port *ap);
+ static int ahci_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg);
+ static int ahci_pci_device_resume(struct pci_dev *pdev);
++#endif
+ static void ahci_remove_one (struct pci_dev *pdev);
+
+ static struct scsi_host_template ahci_sht = {
+@@ -248,8 +250,10 @@ static struct scsi_host_template ahci_sh
+ .slave_configure = ata_scsi_slave_config,
+ .slave_destroy = ata_scsi_slave_destroy,
+ .bios_param = ata_std_bios_param,
++#ifdef CONFIG_PM
+ .suspend = ata_scsi_device_suspend,
+ .resume = ata_scsi_device_resume,
++#endif
+ };
+
+ static const struct ata_port_operations ahci_ops = {
+@@ -276,8 +280,10 @@ static const struct ata_port_operations
+ .error_handler = ahci_error_handler,
+ .post_internal_cmd = ahci_post_internal_cmd,
+
++#ifdef CONFIG_PM
+ .port_suspend = ahci_port_suspend,
+ .port_resume = ahci_port_resume,
++#endif
+
+ .port_start = ahci_port_start,
+ .port_stop = ahci_port_stop,
+@@ -307,8 +313,10 @@ static const struct ata_port_operations
+ .error_handler = ahci_vt8251_error_handler,
+ .post_internal_cmd = ahci_post_internal_cmd,
+
++#ifdef CONFIG_PM
+ .port_suspend = ahci_port_suspend,
+ .port_resume = ahci_port_resume,
++#endif
+
+ .port_start = ahci_port_start,
+ .port_stop = ahci_port_stop,
+@@ -441,8 +449,10 @@ static struct pci_driver ahci_pci_driver
+ .name = DRV_NAME,
+ .id_table = ahci_pci_tbl,
+ .probe = ahci_init_one,
++#ifdef CONFIG_PM
+ .suspend = ahci_pci_device_suspend,
+ .resume = ahci_pci_device_resume,
++#endif
+ .remove = ahci_remove_one,
+ };
+
+@@ -587,6 +597,7 @@ static void ahci_power_up(void __iomem *
+ writel(cmd | PORT_CMD_ICC_ACTIVE, port_mmio + PORT_CMD);
+ }
+
++#ifdef CONFIG_PM
+ static void ahci_power_down(void __iomem *port_mmio, u32 cap)
+ {
+ u32 cmd, scontrol;
+@@ -604,6 +615,7 @@ static void ahci_power_down(void __iomem
+ cmd &= ~PORT_CMD_SPIN_UP;
+ writel(cmd, port_mmio + PORT_CMD);
+ }
++#endif
+
+ static void ahci_init_port(void __iomem *port_mmio, u32 cap,
+ dma_addr_t cmd_slot_dma, dma_addr_t rx_fis_dma)
+@@ -1336,6 +1348,7 @@ static void ahci_post_internal_cmd(struc
+ }
+ }
+
++#ifdef CONFIG_PM
+ static int ahci_port_suspend(struct ata_port *ap, pm_message_t mesg)
+ {
+ struct ahci_host_priv *hpriv = ap->host->private_data;
+@@ -1412,6 +1425,7 @@ static int ahci_pci_device_resume(struct
+
+ return 0;
+ }
++#endif
+
+ static int ahci_port_start(struct ata_port *ap)
+ {
+--- linux-2.6.20.1.orig/drivers/ata/ata_generic.c
++++ linux-2.6.20.1/drivers/ata/ata_generic.c
+@@ -119,8 +119,10 @@ static struct scsi_host_template generic
+ .slave_configure = ata_scsi_slave_config,
+ .slave_destroy = ata_scsi_slave_destroy,
+ .bios_param = ata_std_bios_param,
++#ifdef CONFIG_PM
+ .resume = ata_scsi_device_resume,
+ .suspend = ata_scsi_device_suspend,
++#endif
+ };
+
+ static struct ata_port_operations generic_port_ops = {
+@@ -230,8 +232,10 @@ static struct pci_driver ata_generic_pci
+ .id_table = ata_generic,
+ .probe = ata_generic_init_one,
+ .remove = ata_pci_remove_one,
++#ifdef CONFIG_PM
+ .suspend = ata_pci_device_suspend,
+ .resume = ata_pci_device_resume,
++#endif
+ };
+
+ static int __init ata_generic_init(void)
+--- linux-2.6.20.1.orig/drivers/ata/ata_piix.c
++++ linux-2.6.20.1/drivers/ata/ata_piix.c
+@@ -255,8 +255,10 @@ static struct pci_driver piix_pci_driver
+ .id_table = piix_pci_tbl,
+ .probe = piix_init_one,
+ .remove = ata_pci_remove_one,
++#ifdef CONFIG_PM
+ .suspend = ata_pci_device_suspend,
+ .resume = ata_pci_device_resume,
++#endif
+ };
+
+ static struct scsi_host_template piix_sht = {
+@@ -275,8 +277,10 @@ static struct scsi_host_template piix_sh
+ .slave_configure = ata_scsi_slave_config,
+ .slave_destroy = ata_scsi_slave_destroy,
+ .bios_param = ata_std_bios_param,
++#ifdef CONFIG_PM
+ .resume = ata_scsi_device_resume,
+ .suspend = ata_scsi_device_suspend,
++#endif
+ };
+
+ static const struct ata_port_operations piix_pata_ops = {
+--- linux-2.6.20.1.orig/drivers/ata/pata_ali.c
++++ linux-2.6.20.1/drivers/ata/pata_ali.c
+@@ -345,8 +345,10 @@ static struct scsi_host_template ali_sht
+ .slave_configure = ata_scsi_slave_config,
+ .slave_destroy = ata_scsi_slave_destroy,
+ .bios_param = ata_std_bios_param,
++#ifdef CONFIG_PM
+ .resume = ata_scsi_device_resume,
+ .suspend = ata_scsi_device_suspend,
++#endif
+ };
+
+ /*
+@@ -667,11 +669,13 @@ static int ali_init_one(struct pci_dev *
+ return ata_pci_init_one(pdev, port_info, 2);
+ }
+
++#ifdef CONFIG_PM
+ static int ali_reinit_one(struct pci_dev *pdev)
+ {
+ ali_init_chipset(pdev);
+ return ata_pci_device_resume(pdev);
+ }
++#endif
+
+ static const struct pci_device_id ali[] = {
+ { PCI_VDEVICE(AL, PCI_DEVICE_ID_AL_M5228), },
+@@ -685,8 +689,10 @@ static struct pci_driver ali_pci_driver
+ .id_table = ali,
+ .probe = ali_init_one,
+ .remove = ata_pci_remove_one,
++#ifdef CONFIG_PM
+ .suspend = ata_pci_device_suspend,
+ .resume = ali_reinit_one,
++#endif
+ };
+
+ static int __init ali_init(void)
+--- linux-2.6.20.1.orig/drivers/ata/pata_amd.c
++++ linux-2.6.20.1/drivers/ata/pata_amd.c
+@@ -334,8 +334,10 @@ static struct scsi_host_template amd_sht
+ .slave_configure = ata_scsi_slave_config,
+ .slave_destroy = ata_scsi_slave_destroy,
+ .bios_param = ata_std_bios_param,
++#ifdef CONFIG_PM
+ .resume = ata_scsi_device_resume,
+ .suspend = ata_scsi_device_suspend,
++#endif
+ };
+
+ static struct ata_port_operations amd33_port_ops = {
+@@ -663,6 +665,7 @@ static int amd_init_one(struct pci_dev *
+ return ata_pci_init_one(pdev, port_info, 2);
+ }
+
++#ifdef CONFIG_PM
+ static int amd_reinit_one(struct pci_dev *pdev)
+ {
+ if (pdev->vendor == PCI_VENDOR_ID_AMD) {
+@@ -679,6 +682,7 @@ static int amd_reinit_one(struct pci_dev
+ }
+ return ata_pci_device_resume(pdev);
+ }
++#endif
+
+ static const struct pci_device_id amd[] = {
+ { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_COBRA_7401), 0 },
+@@ -708,8 +712,10 @@ static struct pci_driver amd_pci_driver
+ .id_table = amd,
+ .probe = amd_init_one,
+ .remove = ata_pci_remove_one,
++#ifdef CONFIG_PM
+ .suspend = ata_pci_device_suspend,
+ .resume = amd_reinit_one,
++#endif
+ };
+
+ static int __init amd_init(void)
+--- linux-2.6.20.1.orig/drivers/ata/pata_atiixp.c
++++ linux-2.6.20.1/drivers/ata/pata_atiixp.c
+@@ -224,8 +224,10 @@ static struct scsi_host_template atiixp_
+ .slave_configure = ata_scsi_slave_config,
+ .slave_destroy = ata_scsi_slave_destroy,
+ .bios_param = ata_std_bios_param,
++#ifdef CONFIG_PM
+ .resume = ata_scsi_device_resume,
+ .suspend = ata_scsi_device_suspend,
++#endif
+ };
+
+ static struct ata_port_operations atiixp_port_ops = {
+@@ -290,8 +292,10 @@ static struct pci_driver atiixp_pci_driv
+ .id_table = atiixp,
+ .probe = atiixp_init_one,
+ .remove = ata_pci_remove_one,
++#ifdef CONFIG_PM
+ .resume = ata_pci_device_resume,
+ .suspend = ata_pci_device_suspend,
++#endif
+ };
+
+ static int __init atiixp_init(void)
+--- linux-2.6.20.1.orig/drivers/ata/pata_cmd64x.c
++++ linux-2.6.20.1/drivers/ata/pata_cmd64x.c
+@@ -285,8 +285,10 @@ static struct scsi_host_template cmd64x_
+ .slave_configure = ata_scsi_slave_config,
+ .slave_destroy = ata_scsi_slave_destroy,
+ .bios_param = ata_std_bios_param,
++#ifdef CONFIG_PM
+ .resume = ata_scsi_device_resume,
+ .suspend = ata_scsi_device_suspend,
++#endif
+ };
+
+ static struct ata_port_operations cmd64x_port_ops = {
+@@ -479,6 +481,7 @@ static int cmd64x_init_one(struct pci_de
+ return ata_pci_init_one(pdev, port_info, 2);
+ }
+
++#ifdef CONFIG_PM
+ static int cmd64x_reinit_one(struct pci_dev *pdev)
+ {
+ u8 mrdmode;
+@@ -492,6 +495,7 @@ static int cmd64x_reinit_one(struct pci_
+ #endif
+ return ata_pci_device_resume(pdev);
+ }
++#endif
+
+ static const struct pci_device_id cmd64x[] = {
+ { PCI_VDEVICE(CMD, PCI_DEVICE_ID_CMD_643), 0 },
+@@ -507,8 +511,10 @@ static struct pci_driver cmd64x_pci_driv
+ .id_table = cmd64x,
+ .probe = cmd64x_init_one,
+ .remove = ata_pci_remove_one,
++#ifdef CONFIG_PM
+ .suspend = ata_pci_device_suspend,
+ .resume = cmd64x_reinit_one,
++#endif
+ };
+
+ static int __init cmd64x_init(void)
+--- linux-2.6.20.1.orig/drivers/ata/pata_cs5520.c
++++ linux-2.6.20.1/drivers/ata/pata_cs5520.c
+@@ -167,8 +167,10 @@ static struct scsi_host_template cs5520_
+ .slave_configure = ata_scsi_slave_config,
+ .slave_destroy = ata_scsi_slave_destroy,
+ .bios_param = ata_std_bios_param,
++#ifdef CONFIG_PM
+ .resume = ata_scsi_device_resume,
+ .suspend = ata_scsi_device_suspend,
++#endif
+ };
+
+ static struct ata_port_operations cs5520_port_ops = {
+@@ -298,6 +300,7 @@ static void __devexit cs5520_remove_one(
+ dev_set_drvdata(dev, NULL);
+ }
+
++#ifdef CONFIG_PM
+ /**
+ * cs5520_reinit_one - device resume
+ * @pdev: PCI device
+@@ -314,6 +317,8 @@ static int cs5520_reinit_one(struct pci_
+ pci_write_config_byte(pdev, 0x60, pcicfg | 0x40);
+ return ata_pci_device_resume(pdev);
+ }
++#endif
++
+ /* For now keep DMA off. We can set it for all but A rev CS5510 once the
+ core ATA code can handle it */
+
+@@ -329,8 +334,10 @@ static struct pci_driver cs5520_pci_driv
+ .id_table = pata_cs5520,
+ .probe = cs5520_init_one,
+ .remove = cs5520_remove_one,
++#ifdef CONFIG_PM
+ .suspend = ata_pci_device_suspend,
+ .resume = cs5520_reinit_one,
++#endif
+ };
+
+ static int __init cs5520_init(void)
+--- linux-2.6.20.1.orig/drivers/ata/pata_cs5530.c
++++ linux-2.6.20.1/drivers/ata/pata_cs5530.c
+@@ -181,8 +181,10 @@ static struct scsi_host_template cs5530_
+ .slave_configure = ata_scsi_slave_config,
+ .slave_destroy = ata_scsi_slave_destroy,
+ .bios_param = ata_std_bios_param,
++#ifdef CONFIG_PM
+ .resume = ata_scsi_device_resume,
+ .suspend = ata_scsi_device_suspend,
++#endif
+ };
+
+ static struct ata_port_operations cs5530_port_ops = {
+@@ -369,6 +371,7 @@ static int cs5530_init_one(struct pci_de
+ return ata_pci_init_one(pdev, port_info, 2);
+ }
+
++#ifdef CONFIG_PM
+ static int cs5530_reinit_one(struct pci_dev *pdev)
+ {
+ /* If we fail on resume we are doomed */
+@@ -376,6 +379,7 @@ static int cs5530_reinit_one(struct pci_
+ BUG();
+ return ata_pci_device_resume(pdev);
+ }
++#endif
+
+ static const struct pci_device_id cs5530[] = {
+ { PCI_VDEVICE(CYRIX, PCI_DEVICE_ID_CYRIX_5530_IDE), },
+@@ -388,8 +392,10 @@ static struct pci_driver cs5530_pci_driv
+ .id_table = cs5530,
+ .probe = cs5530_init_one,
+ .remove = ata_pci_remove_one,
++#ifdef CONFIG_PM
+ .suspend = ata_pci_device_suspend,
+ .resume = cs5530_reinit_one,
++#endif
+ };
+
+ static int __init cs5530_init(void)
+--- linux-2.6.20.1.orig/drivers/ata/pata_cs5535.c
++++ linux-2.6.20.1/drivers/ata/pata_cs5535.c
+@@ -185,8 +185,10 @@ static struct scsi_host_template cs5535_
+ .slave_configure = ata_scsi_slave_config,
+ .slave_destroy = ata_scsi_slave_destroy,
+ .bios_param = ata_std_bios_param,
++#ifdef CONFIG_PM
+ .resume = ata_scsi_device_resume,
+ .suspend = ata_scsi_device_suspend,
++#endif
+ };
+
+ static struct ata_port_operations cs5535_port_ops = {
+@@ -270,8 +272,10 @@ static struct pci_driver cs5535_pci_driv
+ .id_table = cs5535,
+ .probe = cs5535_init_one,
+ .remove = ata_pci_remove_one,
++#ifdef CONFIG_PM
+ .suspend = ata_pci_device_suspend,
+ .resume = ata_pci_device_resume,
++#endif
+ };
+
+ static int __init cs5535_init(void)
+--- linux-2.6.20.1.orig/drivers/ata/pata_cypress.c
++++ linux-2.6.20.1/drivers/ata/pata_cypress.c
+@@ -136,8 +136,10 @@ static struct scsi_host_template cy82c69
+ .slave_configure = ata_scsi_slave_config,
+ .slave_destroy = ata_scsi_slave_destroy,
+ .bios_param = ata_std_bios_param,
++#ifdef CONFIG_PM
+ .resume = ata_scsi_device_resume,
+ .suspend = ata_scsi_device_suspend,
++#endif
+ };
+
+ static struct ata_port_operations cy82c693_port_ops = {
+@@ -206,8 +208,10 @@ static struct pci_driver cy82c693_pci_dr
+ .id_table = cy82c693,
+ .probe = cy82c693_init_one,
+ .remove = ata_pci_remove_one,
++#ifdef CONFIG_PM
+ .suspend = ata_pci_device_suspend,
+ .resume = ata_pci_device_resume,
++#endif
+ };
+
+ static int __init cy82c693_init(void)
+--- linux-2.6.20.1.orig/drivers/ata/pata_efar.c
++++ linux-2.6.20.1/drivers/ata/pata_efar.c
+@@ -234,8 +234,10 @@ static struct scsi_host_template efar_sh
+ .slave_configure = ata_scsi_slave_config,
+ .slave_destroy = ata_scsi_slave_destroy,
+ .bios_param = ata_std_bios_param,
++#ifdef CONFIG_PM
+ .resume = ata_scsi_device_resume,
+ .suspend = ata_scsi_device_suspend,
++#endif
+ };
+
+ static const struct ata_port_operations efar_ops = {
+@@ -317,8 +319,10 @@ static struct pci_driver efar_pci_driver
+ .id_table = efar_pci_tbl,
+ .probe = efar_init_one,
+ .remove = ata_pci_remove_one,
++#ifdef CONFIG_PM
+ .suspend = ata_pci_device_suspend,
+ .resume = ata_pci_device_resume,
++#endif
+ };
+
+ static int __init efar_init(void)
+--- linux-2.6.20.1.orig/drivers/ata/pata_hpt366.c
++++ linux-2.6.20.1/drivers/ata/pata_hpt366.c
+@@ -338,8 +338,10 @@ static struct scsi_host_template hpt36x_
+ .slave_configure = ata_scsi_slave_config,
+ .slave_destroy = ata_scsi_slave_destroy,
+ .bios_param = ata_std_bios_param,
++#ifdef CONFIG_PM
+ .resume = ata_scsi_device_resume,
+ .suspend = ata_scsi_device_suspend,
++#endif
+ };
+
+ /*
+@@ -467,12 +469,13 @@ static int hpt36x_init_one(struct pci_de
+ return ata_pci_init_one(dev, port_info, 2);
+ }
+
++#ifdef CONFIG_PM
+ static int hpt36x_reinit_one(struct pci_dev *dev)
+ {
+ hpt36x_init_chipset(dev);
+ return ata_pci_device_resume(dev);
+ }
+-
++#endif
+
+ static const struct pci_device_id hpt36x[] = {
+ { PCI_VDEVICE(TTI, PCI_DEVICE_ID_TTI_HPT366), },
+@@ -484,8 +487,10 @@ static struct pci_driver hpt36x_pci_driv
+ .id_table = hpt36x,
+ .probe = hpt36x_init_one,
+ .remove = ata_pci_remove_one,
++#ifdef CONFIG_PM
+ .suspend = ata_pci_device_suspend,
+ .resume = hpt36x_reinit_one,
++#endif
+ };
+
+ static int __init hpt36x_init(void)
+--- linux-2.6.20.1.orig/drivers/ata/pata_hpt3x3.c
++++ linux-2.6.20.1/drivers/ata/pata_hpt3x3.c
+@@ -119,8 +119,10 @@ static struct scsi_host_template hpt3x3_
+ .slave_configure = ata_scsi_slave_config,
+ .slave_destroy = ata_scsi_slave_destroy,
+ .bios_param = ata_std_bios_param,
++#ifdef CONFIG_PM
+ .resume = ata_scsi_device_resume,
+ .suspend = ata_scsi_device_suspend,
++#endif
+ };
+
+ static struct ata_port_operations hpt3x3_port_ops = {
+@@ -206,11 +208,13 @@ static int hpt3x3_init_one(struct pci_de
+ return ata_pci_init_one(dev, port_info, 2);
+ }
+
++#ifdef CONFIG_PM
+ static int hpt3x3_reinit_one(struct pci_dev *dev)
+ {
+ hpt3x3_init_chipset(dev);
+ return ata_pci_device_resume(dev);
+ }
++#endif
+
+ static const struct pci_device_id hpt3x3[] = {
+ { PCI_VDEVICE(TTI, PCI_DEVICE_ID_TTI_HPT343), },
+@@ -223,8 +227,10 @@ static struct pci_driver hpt3x3_pci_driv
+ .id_table = hpt3x3,
+ .probe = hpt3x3_init_one,
+ .remove = ata_pci_remove_one,
++#ifdef CONFIG_PM
+ .suspend = ata_pci_device_suspend,
+ .resume = hpt3x3_reinit_one,
++#endif
+ };
+
+ static int __init hpt3x3_init(void)
+--- linux-2.6.20.1.orig/drivers/ata/pata_it821x.c
++++ linux-2.6.20.1/drivers/ata/pata_it821x.c
+@@ -676,8 +676,10 @@ static struct scsi_host_template it821x_
+ .slave_configure = ata_scsi_slave_config,
+ .slave_destroy = ata_scsi_slave_destroy,
+ .bios_param = ata_std_bios_param,
++#ifdef CONFIG_PM
+ .resume = ata_scsi_device_resume,
+ .suspend = ata_scsi_device_suspend,
++#endif
+ };
+
+ static struct ata_port_operations it821x_smart_port_ops = {
+@@ -810,6 +812,7 @@ static int it821x_init_one(struct pci_de
+ return ata_pci_init_one(pdev, port_info, 2);
+ }
+
++#ifdef CONFIG_PM
+ static int it821x_reinit_one(struct pci_dev *pdev)
+ {
+ /* Resume - turn raid back off if need be */
+@@ -817,6 +820,7 @@ static int it821x_reinit_one(struct pci_
+ it821x_disable_raid(pdev);
+ return ata_pci_device_resume(pdev);
+ }
++#endif
+
+ static const struct pci_device_id it821x[] = {
+ { PCI_VDEVICE(ITE, PCI_DEVICE_ID_ITE_8211), },
+@@ -830,8 +834,10 @@ static struct pci_driver it821x_pci_driv
+ .id_table = it821x,
+ .probe = it821x_init_one,
+ .remove = ata_pci_remove_one,
++#ifdef CONFIG_PM
+ .suspend = ata_pci_device_suspend,
+ .resume = it821x_reinit_one,
++#endif
+ };
+
+ static int __init it821x_init(void)
+--- linux-2.6.20.1.orig/drivers/ata/pata_jmicron.c
++++ linux-2.6.20.1/drivers/ata/pata_jmicron.c
+@@ -222,6 +222,7 @@ static int jmicron_init_one (struct pci_
+ return ata_pci_init_one(pdev, port_info, 2);
+ }
+
++#ifdef CONFIG_PM
+ static int jmicron_reinit_one(struct pci_dev *pdev)
+ {
+ u32 reg;
+@@ -242,6 +243,7 @@ static int jmicron_reinit_one(struct pci
+ }
+ return ata_pci_device_resume(pdev);
+ }
++#endif
+
+ static const struct pci_device_id jmicron_pci_tbl[] = {
+ { PCI_VDEVICE(JMICRON, PCI_DEVICE_ID_JMICRON_JMB361), 361},
+@@ -258,8 +260,10 @@ static struct pci_driver jmicron_pci_dri
+ .id_table = jmicron_pci_tbl,
+ .probe = jmicron_init_one,
+ .remove = ata_pci_remove_one,
++#ifdef CONFIG_PM
+ .suspend = ata_pci_device_suspend,
+ .resume = jmicron_reinit_one,
++#endif
+ };
+
+ static int __init jmicron_init(void)
+--- linux-2.6.20.1.orig/drivers/ata/pata_marvell.c
++++ linux-2.6.20.1/drivers/ata/pata_marvell.c
+@@ -103,8 +103,10 @@ static struct scsi_host_template marvell
+ .slave_destroy = ata_scsi_slave_destroy,
+ /* Use standard CHS mapping rules */
+ .bios_param = ata_std_bios_param,
++#ifdef CONFIG_PM
+ .resume = ata_scsi_device_resume,
+ .suspend = ata_scsi_device_suspend,
++#endif
+ };
+
+ static const struct ata_port_operations marvell_ops = {
+@@ -199,8 +201,10 @@ static struct pci_driver marvell_pci_dri
+ .id_table = marvell_pci_tbl,
+ .probe = marvell_init_one,
+ .remove = ata_pci_remove_one,
++#ifdef CONFIG_PM
+ .suspend = ata_pci_device_suspend,
+ .resume = ata_pci_device_resume,
++#endif
+ };
+
+ static int __init marvell_init(void)
+--- linux-2.6.20.1.orig/drivers/ata/pata_mpiix.c
++++ linux-2.6.20.1/drivers/ata/pata_mpiix.c
+@@ -167,8 +167,10 @@ static struct scsi_host_template mpiix_s
+ .slave_configure = ata_scsi_slave_config,
+ .slave_destroy = ata_scsi_slave_destroy,
+ .bios_param = ata_std_bios_param,
++#ifdef CONFIG_PM
+ .resume = ata_scsi_device_resume,
+ .suspend = ata_scsi_device_suspend,
++#endif
+ };
+
+ static struct ata_port_operations mpiix_port_ops = {
+@@ -287,8 +289,10 @@ static struct pci_driver mpiix_pci_drive
+ .id_table = mpiix,
+ .probe = mpiix_init_one,
+ .remove = mpiix_remove_one,
++#ifdef CONFIG_PM
+ .suspend = ata_pci_device_suspend,
+ .resume = ata_pci_device_resume,
++#endif
+ };
+
+ static int __init mpiix_init(void)
+--- linux-2.6.20.1.orig/drivers/ata/pata_netcell.c
++++ linux-2.6.20.1/drivers/ata/pata_netcell.c
+@@ -63,8 +63,10 @@ static struct scsi_host_template netcell
+ .slave_destroy = ata_scsi_slave_destroy,
+ /* Use standard CHS mapping rules */
+ .bios_param = ata_std_bios_param,
++#ifdef CONFIG_PM
+ .resume = ata_scsi_device_resume,
+ .suspend = ata_scsi_device_suspend,
++#endif
+ };
+
+ static const struct ata_port_operations netcell_ops = {
+@@ -153,8 +155,10 @@ static struct pci_driver netcell_pci_dri
+ .id_table = netcell_pci_tbl,
+ .probe = netcell_init_one,
+ .remove = ata_pci_remove_one,
++#ifdef CONFIG_PM
+ .suspend = ata_pci_device_suspend,
+ .resume = ata_pci_device_resume,
++#endif
+ };
+
+ static int __init netcell_init(void)
+--- linux-2.6.20.1.orig/drivers/ata/pata_ns87410.c
++++ linux-2.6.20.1/drivers/ata/pata_ns87410.c
+@@ -157,8 +157,10 @@ static struct scsi_host_template ns87410
+ .slave_configure = ata_scsi_slave_config,
+ .slave_destroy = ata_scsi_slave_destroy,
+ .bios_param = ata_std_bios_param,
++#ifdef CONFIG_PM
+ .resume = ata_scsi_device_resume,
+ .suspend = ata_scsi_device_suspend,
++#endif
+ };
+
+ static struct ata_port_operations ns87410_port_ops = {
+@@ -212,8 +214,10 @@ static struct pci_driver ns87410_pci_dri
+ .id_table = ns87410,
+ .probe = ns87410_init_one,
+ .remove = ata_pci_remove_one,
++#ifdef CONFIG_PM
+ .suspend = ata_pci_device_suspend,
+ .resume = ata_pci_device_resume,
++#endif
+ };
+
+ static int __init ns87410_init(void)
+--- linux-2.6.20.1.orig/drivers/ata/pata_oldpiix.c
++++ linux-2.6.20.1/drivers/ata/pata_oldpiix.c
+@@ -232,8 +232,10 @@ static struct scsi_host_template oldpiix
+ .slave_configure = ata_scsi_slave_config,
+ .slave_destroy = ata_scsi_slave_destroy,
+ .bios_param = ata_std_bios_param,
++#ifdef CONFIG_PM
+ .resume = ata_scsi_device_resume,
+ .suspend = ata_scsi_device_suspend,
++#endif
+ };
+
+ static const struct ata_port_operations oldpiix_pata_ops = {
+@@ -315,8 +317,10 @@ static struct pci_driver oldpiix_pci_dri
+ .id_table = oldpiix_pci_tbl,
+ .probe = oldpiix_init_one,
+ .remove = ata_pci_remove_one,
++#ifdef CONFIG_PM
+ .suspend = ata_pci_device_suspend,
+ .resume = ata_pci_device_resume,
++#endif
+ };
+
+ static int __init oldpiix_init(void)
+--- linux-2.6.20.1.orig/drivers/ata/pata_opti.c
++++ linux-2.6.20.1/drivers/ata/pata_opti.c
+@@ -179,8 +179,10 @@ static struct scsi_host_template opti_sh
+ .slave_configure = ata_scsi_slave_config,
+ .slave_destroy = ata_scsi_slave_destroy,
+ .bios_param = ata_std_bios_param,
++#ifdef CONFIG_PM
+ .resume = ata_scsi_device_resume,
+ .suspend = ata_scsi_device_suspend,
++#endif
+ };
+
+ static struct ata_port_operations opti_port_ops = {
+@@ -244,8 +246,10 @@ static struct pci_driver opti_pci_driver
+ .id_table = opti,
+ .probe = opti_init_one,
+ .remove = ata_pci_remove_one,
++#ifdef CONFIG_PM
+ .suspend = ata_pci_device_suspend,
+ .resume = ata_pci_device_resume,
++#endif
+ };
+
+ static int __init opti_init(void)
+--- linux-2.6.20.1.orig/drivers/ata/pata_optidma.c
++++ linux-2.6.20.1/drivers/ata/pata_optidma.c
+@@ -360,8 +360,10 @@ static struct scsi_host_template optidma
+ .slave_configure = ata_scsi_slave_config,
+ .slave_destroy = ata_scsi_slave_destroy,
+ .bios_param = ata_std_bios_param,
++#ifdef CONFIG_PM
+ .resume = ata_scsi_device_resume,
+ .suspend = ata_scsi_device_suspend,
++#endif
+ };
+
+ static struct ata_port_operations optidma_port_ops = {
+@@ -524,8 +526,10 @@ static struct pci_driver optidma_pci_dri
+ .id_table = optidma,
+ .probe = optidma_init_one,
+ .remove = ata_pci_remove_one,
++#ifdef CONFIG_PM
+ .suspend = ata_pci_device_suspend,
+ .resume = ata_pci_device_resume,
++#endif
+ };
+
+ static int __init optidma_init(void)
+--- linux-2.6.20.1.orig/drivers/ata/pata_pdc202xx_old.c
++++ linux-2.6.20.1/drivers/ata/pata_pdc202xx_old.c
+@@ -270,8 +270,10 @@ static struct scsi_host_template pdc202x
+ .slave_configure = ata_scsi_slave_config,
+ .slave_destroy = ata_scsi_slave_destroy,
+ .bios_param = ata_std_bios_param,
++#ifdef CONFIG_PM
+ .resume = ata_scsi_device_resume,
+ .suspend = ata_scsi_device_suspend,
++#endif
+ };
+
+ static struct ata_port_operations pdc2024x_port_ops = {
+@@ -402,8 +404,10 @@ static struct pci_driver pdc202xx_pci_dr
+ .id_table = pdc202xx,
+ .probe = pdc202xx_init_one,
+ .remove = ata_pci_remove_one,
++#ifdef CONFIG_PM
+ .suspend = ata_pci_device_suspend,
+ .resume = ata_pci_device_resume,
++#endif
+ };
+
+ static int __init pdc202xx_init(void)
+--- linux-2.6.20.1.orig/drivers/ata/pata_radisys.c
++++ linux-2.6.20.1/drivers/ata/pata_radisys.c
+@@ -228,8 +228,10 @@ static struct scsi_host_template radisys
+ .slave_configure = ata_scsi_slave_config,
+ .slave_destroy = ata_scsi_slave_destroy,
+ .bios_param = ata_std_bios_param,
++#ifdef CONFIG_PM
+ .resume = ata_scsi_device_resume,
+ .suspend = ata_scsi_device_suspend,
++#endif
+ };
+
+ static const struct ata_port_operations radisys_pata_ops = {
+@@ -312,8 +314,10 @@ static struct pci_driver radisys_pci_dri
+ .id_table = radisys_pci_tbl,
+ .probe = radisys_init_one,
+ .remove = ata_pci_remove_one,
++#ifdef CONFIG_PM
+ .suspend = ata_pci_device_suspend,
+ .resume = ata_pci_device_resume,
++#endif
+ };
+
+ static int __init radisys_init(void)
+--- linux-2.6.20.1.orig/drivers/ata/pata_rz1000.c
++++ linux-2.6.20.1/drivers/ata/pata_rz1000.c
+@@ -93,8 +93,10 @@ static struct scsi_host_template rz1000_
+ .slave_configure = ata_scsi_slave_config,
+ .slave_destroy = ata_scsi_slave_destroy,
+ .bios_param = ata_std_bios_param,
++#ifdef CONFIG_PM
+ .resume = ata_scsi_device_resume,
+ .suspend = ata_scsi_device_suspend,
++#endif
+ };
+
+ static struct ata_port_operations rz1000_port_ops = {
+@@ -177,6 +179,7 @@ static int rz1000_init_one (struct pci_d
+ return -ENODEV;
+ }
+
++#ifdef CONFIG_PM
+ static int rz1000_reinit_one(struct pci_dev *pdev)
+ {
+ /* If this fails on resume (which is a "cant happen" case), we
+@@ -185,6 +188,7 @@ static int rz1000_reinit_one(struct pci_
+ panic("rz1000 fifo");
+ return ata_pci_device_resume(pdev);
+ }
++#endif
+
+ static const struct pci_device_id pata_rz1000[] = {
+ { PCI_VDEVICE(PCTECH, PCI_DEVICE_ID_PCTECH_RZ1000), },
+@@ -198,8 +202,10 @@ static struct pci_driver rz1000_pci_driv
+ .id_table = pata_rz1000,
+ .probe = rz1000_init_one,
+ .remove = ata_pci_remove_one,
++#ifdef CONFIG_PM
+ .suspend = ata_pci_device_suspend,
+ .resume = rz1000_reinit_one,
++#endif
+ };
+
+ static int __init rz1000_init(void)
+--- linux-2.6.20.1.orig/drivers/ata/pata_sc1200.c
++++ linux-2.6.20.1/drivers/ata/pata_sc1200.c
+@@ -194,8 +194,10 @@ static struct scsi_host_template sc1200_
+ .slave_configure = ata_scsi_slave_config,
+ .slave_destroy = ata_scsi_slave_destroy,
+ .bios_param = ata_std_bios_param,
++#ifdef CONFIG_PM
+ .resume = ata_scsi_device_resume,
+ .suspend = ata_scsi_device_suspend,
++#endif
+ };
+
+ static struct ata_port_operations sc1200_port_ops = {
+@@ -266,8 +268,10 @@ static struct pci_driver sc1200_pci_driv
+ .id_table = sc1200,
+ .probe = sc1200_init_one,
+ .remove = ata_pci_remove_one,
++#ifdef CONFIG_PM
+ .suspend = ata_pci_device_suspend,
+ .resume = ata_pci_device_resume,
++#endif
+ };
+
+ static int __init sc1200_init(void)
+--- linux-2.6.20.1.orig/drivers/ata/pata_serverworks.c
++++ linux-2.6.20.1/drivers/ata/pata_serverworks.c
+@@ -326,8 +326,10 @@ static struct scsi_host_template serverw
+ .slave_configure = ata_scsi_slave_config,
+ .slave_destroy = ata_scsi_slave_destroy,
+ .bios_param = ata_std_bios_param,
++#ifdef CONFIG_PM
+ .resume = ata_scsi_device_resume,
+ .suspend = ata_scsi_device_suspend,
++#endif
+ };
+
+ static struct ata_port_operations serverworks_osb4_port_ops = {
+@@ -555,6 +557,7 @@ static int serverworks_init_one(struct p
+ return ata_pci_init_one(pdev, port_info, ports);
+ }
+
++#ifdef CONFIG_PM
+ static int serverworks_reinit_one(struct pci_dev *pdev)
+ {
+ /* Force master latency timer to 64 PCI clocks */
+@@ -578,6 +581,7 @@ static int serverworks_reinit_one(struct
+ }
+ return ata_pci_device_resume(pdev);
+ }
++#endif
+
+ static const struct pci_device_id serverworks[] = {
+ { PCI_VDEVICE(SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_OSB4IDE), 0},
+@@ -594,8 +598,10 @@ static struct pci_driver serverworks_pci
+ .id_table = serverworks,
+ .probe = serverworks_init_one,
+ .remove = ata_pci_remove_one,
++#ifdef CONFIG_PM
+ .suspend = ata_pci_device_suspend,
+ .resume = serverworks_reinit_one,
++#endif
+ };
+
+ static int __init serverworks_init(void)
+--- linux-2.6.20.1.orig/drivers/ata/pata_sil680.c
++++ linux-2.6.20.1/drivers/ata/pata_sil680.c
+@@ -371,11 +371,13 @@ static int sil680_init_one(struct pci_de
+ return ata_pci_init_one(pdev, port_info, 2);
+ }
+
++#ifdef CONFIG_PM
+ static int sil680_reinit_one(struct pci_dev *pdev)
+ {
+ sil680_init_chip(pdev);
+ return ata_pci_device_resume(pdev);
+ }
++#endif
+
+ static const struct pci_device_id sil680[] = {
+ { PCI_VDEVICE(CMD, PCI_DEVICE_ID_SII_680), },
+@@ -388,8 +390,10 @@ static struct pci_driver sil680_pci_driv
+ .id_table = sil680,
+ .probe = sil680_init_one,
+ .remove = ata_pci_remove_one,
++#ifdef CONFIG_PM
+ .suspend = ata_pci_device_suspend,
+ .resume = sil680_reinit_one,
++#endif
+ };
+
+ static int __init sil680_init(void)
+--- linux-2.6.20.1.orig/drivers/ata/pata_sis.c
++++ linux-2.6.20.1/drivers/ata/pata_sis.c
+@@ -546,8 +546,10 @@ static struct scsi_host_template sis_sht
+ .slave_configure = ata_scsi_slave_config,
+ .slave_destroy = ata_scsi_slave_destroy,
+ .bios_param = ata_std_bios_param,
++#ifdef CONFIG_PM
+ .resume = ata_scsi_device_resume,
+ .suspend = ata_scsi_device_suspend,
++#endif
+ };
+
+ static const struct ata_port_operations sis_133_ops = {
+@@ -1001,8 +1003,10 @@ static struct pci_driver sis_pci_driver
+ .id_table = sis_pci_tbl,
+ .probe = sis_init_one,
+ .remove = ata_pci_remove_one,
++#ifdef CONFIG_PM
+ .suspend = ata_pci_device_suspend,
+ .resume = ata_pci_device_resume,
++#endif
+ };
+
+ static int __init sis_init(void)
+--- linux-2.6.20.1.orig/drivers/ata/pata_triflex.c
++++ linux-2.6.20.1/drivers/ata/pata_triflex.c
+@@ -193,8 +193,10 @@ static struct scsi_host_template triflex
+ .slave_configure = ata_scsi_slave_config,
+ .slave_destroy = ata_scsi_slave_destroy,
+ .bios_param = ata_std_bios_param,
++#ifdef CONFIG_PM
+ .resume = ata_scsi_device_resume,
+ .suspend = ata_scsi_device_suspend,
++#endif
+ };
+
+ static struct ata_port_operations triflex_port_ops = {
+@@ -260,8 +262,10 @@ static struct pci_driver triflex_pci_dri
+ .id_table = triflex,
+ .probe = triflex_init_one,
+ .remove = ata_pci_remove_one,
++#ifdef CONFIG_PM
+ .suspend = ata_pci_device_suspend,
+ .resume = ata_pci_device_resume,
++#endif
+ };
+
+ static int __init triflex_init(void)
+--- linux-2.6.20.1.orig/drivers/ata/pata_via.c
++++ linux-2.6.20.1/drivers/ata/pata_via.c
+@@ -305,8 +305,10 @@ static struct scsi_host_template via_sht
+ .slave_configure = ata_scsi_slave_config,
+ .slave_destroy = ata_scsi_slave_destroy,
+ .bios_param = ata_std_bios_param,
++#ifdef CONFIG_PM
+ .resume = ata_scsi_device_resume,
+ .suspend = ata_scsi_device_suspend,
++#endif
+ };
+
+ static struct ata_port_operations via_port_ops = {
+@@ -560,6 +562,7 @@ static int via_init_one(struct pci_dev *
+ return ata_pci_init_one(pdev, port_info, 2);
+ }
+
++#ifdef CONFIG_PM
+ /**
+ * via_reinit_one - reinit after resume
+ * @pdev; PCI device
+@@ -592,6 +595,7 @@ static int via_reinit_one(struct pci_dev
+ }
+ return ata_pci_device_resume(pdev);
+ }
++#endif
+
+ static const struct pci_device_id via[] = {
+ { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_82C576_1), },
+@@ -607,8 +611,10 @@ static struct pci_driver via_pci_driver
+ .id_table = via,
+ .probe = via_init_one,
+ .remove = ata_pci_remove_one,
++#ifdef CONFIG_PM
+ .suspend = ata_pci_device_suspend,
+ .resume = via_reinit_one,
++#endif
+ };
+
+ static int __init via_init(void)
+--- linux-2.6.20.1.orig/drivers/ata/sata_sil.c
++++ linux-2.6.20.1/drivers/ata/sata_sil.c
+@@ -181,8 +181,10 @@ static struct scsi_host_template sil_sht
+ .slave_configure = ata_scsi_slave_config,
+ .slave_destroy = ata_scsi_slave_destroy,
+ .bios_param = ata_std_bios_param,
++#ifdef CONFIG_PM
+ .suspend = ata_scsi_device_suspend,
+ .resume = ata_scsi_device_resume,
++#endif
+ };
+
+ static const struct ata_port_operations sil_ops = {
+--- linux-2.6.20.1.orig/drivers/ata/sata_sil24.c
++++ linux-2.6.20.1/drivers/ata/sata_sil24.c
+@@ -386,8 +386,10 @@ static struct scsi_host_template sil24_s
+ .slave_configure = ata_scsi_slave_config,
+ .slave_destroy = ata_scsi_slave_destroy,
+ .bios_param = ata_std_bios_param,
++#ifdef CONFIG_PM
+ .suspend = ata_scsi_device_suspend,
+ .resume = ata_scsi_device_resume,
++#endif
+ };
+
+ static const struct ata_port_operations sil24_ops = {
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:18 2007
+Message-Id: <20070307170618.451785228@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:02:25 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Paul Mackerras <paulus@samba.org>
+Subject: [patch 062/101] POWERPC: Fix performance monitor exception
+Content-Disposition: inline; filename=powerpc-fix-performance-monitor-exception.patch
+Content-Length: 2515
+Lines: 56
+
+
+From: Livio Soares <livio@eecg.toronto.edu>
+
+To the issue: some point during 2.6.20 development, Paul Mackerras
+introduced the "lazy IRQ disabling" patch (very cool work, BTW).
+In that patch, the performance monitor unit exception was marked as
+"maskable", in the sense that if interrupts were soft-disabled, that
+exception could be ignored. This broke my PowerPC profiling code.
+The symptom that I see is that a varying number of interrupts
+(from 0 to $n$, typically closer to 0) get delivered, when, in
+reality, it should always be very close to $n$.
+
+The issue stems from the way masking is being done. Masking in
+this fashion seems to work well with the decrementer and external
+interrupts, because they are raised again until "really" handled.
+For the PMU, however, this does not apply (at least on my Xserver
+machine with a 970FX processor). If the PMU exception is not handled,
+it will _not_ be re-raised (at least on my machine). The documentation
+states that the PMXE bit in MMCR0 is set to 0 when the PMU exception
+is raised. However, software must re-set the bit to re-enable PMU
+exceptions. If the exception is ignored (as currently) not only is
+that interrupt lost, but because software does not re-set PMXE, the
+PMU registers are "frozen" forever.
+
+[This patch means that performance monitor exceptions are taken and
+handled even if irqs are off, as long as some other interrupt hasn't
+come along and caused interrupts to be hard-disabled. In this sense
+the PMU exception becomes like an NMI. The oprofile code for most
+powerpc processors does nothing that is unsafe in an NMI context, but
+the Cell oprofile code does a spin_lock_irqsave. However, that turns
+out to be OK because Cell doesn't actually use the performance
+monitor exception; performance monitor interrupts come in as a
+regular interrupt on Cell, so will be disabled when irqs are off.
+ -- paulus.]
+
+From: Livio Soares <livio@eecg.toronto.edu>
+Signed-off-by: Paul Mackerras <paulus@samba.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/powerpc/kernel/head_64.S | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- linux-2.6.20.1.orig/arch/powerpc/kernel/head_64.S
++++ linux-2.6.20.1/arch/powerpc/kernel/head_64.S
+@@ -613,7 +613,7 @@ system_call_pSeries:
+ /*** pSeries interrupt support ***/
+
+ /* moved from 0xf00 */
+- MASKABLE_EXCEPTION_PSERIES(., performance_monitor)
++ STD_EXCEPTION_PSERIES(., performance_monitor)
+
+ /*
+ * An interrupt came in while soft-disabled; clear EE in SRR1,
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:18 2007
+Message-Id: <20070307170618.580162123@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:02:26 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Jiri Kosina <jkosina@suse.cz>
+Subject: [patch 063/101] HID: fix possible double-free on error path in hid parser
+Content-Disposition: inline; filename=hid-fix-possible-double-free-on-error-path-in-hid-parser.patch
+Content-Length: 1935
+Lines: 61
+
+
+From: Jiri Kosina <jkosina@suse.cz>
+
+HID: fix possible double-free on error path in hid parser
+
+Freeing of device->collection is properly done in hid_free_device() (as
+this function is supposed to free all the device resources and could be
+called from transport specific code, e.g. usb_hid_configure()).
+
+Remove all kfree() calls preceeding the hid_free_device() call.
+
+Signed-off-by: Jiri Kosina <jkosina@suse.cz>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/hid/hid-core.c | 5 -----
+ 1 file changed, 5 deletions(-)
+
+--- linux-2.6.20.1.orig/drivers/hid/hid-core.c
++++ linux-2.6.20.1/drivers/hid/hid-core.c
+@@ -670,7 +670,6 @@ struct hid_device *hid_parse_report(__u8
+
+ if (item.format != HID_ITEM_FORMAT_SHORT) {
+ dbg("unexpected long global item");
+- kfree(device->collection);
+ hid_free_device(device);
+ kfree(parser);
+ return NULL;
+@@ -679,7 +678,6 @@ struct hid_device *hid_parse_report(__u8
+ if (dispatch_type[item.type](parser, &item)) {
+ dbg("item %u %u %u %u parsing failed\n",
+ item.format, (unsigned)item.size, (unsigned)item.type, (unsigned)item.tag);
+- kfree(device->collection);
+ hid_free_device(device);
+ kfree(parser);
+ return NULL;
+@@ -688,14 +686,12 @@ struct hid_device *hid_parse_report(__u8
+ if (start == end) {
+ if (parser->collection_stack_ptr) {
+ dbg("unbalanced collection at end of report description");
+- kfree(device->collection);
+ hid_free_device(device);
+ kfree(parser);
+ return NULL;
+ }
+ if (parser->local.delimiter_depth) {
+ dbg("unbalanced delimiter at end of report description");
+- kfree(device->collection);
+ hid_free_device(device);
+ kfree(parser);
+ return NULL;
+@@ -706,7 +702,6 @@ struct hid_device *hid_parse_report(__u8
+ }
+
+ dbg("item fetching failed at offset %d\n", (int)(end - start));
+- kfree(device->collection);
+ hid_free_device(device);
+ kfree(parser);
+ return NULL;
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:18 2007
+Message-Id: <20070307170618.770824570@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:02:27 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ fabbione@ubuntu.com,
+ bunk@stusta.de,
+ "David S. Miller" <davem@davemloft.net>
+Subject: [patch 064/101] Fix interrupt probing on E450 sparc64 systems
+Content-Disposition: inline; filename=fix-interrupt-probing-on-e450-sparc64-systems.patch
+Content-Length: 2330
+Lines: 79
+
+From: David Miller <davem@davemloft.net>
+
+[SPARC64]: Fix PCI interrupts on E450 et al.
+
+When the PCI controller OBP node lacks an interrupt-map
+and interrupt-map-mask property, we need to form the
+INO by hand. The PCI swizzle logic was not doing that
+properly.
+
+This was a regression added by the of_device code.
+
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/sparc64/kernel/of_device.c | 40 ++++++++++++++++++++++++++++++++++++++--
+ 1 file changed, 38 insertions(+), 2 deletions(-)
+
+--- linux-2.6.20.1.orig/arch/sparc64/kernel/of_device.c
++++ linux-2.6.20.1/arch/sparc64/kernel/of_device.c
+@@ -708,7 +708,7 @@ static unsigned int __init pci_irq_swizz
+ unsigned int irq)
+ {
+ struct linux_prom_pci_registers *regs;
+- unsigned int devfn, slot, ret;
++ unsigned int bus, devfn, slot, ret;
+
+ if (irq < 1 || irq > 4)
+ return irq;
+@@ -717,10 +717,46 @@ static unsigned int __init pci_irq_swizz
+ if (!regs)
+ return irq;
+
++ bus = (regs->phys_hi >> 16) & 0xff;
+ devfn = (regs->phys_hi >> 8) & 0xff;
+ slot = (devfn >> 3) & 0x1f;
+
+- ret = ((irq - 1 + (slot & 3)) & 3) + 1;
++ if (pp->irq_trans) {
++ /* Derived from Table 8-3, U2P User's Manual. This branch
++ * is handling a PCI controller that lacks a proper set of
++ * interrupt-map and interrupt-map-mask properties. The
++ * Ultra-E450 is one example.
++ *
++ * The bit layout is BSSLL, where:
++ * B: 0 on bus A, 1 on bus B
++ * D: 2-bit slot number, derived from PCI device number as
++ * (dev - 1) for bus A, or (dev - 2) for bus B
++ * L: 2-bit line number
++ *
++ * Actually, more "portable" way to calculate the funky
++ * slot number is to subtract pbm->pci_first_slot from the
++ * device number, and that's exactly what the pre-OF
++ * sparc64 code did, but we're building this stuff generically
++ * using the OBP tree, not in the PCI controller layer.
++ */
++ if (bus & 0x80) {
++ /* PBM-A */
++ bus = 0x00;
++ slot = (slot - 1) << 2;
++ } else {
++ /* PBM-B */
++ bus = 0x10;
++ slot = (slot - 2) << 2;
++ }
++ irq -= 1;
++
++ ret = (bus | slot | irq);
++ } else {
++ /* Going through a PCI-PCI bridge that lacks a set of
++ * interrupt-map and interrupt-map-mask properties.
++ */
++ ret = ((irq - 1 + (slot & 3)) & 3) + 1;
++ }
+
+ return ret;
+ }
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:18 2007
+Message-Id: <20070307170618.846350628@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:02:28 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ bunk@stusta.de,
+ "David S. Miller" <davem@davemloft.net>
+Subject: [patch 065/101] Fix xfrm_add_sa_expire() return value
+Content-Disposition: inline; filename=fix-xfrm_add_sa_expire-return-value.patch
+Content-Length: 1154
+Lines: 43
+
+From: David Miller <davem@davemloft.net>
+
+[XFRM] xfrm_user: Fix return values of xfrm_add_sa_expire.
+
+As noted by Kent Yoder, this function will always return an
+error. Make sure it returns zero on success.
+
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ net/xfrm/xfrm_user.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- linux-2.6.20.1.orig/net/xfrm/xfrm_user.c
++++ linux-2.6.20.1/net/xfrm/xfrm_user.c
+@@ -1557,14 +1557,13 @@ static int xfrm_add_sa_expire(struct sk_
+ struct xfrm_usersa_info *p = &ue->state;
+
+ x = xfrm_state_lookup(&p->id.daddr, p->id.spi, p->id.proto, p->family);
+- err = -ENOENT;
+
++ err = -ENOENT;
+ if (x == NULL)
+ return err;
+
+- err = -EINVAL;
+-
+ spin_lock_bh(&x->lock);
++ err = -EINVAL;
+ if (x->km.state != XFRM_STATE_VALID)
+ goto out;
+ km_state_expired(x, ue->hard, current->pid);
+@@ -1574,6 +1573,7 @@ static int xfrm_add_sa_expire(struct sk_
+ xfrm_audit_log(NETLINK_CB(skb).loginuid, NETLINK_CB(skb).sid,
+ AUDIT_MAC_IPSEC_DELSA, 1, NULL, x);
+ }
++ err = 0;
+ out:
+ spin_unlock_bh(&x->lock);
+ xfrm_state_put(x);
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:19 2007
+Message-Id: <20070307170618.981055421@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:02:29 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ bunk@stusta.de,
+ Arnaldo Carvalho de Melo <acme@redhat.com>,
+ "David S. Miller" <davem@davemloft.net>
+Subject: [patch 066/101] Fix skb data reallocation handling in IPSEC
+Content-Disposition: inline; filename=fix-skb-data-reallocation-handling-in-ipsec.patch
+Content-Length: 919
+Lines: 28
+
+From: Arnaldo Carvalho de Melo <acme@redhat.com>
+
+[XFRM_TUNNEL]: Reload header pointer after pskb_may_pull/pskb_expand_head
+
+Please consider applying, this was found on your latest
+net-2.6 tree while playing around with that ip_hdr() + turn
+skb->nh/h/mac pointers as offsets on 64 bits idea :-)
+
+Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ net/ipv4/xfrm4_mode_tunnel.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- linux-2.6.20.1.orig/net/ipv4/xfrm4_mode_tunnel.c
++++ linux-2.6.20.1/net/ipv4/xfrm4_mode_tunnel.c
+@@ -84,6 +84,7 @@ static int xfrm4_tunnel_input(struct xfr
+ (err = pskb_expand_head(skb, 0, 0, GFP_ATOMIC)))
+ goto out;
+
++ iph = skb->nh.iph;
+ if (x->props.flags & XFRM_STATE_DECAP_DSCP)
+ ipv4_copy_dscp(iph, skb->h.ipiph);
+ if (!(x->props.flags & XFRM_STATE_NOECN))
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:19 2007
+Message-Id: <20070307170619.115652657@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:02:30 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ bunk@stusta.de,
+ "David S. Miller" <davem@davemloft.net>
+Subject: [patch 067/101] Fix %100 cpu spinning on sparc64
+Content-Disposition: inline; filename=fix-100-cpu-spinning-on-sparc64.patch
+Content-Length: 1298
+Lines: 52
+
+From: David Miller <davem@davemloft.net>
+
+[SPARC64] bbc_i2c: Fix kenvctrld eating %100 cpu.
+
+Based almost entirely upon a patch by Joerg Friedrich
+
+Signed-off-by: David S. Miller <davem@davemloft.net>
+
+---
+ drivers/sbus/char/bbc_i2c.c | 15 ++++++++-------
+ 1 file changed, 8 insertions(+), 7 deletions(-)
+
+--- linux-2.6.20.1.orig/drivers/sbus/char/bbc_i2c.c
++++ linux-2.6.20.1/drivers/sbus/char/bbc_i2c.c
+@@ -187,19 +187,20 @@ static int wait_for_pin(struct bbc_i2c_b
+ bp->waiting = 1;
+ add_wait_queue(&bp->wq, &wait);
+ while (limit-- > 0) {
+- u8 val;
++ unsigned long val;
+
+- set_current_state(TASK_INTERRUPTIBLE);
+- *status = val = readb(bp->i2c_control_regs + 0);
+- if ((val & I2C_PCF_PIN) == 0) {
++ val = wait_event_interruptible_timeout(
++ bp->wq,
++ (((*status = readb(bp->i2c_control_regs + 0))
++ & I2C_PCF_PIN) == 0),
++ msecs_to_jiffies(250));
++ if (val > 0) {
+ ret = 0;
+ break;
+ }
+- msleep_interruptible(250);
+ }
+ remove_wait_queue(&bp->wq, &wait);
+ bp->waiting = 0;
+- current->state = TASK_RUNNING;
+
+ return ret;
+ }
+@@ -340,7 +341,7 @@ static irqreturn_t bbc_i2c_interrupt(int
+ */
+ if (bp->waiting &&
+ !(readb(bp->i2c_control_regs + 0x0) & I2C_PCF_PIN))
+- wake_up(&bp->wq);
++ wake_up_interruptible(&bp->wq);
+
+ return IRQ_HANDLED;
+ }
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:19 2007
+Message-Id: <20070307170619.241029171@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:02:31 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ bunk@stusta.de,
+ "David S. Miller" <davem@davemloft.net>
+Subject: [patch 068/101] Fix TCP MD5 locking.
+Content-Disposition: inline; filename=fix-tcp-md5-locking.patch
+Content-Length: 2630
+Lines: 94
+
+From: David Miller <davem@davemloft.net>
+
+[TCP]: Fix MD5 signature pool locking.
+
+The locking calls assumed that these code paths were only
+invoked in software interrupt context, but that isn't true.
+
+Therefore we need to use spin_{lock,unlock}_bh() throughout.
+
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ net/ipv4/tcp.c | 24 ++++++++++++------------
+ 1 file changed, 12 insertions(+), 12 deletions(-)
+
+--- linux-2.6.20.1.orig/net/ipv4/tcp.c
++++ linux-2.6.20.1/net/ipv4/tcp.c
+@@ -2266,12 +2266,12 @@ void tcp_free_md5sig_pool(void)
+ {
+ struct tcp_md5sig_pool **pool = NULL;
+
+- spin_lock(&tcp_md5sig_pool_lock);
++ spin_lock_bh(&tcp_md5sig_pool_lock);
+ if (--tcp_md5sig_users == 0) {
+ pool = tcp_md5sig_pool;
+ tcp_md5sig_pool = NULL;
+ }
+- spin_unlock(&tcp_md5sig_pool_lock);
++ spin_unlock_bh(&tcp_md5sig_pool_lock);
+ if (pool)
+ __tcp_free_md5sig_pool(pool);
+ }
+@@ -2314,36 +2314,36 @@ struct tcp_md5sig_pool **tcp_alloc_md5si
+ int alloc = 0;
+
+ retry:
+- spin_lock(&tcp_md5sig_pool_lock);
++ spin_lock_bh(&tcp_md5sig_pool_lock);
+ pool = tcp_md5sig_pool;
+ if (tcp_md5sig_users++ == 0) {
+ alloc = 1;
+- spin_unlock(&tcp_md5sig_pool_lock);
++ spin_unlock_bh(&tcp_md5sig_pool_lock);
+ } else if (!pool) {
+ tcp_md5sig_users--;
+- spin_unlock(&tcp_md5sig_pool_lock);
++ spin_unlock_bh(&tcp_md5sig_pool_lock);
+ cpu_relax();
+ goto retry;
+ } else
+- spin_unlock(&tcp_md5sig_pool_lock);
++ spin_unlock_bh(&tcp_md5sig_pool_lock);
+
+ if (alloc) {
+ /* we cannot hold spinlock here because this may sleep. */
+ struct tcp_md5sig_pool **p = __tcp_alloc_md5sig_pool();
+- spin_lock(&tcp_md5sig_pool_lock);
++ spin_lock_bh(&tcp_md5sig_pool_lock);
+ if (!p) {
+ tcp_md5sig_users--;
+- spin_unlock(&tcp_md5sig_pool_lock);
++ spin_unlock_bh(&tcp_md5sig_pool_lock);
+ return NULL;
+ }
+ pool = tcp_md5sig_pool;
+ if (pool) {
+ /* oops, it has already been assigned. */
+- spin_unlock(&tcp_md5sig_pool_lock);
++ spin_unlock_bh(&tcp_md5sig_pool_lock);
+ __tcp_free_md5sig_pool(p);
+ } else {
+ tcp_md5sig_pool = pool = p;
+- spin_unlock(&tcp_md5sig_pool_lock);
++ spin_unlock_bh(&tcp_md5sig_pool_lock);
+ }
+ }
+ return pool;
+@@ -2354,11 +2354,11 @@ EXPORT_SYMBOL(tcp_alloc_md5sig_pool);
+ struct tcp_md5sig_pool *__tcp_get_md5sig_pool(int cpu)
+ {
+ struct tcp_md5sig_pool **p;
+- spin_lock(&tcp_md5sig_pool_lock);
++ spin_lock_bh(&tcp_md5sig_pool_lock);
+ p = tcp_md5sig_pool;
+ if (p)
+ tcp_md5sig_users++;
+- spin_unlock(&tcp_md5sig_pool_lock);
++ spin_unlock_bh(&tcp_md5sig_pool_lock);
+ return (p ? *per_cpu_ptr(p, cpu) : NULL);
+ }
+
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:19 2007
+Message-Id: <20070307170619.369558320@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:02:32 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ bunk@stusta.de,
+ Michal Wrobel <xmxwx@asn.pl>,
+ "David S. Miller" <davem@davemloft.net>
+Subject: [patch 069/101] Dont add anycast reference to device multiple times
+Content-Disposition: inline; filename=don-t-add-anycast-reference-to-device-multiple-times.patch
+Content-Length: 893
+Lines: 30
+
+From: Michal Wrobel <xmxwx@asn.pl>
+
+[IPV6]: anycast refcnt fix
+
+This patch fixes a bug in Linux IPv6 stack which caused anycast address
+to be added to a device prior DAD has been completed. This led to
+incorrect reference count which resulted in infinite wait for
+unregister_netdevice completion on interface removal.
+
+Signed-off-by: Michal Wrobel <xmxwx@asn.pl>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ net/ipv6/addrconf.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- linux-2.6.20.1.orig/net/ipv6/addrconf.c
++++ linux-2.6.20.1/net/ipv6/addrconf.c
+@@ -469,6 +469,8 @@ static void dev_forward_change(struct in
+ ipv6_dev_mc_dec(dev, &addr);
+ }
+ for (ifa=idev->addr_list; ifa; ifa=ifa->if_next) {
++ if (ifa->flags&IFA_F_TENTATIVE)
++ continue;
+ if (idev->cnf.forwarding)
+ addrconf_join_anycast(ifa);
+ else
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:19 2007
+Message-Id: <20070307170619.497047671@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:02:33 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ bunk@stusta.de,
+ "David S. Miller" <davem@davemloft.net>
+Subject: [patch 070/101] Fix anycast procfs device leak
+Content-Disposition: inline; filename=fix-anycast-procfs-device-leak.patch
+Content-Length: 790
+Lines: 30
+
+From: David Stevens <dlstevens@us.ibm.com>
+
+[IPV6]: /proc/net/anycast6 unbalanced inet6_dev refcnt
+
+From: David Stevens <dlstevens@us.ibm.com>
+
+Reading /proc/net/anycast6 when there is no anycast address
+on an interface results in an ever-increasing inet6_dev reference
+count, as well as a reference to the netdevice you can't get rid of.
+
+From: David Stevens <dlstevens@us.ibm.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ net/ipv6/anycast.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- linux-2.6.20.1.orig/net/ipv6/anycast.c
++++ linux-2.6.20.1/net/ipv6/anycast.c
+@@ -462,6 +462,7 @@ static inline struct ifacaddr6 *ac6_get_
+ break;
+ }
+ read_unlock_bh(&idev->lock);
++ in6_dev_put(idev);
+ }
+ return im;
+ }
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:19 2007
+Message-Id: <20070307170619.624623906@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:02:34 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ =?ISO-8859-15?q?Micha=C5=82=20Miros=C5=82aw?= <mirq-linux@rere.qmqm.pl>
+Subject: [patch 071/101] Fix reference counting (memory leak) problem in __nfulnl_send() and callers related to packet queueing.
+Content-Disposition: inline; filename=nfnetlink_log_refcounting_fix.patch.patch
+Content-Length: 1545
+Lines: 54
+
+Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ net/netfilter/nfnetlink_log.c | 15 ++++++++++++---
+ 1 file changed, 12 insertions(+), 3 deletions(-)
+
+--- linux-2.6.20.1.orig/net/netfilter/nfnetlink_log.c
++++ linux-2.6.20.1/net/netfilter/nfnetlink_log.c
+@@ -217,6 +217,11 @@ _instance_destroy2(struct nfulnl_instanc
+
+ spin_lock_bh(&inst->lock);
+ if (inst->skb) {
++ /* timer "holds" one reference (we have one more) */
++ if (timer_pending(&inst->timer)) {
++ del_timer(&inst->timer);
++ instance_put(inst);
++ }
+ if (inst->qlen)
+ __nfulnl_send(inst);
+ if (inst->skb) {
+@@ -363,9 +368,6 @@ __nfulnl_send(struct nfulnl_instance *in
+ {
+ int status;
+
+- if (timer_pending(&inst->timer))
+- del_timer(&inst->timer);
+-
+ if (!inst->skb)
+ return 0;
+
+@@ -392,6 +394,8 @@ static void nfulnl_timer(unsigned long d
+ UDEBUG("timer function called, flushing buffer\n");
+
+ spin_lock_bh(&inst->lock);
++ if (timer_pending(&inst->timer)) /* is it always true or false here? */
++ del_timer(&inst->timer);
+ __nfulnl_send(inst);
+ instance_put(inst);
+ spin_unlock_bh(&inst->lock);
+@@ -689,6 +693,11 @@ nfulnl_log_packet(unsigned int pf,
+ * enough room in the skb left. flush to userspace. */
+ UDEBUG("flushing old skb\n");
+
++ /* timer "holds" one reference (we have another one) */
++ if (timer_pending(&inst->timer)) {
++ del_timer(&inst->timer);
++ instance_put(inst);
++ }
+ __nfulnl_send(inst);
+
+ if (!(inst->skb = nfulnl_alloc_skb(nlbufsiz, size))) {
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:19 2007
+Message-Id: <20070307170619.802814659@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:02:35 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Neil Brown <neilb@suse.de>
+Subject: [patch 072/101] export blk_recount_segments
+Content-Disposition: inline; filename=md_md5_6_bio_too_big_fix_fix.patch
+Content-Length: 894
+Lines: 31
+
+On Monday February 12, marcm@liquid-nexus.net wrote:
+> >
+> > Thanks for the quick response Neil unfortunately the kernel doesn't build with
+> > this patch due to a missing symbol:
+> >
+> > WARNING: "blk_recount_segments" [drivers/md/raid456.ko] undefined!
+> >
+> > Is that in another file that needs patching or within raid5.c?
+
+Yes. I keep forgetting about that bit. Sorry.
+
+Signed-off-by: Neil Brown <neilb@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ block/ll_rw_blk.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- linux-2.6.20.1.orig/block/ll_rw_blk.c
++++ linux-2.6.20.1/block/ll_rw_blk.c
+@@ -1264,7 +1264,7 @@ new_hw_segment:
+ bio->bi_hw_segments = nr_hw_segs;
+ bio->bi_flags |= (1 << BIO_SEG_VALID);
+ }
+-
++EXPORT_SYMBOL(blk_recount_segments);
+
+ static int blk_phys_contig_segment(request_queue_t *q, struct bio *bio,
+ struct bio *nxt)
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:19 2007
+Message-Id: <20070307170619.877060109@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:02:36 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Ayaz Abdulla <aabdulla@nvidia.com>,
+ Jeff Garzik <jeff@garzik.org>
+Subject: [patch 073/101] forcedeth: disable msix
+Content-Disposition: inline; filename=forcedeth-disable-msix.patch
+Content-Length: 749
+Lines: 29
+
+From: Ayaz Abdulla <aabdulla@nvidia.com>
+
+forcedeth: disable msix
+
+There seems to be an issue when both MSI-X is enabled and NAPI is
+configured. This patch disables MSI-X until the issue is root caused.
+
+Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
+Signed-off-by: Jeff Garzik <jeff@garzik.org>
+Cc: Chuck Ebbert <cebbert@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/net/forcedeth.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- linux-2.6.20.1.orig/drivers/net/forcedeth.c
++++ linux-2.6.20.1/drivers/net/forcedeth.c
+@@ -825,7 +825,7 @@ enum {
+ NV_MSIX_INT_DISABLED,
+ NV_MSIX_INT_ENABLED
+ };
+-static int msix = NV_MSIX_INT_ENABLED;
++static int msix = NV_MSIX_INT_DISABLED;
+
+ /*
+ * DMA 64bit
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:20 2007
+Message-Id: <20070307170620.004428216@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:02:37 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Aristeu Sergio Rozanski Filho <aris@ruivo.org>,
+ "H. Peter Anvin" <hpa@zytor.com>
+Subject: [patch 074/101] tty_io: fix race in master pty close/slave pty close path
+Content-Disposition: inline; filename=tty_io-fix-race-in-master-pty-close-slave-pty-close-path.patch
+Content-Length: 5658
+Lines: 146
+
+From: Aristeu Sergio Rozanski Filho <aristeu.sergio@gmail.com>
+
+[PATCH] tty_io: fix race in master pty close/slave pty close path
+
+This patch fixes a possible race that leads to double freeing an idr index.
+ When the master begin to close, release_dev() is called and then
+pty_close() is called:
+
+ if (tty->driver->close)
+ tty->driver->close(tty, filp);
+
+This is done without helding any locks other than BKL. Inside pty_close(),
+being a master close, the devpts entry will be removed:
+
+#ifdef CONFIG_UNIX98_PTYS
+ if (tty->driver == ptm_driver)
+ devpts_pty_kill(tty->index);
+#endif
+
+But devpts_pty_kill() will call get_node() that may sleep while waiting for
+&devpts_root->d_inode->i_sem. When this happens and the slave is being
+opened, tty_open() just found the driver and index:
+
+ driver = get_tty_driver(device, &index);
+ if (!driver) {
+ mutex_unlock(&tty_mutex);
+ return -ENODEV;
+ }
+
+This part of the code is already protected under tty_mute. The problem is
+that the slave close already got an index. Then init_dev() is called and
+blocks waiting for the same &devpts_root->d_inode->i_sem.
+
+When the master close resumes, it removes the devpts entry, and the
+relation between idr index and the tty is gone. The master then sleeps
+waiting for the tty_mutex on release_dev().
+
+Slave open resumes and found no tty for that index. As result, a NULL tty
+is returned and init_dev() doesn't flow to fast_track:
+
+ /* check whether we're reopening an existing tty */
+ if (driver->flags & TTY_DRIVER_DEVPTS_MEM) {
+ tty = devpts_get_tty(idx);
+ if (tty && driver->subtype == PTY_TYPE_MASTER)
+ tty = tty->link;
+ } else {
+ tty = driver->ttys[idx];
+ }
+ if (tty) goto fast_track;
+
+The result of this, is that a new tty will be created and init_dev() returns
+sucessfull. After returning, tty_mutex is dropped and master close may resume.
+
+Master close finds it's the only use and both sides are closing, then releases
+the tty and the index. At this point, the idr index is free, but slave still
+has it.
+
+Slave open then calls pty_open() and finds that tty->link->count is 0,
+because there's no master and returns error. Then tty_open() calls
+release_dev() which executes without any warning, as it was a case of last
+slave close when the master is already closed (master->count == 0,
+slave->count == 1). The tty is then released with the already released idr
+index.
+
+This normally would only issue a warning on idr_remove() but in case of a
+customer's critical application, it's never too simple:
+
+thread1: opens master, gets index X
+thread1: begin closing master
+thread2: begin opening slave with index X
+thread1: finishes closing master, index X released
+thread3: opens master, gets index X, just released
+thread2: fails opening slave, releases index X <----
+thread4: opens master, gets index X, init_dev() then find an already in use
+ and healthy tty and fails
+
+If no more indexes are released, ptmx_open() will keep failing, as the
+first free index available is X, and it will make init_dev() fail because
+you're trying to "reopen a master" which isn't valid.
+
+The patch notices when this race happens and make init_dev() fail
+imediately. The init_dev() function is called with tty_mutex held, so it's
+safe to continue with tty till the end of function because release_dev()
+won't make any further changes without grabbing the tty_mutex.
+
+Without the patch, on some machines it's possible get easily idr warnings
+like this one:
+
+idr_remove called for id=15 which is not allocated.
+ [<c02555b9>] idr_remove+0x139/0x170
+ [<c02a1b62>] release_mem+0x182/0x230
+ [<c02a28e7>] release_dev+0x4b7/0x700
+ [<c02a0ea7>] tty_ldisc_enable+0x27/0x30
+ [<c02a1e64>] init_dev+0x254/0x580
+ [<c02a0d64>] check_tty_count+0x14/0xb0
+ [<c02a4f05>] tty_open+0x1c5/0x340
+ [<c02a4d40>] tty_open+0x0/0x340
+ [<c017388f>] chrdev_open+0xaf/0x180
+ [<c017c2ac>] open_namei+0x8c/0x760
+ [<c01737e0>] chrdev_open+0x0/0x180
+ [<c0167bc9>] __dentry_open+0xc9/0x210
+ [<c0167e2c>] do_filp_open+0x5c/0x70
+ [<c0167a91>] get_unused_fd+0x61/0xd0
+ [<c0167e93>] do_sys_open+0x53/0x100
+ [<c0167f97>] sys_open+0x27/0x30
+ [<c010303b>] syscall_call+0x7/0xb
+
+using this test application available on:
+ http://www.ruivo.org/~aris/pty_sodomizer.c
+
+Signed-off-by: Aristeu Sergio Rozanski Filho <aris@ruivo.org>
+Cc: "H. Peter Anvin" <hpa@zytor.com>
+Cc: Chuck Ebbert <cebbert@redhat.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/char/tty_io.c | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
+
+--- linux-2.6.20.1.orig/drivers/char/tty_io.c
++++ linux-2.6.20.1/drivers/char/tty_io.c
+@@ -1891,6 +1891,20 @@ static int init_dev(struct tty_driver *d
+ /* check whether we're reopening an existing tty */
+ if (driver->flags & TTY_DRIVER_DEVPTS_MEM) {
+ tty = devpts_get_tty(idx);
++ /*
++ * If we don't have a tty here on a slave open, it's because
++ * the master already started the close process and there's
++ * no relation between devpts file and tty anymore.
++ */
++ if (!tty && driver->subtype == PTY_TYPE_SLAVE) {
++ retval = -EIO;
++ goto end_init;
++ }
++ /*
++ * It's safe from now on because init_dev() is called with
++ * tty_mutex held and release_dev() won't change tty->count
++ * or tty->flags without having to grab tty_mutex
++ */
+ if (tty && driver->subtype == PTY_TYPE_MASTER)
+ tty = tty->link;
+ } else {
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:20 2007
+Message-Id: <20070307170620.142747433@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:02:38 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Ingo Molnar <mingo@elte.hu>,
+ Michal Piotrowski <michal.k.k.piotrowski@gmail.com>,
+ Nick Piggin <nickpiggin@yahoo.com.au>,
+ Thomas Gleixner <tglx@linutronix.de>
+Subject: [patch 075/101] sched: fix SMT scheduler bug
+Content-Disposition: inline; filename=sched-fix-smt-scheduler-bug.patch
+Content-Length: 1341
+Lines: 40
+
+From: Ingo Molnar <mingo@elte.hu>
+
+[PATCH] sched: fix SMT scheduler bug
+
+The SMT scheduler incorrectly skips kernel threads even if they are
+runnable (but they are preempted by a higher-prio user-space task which got
+SMT-delayed by an even higher-priority task running on a sibling CPU).
+
+Fix this for now by only doing the SMT-nice optimization if the
+to-be-delayed task is the only runnable task. (This should cover most of
+the real-life cases anyway.)
+
+This bug has been in the SMT scheduler since 2.6.17 or so, but has only
+been noticed now by the active check in the dynticks code.
+
+Signed-off-by: Ingo Molnar <mingo@elte.hu>
+Cc: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>
+Cc: Nick Piggin <nickpiggin@yahoo.com.au>
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Cc: Chuck Ebbert <cebbert@redhat.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+
+---
+ kernel/sched.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- linux-2.6.20.1.orig/kernel/sched.c
++++ linux-2.6.20.1/kernel/sched.c
+@@ -3528,7 +3528,7 @@ need_resched_nonpreemptible:
+ }
+ }
+ next->sleep_type = SLEEP_NORMAL;
+- if (dependent_sleeper(cpu, rq, next))
++ if (rq->nr_running == 1 && dependent_sleeper(cpu, rq, next))
+ next = rq->idle;
+ switch_tasks:
+ if (next == rq->idle)
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:20 2007
+Message-Id: <20070307170620.326687240@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:02:39 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org,
+ Greg KH <greg@kroah.com>
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ David Brownell <david-b@pacbell.net>
+Subject: [patch 076/101] USB: usbnet driver bugfix
+Content-Disposition: inline; filename=usb-usbnet-driver-bugfix.patch
+Content-Length: 1242
+Lines: 43
+
+From: David Brownell <david-b@pacbell.net>
+
+The attached fixes an oops in the usbnet driver. The same patch is
+in 2.6.21-rc1, but that one has many whitespace changes. This is much
+smaller.
+
+
+Signed-off-by: David Brownell <david-b@pacbell.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/net/usbnet.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+--- linux-2.6.20.1.orig/drivers/usb/net/usbnet.c
++++ linux-2.6.20.1/drivers/usb/net/usbnet.c
+@@ -1182,6 +1182,9 @@ usbnet_probe (struct usb_interface *udev
+ // NOTE net->name still not usable ...
+ if (info->bind) {
+ status = info->bind (dev, udev);
++ if (status < 0)
++ goto out1;
++
+ // heuristic: "usb%d" for links we know are two-host,
+ // else "eth%d" when there's reasonable doubt. userspace
+ // can rename the link if it knows better.
+@@ -1208,12 +1211,12 @@ usbnet_probe (struct usb_interface *udev
+ if (status == 0 && dev->status)
+ status = init_status (dev, udev);
+ if (status < 0)
+- goto out1;
++ goto out3;
+
+ if (!dev->rx_urb_size)
+ dev->rx_urb_size = dev->hard_mtu;
+ dev->maxpacket = usb_maxpacket (dev->udev, dev->out, 1);
+-
++
+ SET_NETDEV_DEV(net, &udev->dev);
+ status = register_netdev (net);
+ if (status)
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:20 2007
+Message-Id: <20070307170620.403121793@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:02:40 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Dmitry Torokhov <dmitry.torokhov@gmail.com>,
+ Dmitry Torokhov <dtor@mail.ru>,
+ Thomas Renninger <trenn@suse.de>
+Subject: [patch 077/101] Backport of psmouse suspend/shutdown cleanups
+Content-Disposition: inline; filename=backport-of-psmouse-suspend-shutdown-cleanups.patch
+Content-Length: 2562
+Lines: 86
+
+From: Thomas Renninger <trenn@suse.de>
+
+This patch works back to 2.6.17 (earlier kernels seem to
+need up/down operations on mutex/semaphore).
+
+psmouse - properly reset mouse on shutdown/suspend
+
+Some people report that they need psmouse module unloaded
+for suspend to ram/disk to work properly. Let's make port
+cleanup behave the same way as driver unload.
+
+This fixes "bad state" problem on various HP laptops, such
+as nx7400.
+
+
+Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
+Signed-off-by: Thomas Renninger <trenn@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/input/mouse/psmouse-base.c | 28 ++++++++++++++++++++++++++++
+ drivers/input/mouse/psmouse.h | 1 +
+ drivers/input/mouse/synaptics.c | 1 +
+ 3 files changed, 30 insertions(+)
+
+--- linux-2.6.20.1.orig/drivers/input/mouse/psmouse-base.c
++++ linux-2.6.20.1/drivers/input/mouse/psmouse-base.c
+@@ -987,8 +987,36 @@ static void psmouse_resync(struct work_s
+ static void psmouse_cleanup(struct serio *serio)
+ {
+ struct psmouse *psmouse = serio_get_drvdata(serio);
++ struct psmouse *parent = NULL;
++
++ mutex_lock(&psmouse_mutex);
++
++ if (serio->parent && serio->id.type == SERIO_PS_PSTHRU) {
++ parent = serio_get_drvdata(serio->parent);
++ psmouse_deactivate(parent);
++ }
++
++ psmouse_deactivate(psmouse);
++
++ if (psmouse->cleanup)
++ psmouse->cleanup(psmouse);
+
+ psmouse_reset(psmouse);
++
++/*
++ * Some boxes, such as HP nx7400, get terribly confused if mouse
++ * is not fully enabled before suspending/shutting down.
++ */
++ ps2_command(&psmouse->ps2dev, NULL, PSMOUSE_CMD_ENABLE);
++
++ if (parent) {
++ if (parent->pt_deactivate)
++ parent->pt_deactivate(parent);
++
++ psmouse_activate(parent);
++ }
++
++ mutex_unlock(&psmouse_mutex);
+ }
+
+ /*
+--- linux-2.6.20.1.orig/drivers/input/mouse/psmouse.h
++++ linux-2.6.20.1/drivers/input/mouse/psmouse.h
+@@ -68,6 +68,7 @@ struct psmouse {
+
+ int (*reconnect)(struct psmouse *psmouse);
+ void (*disconnect)(struct psmouse *psmouse);
++ void (*cleanup)(struct psmouse *psmouse);
+ int (*poll)(struct psmouse *psmouse);
+
+ void (*pt_activate)(struct psmouse *psmouse);
+--- linux-2.6.20.1.orig/drivers/input/mouse/synaptics.c
++++ linux-2.6.20.1/drivers/input/mouse/synaptics.c
+@@ -652,6 +652,7 @@ int synaptics_init(struct psmouse *psmou
+ psmouse->set_rate = synaptics_set_rate;
+ psmouse->disconnect = synaptics_disconnect;
+ psmouse->reconnect = synaptics_reconnect;
++ psmouse->cleanup = synaptics_reset;
+ psmouse->pktsize = 6;
+ /* Synaptics can usually stay in sync without extra help */
+ psmouse->resync_time = 0;
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:20 2007
+Message-Id: <20070307170620.534161596@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:02:41 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ David Howells <dhowells@redhat.com>,
+ Benjamin Herrenschmidt <benh@kernel.crashing.org>,
+ Paul Mackerras <paulus@samba.org>,
+ Andrew Morton <akpm@osdl.org>,
+ David Woodhouse <dwmw2@infradead.org>
+Subject: [patch 078/101] Revert "LOG2: Alter get_order() so that it can make use of ilog2() on a constant"
+Content-Disposition: inline; filename=revert-log2-alter-get_order-so-that-it-can-make-use-of-ilog2-on-a-constant.patch
+Content-Length: 2945
+Lines: 91
+
+From: Linus Torvalds <torvalds@linux-foundation.org>
+
+Revert "[PATCH] LOG2: Alter get_order() so that it can make use of ilog2() on a constant"
+
+This reverts commit 39d61db0edb34d60b83c5e0d62d0e906578cc707.
+
+The commit was buggy in multiple ways:
+ - the conversion to ilog2() was incorrect to begin with
+ - it tested the wrong #defines, so on all architectures but FRV you'd
+ never see the bug except for constant arguments.
+ - the new "get_order()" macro used its arguments multiple times, and
+ didn't even parenthesize them properly
+ - despite the comments, it was not true that you could use it for
+ constant initializers, since not all architectures even use the
+ generic page.h header file.
+
+All of the problems are individually fixable, but it all boils down to:
+better just revert it, and re-do it from scratch.
+
+Cc: David Howells <dhowells@redhat.com>
+Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
+Cc: Paul Mackerras <paulus@samba.org>
+Cc: Andrew Morton <akpm@osdl.org>
+Cc: David Woodhouse <dwmw2@infradead.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ include/asm-generic/page.h | 38 ++++----------------------------------
+ 1 file changed, 4 insertions(+), 34 deletions(-)
+
+--- linux-2.6.20.1.orig/include/asm-generic/page.h
++++ linux-2.6.20.1/include/asm-generic/page.h
+@@ -4,51 +4,21 @@
+ #ifdef __KERNEL__
+ #ifndef __ASSEMBLY__
+
+-#include <linux/log2.h>
++#include <linux/compiler.h>
+
+-/*
+- * non-const pure 2^n version of get_order
+- * - the arch may override these in asm/bitops.h if they can be implemented
+- * more efficiently than using the arch log2 routines
+- * - we use the non-const log2() instead if the arch has defined one suitable
+- */
+-#ifndef ARCH_HAS_GET_ORDER
+-static inline __attribute__((const))
+-int __get_order(unsigned long size, int page_shift)
++/* Pure 2^n version of get_order */
++static __inline__ __attribute_const__ int get_order(unsigned long size)
+ {
+-#if BITS_PER_LONG == 32 && defined(ARCH_HAS_ILOG2_U32)
+- int order = __ilog2_u32(size) - page_shift;
+- return order >= 0 ? order : 0;
+-#elif BITS_PER_LONG == 64 && defined(ARCH_HAS_ILOG2_U64)
+- int order = __ilog2_u64(size) - page_shift;
+- return order >= 0 ? order : 0;
+-#else
+ int order;
+
+- size = (size - 1) >> (page_shift - 1);
++ size = (size - 1) >> (PAGE_SHIFT - 1);
+ order = -1;
+ do {
+ size >>= 1;
+ order++;
+ } while (size);
+ return order;
+-#endif
+ }
+-#endif
+-
+-/**
+- * get_order - calculate log2(pages) to hold a block of the specified size
+- * @n - size
+- *
+- * calculate allocation order based on the current page size
+- * - this can be used to initialise global variables from constant data
+- */
+-#define get_order(n) \
+-( \
+- __builtin_constant_p(n) ? \
+- ((n < (1UL << PAGE_SHIFT)) ? 0 : ilog2(n) - PAGE_SHIFT) : \
+- __get_order(n, PAGE_SHIFT) \
+- )
+
+ #endif /* __ASSEMBLY__ */
+ #endif /* __KERNEL__ */
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:20 2007
+Message-Id: <20070307170620.661548421@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:02:42 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ neilb@suse.de,
+ kas@fi.muni.cz,
+ Trond.Myklebust@netapp.com
+Subject: [patch 079/101] RPM: fix double free in portmapper code
+Content-Disposition: inline; filename=rpm-fix-double-free-in-portmapper-code.patch
+Content-Length: 1267
+Lines: 49
+
+
+From: Trond Myklebust <Trond.Myklebust@netapp.com>
+
+rpc_run_task is guaranteed to always call ->rpc_release.
+
+Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
+Cc: Neil Brown <neilb@suse.de>
+Cc: Jan "Yenya" Kasprzak <kas@fi.muni.cz>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+
+---
+ net/sunrpc/pmap_clnt.c | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+--- linux-2.6.20.1.orig/net/sunrpc/pmap_clnt.c
++++ linux-2.6.20.1/net/sunrpc/pmap_clnt.c
+@@ -62,7 +62,10 @@ static inline void pmap_map_free(struct
+
+ static void pmap_map_release(void *data)
+ {
+- pmap_map_free(data);
++ struct portmap_args *map = data;
++
++ xprt_put(map->pm_xprt);
++ pmap_map_free(map);
+ }
+
+ static const struct rpc_call_ops pmap_getport_ops = {
+@@ -133,7 +136,7 @@ void rpc_getport(struct rpc_task *task)
+ status = -EIO;
+ child = rpc_run_task(pmap_clnt, RPC_TASK_ASYNC, &pmap_getport_ops, map);
+ if (IS_ERR(child))
+- goto bailout;
++ goto bailout_nofree;
+ rpc_put_task(child);
+
+ task->tk_xprt->stat.bind_count++;
+@@ -222,7 +225,6 @@ static void pmap_getport_done(struct rpc
+ child->tk_pid, status, map->pm_port);
+
+ pmap_wake_portmap_waiters(xprt, status);
+- xprt_put(xprt);
+ }
+
+ /**
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:20 2007
+Message-Id: <20070307170620.790452477@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:02:43 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ neilb@suse.de,
+ kas@fi.muni.cz,
+ Trond.Myklebust@netapp.com,
+ Andrew Morton <akpm@osdl.org>
+Subject: [patch 080/101] NLM: Fix double free in __nlm_async_call
+Content-Disposition: inline; filename=nlm-fix-double-free-in-__nlm_async_call.patch
+Content-Length: 1813
+Lines: 60
+
+
+From: Trond Myklebust <Trond.Myklebust@netapp.com>
+
+rpc_call_async() will always call rpc_release_calldata(), so it is an
+error for __nlm_async_call() to do so as well.
+
+Addresses http://bugzilla.kernel.org/show_bug.cgi?id=7923
+
+Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
+Cc: Jan "Yenya" Kasprzak <kas@fi.muni.cz>
+Cc: Neil Brown <neilb@suse.de>
+Signed-off-by: Andrew Morton <akpm@osdl.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ fs/lockd/clntproc.c | 9 +++------
+ fs/lockd/svclock.c | 4 +---
+ 2 files changed, 4 insertions(+), 9 deletions(-)
+
+--- linux-2.6.20.1.orig/fs/lockd/clntproc.c
++++ linux-2.6.20.1/fs/lockd/clntproc.c
+@@ -361,7 +361,6 @@ static int __nlm_async_call(struct nlm_r
+ {
+ struct nlm_host *host = req->a_host;
+ struct rpc_clnt *clnt;
+- int status = -ENOLCK;
+
+ dprintk("lockd: call procedure %d on %s (async)\n",
+ (int)proc, host->h_name);
+@@ -373,12 +372,10 @@ static int __nlm_async_call(struct nlm_r
+ msg->rpc_proc = &clnt->cl_procinfo[proc];
+
+ /* bootstrap and kick off the async RPC call */
+- status = rpc_call_async(clnt, msg, RPC_TASK_ASYNC, tk_ops, req);
+- if (status == 0)
+- return 0;
++ return rpc_call_async(clnt, msg, RPC_TASK_ASYNC, tk_ops, req);
+ out_err:
+- nlm_release_call(req);
+- return status;
++ tk_ops->rpc_release(req);
++ return -ENOLCK;
+ }
+
+ int nlm_async_call(struct nlm_rqst *req, u32 proc, const struct rpc_call_ops *tk_ops)
+--- linux-2.6.20.1.orig/fs/lockd/svclock.c
++++ linux-2.6.20.1/fs/lockd/svclock.c
+@@ -593,9 +593,7 @@ callback:
+
+ /* Call the client */
+ kref_get(&block->b_count);
+- if (nlm_async_call(block->b_call, NLMPROC_GRANTED_MSG,
+- &nlmsvc_grant_ops) < 0)
+- nlmsvc_release_block(block);
++ nlm_async_call(block->b_call, NLMPROC_GRANTED_MSG, &nlmsvc_grant_ops);
+ }
+
+ /*
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:21 2007
+Message-Id: <20070307170620.923082146@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:02:44 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org,
+ tony.luck@intel.com
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ linux-ia64@vger.kernel.org,
+ jlan@sgi.com,
+ magnus@valinux.co.jp,
+ horms@verge.net.au
+Subject: [patch 081/101] kexec: Fix CONFIG_SMP=n compilation V2 (ia64)
+Content-Disposition: inline; filename=kexec-fix-config_smp-n-compilation-v2.patch
+Content-Length: 2544
+Lines: 87
+
+
+From: Magnus Damm <magnus@valinux.co.jp>
+
+Kexec support for 2.6.20 on ia64 does not build properly using a config
+made up by CONFIG_SMP=n and CONFIG_HOTPLUG_CPU=n:
+
+ CC arch/ia64/kernel/machine_kexec.o
+arch/ia64/kernel/machine_kexec.c: In function `machine_shutdown':
+arch/ia64/kernel/machine_kexec.c:77: warning: implicit declaration of function `cpu_down'
+ AS arch/ia64/kernel/relocate_kernel.o
+ CC arch/ia64/kernel/crash.o
+arch/ia64/kernel/crash.c: In function `kdump_cpu_freeze':
+arch/ia64/kernel/crash.c:139: warning: implicit declaration of function `ia64_jump_to_sal'
+arch/ia64/kernel/crash.c:139: error: `sal_boot_rendez_state' undeclared (first use in this function)
+arch/ia64/kernel/crash.c:139: error: (Each undeclared identifier is reported only once
+arch/ia64/kernel/crash.c:139: error: for each function it appears in.)
+arch/ia64/kernel/crash.c: At top level:
+arch/ia64/kernel/crash.c:84: warning: 'kdump_wait_cpu_freeze' defined but not used
+make[1]: *** [arch/ia64/kernel/crash.o] Error 1
+make: *** [arch/ia64/kernel] Error 2
+
+Signed-off-by: Magnus Damm <magnus@valinux.co.jp>
+Acked-by: Simon Horman <horms@verge.net.au>
+Acked-by: Jay Lan <jlan@sgi.com>
+Cc: Tony Luck <tony.luck@intel.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/ia64/kernel/crash.c | 11 +++++++----
+ arch/ia64/kernel/machine_kexec.c | 2 ++
+ 2 files changed, 9 insertions(+), 4 deletions(-)
+
+--- linux-2.6.20.1.orig/arch/ia64/kernel/crash.c
++++ linux-2.6.20.1/arch/ia64/kernel/crash.c
+@@ -79,6 +79,7 @@ crash_save_this_cpu()
+ final_note(buf);
+ }
+
++#ifdef CONFIG_SMP
+ static int
+ kdump_wait_cpu_freeze(void)
+ {
+@@ -91,6 +92,7 @@ kdump_wait_cpu_freeze(void)
+ }
+ return 1;
+ }
++#endif
+
+ void
+ machine_crash_shutdown(struct pt_regs *pt)
+@@ -132,11 +134,12 @@ kdump_cpu_freeze(struct unw_frame_info *
+ atomic_inc(&kdump_cpu_freezed);
+ kdump_status[cpuid] = 1;
+ mb();
+- if (cpuid == 0) {
+- for (;;)
+- cpu_relax();
+- } else
++#ifdef CONFIG_HOTPLUG_CPU
++ if (cpuid != 0)
+ ia64_jump_to_sal(&sal_boot_rendez_state[cpuid]);
++#endif
++ for (;;)
++ cpu_relax();
+ }
+
+ static int
+--- linux-2.6.20.1.orig/arch/ia64/kernel/machine_kexec.c
++++ linux-2.6.20.1/arch/ia64/kernel/machine_kexec.c
+@@ -70,12 +70,14 @@ void machine_kexec_cleanup(struct kimage
+
+ void machine_shutdown(void)
+ {
++#ifdef CONFIG_HOTPLUG_CPU
+ int cpu;
+
+ for_each_online_cpu(cpu) {
+ if (cpu != smp_processor_id())
+ cpu_down(cpu);
+ }
++#endif
+ kexec_disable_iosapic();
+ }
+
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:21 2007
+Message-Id: <20070307170621.054565300@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:02:45 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org,
+ ak@suse.de
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ zwane@infradead.org
+Subject: [patch 082/101] Fix MTRR compat ioctl
+Content-Disposition: inline; filename=fix-mtrr-compat-ioctl.patch
+Content-Length: 3099
+Lines: 98
+
+
+From: Zwane Mwaikambo <zwane@infradead.org>
+
+The MTRR compat code wasn't calling the lowlevel MTRR setup due to a switch
+block not handling the compat case.
+
+Before:
+(WW) I810(0): Failed to set up write-combining range (0xd0000000,0x10000000)
+
+After:
+reg00: base=0x00000000 ( 0MB), size=1024MB: write-back, count=1
+reg01: base=0x40000000 (1024MB), size= 512MB: write-back, count=1
+reg02: base=0x5f700000 (1527MB), size= 1MB: uncachable, count=1
+reg03: base=0x5f800000 (1528MB), size= 8MB: uncachable, count=1
+reg04: base=0xd0000000 (3328MB), size= 256MB: write-combining, count=1
+
+Signed-off-by: Zwane Mwaikambo <zwane@infradead.org>
+Cc: Andi Kleen <ak@suse.de>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/i386/kernel/cpu/mtrr/if.c | 33 +++++++++++++++++++++------------
+ 1 file changed, 21 insertions(+), 12 deletions(-)
+
+--- linux-2.6.20.1.orig/arch/i386/kernel/cpu/mtrr/if.c
++++ linux-2.6.20.1/arch/i386/kernel/cpu/mtrr/if.c
+@@ -158,8 +158,9 @@ mtrr_ioctl(struct file *file, unsigned i
+ struct mtrr_sentry sentry;
+ struct mtrr_gentry gentry;
+ void __user *arg = (void __user *) __arg;
++ unsigned int compat_cmd = cmd;
+
+- switch (cmd) {
++ switch (compat_cmd) {
+ case MTRRIOC_ADD_ENTRY:
+ case MTRRIOC_SET_ENTRY:
+ case MTRRIOC_DEL_ENTRY:
+@@ -177,14 +178,20 @@ mtrr_ioctl(struct file *file, unsigned i
+ return -EFAULT;
+ break;
+ #ifdef CONFIG_COMPAT
+- case MTRRIOC32_ADD_ENTRY:
+- case MTRRIOC32_SET_ENTRY:
+- case MTRRIOC32_DEL_ENTRY:
+- case MTRRIOC32_KILL_ENTRY:
+- case MTRRIOC32_ADD_PAGE_ENTRY:
+- case MTRRIOC32_SET_PAGE_ENTRY:
+- case MTRRIOC32_DEL_PAGE_ENTRY:
+- case MTRRIOC32_KILL_PAGE_ENTRY: {
++#define MTRR_COMPAT_OP(op, type)\
++ case MTRRIOC32_##op: \
++ cmd = MTRRIOC_##op; \
++ goto compat_get_##type
++
++ MTRR_COMPAT_OP(ADD_ENTRY, sentry);
++ MTRR_COMPAT_OP(SET_ENTRY, sentry);
++ MTRR_COMPAT_OP(DEL_ENTRY, sentry);
++ MTRR_COMPAT_OP(KILL_ENTRY, sentry);
++ MTRR_COMPAT_OP(ADD_PAGE_ENTRY, sentry);
++ MTRR_COMPAT_OP(SET_PAGE_ENTRY, sentry);
++ MTRR_COMPAT_OP(DEL_PAGE_ENTRY, sentry);
++ MTRR_COMPAT_OP(KILL_PAGE_ENTRY, sentry);
++compat_get_sentry: {
+ struct mtrr_sentry32 __user *s32 = (struct mtrr_sentry32 __user *)__arg;
+ err = get_user(sentry.base, &s32->base);
+ err |= get_user(sentry.size, &s32->size);
+@@ -193,8 +200,9 @@ mtrr_ioctl(struct file *file, unsigned i
+ return err;
+ break;
+ }
+- case MTRRIOC32_GET_ENTRY:
+- case MTRRIOC32_GET_PAGE_ENTRY: {
++ MTRR_COMPAT_OP(GET_ENTRY, gentry);
++ MTRR_COMPAT_OP(GET_PAGE_ENTRY, gentry);
++compat_get_gentry: {
+ struct mtrr_gentry32 __user *g32 = (struct mtrr_gentry32 __user *)__arg;
+ err = get_user(gentry.regnum, &g32->regnum);
+ err |= get_user(gentry.base, &g32->base);
+@@ -204,6 +212,7 @@ mtrr_ioctl(struct file *file, unsigned i
+ return err;
+ break;
+ }
++#undef MTRR_COMPAT_OP
+ #endif
+ }
+
+@@ -287,7 +296,7 @@ mtrr_ioctl(struct file *file, unsigned i
+ if (err)
+ return err;
+
+- switch(cmd) {
++ switch(compat_cmd) {
+ case MTRRIOC_GET_ENTRY:
+ case MTRRIOC_GET_PAGE_ENTRY:
+ if (copy_to_user(arg, &gentry, sizeof gentry))
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:21 2007
+Message-Id: <20070307170621.183753192@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:02:46 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org,
+ torvalds@linux-foundation.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ dushistov@mail.ru
+Subject: [patch 083/101] ufs: restore back support of openstep
+Content-Disposition: inline; filename=ufs-restore-back-support-of-openstep.patch
+Content-Length: 6248
+Lines: 170
+
+
+From: Evgeniy Dushistov <dushistov@mail.ru>
+
+This is a fix of regression, which triggered by ~2.6.16.
+
+Patch with name ufs-directory-and-page-cache-from-blocks-to-pages.patch: in
+additional to conversation from block to page cache mechanism added new
+checks of directory integrity, one of them that directory entry do not
+across directory chunks.
+
+But some kinds of UFS: OpenStep UFS and Apple UFS (looks like these are the
+same filesystems) have different directory chunk size, then common
+UFSes(BSD and Solaris UFS).
+
+So this patch adds ability to works with variable size of directory chunks,
+and set it for ufstype=openstep to right size.
+
+Tested on darwin ufs.
+
+Signed-off-by: Evgeniy Dushistov <dushistov@mail.ru>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ fs/ufs/dir.c | 21 ++++++++++++---------
+ fs/ufs/super.c | 5 ++++-
+ include/linux/ufs_fs.h | 1 +
+ 3 files changed, 17 insertions(+), 10 deletions(-)
+
+--- linux-2.6.20.1.orig/fs/ufs/dir.c
++++ linux-2.6.20.1/fs/ufs/dir.c
+@@ -106,12 +106,13 @@ static void ufs_check_page(struct page *
+ char *kaddr = page_address(page);
+ unsigned offs, rec_len;
+ unsigned limit = PAGE_CACHE_SIZE;
++ const unsigned chunk_mask = UFS_SB(sb)->s_uspi->s_dirblksize - 1;
+ struct ufs_dir_entry *p;
+ char *error;
+
+ if ((dir->i_size >> PAGE_CACHE_SHIFT) == page->index) {
+ limit = dir->i_size & ~PAGE_CACHE_MASK;
+- if (limit & (UFS_SECTOR_SIZE - 1))
++ if (limit & chunk_mask)
+ goto Ebadsize;
+ if (!limit)
+ goto out;
+@@ -126,7 +127,7 @@ static void ufs_check_page(struct page *
+ goto Ealign;
+ if (rec_len < UFS_DIR_REC_LEN(ufs_get_de_namlen(sb, p)))
+ goto Enamelen;
+- if (((offs + rec_len - 1) ^ offs) & ~(UFS_SECTOR_SIZE-1))
++ if (((offs + rec_len - 1) ^ offs) & ~chunk_mask)
+ goto Espan;
+ if (fs32_to_cpu(sb, p->d_ino) > (UFS_SB(sb)->s_uspi->s_ipg *
+ UFS_SB(sb)->s_uspi->s_ncg))
+@@ -310,6 +311,7 @@ int ufs_add_link(struct dentry *dentry,
+ int namelen = dentry->d_name.len;
+ struct super_block *sb = dir->i_sb;
+ unsigned reclen = UFS_DIR_REC_LEN(namelen);
++ const unsigned int chunk_size = UFS_SB(sb)->s_uspi->s_dirblksize;
+ unsigned short rec_len, name_len;
+ struct page *page = NULL;
+ struct ufs_dir_entry *de;
+@@ -342,8 +344,8 @@ int ufs_add_link(struct dentry *dentry,
+ if ((char *)de == dir_end) {
+ /* We hit i_size */
+ name_len = 0;
+- rec_len = UFS_SECTOR_SIZE;
+- de->d_reclen = cpu_to_fs16(sb, UFS_SECTOR_SIZE);
++ rec_len = chunk_size;
++ de->d_reclen = cpu_to_fs16(sb, chunk_size);
+ de->d_ino = 0;
+ goto got_it;
+ }
+@@ -431,7 +433,7 @@ ufs_readdir(struct file *filp, void *dir
+ unsigned int offset = pos & ~PAGE_CACHE_MASK;
+ unsigned long n = pos >> PAGE_CACHE_SHIFT;
+ unsigned long npages = ufs_dir_pages(inode);
+- unsigned chunk_mask = ~(UFS_SECTOR_SIZE - 1);
++ unsigned chunk_mask = ~(UFS_SB(sb)->s_uspi->s_dirblksize - 1);
+ int need_revalidate = filp->f_version != inode->i_version;
+ unsigned flags = UFS_SB(sb)->s_flags;
+
+@@ -511,7 +513,7 @@ int ufs_delete_entry(struct inode *inode
+ struct super_block *sb = inode->i_sb;
+ struct address_space *mapping = page->mapping;
+ char *kaddr = page_address(page);
+- unsigned from = ((char*)dir - kaddr) & ~(UFS_SECTOR_SIZE - 1);
++ unsigned from = ((char*)dir - kaddr) & ~(UFS_SB(sb)->s_uspi->s_dirblksize - 1);
+ unsigned to = ((char*)dir - kaddr) + fs16_to_cpu(sb, dir->d_reclen);
+ struct ufs_dir_entry *pde = NULL;
+ struct ufs_dir_entry *de = (struct ufs_dir_entry *) (kaddr + from);
+@@ -556,6 +558,7 @@ int ufs_make_empty(struct inode * inode,
+ struct super_block * sb = dir->i_sb;
+ struct address_space *mapping = inode->i_mapping;
+ struct page *page = grab_cache_page(mapping, 0);
++ const unsigned int chunk_size = UFS_SB(sb)->s_uspi->s_dirblksize;
+ struct ufs_dir_entry * de;
+ char *base;
+ int err;
+@@ -563,7 +566,7 @@ int ufs_make_empty(struct inode * inode,
+ if (!page)
+ return -ENOMEM;
+ kmap(page);
+- err = mapping->a_ops->prepare_write(NULL, page, 0, UFS_SECTOR_SIZE);
++ err = mapping->a_ops->prepare_write(NULL, page, 0, chunk_size);
+ if (err) {
+ unlock_page(page);
+ goto fail;
+@@ -584,11 +587,11 @@ int ufs_make_empty(struct inode * inode,
+ ((char *)de + fs16_to_cpu(sb, de->d_reclen));
+ de->d_ino = cpu_to_fs32(sb, dir->i_ino);
+ ufs_set_de_type(sb, de, dir->i_mode);
+- de->d_reclen = cpu_to_fs16(sb, UFS_SECTOR_SIZE - UFS_DIR_REC_LEN(1));
++ de->d_reclen = cpu_to_fs16(sb, chunk_size - UFS_DIR_REC_LEN(1));
+ ufs_set_de_namlen(sb, de, 2);
+ strcpy (de->d_name, "..");
+
+- err = ufs_commit_chunk(page, 0, UFS_SECTOR_SIZE);
++ err = ufs_commit_chunk(page, 0, chunk_size);
+ fail:
+ kunmap(page);
+ page_cache_release(page);
+--- linux-2.6.20.1.orig/fs/ufs/super.c
++++ linux-2.6.20.1/fs/ufs/super.c
+@@ -649,7 +649,7 @@ static int ufs_fill_super(struct super_b
+ kmalloc (sizeof(struct ufs_sb_private_info), GFP_KERNEL);
+ if (!uspi)
+ goto failed;
+-
++ uspi->s_dirblksize = UFS_SECTOR_SIZE;
+ super_block_offset=UFS_SBLOCK;
+
+ /* Keep 2Gig file limit. Some UFS variants need to override
+@@ -718,6 +718,7 @@ static int ufs_fill_super(struct super_b
+ break;
+
+ case UFS_MOUNT_UFSTYPE_NEXTSTEP:
++ /*TODO: check may be we need set special dir block size?*/
+ UFSD("ufstype=nextstep\n");
+ uspi->s_fsize = block_size = 1024;
+ uspi->s_fmask = ~(1024 - 1);
+@@ -733,6 +734,7 @@ static int ufs_fill_super(struct super_b
+ break;
+
+ case UFS_MOUNT_UFSTYPE_NEXTSTEP_CD:
++ /*TODO: check may be we need set special dir block size?*/
+ UFSD("ufstype=nextstep-cd\n");
+ uspi->s_fsize = block_size = 2048;
+ uspi->s_fmask = ~(2048 - 1);
+@@ -754,6 +756,7 @@ static int ufs_fill_super(struct super_b
+ uspi->s_fshift = 10;
+ uspi->s_sbsize = super_block_size = 2048;
+ uspi->s_sbbase = 0;
++ uspi->s_dirblksize = 1024;
+ flags |= UFS_DE_44BSD | UFS_UID_44BSD | UFS_ST_44BSD | UFS_CG_44BSD;
+ if (!(sb->s_flags & MS_RDONLY)) {
+ if (!silent)
+--- linux-2.6.20.1.orig/include/linux/ufs_fs.h
++++ linux-2.6.20.1/include/linux/ufs_fs.h
+@@ -789,6 +789,7 @@ struct ufs_sb_private_info {
+
+ __u32 s_maxsymlinklen;/* upper limit on fast symlinks' size */
+ __s32 fs_magic; /* filesystem magic */
++ unsigned int s_dirblksize;
+ };
+
+ /*
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:21 2007
+Message-Id: <20070307170621.310911775@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:02:47 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org,
+ torvalds@linux-foundation.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ ericvh@gmail.com,
+ bunk@stusta.de
+Subject: [patch 084/101] v9fs_vfs_mkdir(): fix a double free
+Content-Disposition: inline; filename=v9fs_vfs_mkdir-fix-a-double-free.patch
+Content-Length: 925
+Lines: 40
+
+
+From: Adrian Bunk <bunk@stusta.de>
+
+Fix a double free of "dfid" introduced by commit
+da977b2c7eb4d6312f063a7b486f2aad99809710 and spotted by the Coverity
+checker.
+
+Signed-off-by: Adrian Bunk <bunk@stusta.de>
+Cc: Eric Van Hensbergen <ericvh@gmail.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+---
+
+ fs/9p/vfs_inode.c | 7 ++-----
+ 1 file changed, 2 insertions(+), 5 deletions(-)
+
+--- linux-2.6.20.1.orig/fs/9p/vfs_inode.c
++++ linux-2.6.20.1/fs/9p/vfs_inode.c
+@@ -585,17 +585,14 @@ static int v9fs_vfs_mkdir(struct inode *
+ if (IS_ERR(inode)) {
+ err = PTR_ERR(inode);
+ inode = NULL;
+- goto clean_up_fids;
++ v9fs_fid_destroy(vfid);
++ goto error;
+ }
+
+ dentry->d_op = &v9fs_dentry_operations;
+ d_instantiate(dentry, inode);
+ return 0;
+
+-clean_up_fids:
+- if (vfid)
+- v9fs_fid_destroy(vfid);
+-
+ clean_up_dfid:
+ v9fs_fid_clunk(v9ses, dfid);
+
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:21 2007
+Message-Id: <20070307170621.437614156@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:02:48 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org,
+ torvalds@linux-foundation.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ kernel@nn7.de,
+ benh@kernel.crashing.org,
+ paulus@samba.org,
+ dtor@mail.ru
+Subject: [patch 085/101] enable mouse button 2+3 emulation for x86 macs
+Content-Disposition: inline; filename=enable-mouse-button-2-3-emulation-for-x86-macs.patch
+Content-Length: 1359
+Lines: 43
+
+
+From: Soeren Sonnenburg <kernel@nn7.de>
+
+As macbook/macbook pro's also have to live with a single mouse button the
+following patch just enables the Macintosh device drivers menu in Kconfig +
+adds the macintosh dir to the obj-* to make macbook* users happy (who use
+exactly that since months....
+
+Signed-off-by: Soeren Sonnenburg <kernel@nn7.de>
+Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
+Cc: Paul Mackerras <paulus@samba.org>
+Cc: Dmitry Torokhov <dtor@mail.ru>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/Makefile | 2 +-
+ drivers/macintosh/Kconfig | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+--- linux-2.6.20.1.orig/drivers/Makefile
++++ linux-2.6.20.1/drivers/Makefile
+@@ -30,7 +30,7 @@ obj-$(CONFIG_PARPORT) += parport/
+ obj-y += base/ block/ misc/ mfd/ net/ media/
+ obj-$(CONFIG_NUBUS) += nubus/
+ obj-$(CONFIG_ATM) += atm/
+-obj-$(CONFIG_PPC_PMAC) += macintosh/
++obj-y += macintosh/
+ obj-$(CONFIG_IDE) += ide/
+ obj-$(CONFIG_FC4) += fc4/
+ obj-$(CONFIG_SCSI) += scsi/
+--- linux-2.6.20.1.orig/drivers/macintosh/Kconfig
++++ linux-2.6.20.1/drivers/macintosh/Kconfig
+@@ -1,6 +1,6 @@
+
+ menu "Macintosh device drivers"
+- depends on PPC || MAC
++ depends on PPC || MAC || X86
+
+ config ADB
+ bool "Apple Desktop Bus (ADB) support"
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:21 2007
+Message-Id: <20070307170621.566654263@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:02:49 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org,
+ torvalds@linux-foundation.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ nish.aravamudan@gmail.com,
+ wli@holomorphy.com,
+ kenchen@google.com,
+ agl@us.ibm.com,
+ hugh@veritas.com,
+ david@gibson.dropbear.id.au,
+ William Irwin <bill.irwin@oracle.com>
+Subject: [patch 086/101] hugetlb: preserve hugetlb pte dirty state
+Content-Disposition: inline; filename=hugetlb-preserve-hugetlb-pte-dirty-state.patch
+Content-Length: 1964
+Lines: 62
+
+
+From: "Ken Chen" <kenchen@google.com>
+
+__unmap_hugepage_range() is buggy that it does not preserve dirty state of
+huge_pte when unmapping hugepage range. It causes data corruption in the
+event of dop_caches being used by sys admin. For example, an application
+creates a hugetlb file, modify pages, then unmap it. While leaving the
+hugetlb file alive, comes along sys admin doing a "echo 3 >
+/proc/sys/vm/drop_caches".
+
+drop_pagecache_sb() will happily free all pages that aren't marked dirty if
+there are no active mapping. Later when application remaps the hugetlb
+file back and all data are gone, triggering catastrophic flip over on
+application.
+
+Not only that, the internal resv_huge_pages count will also get all messed
+up. Fix it up by marking page dirty appropriately.
+
+Signed-off-by: Ken Chen <kenchen@google.com>
+Cc: "Nish Aravamudan" <nish.aravamudan@gmail.com>
+Cc: Adam Litke <agl@us.ibm.com>
+Cc: David Gibson <david@gibson.dropbear.id.au>
+Acked-by: William Irwin <bill.irwin@oracle.com>
+Cc: Hugh Dickins <hugh@veritas.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ fs/hugetlbfs/inode.c | 5 ++++-
+ mm/hugetlb.c | 2 ++
+ 2 files changed, 6 insertions(+), 1 deletion(-)
+
+--- linux-2.6.20.1.orig/fs/hugetlbfs/inode.c
++++ linux-2.6.20.1/fs/hugetlbfs/inode.c
+@@ -449,10 +449,13 @@ static int hugetlbfs_symlink(struct inod
+ }
+
+ /*
+- * For direct-IO reads into hugetlb pages
++ * mark the head page dirty
+ */
+ static int hugetlbfs_set_page_dirty(struct page *page)
+ {
++ struct page *head = (struct page *)page_private(page);
++
++ SetPageDirty(head);
+ return 0;
+ }
+
+--- linux-2.6.20.1.orig/mm/hugetlb.c
++++ linux-2.6.20.1/mm/hugetlb.c
+@@ -389,6 +389,8 @@ void __unmap_hugepage_range(struct vm_ar
+ continue;
+
+ page = pte_page(pte);
++ if (pte_dirty(pte))
++ set_page_dirty(page);
+ list_add(&page->lru, &page_list);
+ }
+ spin_unlock(&mm->page_table_lock);
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:21 2007
+Message-Id: <20070307170621.695130332@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:02:50 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org,
+ torvalds@linux-foundation.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ takata@linux-m32r.org
+Subject: [patch 087/101] m32r: build fix for processors without ISA_DSP_LEVEL2
+Content-Disposition: inline; filename=m32r-build-fix-for-processors-without-isa_dsp_level2.patch
+Content-Length: 2057
+Lines: 74
+
+
+From: Hirokazu Takata <takata@linux-m32r.org>
+
+Additional fixes for processors without ISA_DSP_LEVEL2. sigcontext_t does not
+have dummy_acc1h, dummy_acc1l members any longer.
+
+Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/m32r/kernel/process.c | 2 +-
+ arch/m32r/kernel/signal.c | 26 ++++----------------------
+ 2 files changed, 5 insertions(+), 23 deletions(-)
+
+--- linux-2.6.20.1.orig/arch/m32r/kernel/process.c
++++ linux-2.6.20.1/arch/m32r/kernel/process.c
+@@ -174,7 +174,7 @@ void show_regs(struct pt_regs * regs)
+ regs->acc1h, regs->acc1l);
+ #elif defined(CONFIG_ISA_M32R2) || defined(CONFIG_ISA_M32R)
+ printk("ACCH[%08lx]:ACCL[%08lx]\n", \
+- regs->acch, regs->accl);
++ regs->acc0h, regs->acc0l);
+ #else
+ #error unknown isa configuration
+ #endif
+--- linux-2.6.20.1.orig/arch/m32r/kernel/signal.c
++++ linux-2.6.20.1/arch/m32r/kernel/signal.c
+@@ -109,19 +109,10 @@ restore_sigcontext(struct pt_regs *regs,
+ COPY(r10);
+ COPY(r11);
+ COPY(r12);
+-#if defined(CONFIG_ISA_M32R2) && defined(CONFIG_ISA_DSP_LEVEL2)
+ COPY(acc0h);
+ COPY(acc0l);
+- COPY(acc1h);
+- COPY(acc1l);
+-#elif defined(CONFIG_ISA_M32R2) || defined(CONFIG_ISA_M32R)
+- COPY(acch);
+- COPY(accl);
+- COPY(dummy_acc1h);
+- COPY(dummy_acc1l);
+-#else
+-#error unknown isa configuration
+-#endif
++ COPY(acc1h); /* ISA_DSP_LEVEL2 only */
++ COPY(acc1l); /* ISA_DSP_LEVEL2 only */
+ COPY(psw);
+ COPY(bpc);
+ COPY(bbpsw);
+@@ -196,19 +187,10 @@ setup_sigcontext(struct sigcontext __use
+ COPY(r10);
+ COPY(r11);
+ COPY(r12);
+-#if defined(CONFIG_ISA_M32R2) && defined(CONFIG_ISA_DSP_LEVEL2)
+ COPY(acc0h);
+ COPY(acc0l);
+- COPY(acc1h);
+- COPY(acc1l);
+-#elif defined(CONFIG_ISA_M32R2) || defined(CONFIG_ISA_M32R)
+- COPY(acch);
+- COPY(accl);
+- COPY(dummy_acc1h);
+- COPY(dummy_acc1l);
+-#else
+-#error unknown isa configuration
+-#endif
++ COPY(acc1h); /* ISA_DSP_LEVEL2 only */
++ COPY(acc1l); /* ISA_DSP_LEVEL2 only */
+ COPY(psw);
+ COPY(bpc);
+ COPY(bbpsw);
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:21 2007
+Message-Id: <20070307170621.823076167@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:02:51 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org,
+ torvalds@linux-foundation.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ mathieu.desnoyers@polymtl.ca,
+ zippel@linux-m68k.org,
+ tglx@linutronix.de,
+ mingo@elte.hu
+Subject: [patch 088/101] kernel/time/clocksource.c needs struct task_struct on m68k
+Content-Disposition: inline; filename=kernel-time-clocksource.c-needs-struct-task_struct-on-m68k.patch
+Content-Length: 1265
+Lines: 35
+
+
+From: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
+
+kernel/time/clocksource.c needs struct task_struct on m68k.
+
+Because it uses spin_unlock_irq(), which, on m68k, uses hardirq_count(), which
+uses preempt_count(), which needs to dereference struct task_struct, we
+have to include sched.h. Because it would cause a loop inclusion, we
+cannot include sched.h in any other of asm-m68k/system.h,
+linux/thread_info.h, linux/hardirq.h, which leaves this ugly include in
+a C file as the only simple solution.
+
+Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
+Cc: Ingo Molnar <mingo@elte.hu>
+Cc: Roman Zippel <zippel@linux-m68k.org>
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ kernel/time/clocksource.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- linux-2.6.20.1.orig/kernel/time/clocksource.c
++++ linux-2.6.20.1/kernel/time/clocksource.c
+@@ -28,6 +28,7 @@
+ #include <linux/sysdev.h>
+ #include <linux/init.h>
+ #include <linux/module.h>
++#include <linux/sched.h> /* for spin_unlock_irq() using preempt_count() m68k */
+
+ /* XXX - Would like a better way for initializing curr_clocksource */
+ extern struct clocksource clocksource_jiffies;
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:22 2007
+Message-Id: <20070307170621.954689785@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:02:52 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org,
+ torvalds@linux-foundation.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ npiggin@suse.de,
+ cmm@us.ibm.com
+Subject: [patch 089/101] buffer: memorder fix
+Content-Disposition: inline; filename=buffer-memorder-fix.patch
+Content-Length: 2273
+Lines: 61
+
+
+From: Nick Piggin <npiggin@suse.de>
+
+unlock_buffer(), like unlock_page(), must not clear the lock without
+ensuring that the critical section is closed.
+
+
+Mingming later sent the same patch, saying:
+
+We are running SDET benchmark and saw double free issue for ext3 extended
+attributes block, which complains the same xattr block already being freed (in
+ext3_xattr_release_block()). The problem could also been triggered by
+multiple threads loop untar/rm a kernel tree.
+
+The race is caused by missing a memory barrier at unlock_buffer() before the
+lock bit being cleared, resulting in possible concurrent h_refcounter update.
+That causes a reference counter leak, then later leads to the double free that
+we have seen.
+
+Inside unlock_buffer(), there is a memory barrier is placed *after* the lock
+bit is being cleared, however, there is no memory barrier *before* the bit is
+cleared. On some arch the h_refcount update instruction and the clear bit
+instruction could be reordered, thus leave the critical section re-entered.
+
+The race is like this: For example, if the h_refcount is initialized as 1,
+
+cpu 0: cpu1
+-------------------------------------- -----------------------------------
+lock_buffer() /* test_and_set_bit */
+clear_buffer_locked(bh);
+ lock_buffer() /* test_and_set_bit */
+h_refcount = h_refcount+1; /* = 2*/ h_refcount = h_refcount + 1; /*= 2 */
+ clear_buffer_locked(bh);
+.... ......
+
+
+We lost a h_refcount here. We need a memory barrier before the buffer head
+lock bit being cleared to force the order of the two writes. Please apply.
+
+
+Signed-off-by: Nick Piggin <npiggin@suse.de>
+Cc: Mingming Cao <cmm@us.ibm.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ fs/buffer.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- linux-2.6.20.1.orig/fs/buffer.c
++++ linux-2.6.20.1/fs/buffer.c
+@@ -78,6 +78,7 @@ EXPORT_SYMBOL(__lock_buffer);
+
+ void fastcall unlock_buffer(struct buffer_head *bh)
+ {
++ smp_mb__before_clear_bit();
+ clear_buffer_locked(bh);
+ smp_mb__after_clear_bit();
+ wake_up_bit(&bh->b_state, BH_Lock);
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:22 2007
+Message-Id: <20070307170622.080652128@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:02:53 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org,
+ torvalds@linux-foundation.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ jirislaby@gmail.com
+Subject: [patch 090/101] Char: specialix, isr have 2 params
+Content-Disposition: inline; filename=char-specialix-isr-have-2-params.patch
+Content-Length: 833
+Lines: 29
+
+
+From: Jiri Slaby <jirislaby@gmail.com>
+
+specialix, isr have 2 params
+
+pt_regs are no longer the third parameter of isr, call sx_interrupt without
+it.
+
+Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+---
+
+ drivers/char/specialix.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- linux-2.6.20.1.orig/drivers/char/specialix.c
++++ linux-2.6.20.1/drivers/char/specialix.c
+@@ -459,7 +459,7 @@ void missed_irq (unsigned long data)
+ if (irq) {
+ printk (KERN_INFO "Missed interrupt... Calling int from timer. \n");
+ sx_interrupt (((struct specialix_board *)data)->irq,
+- (void*)data, NULL);
++ (void*)data);
+ }
+ missed_irq_timer.expires = jiffies + sx_poll;
+ add_timer (&missed_irq_timer);
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:22 2007
+Message-Id: <20070307170622.234811901@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:02:54 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org,
+ torvalds@linux-foundation.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ schwidefsky@de.ibm.com,
+ heiko.carstens@de.ibm.com,
+ mingo@elte.hu
+Subject: [patch 091/101] lockdep: forward declare struct task_struct
+Content-Disposition: inline; filename=lockdep-forward-declare-struct-task_struct.patch
+Content-Length: 947
+Lines: 35
+
+
+From: Heiko Carstens <heiko.carstens@de.ibm.com>
+
+3117df0453828bd045c16244e6f50e5714667a8a causes this:
+
+In file included from arch/s390/kernel/early.c:13:
+include/linux/lockdep.h:300: warning:
+ "struct task_struct" declared inside parameter list
+include/linux/lockdep.h:300:
+ warning: its scope is only this definition or
+ declaration, which is probably not what you want
+
+Acked-by: Ingo Molnar <mingo@elte.hu>
+Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
+Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ include/linux/lockdep.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- linux-2.6.20.1.orig/include/linux/lockdep.h
++++ linux-2.6.20.1/include/linux/lockdep.h
+@@ -8,6 +8,8 @@
+ #ifndef __LINUX_LOCKDEP_H
+ #define __LINUX_LOCKDEP_H
+
++struct task_struct;
++
+ #ifdef CONFIG_LOCKDEP
+
+ #include <linux/linkage.h>
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:22 2007
+Message-Id: <20070307170622.345002132@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:02:55 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org,
+ torvalds@linux-foundation.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ caglar@pardus.org.tr,
+ mingo@elte.hu,
+ avi@qumranet.com
+Subject: [patch 092/101] kvm: Fix asm constraint for lldt instruction
+Content-Disposition: inline; filename=kvm-fix-asm-constraint-for-lldt-instruction.patch
+Content-Length: 700
+Lines: 28
+
+
+From: S.Caglar Onur <caglar@pardus.org.tr>
+
+lldt does not accept immediate operands, which "g" allows.
+
+Signed-off-by: S.Caglar Onur <caglar@pardus.org.tr>
+Signed-off-by: Avi Kivity <avi@qumranet.com>
+Cc: Ingo Molnar <mingo@elte.hu>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/kvm/kvm.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- linux-2.6.20.1.orig/drivers/kvm/kvm.h
++++ linux-2.6.20.1/drivers/kvm/kvm.h
+@@ -558,7 +558,7 @@ static inline void load_gs(u16 sel)
+ #ifndef load_ldt
+ static inline void load_ldt(u16 sel)
+ {
+- asm ("lldt %0" : : "g"(sel));
++ asm ("lldt %0" : : "rm"(sel));
+ }
+ #endif
+
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:22 2007
+Message-Id: <20070307170622.476161502@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:02:56 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org,
+ greg@kroah.com
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ randy.dunlap@oracle.com
+Subject: [patch 093/101] ueagle-atm.c needs sched.h
+Content-Disposition: inline; filename=ueagle-atm.c-needs-sched.h.patch
+Content-Length: 668
+Lines: 26
+
+
+From: Randy Dunlap <randy.dunlap@oracle.com>
+
+Driver needs sched.h for try_to_freeze().
+
+Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
+Cc: Greg KH <greg@kroah.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/atm/ueagle-atm.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- linux-2.6.20.1.orig/drivers/usb/atm/ueagle-atm.c
++++ linux-2.6.20.1/drivers/usb/atm/ueagle-atm.c
+@@ -61,6 +61,7 @@
+ #include <linux/usb.h>
+ #include <linux/firmware.h>
+ #include <linux/ctype.h>
++#include <linux/sched.h>
+ #include <linux/kthread.h>
+ #include <linux/version.h>
+ #include <linux/mutex.h>
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:22 2007
+Message-Id: <20070307170622.606035793@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:02:57 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org,
+ torvalds@linux-foundation.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ sam@ravnborg.org,
+ mingo@elte.hu
+Subject: [patch 094/101] fix section mismatch warning in lockdep
+Content-Disposition: inline; filename=fix-section-mismatch-warning-in-lockdep.patch
+Content-Length: 1334
+Lines: 38
+
+
+From: Sam Ravnborg <sam@ravnborg.org>
+
+lockdep_init() is marked __init but used in several places
+outside __init code. This causes following warnings:
+$ scripts/mod/modpost kernel/lockdep.o
+WARNING: kernel/built-in.o - Section mismatch: reference to .init.text:lockdep_init from .text.lockdep_init_map after 'lockdep_init_map' (at offset 0x105)
+WARNING: kernel/built-in.o - Section mismatch: reference to .init.text:lockdep_init from .text.lockdep_reset_lock after 'lockdep_reset_lock' (at offset 0x35)
+WARNING: kernel/built-in.o - Section mismatch: reference to .init.text:lockdep_init from .text.__lock_acquire after '__lock_acquire' (at offset 0xb2)
+
+The warnings are less obviously due to heavy inlining by gcc - this is not
+altered.
+
+Fix the section mismatch warnings by removing the __init marking, which
+seems obviously wrong.
+
+Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
+Acked-by: Ingo Molnar <mingo@elte.hu>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ kernel/lockdep.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- linux-2.6.20.1.orig/kernel/lockdep.c
++++ linux-2.6.20.1/kernel/lockdep.c
+@@ -2577,7 +2577,7 @@ out_restore:
+ raw_local_irq_restore(flags);
+ }
+
+-void __init lockdep_init(void)
++void lockdep_init(void)
+ {
+ int i;
+
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:22 2007
+Message-Id: <20070307170622.734014034@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:02:58 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org,
+ torvalds@linux-foundation.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ nickpiggin@yahoo.com.au,
+ galak@kernel.crashing.org,
+ zaitcev@redhat.com,
+ hirofumi@mail.parknet.co.jp
+Subject: [patch 095/101] throttle_vm_writeout(): dont loop on GFP_NOFS and GFP_NOIO allocations
+Content-Disposition: inline; filename=throttle_vm_writeout-don-t-loop-on-gfp_nofs-and-gfp_noio-allocations.patch
+Content-Length: 2393
+Lines: 79
+
+
+From: Andrew Morton <akpm@linux-foundation.org>
+
+throttle_vm_writeout() is designed to wait for the dirty levels to subside.
+But if the caller holds IO or FS locks, we might be holding up that writeout.
+
+So change it to take a single nap to give other devices a chance to clean some
+memory, then return.
+
+Cc: Nick Piggin <nickpiggin@yahoo.com.au>
+Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
+Cc: Kumar Gala <galak@kernel.crashing.org>
+Cc: Pete Zaitcev <zaitcev@redhat.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ include/linux/writeback.h | 2 +-
+ mm/page-writeback.c | 13 +++++++++++--
+ mm/vmscan.c | 2 +-
+ 3 files changed, 13 insertions(+), 4 deletions(-)
+
+--- linux-2.6.20.1.orig/include/linux/writeback.h
++++ linux-2.6.20.1/include/linux/writeback.h
+@@ -84,7 +84,7 @@ static inline void wait_on_inode(struct
+ int wakeup_pdflush(long nr_pages);
+ void laptop_io_completion(void);
+ void laptop_sync_completion(void);
+-void throttle_vm_writeout(void);
++void throttle_vm_writeout(gfp_t gfp_mask);
+
+ /* These are exported to sysctl. */
+ extern int dirty_background_ratio;
+--- linux-2.6.20.1.orig/mm/page-writeback.c
++++ linux-2.6.20.1/mm/page-writeback.c
+@@ -296,11 +296,21 @@ void balance_dirty_pages_ratelimited_nr(
+ }
+ EXPORT_SYMBOL(balance_dirty_pages_ratelimited_nr);
+
+-void throttle_vm_writeout(void)
++void throttle_vm_writeout(gfp_t gfp_mask)
+ {
+ long background_thresh;
+ long dirty_thresh;
+
++ if ((gfp_mask & (__GFP_FS|__GFP_IO)) != (__GFP_FS|__GFP_IO)) {
++ /*
++ * The caller might hold locks which can prevent IO completion
++ * or progress in the filesystem. So we cannot just sit here
++ * waiting for IO to complete.
++ */
++ congestion_wait(WRITE, HZ/10);
++ return;
++ }
++
+ for ( ; ; ) {
+ get_dirty_limits(&background_thresh, &dirty_thresh, NULL);
+
+@@ -317,7 +327,6 @@ void throttle_vm_writeout(void)
+ }
+ }
+
+-
+ /*
+ * writeback at least _min_pages, and keep writing until the amount of dirty
+ * memory is less than the background threshold, or until we're all clean.
+--- linux-2.6.20.1.orig/mm/vmscan.c
++++ linux-2.6.20.1/mm/vmscan.c
+@@ -949,7 +949,7 @@ static unsigned long shrink_zone(int pri
+ }
+ }
+
+- throttle_vm_writeout();
++ throttle_vm_writeout(sc->gfp_mask);
+
+ atomic_dec(&zone->reclaim_in_progress);
+ return nr_reclaimed;
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:22 2007
+Message-Id: <20070307170622.863825748@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:02:59 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org,
+ James.Bottomley@steeleye.com
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Achim_Leubner@adaptec.com,
+ joerg@dorchain.net,
+ linux-scsi@vger.kernel.org
+Subject: [patch 096/101] bug in gdth.c crashing machine
+Content-Disposition: inline; filename=bug-in-gdth.c-crashing-machine.patch
+Content-Length: 1185
+Lines: 35
+
+
+From: Joerg Dorchain <joerg@dorchain.net>
+
+Undocumented...
+
+Signed-off-by: Joerg Dorchain <joerg@dorchain.net>
+Acked-by: Achim Leubner <Achim_Leubner@adaptec.com>
+Cc: James Bottomley <James.Bottomley@steeleye.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/scsi/gdth.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- linux-2.6.20.1.orig/drivers/scsi/gdth.c
++++ linux-2.6.20.1/drivers/scsi/gdth.c
+@@ -3092,6 +3092,7 @@ static int gdth_fill_raw_cmd(int hanum,S
+ cmdp->u.raw64.direction =
+ gdth_direction_tab[scp->cmnd[0]]==DOU ? GDTH_DATA_OUT:GDTH_DATA_IN;
+ memcpy(cmdp->u.raw64.cmd,scp->cmnd,16);
++ cmdp->u.raw64.sg_ranz = 0;
+ } else {
+ cmdp->u.raw.reserved = 0;
+ cmdp->u.raw.mdisc_time = 0;
+@@ -3108,6 +3109,7 @@ static int gdth_fill_raw_cmd(int hanum,S
+ cmdp->u.raw.direction =
+ gdth_direction_tab[scp->cmnd[0]]==DOU ? GDTH_DATA_OUT:GDTH_DATA_IN;
+ memcpy(cmdp->u.raw.cmd,scp->cmnd,12);
++ cmdp->u.raw.sg_ranz = 0;
+ }
+
+ if (scp->use_sg) {
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:23 2007
+Message-Id: <20070307170622.998828901@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:03:00 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org,
+ jeff@garzik.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ netdev@vger.kernel.org,
+ thomas@archlinux.org,
+ val_henson@linux.intel.com,
+ samuel.thibault@ens-lyon.org
+Subject: [patch 097/101] revert "drivers/net/tulip/dmfe: support basic carrier detection"
+Content-Disposition: inline; filename=revert-drivers-net-tulip-dmfe-support-basic-carrier-detection.patch
+Content-Length: 2644
+Lines: 78
+
+
+From: Andrew Morton <akpm@linux-foundation.org>
+
+Revert 7628b0a8c01a02966d2228bdf741ddedb128e8f8. Thomas Bachler
+reports:
+
+ Commit 7628b0a8c01a02966d2228bdf741ddedb128e8f8 (drivers/net/tulip/dmfe:
+ support basic carrier detection) breaks networking on my Davicom DM9009.
+ ethtool always reports there is no link. tcpdump shows incoming packets,
+ but TX is disabled. Reverting the above patch fixes the problem.
+
+
+Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>
+Cc: Jeff Garzik <jeff@garzik.org>
+Cc: Valerie Henson <val_henson@linux.intel.com>
+Cc: Thomas Bachler <thomas@archlinux.org>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/net/tulip/dmfe.c | 9 +--------
+ 1 file changed, 1 insertion(+), 8 deletions(-)
+
+--- linux-2.6.20.1.orig/drivers/net/tulip/dmfe.c
++++ linux-2.6.20.1/drivers/net/tulip/dmfe.c
+@@ -187,7 +187,7 @@ struct rx_desc {
+ struct dmfe_board_info {
+ u32 chip_id; /* Chip vendor/Device ID */
+ u32 chip_revision; /* Chip revision */
+- struct DEVICE *dev; /* net device */
++ struct DEVICE *next_dev; /* next device */
+ struct pci_dev *pdev; /* PCI device */
+ spinlock_t lock;
+
+@@ -399,8 +399,6 @@ static int __devinit dmfe_init_one (stru
+ /* Init system & device */
+ db = netdev_priv(dev);
+
+- db->dev = dev;
+-
+ /* Allocate Tx/Rx descriptor memory */
+ db->desc_pool_ptr = pci_alloc_consistent(pdev, sizeof(struct tx_desc) * DESC_ALL_CNT + 0x20, &db->desc_pool_dma_ptr);
+ db->buf_pool_ptr = pci_alloc_consistent(pdev, TX_BUF_ALLOC * TX_DESC_CNT + 4, &db->buf_pool_dma_ptr);
+@@ -428,7 +426,6 @@ static int __devinit dmfe_init_one (stru
+ dev->poll_controller = &poll_dmfe;
+ #endif
+ dev->ethtool_ops = &netdev_ethtool_ops;
+- netif_carrier_off(db->dev);
+ spin_lock_init(&db->lock);
+
+ pci_read_config_dword(pdev, 0x50, &pci_pmr);
+@@ -1053,7 +1050,6 @@ static void netdev_get_drvinfo(struct ne
+
+ static const struct ethtool_ops netdev_ethtool_ops = {
+ .get_drvinfo = netdev_get_drvinfo,
+- .get_link = ethtool_op_get_link,
+ };
+
+ /*
+@@ -1148,7 +1144,6 @@ static void dmfe_timer(unsigned long dat
+ /* Link Failed */
+ DMFE_DBUG(0, "Link Failed", tmp_cr12);
+ db->link_failed = 1;
+- netif_carrier_off(db->dev);
+
+ /* For Force 10/100M Half/Full mode: Enable Auto-Nego mode */
+ /* AUTO or force 1M Homerun/Longrun don't need */
+@@ -1171,8 +1166,6 @@ static void dmfe_timer(unsigned long dat
+ if ( (db->media_mode & DMFE_AUTO) &&
+ dmfe_sense_speed(db) )
+ db->link_failed = 1;
+- else
+- netif_carrier_on(db->dev);
+ dmfe_process_mode(db);
+ /* SHOW_MEDIA_TYPE(db->op_mode); */
+ }
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:23 2007
+Message-Id: <20070307170623.134026493@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:03:01 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ "Antonino A. Daplas" <adaplas@pol.net>,
+ "David S. Miller" <davem@davemloft.net>
+Subject: [patch 098/101] video/aty/mach64_ct.c: fix bogus delay loop
+Content-Disposition: inline; filename=video-aty-mach64_ct.c-fix-bogus-delay-loop.patch
+Content-Length: 1467
+Lines: 45
+
+From: David Miller <davem@davemloft.net>
+
+[PATCH] video/aty/mach64_ct.c: fix bogus delay loop
+
+CT based mach64 cards were reported to hang on sparc64 boxes when
+compiled with gcc-4.1.x and later.
+
+Looking at this piece of code, it's no surprise. A critical
+delay was implemented as an empty for() loop, and gcc 4.0.x
+and previous did not optimize it away, so we did get a delay.
+
+But gcc-4.1.x and later can optimize it away, and we get crashes.
+
+Use a real udelay() to fix this. Fix verified on SunBlade100.
+
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Cc: Andrew Morton <akpm@linux-foundation.org>
+Cc: "Antonino A. Daplas" <adaplas@pol.net>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+
+---
+ drivers/video/aty/mach64_ct.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+--- linux-2.6.20.1.orig/drivers/video/aty/mach64_ct.c
++++ linux-2.6.20.1/drivers/video/aty/mach64_ct.c
+@@ -598,7 +598,6 @@ static void aty_resume_pll_ct(const stru
+ struct atyfb_par *par = info->par;
+
+ if (par->mclk_per != par->xclk_per) {
+- int i;
+ /*
+ * This disables the sclk, crashes the computer as reported:
+ * aty_st_pll_ct(SPLL_CNTL2, 3, info);
+@@ -614,7 +613,7 @@ static void aty_resume_pll_ct(const stru
+ * helps for Rage Mobilities that sometimes crash when
+ * we switch to sclk. (Daniel Mantione, 13-05-2003)
+ */
+- for (i=0;i<=0x1ffff;i++);
++ udelay(500);
+ }
+
+ aty_st_pll_ct(PLL_REF_DIV, pll->ct.pll_ref_div, par);
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:23 2007
+Message-Id: <20070307170623.259758640@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:03:02 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org,
+ mm-commits@vger.kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ petero2@telia.com,
+ gd@spherenet.de
+Subject: [patch 099/101] pktcdvd: Correctly set cmd_len field in pkt_generic_packet
+Content-Disposition: inline; filename=pktcdvd-correctly-set-cmd_len-field-in-pkt_generic_packet.patch
+Content-Length: 872
+Lines: 28
+
+
+From: Gerhard Dirschl <gd@spherenet.de>
+
+Fixes http://bugzilla.kernel.org/show_bug.cgi?id=7810 - a silly
+copy-paste bug introduced by the latest change.
+
+Signed-off-by: Gerhard Dirschl <gd@spherenet.de>
+Cc: Peter Osterlund <petero2@telia.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/block/pktcdvd.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- linux-2.6.20.1.orig/drivers/block/pktcdvd.c
++++ linux-2.6.20.1/drivers/block/pktcdvd.c
+@@ -777,7 +777,7 @@ static int pkt_generic_packet(struct pkt
+ goto out;
+ }
+
+- rq->cmd_len = COMMAND_SIZE(rq->cmd[0]);
++ rq->cmd_len = COMMAND_SIZE(cgc->cmd[0]);
+ memcpy(rq->cmd, cgc->cmd, CDROM_PACKET_SIZE);
+ if (sizeof(rq->cmd) > CDROM_PACKET_SIZE)
+ memset(rq->cmd + CDROM_PACKET_SIZE, 0, sizeof(rq->cmd) - CDROM_PACKET_SIZE);
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:23 2007
+Message-Id: <20070307170623.391803596@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:03:03 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org,
+ mm-commits@vger.kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ yanmin.zhang@intel.com,
+ yanmin_zhang@linux.intel.com,
+ tony.luck@intel.com,
+ jeff@garzik.org
+Subject: [patch 100/101] ATA: convert GSI to irq on ia64
+Content-Disposition: inline; filename=ata-convert-gsi-to-irq-on-ia64.patch
+Content-Length: 1279
+Lines: 45
+
+
+From: "Zhang, Yanmin" <yanmin_zhang@linux.intel.com>
+
+If an ATA drive uses legacy mode, ata driver will choose 14 and 15 as the
+fixed irq number. On ia64 platform, such numbers are GSI and should be
+converted to irq vector.
+
+Signed-off-by: Zhang Yanmin <yanmin.zhang@intel.com>
+Cc: Jeff Garzik <jeff@garzik.org>
+Cc: Tony Luck <tony.luck@intel.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/ia64/Kconfig | 1 +
+ include/asm-ia64/libata-portmap.h | 12 ++++++++++++
+ 2 files changed, 13 insertions(+)
+
+--- linux-2.6.20.1.orig/arch/ia64/Kconfig
++++ linux-2.6.20.1/arch/ia64/Kconfig
+@@ -11,6 +11,7 @@ menu "Processor type and features"
+
+ config IA64
+ bool
++ select ATA_NONSTANDARD if ATA
+ default y
+ help
+ The Itanium Processor Family is Intel's 64-bit successor to
+--- /dev/null
++++ linux-2.6.20.1/include/asm-ia64/libata-portmap.h
+@@ -0,0 +1,12 @@
++#ifndef __ASM_IA64_LIBATA_PORTMAP_H
++#define __ASM_IA64_LIBATA_PORTMAP_H
++
++#define ATA_PRIMARY_CMD 0x1F0
++#define ATA_PRIMARY_CTL 0x3F6
++#define ATA_PRIMARY_IRQ(dev) isa_irq_to_vector(14)
++
++#define ATA_SECONDARY_CMD 0x170
++#define ATA_SECONDARY_CTL 0x376
++#define ATA_SECONDARY_IRQ(dev) isa_irq_to_vector(15)
++
++#endif
+
+--
+
+From gregkh@mini.kroah.org Wed Mar 7 09:06:23 2007
+Message-Id: <20070307170623.528746382@mini.kroah.org>
+References: <20070307170123.677686080@mini.kroah.org>
+User-Agent: quilt/0.45-1
+Date: Wed, 07 Mar 2007 09:03:04 -0800
+From: Greg KH <gregkh@suse.de>
+To: linux-kernel@vger.kernel.org,
+ stable@kernel.org,
+ mm-commits@vger.kernel.org
+Cc: Justin Forbes <jmforbes@linuxtx.org>,
+ Zwane Mwaikambo <zwane@arm.linux.org.uk>,
+ Theodore Ts'o <tytso@mit.edu>,
+ Randy Dunlap <rdunlap@xenotime.net>,
+ Dave Jones <davej@redhat.com>,
+ Chuck Wolber <chuckw@quantumlinux.com>,
+ Chris Wedgwood <reviews@ml.cw.f00f.org>,
+ Michael Krufky <mkrufky@linuxtv.org>,
+ Chuck Ebbert <cebbert@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ jwhiter@redhat.com,
+ swhiteho@redhat.com
+Subject: [patch 101/101] gfs2: fix locking mistake
+Content-Disposition: inline; filename=gfs2-fix-locking-mistake.patch
+Content-Length: 741
+Lines: 27
+
+From: Josef Whiter <jwhiter@redhat.com>
+
+Fix a locking mistake in the quota code, we do a mutex_lock instead of a
+mutex_unlock.
+
+Signed-off-by: Josef Whiter <jwhiter@redhat.com>
+Cc: Steven Whitehouse <swhiteho@redhat.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ fs/gfs2/quota.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- linux-2.6.20.1.orig/fs/gfs2/quota.c
++++ linux-2.6.20.1/fs/gfs2/quota.c
+@@ -279,7 +279,7 @@ static int bh_get(struct gfs2_quota_data
+ (bh->b_data + sizeof(struct gfs2_meta_header) +
+ offset * sizeof(struct gfs2_quota_change));
+
+- mutex_lock(&sdp->sd_quota_mutex);
++ mutex_unlock(&sdp->sd_quota_mutex);
+
+ return 0;
+
+
+--
+