--- /dev/null
+From gregkh@mini.kroah.org Mon Aug 4 13:06:52 2008
+Message-Id: <20080804200515.110033151@mini.kroah.org>
+User-Agent: quilt/0.46-1
+Date: Mon, 04 Aug 2008 13:05:15 -0700
+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>,
+ Domenico Andreoli <cavokz@gmail.com>,
+ Willy Tarreau <w@1wt.eu>,
+ Rodrigo Rubira Branco <rbranco@la.checkpoint.com>,
+ Jake Edge <jake@lwn.net>,
+ Eugene Teo <eteo@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk
+Subject: [patch 00/33] 2.6.25-stable review cycle
+Content-Length: 3140
+Lines: 66
+
+This is the start of the stable review cycle for the 2.6.25.15 release.
+There are 33 patches in this series, all will be posted as a response to
+this one. If anyone has any issues with these being applied, please let
+us know. If anyone is a maintainer of the proper subsystem, and wants
+to add a Signed-off-by: line to the patch, please respond with it.
+
+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 Wed, August 6, 12:00:00 UTC. Anything
+received after that time might be too late.
+
+The whole patch series can be found in one patch at:
+ kernel.org/pub/linux/kernel/v2.6/stable-review/patch-2.6.25.15-rc1.gz
+and the diffstat can be found below.
+
+
+thanks,
+
+the -stable release team
+------------------
+
+ Makefile | 2
+ arch/powerpc/kernel/ppc32.h | 2
+ arch/powerpc/kernel/ptrace32.c | 27 ++++++++++
+ arch/x86/mm/ioremap.c | 5 +
+ drivers/acpi/bay.c | 16 +++--
+ drivers/acpi/thermal.c | 16 +++++
+ drivers/input/mouse/appletouch.c | 49 +++++++++++++++---
+ drivers/input/serio/i8042-x86ia64io.h | 57 +++++++++++++++++----
+ drivers/input/serio/i8042.c | 8 ++
+ drivers/net/wireless/ath5k/base.c | 4 +
+ drivers/pci/quirks.c | 1
+ drivers/ps3/ps3-lpm.c | 1
+ drivers/scsi/megaraid/megaraid_mbox.c | 17 ++++++
+ drivers/scsi/megaraid/megaraid_mbox.h | 1
+ drivers/usb/core/quirks.c | 3 +
+ drivers/usb/host/ehci-hub.c | 6 +-
+ drivers/usb/host/ehci.h | 2
+ fs/fat/inode.c | 2
+ fs/jbd/commit.c | 19 +------
+ fs/jbd/transaction.c | 91 ++++++++++++++++++++++++++++++++--
+ fs/namei.c | 31 +++++++++--
+ fs/nfs/inode.c | 4 -
+ fs/nfs/internal.h | 1
+ fs/nfs/nfs3acl.c | 9 ++-
+ fs/nfs/nfs4proc.c | 6 +-
+ fs/partitions/msdos.c | 20 ++++++-
+ fs/romfs/inode.c | 37 ++++++++-----
+ include/linux/msdos_fs.h | 6 +-
+ include/sound/ac97_codec.h | 1
+ include/sound/emu10k1.h | 1
+ mm/filemap.c | 3 -
+ net/bluetooth/bnep/core.c | 5 +
+ net/bluetooth/hidp/core.c | 10 +++
+ sound/core/init.c | 36 +++++--------
+ sound/core/oss/mixer_oss.c | 2
+ sound/pci/ac97/ac97_patch.c | 48 ++++++++++++-----
+ sound/pci/emu10k1/emu10k1_main.c | 1
+ sound/pci/emu10k1/emumixer.c | 13 +++-
+ sound/pci/hda/patch_analog.c | 33 ++++++++----
+ sound/usb/usbaudio.c | 35 +++++++++----
+ sound/usb/usbquirks.h | 75 ++++++++++++++--------------
+ 41 files changed, 521 insertions(+), 185 deletions(-)
+
+From gregkh@mini.kroah.org Mon Aug 4 13:06:52 2008
+Message-Id: <20080804200652.535704709@mini.kroah.org>
+References: <20080804200515.110033151@mini.kroah.org>
+User-Agent: quilt/0.46-1
+Date: Mon, 04 Aug 2008 13:05:16 -0700
+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>,
+ Domenico Andreoli <cavokz@gmail.com>,
+ Willy Tarreau <w@1wt.eu>,
+ Rodrigo Rubira Branco <rbranco@la.checkpoint.com>,
+ Jake Edge <jake@lwn.net>,
+ Eugene Teo <eteo@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Alexander Viro <viro@zeniv.linux.org.uk>,
+ Matt Waddel <matt.waddel@freescale.com>,
+ Greg Ungerer <gerg@snapgear.com>
+Subject: [patch 01/33] romfs_readpage: dont report errors for pages beyond i_size
+Content-Disposition: inline; filename=romfs_readpage-don-t-report-errors-for-pages-beyond-i_size.patch
+Content-Length: 2374
+Lines: 86
+
+
+2.6.25-stable review patch. If anyone has any objections, please let us know.
+
+------------------
+
+
+From: Linus Torvalds <torvalds@linux-foundation.org>
+
+commit 0056e65f9e28d83ee1a3fb4f7d0041e838f03c34 upstream
+
+We zero-fill them like we are supposed to, and that's all fine. It's
+only an error if the 'romfs_copyfrom()' routine isn't able to fill the
+data that is supposed to be there.
+
+Most of the patch is really just re-organizing the code a bit, and using
+separate variables for the error value and for how much of the page we
+actually filled from the filesystem.
+
+Reported-and-tested-by: Chris Fester <cfester@wms.com>
+Cc: Alexander Viro <viro@zeniv.linux.org.uk>
+Cc: Matt Waddel <matt.waddel@freescale.com>
+Cc: Greg Ungerer <gerg@snapgear.com>
+Signed-of-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ fs/romfs/inode.c | 37 +++++++++++++++++++++++--------------
+ 1 file changed, 23 insertions(+), 14 deletions(-)
+
+--- a/fs/romfs/inode.c
++++ b/fs/romfs/inode.c
+@@ -418,7 +418,8 @@ static int
+ romfs_readpage(struct file *file, struct page * page)
+ {
+ struct inode *inode = page->mapping->host;
+- loff_t offset, avail, readlen;
++ loff_t offset, size;
++ unsigned long filled;
+ void *buf;
+ int result = -EIO;
+
+@@ -430,21 +431,29 @@ romfs_readpage(struct file *file, struct
+
+ /* 32 bit warning -- but not for us :) */
+ offset = page_offset(page);
+- if (offset < i_size_read(inode)) {
+- avail = inode->i_size-offset;
+- readlen = min_t(unsigned long, avail, PAGE_SIZE);
+- if (romfs_copyfrom(inode, buf, ROMFS_I(inode)->i_dataoffset+offset, readlen) == readlen) {
+- if (readlen < PAGE_SIZE) {
+- memset(buf + readlen,0,PAGE_SIZE-readlen);
+- }
+- SetPageUptodate(page);
+- result = 0;
++ size = i_size_read(inode);
++ filled = 0;
++ result = 0;
++ if (offset < size) {
++ unsigned long readlen;
++
++ size -= offset;
++ readlen = size > PAGE_SIZE ? PAGE_SIZE : size;
++
++ filled = romfs_copyfrom(inode, buf, ROMFS_I(inode)->i_dataoffset+offset, readlen);
++
++ if (filled != readlen) {
++ SetPageError(page);
++ filled = 0;
++ result = -EIO;
+ }
+ }
+- if (result) {
+- memset(buf, 0, PAGE_SIZE);
+- SetPageError(page);
+- }
++
++ if (filled < PAGE_SIZE)
++ memset(buf + filled, 0, PAGE_SIZE-filled);
++
++ if (!result)
++ SetPageUptodate(page);
+ flush_dcache_page(page);
+
+ unlock_page(page);
+
+--
+
+From gregkh@mini.kroah.org Mon Aug 4 13:06:52 2008
+Message-Id: <20080804200652.693290659@mini.kroah.org>
+References: <20080804200515.110033151@mini.kroah.org>
+User-Agent: quilt/0.46-1
+Date: Mon, 04 Aug 2008 13:05:17 -0700
+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>,
+ Domenico Andreoli <cavokz@gmail.com>,
+ Willy Tarreau <w@1wt.eu>,
+ Rodrigo Rubira Branco <rbranco@la.checkpoint.com>,
+ Jake Edge <jake@lwn.net>,
+ Eugene Teo <eteo@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Ingo Molnar <mingo@elte.hu>
+Subject: [patch 02/33] x86: ioremap of 64-bit resource on 32-bit kernel fix
+Content-Disposition: inline; filename=linux-2.6-x86-mm-ioremap-64-bit-resource-on-32-bit-kernel.patch
+Content-Length: 993
+Lines: 40
+
+2.6.25-stable review patch. If anyone has any objections, please let us
+know.
+
+------------------
+
+commit 756a6c68556600aec9460346332884d891d5beb4 upstream
+
+x86: ioremap of 64-bit resource on 32-bit kernel fix
+
+Signed-off-by: Ingo Molnar <mingo@elte.hu>
+Cc: Chuck Ebbert <cebbert@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/x86/mm/ioremap.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+--- a/arch/x86/mm/ioremap.c
++++ b/arch/x86/mm/ioremap.c
+@@ -39,7 +39,7 @@ EXPORT_SYMBOL(__phys_addr);
+
+ int page_is_ram(unsigned long pagenr)
+ {
+- unsigned long addr, end;
++ resource_size_t addr, end;
+ int i;
+
+ /*
+@@ -109,7 +109,8 @@ static int ioremap_change_attr(unsigned
+ static void __iomem *__ioremap(resource_size_t phys_addr, unsigned long size,
+ enum ioremap_mode mode)
+ {
+- unsigned long pfn, offset, last_addr, vaddr;
++ unsigned long pfn, offset, vaddr;
++ resource_size_t last_addr;
+ struct vm_struct *area;
+ pgprot_t prot;
+
+
+--
+
+From gregkh@mini.kroah.org Mon Aug 4 13:06:53 2008
+Message-Id: <20080804200652.859445925@mini.kroah.org>
+References: <20080804200515.110033151@mini.kroah.org>
+User-Agent: quilt/0.46-1
+Date: Mon, 04 Aug 2008 13:05:18 -0700
+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>,
+ Domenico Andreoli <cavokz@gmail.com>,
+ Willy Tarreau <w@1wt.eu>,
+ Rodrigo Rubira Branco <rbranco@la.checkpoint.com>,
+ Jake Edge <jake@lwn.net>,
+ Eugene Teo <eteo@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Hannes Reinecke <hare@suse.de>,
+ Bo Yang <Bo.Yang@lsi.com>,
+ James Bottomley <James.Bottomley@HansenPartnership.com>
+Subject: [patch 03/33] SCSI: megaraid_mbox: fix Dell CERC firmware problem
+Content-Disposition: inline; filename=scsi-megaraid_mbox-fix-dell-cerc-firmware-problem.patch
+Content-Length: 2433
+Lines: 70
+
+2.6.25-stable review patch. If anyone has any objections, please let us
+know.
+
+------------------
+
+From: Hannes Reinecke <hare@suse.de>
+
+commit 69cd39e94669e2994277a29249b6ef93b088ddbb upstream
+
+Newer Dell CERC firmware (>= 6.62) implement a random deletion handling
+compatible with the legacy megaraid driver. The legacy handling shifted
+the target ID by 0x80 only for I/O commands (READ/WRITE/etc), whereas
+megaraid_mbox shifts the target ID always if random deletion is supported.
+The resulted in megaraid_mbox sending an INQUIRY to the wrong channel, and
+not finding any devices, obviously.
+
+So we disable the random deletion support if the offending firmware is
+found.
+
+Addresses http://bugzilla.kernel.org/show_bug.cgi?id=6695
+
+Signed-off-by: Hannes Reinecke <hare@suse.de>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Acked-by: Bo Yang <Bo.Yang@lsi.com>
+Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/scsi/megaraid/megaraid_mbox.c | 17 +++++++++++++++++
+ drivers/scsi/megaraid/megaraid_mbox.h | 1 +
+ 2 files changed, 18 insertions(+)
+
+--- a/drivers/scsi/megaraid/megaraid_mbox.c
++++ b/drivers/scsi/megaraid/megaraid_mbox.c
+@@ -3168,6 +3168,23 @@ megaraid_mbox_support_random_del(adapter
+ uint8_t raw_mbox[sizeof(mbox_t)];
+ int rval;
+
++ /*
++ * Newer firmware on Dell CERC expect a different
++ * random deletion handling, so disable it.
++ */
++ if (adapter->pdev->vendor == PCI_VENDOR_ID_AMI &&
++ adapter->pdev->device == PCI_DEVICE_ID_AMI_MEGARAID3 &&
++ adapter->pdev->subsystem_vendor == PCI_VENDOR_ID_DELL &&
++ adapter->pdev->subsystem_device == PCI_SUBSYS_ID_CERC_ATA100_4CH &&
++ (adapter->fw_version[0] > '6' ||
++ (adapter->fw_version[0] == '6' &&
++ adapter->fw_version[2] > '6') ||
++ (adapter->fw_version[0] == '6'
++ && adapter->fw_version[2] == '6'
++ && adapter->fw_version[3] > '1'))) {
++ con_log(CL_DLEVEL1, ("megaraid: disable random deletion\n"));
++ return 0;
++ }
+
+ mbox = (mbox_t *)raw_mbox;
+
+--- a/drivers/scsi/megaraid/megaraid_mbox.h
++++ b/drivers/scsi/megaraid/megaraid_mbox.h
+@@ -88,6 +88,7 @@
+ #define PCI_SUBSYS_ID_PERC3_QC 0x0471
+ #define PCI_SUBSYS_ID_PERC3_DC 0x0493
+ #define PCI_SUBSYS_ID_PERC3_SC 0x0475
++#define PCI_SUBSYS_ID_CERC_ATA100_4CH 0x0511
+
+
+ #define MBOX_MAX_SCSI_CMDS 128 // number of cmds reserved for kernel
+
+--
+
+From gregkh@mini.kroah.org Mon Aug 4 13:06:53 2008
+Message-Id: <20080804200653.038845751@mini.kroah.org>
+References: <20080804200515.110033151@mini.kroah.org>
+User-Agent: quilt/0.46-1
+Date: Mon, 04 Aug 2008 13:05:19 -0700
+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>,
+ Domenico Andreoli <cavokz@gmail.com>,
+ Willy Tarreau <w@1wt.eu>,
+ Rodrigo Rubira Branco <rbranco@la.checkpoint.com>,
+ Jake Edge <jake@lwn.net>,
+ Eugene Teo <eteo@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Al Viro <viro@zeniv.linux.org.uk>,
+ Jan Blunck <jblunck@suse.de>
+Subject: [patch 04/33] return to old errno choice in mkdir() et.al.
+Content-Disposition: inline; filename=return-to-old-errno-choice-in-mkdir-et.al.patch
+Content-Length: 1582
+Lines: 57
+
+2.6.25-stable review patch. If anyone has any objections, please let us
+know.
+
+------------------
+
+From: Al Viro <viro@zeniv.linux.org.uk>
+
+commit e9baf6e59842285bcf9570f5094e4c27674a0f7c upstream
+
+ In case when both EEXIST and EROFS would apply we used to
+return the former in mkdir(2) and friends. Lest anyone suspects
+us of being consistent, in the same situation knfsd gave clients
+nfs_erofs...
+
+ ro-bind series had switched the syscall side of things to
+returning -EROFS and immediately broke an application - namely,
+mkdir -p. Patch restores the original behaviour...
+
+Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
+Acked-by: Jan Blunck <jblunck@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ fs/namei.c | 12 ++++++++----
+ 1 file changed, 8 insertions(+), 4 deletions(-)
+
+--- a/fs/namei.c
++++ b/fs/namei.c
+@@ -1904,18 +1904,22 @@ struct dentry *lookup_create(struct name
+ if (IS_ERR(dentry))
+ goto fail;
+
++ if (dentry->d_inode)
++ goto eexist;
+ /*
+ * Special case - lookup gave negative, but... we had foo/bar/
+ * From the vfs_mknod() POV we just have a negative dentry -
+ * all is fine. Let's be bastards - you had / on the end, you've
+ * been asking for (non-existent) directory. -ENOENT for you.
+ */
+- if (!is_dir && nd->last.name[nd->last.len] && !dentry->d_inode)
+- goto enoent;
++ if (unlikely(!is_dir && nd->last.name[nd->last.len])) {
++ dput(dentry);
++ dentry = ERR_PTR(-ENOENT);
++ }
+ return dentry;
+-enoent:
++eexist:
+ dput(dentry);
+- dentry = ERR_PTR(-ENOENT);
++ dentry = ERR_PTR(-EEXIST);
+ fail:
+ return dentry;
+ }
+
+--
+
+From gregkh@mini.kroah.org Mon Aug 4 13:06:53 2008
+Message-Id: <20080804200653.208715944@mini.kroah.org>
+References: <20080804200515.110033151@mini.kroah.org>
+User-Agent: quilt/0.46-1
+Date: Mon, 04 Aug 2008 13:05:20 -0700
+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>,
+ Domenico Andreoli <cavokz@gmail.com>,
+ Willy Tarreau <w@1wt.eu>,
+ Rodrigo Rubira Branco <rbranco@la.checkpoint.com>,
+ Jake Edge <jake@lwn.net>,
+ Eugene Teo <eteo@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>,
+ Geoff Levand <geoffrey.levand@am.sony.com>,
+ Paul Mackerras <paulus@samba.org>,
+ Jeff Mahoney <jeffm@suse.com>
+Subject: [patch 05/33] POWERPC: PS3: Add time include to lpm
+Content-Disposition: inline; filename=powerpc-ps3-add-time-include-to-lpm.patch
+Content-Length: 853
+Lines: 33
+
+2.6.25-stable review patch. If anyone has any objections, please let us
+know.
+
+------------------
+
+From: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
+
+commit 483d8876f75aa5707a646442377051f1b90db206 upstream
+
+Add an include <asm/time.h> statement for get_tb().
+
+Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
+Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
+Signed-off-by: Paul Mackerras <paulus@samba.org>
+Cc: Jeff Mahoney <jeffm@suse.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/ps3/ps3-lpm.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/ps3/ps3-lpm.c
++++ b/drivers/ps3/ps3-lpm.c
+@@ -22,6 +22,7 @@
+ #include <linux/module.h>
+ #include <linux/interrupt.h>
+ #include <linux/uaccess.h>
++#include <asm/time.h>
+ #include <asm/ps3.h>
+ #include <asm/lv1call.h>
+ #include <asm/cell-pmu.h>
+
+--
+
+From gregkh@mini.kroah.org Mon Aug 4 13:06:53 2008
+Message-Id: <20080804200653.384831833@mini.kroah.org>
+References: <20080804200515.110033151@mini.kroah.org>
+User-Agent: quilt/0.46-1
+Date: Mon, 04 Aug 2008 13:05:21 -0700
+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>,
+ Domenico Andreoli <cavokz@gmail.com>,
+ Willy Tarreau <w@1wt.eu>,
+ Rodrigo Rubira Branco <rbranco@la.checkpoint.com>,
+ Jake Edge <jake@lwn.net>,
+ Eugene Teo <eteo@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Trond Myklebust <Trond.Myklebust@netapp.com>
+Subject: [patch 06/33] NFS: Ensure we zap only the access and acl caches when setting new acls
+Content-Disposition: inline; filename=nfs-ensure-we-zap-only-the-access-and-acl-caches-when-setting-new-acls.patch
+Content-Length: 3372
+Lines: 115
+
+2.6.25-stable review patch. If anyone has any objections, please let us
+know.
+
+------------------
+
+From: Trond Myklebust <Trond.Myklebust@netapp.com>
+
+commit f41f741838480aeaa3a189cff6e210503cf9c42d upstream
+
+...and ensure that we obey the NFS_INO_INVALID_ACL flag when retrieving the
+acls.
+
+Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ fs/nfs/inode.c | 4 +---
+ fs/nfs/internal.h | 1 +
+ fs/nfs/nfs3acl.c | 9 ++++++---
+ fs/nfs/nfs4proc.c | 6 +++++-
+ 4 files changed, 13 insertions(+), 7 deletions(-)
+
+--- a/fs/nfs/inode.c
++++ b/fs/nfs/inode.c
+@@ -57,8 +57,6 @@ static int enable_ino64 = NFS_64_BIT_INO
+ static void nfs_invalidate_inode(struct inode *);
+ static int nfs_update_inode(struct inode *, struct nfs_fattr *);
+
+-static void nfs_zap_acl_cache(struct inode *);
+-
+ static struct kmem_cache * nfs_inode_cachep;
+
+ static inline unsigned long
+@@ -167,7 +165,7 @@ void nfs_zap_mapping(struct inode *inode
+ }
+ }
+
+-static void nfs_zap_acl_cache(struct inode *inode)
++void nfs_zap_acl_cache(struct inode *inode)
+ {
+ void (*clear_acl_cache)(struct inode *);
+
+--- a/fs/nfs/internal.h
++++ b/fs/nfs/internal.h
+@@ -153,6 +153,7 @@ extern void nfs_clear_inode(struct inode
+ #ifdef CONFIG_NFS_V4
+ extern void nfs4_clear_inode(struct inode *);
+ #endif
++void nfs_zap_acl_cache(struct inode *inode);
+
+ /* super.c */
+ extern struct file_system_type nfs_xdev_fs_type;
+--- a/fs/nfs/nfs3acl.c
++++ b/fs/nfs/nfs3acl.c
+@@ -5,6 +5,8 @@
+ #include <linux/posix_acl_xattr.h>
+ #include <linux/nfsacl.h>
+
++#include "internal.h"
++
+ #define NFSDBG_FACILITY NFSDBG_PROC
+
+ ssize_t nfs3_listxattr(struct dentry *dentry, char *buffer, size_t size)
+@@ -205,6 +207,8 @@ struct posix_acl *nfs3_proc_getacl(struc
+ status = nfs_revalidate_inode(server, inode);
+ if (status < 0)
+ return ERR_PTR(status);
++ if (NFS_I(inode)->cache_validity & NFS_INO_INVALID_ACL)
++ nfs_zap_acl_cache(inode);
+ acl = nfs3_get_cached_acl(inode, type);
+ if (acl != ERR_PTR(-EAGAIN))
+ return acl;
+@@ -319,9 +323,8 @@ static int nfs3_proc_setacls(struct inod
+ dprintk("NFS call setacl\n");
+ msg.rpc_proc = &server->client_acl->cl_procinfo[ACLPROC3_SETACL];
+ status = rpc_call_sync(server->client_acl, &msg, 0);
+- spin_lock(&inode->i_lock);
+- NFS_I(inode)->cache_validity |= NFS_INO_INVALID_ACCESS;
+- spin_unlock(&inode->i_lock);
++ nfs_access_zap_cache(inode);
++ nfs_zap_acl_cache(inode);
+ dprintk("NFS reply setacl: %d\n", status);
+
+ /* pages may have been allocated at the xdr layer. */
+--- a/fs/nfs/nfs4proc.c
++++ b/fs/nfs/nfs4proc.c
+@@ -52,6 +52,7 @@
+ #include "nfs4_fs.h"
+ #include "delegation.h"
+ #include "iostat.h"
++#include "internal.h"
+
+ #define NFSDBG_FACILITY NFSDBG_PROC
+
+@@ -2707,6 +2708,8 @@ static ssize_t nfs4_proc_get_acl(struct
+ ret = nfs_revalidate_inode(server, inode);
+ if (ret < 0)
+ return ret;
++ if (NFS_I(inode)->cache_validity & NFS_INO_INVALID_ACL)
++ nfs_zap_acl_cache(inode);
+ ret = nfs4_read_cached_acl(inode, buf, buflen);
+ if (ret != -ENOENT)
+ return ret;
+@@ -2734,7 +2737,8 @@ static int __nfs4_proc_set_acl(struct in
+ nfs_inode_return_delegation(inode);
+ buf_to_pages(buf, buflen, arg.acl_pages, &arg.acl_pgbase);
+ ret = rpc_call_sync(NFS_CLIENT(inode), &msg, 0);
+- nfs_zap_caches(inode);
++ nfs_access_zap_cache(inode);
++ nfs_zap_acl_cache(inode);
+ return ret;
+ }
+
+
+--
+
+From gregkh@mini.kroah.org Mon Aug 4 13:06:53 2008
+Message-Id: <20080804200653.560066884@mini.kroah.org>
+References: <20080804200515.110033151@mini.kroah.org>
+User-Agent: quilt/0.46-1
+Date: Mon, 04 Aug 2008 13:05:22 -0700
+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>,
+ Domenico Andreoli <cavokz@gmail.com>,
+ Willy Tarreau <w@1wt.eu>,
+ Rodrigo Rubira Branco <rbranco@la.checkpoint.com>,
+ Jake Edge <jake@lwn.net>,
+ Eugene Teo <eteo@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Josef Bacik <jbacik@redhat.com>,
+ <linux-ext4@vger.kernel.org>,
+ Jan Kara <jack@ucw.cz>
+Subject: [patch 07/33] jbd: fix the way the b_modified flag is cleared
+Content-Disposition: inline; filename=jbd-fix-the-way-the-b_modified-flag-is-cleared.patch
+Content-Length: 3240
+Lines: 98
+
+2.6.25-stable review patch. If anyone has any objections, please let us
+know.
+
+------------------
+
+From: Josef Bacik <jbacik@redhat.com>
+
+commit 5bc833feaa8b2236265764e7e81f44937be46eda upstream
+
+Currently at the start of a journal commit we loop through all of the buffers
+on the committing transaction and clear the b_modified flag (the flag that is
+set when a transaction modifies the buffer) under the j_list_lock.
+
+The problem is that everywhere else this flag is modified only under the jbd
+lock buffer flag, so it will race with a running transaction who could
+potentially set it, and have it unset by the committing transaction.
+
+This is also a big waste, you can have several thousands of buffers that you
+are clearing the modified flag on when you may not need to. This patch
+removes this code and instead clears the b_modified flag upon entering
+do_get_write_access/journal_get_create_access, so if that transaction does
+indeed use the buffer then it will be accounted for properly, and if it does
+not then we know we didn't use it.
+
+That will be important for the next patch in this series. Tested thoroughly
+by myself using postmark/iozone/bonnie++.
+
+Signed-off-by: Josef Bacik <jbacik@redhat.com>
+Cc: <linux-ext4@vger.kernel.org>
+Acked-by: Jan Kara <jack@ucw.cz>
+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>
+
+---
+ fs/jbd/commit.c | 16 ----------------
+ fs/jbd/transaction.c | 13 +++++++++++++
+ 2 files changed, 13 insertions(+), 16 deletions(-)
+
+--- a/fs/jbd/commit.c
++++ b/fs/jbd/commit.c
+@@ -407,22 +407,6 @@ void journal_commit_transaction(journal_
+ jbd_debug (3, "JBD: commit phase 2\n");
+
+ /*
+- * First, drop modified flag: all accesses to the buffers
+- * will be tracked for a new trasaction only -bzzz
+- */
+- spin_lock(&journal->j_list_lock);
+- if (commit_transaction->t_buffers) {
+- new_jh = jh = commit_transaction->t_buffers->b_tnext;
+- do {
+- J_ASSERT_JH(new_jh, new_jh->b_modified == 1 ||
+- new_jh->b_modified == 0);
+- new_jh->b_modified = 0;
+- new_jh = new_jh->b_tnext;
+- } while (new_jh != jh);
+- }
+- spin_unlock(&journal->j_list_lock);
+-
+- /*
+ * Now start flushing things to disk, in the order they appear
+ * on the transaction lists. Data blocks go first.
+ */
+--- a/fs/jbd/transaction.c
++++ b/fs/jbd/transaction.c
+@@ -609,6 +609,12 @@ repeat:
+ goto done;
+
+ /*
++ * this is the first time this transaction is touching this buffer,
++ * reset the modified flag
++ */
++ jh->b_modified = 0;
++
++ /*
+ * If there is already a copy-out version of this buffer, then we don't
+ * need to make another one
+ */
+@@ -820,9 +826,16 @@ int journal_get_create_access(handle_t *
+
+ if (jh->b_transaction == NULL) {
+ jh->b_transaction = transaction;
++
++ /* first access by this transaction */
++ jh->b_modified = 0;
++
+ JBUFFER_TRACE(jh, "file as BJ_Reserved");
+ __journal_file_buffer(jh, transaction, BJ_Reserved);
+ } else if (jh->b_transaction == journal->j_committing_transaction) {
++ /* first access by this transaction */
++ jh->b_modified = 0;
++
+ JBUFFER_TRACE(jh, "set next transaction");
+ jh->b_next_transaction = transaction;
+ }
+
+--
+
+From gregkh@mini.kroah.org Mon Aug 4 13:06:53 2008
+Message-Id: <20080804200653.740632501@mini.kroah.org>
+References: <20080804200515.110033151@mini.kroah.org>
+User-Agent: quilt/0.46-1
+Date: Mon, 04 Aug 2008 13:05:23 -0700
+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>,
+ Domenico Andreoli <cavokz@gmail.com>,
+ Willy Tarreau <w@1wt.eu>,
+ Rodrigo Rubira Branco <rbranco@la.checkpoint.com>,
+ Jake Edge <jake@lwn.net>,
+ Eugene Teo <eteo@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Mingming Cao <cmm@us.ibm.com>,
+ Jan Kara <jack@suse.cz>
+Subject: [patch 08/33] jbd: fix race between free buffer and commit transaction
+Content-Disposition: inline; filename=jbd-fix-race-between-free-buffer-and-commit-transaction.patch
+Content-Length: 4891
+Lines: 139
+
+2.6.25-stable review patch. If anyone has any objections, please let us
+know.
+
+------------------
+
+From: Mingming Cao <cmm@us.ibm.com>
+
+commit 3f31fddfa26b7594b44ff2b34f9a04ba409e0f91 upstream
+
+journal_try_to_free_buffers() could race with jbd commit transaction when
+the later is holding the buffer reference while waiting for the data
+buffer to flush to disk. If the caller of journal_try_to_free_buffers()
+request tries hard to release the buffers, it will treat the failure as
+error and return back to the caller. We have seen the directo IO failed
+due to this race. Some of the caller of releasepage() also expecting the
+buffer to be dropped when passed with GFP_KERNEL mask to the
+releasepage()->journal_try_to_free_buffers().
+
+With this patch, if the caller is passing the __GFP_WAIT and __GFP_FS to
+indicating this call could wait, in case of try_to_free_buffers() failed,
+let's waiting for journal_commit_transaction() to finish commit the
+current committing transaction, then try to free those buffers again.
+
+[akpm@linux-foundation.org: coding-style fixes]
+Signed-off-by: Mingming Cao <cmm@us.ibm.com>
+Reviewed-by: Badari Pulavarty <pbadari@us.ibm.com>
+Acked-by: Jan Kara <jack@suse.cz>
+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>
+
+---
+ fs/jbd/transaction.c | 57 +++++++++++++++++++++++++++++++++++++++++++++++++--
+ mm/filemap.c | 3 --
+ 2 files changed, 56 insertions(+), 4 deletions(-)
+
+--- a/fs/jbd/transaction.c
++++ b/fs/jbd/transaction.c
+@@ -1633,12 +1633,42 @@ out:
+ return;
+ }
+
++/*
++ * journal_try_to_free_buffers() could race with journal_commit_transaction()
++ * The latter might still hold the a count on buffers when inspecting
++ * them on t_syncdata_list or t_locked_list.
++ *
++ * journal_try_to_free_buffers() will call this function to
++ * wait for the current transaction to finish syncing data buffers, before
++ * tryinf to free that buffer.
++ *
++ * Called with journal->j_state_lock held.
++ */
++static void journal_wait_for_transaction_sync_data(journal_t *journal)
++{
++ transaction_t *transaction = NULL;
++ tid_t tid;
++
++ spin_lock(&journal->j_state_lock);
++ transaction = journal->j_committing_transaction;
++
++ if (!transaction) {
++ spin_unlock(&journal->j_state_lock);
++ return;
++ }
++
++ tid = transaction->t_tid;
++ spin_unlock(&journal->j_state_lock);
++ log_wait_commit(journal, tid);
++}
+
+ /**
+ * int journal_try_to_free_buffers() - try to free page buffers.
+ * @journal: journal for operation
+ * @page: to try and free
+- * @unused_gfp_mask: unused
++ * @gfp_mask: we use the mask to detect how hard should we try to release
++ * buffers. If __GFP_WAIT and __GFP_FS is set, we wait for commit code to
++ * release the buffers.
+ *
+ *
+ * For all the buffers on this page,
+@@ -1667,9 +1697,11 @@ out:
+ * journal_try_to_free_buffer() is changing its state. But that
+ * cannot happen because we never reallocate freed data as metadata
+ * while the data is part of a transaction. Yes?
++ *
++ * Return 0 on failure, 1 on success
+ */
+ int journal_try_to_free_buffers(journal_t *journal,
+- struct page *page, gfp_t unused_gfp_mask)
++ struct page *page, gfp_t gfp_mask)
+ {
+ struct buffer_head *head;
+ struct buffer_head *bh;
+@@ -1698,7 +1730,28 @@ int journal_try_to_free_buffers(journal_
+ if (buffer_jbd(bh))
+ goto busy;
+ } while ((bh = bh->b_this_page) != head);
++
+ ret = try_to_free_buffers(page);
++
++ /*
++ * There are a number of places where journal_try_to_free_buffers()
++ * could race with journal_commit_transaction(), the later still
++ * holds the reference to the buffers to free while processing them.
++ * try_to_free_buffers() failed to free those buffers. Some of the
++ * caller of releasepage() request page buffers to be dropped, otherwise
++ * treat the fail-to-free as errors (such as generic_file_direct_IO())
++ *
++ * So, if the caller of try_to_release_page() wants the synchronous
++ * behaviour(i.e make sure buffers are dropped upon return),
++ * let's wait for the current transaction to finish flush of
++ * dirty data buffers, then try to free those buffers again,
++ * with the journal locked.
++ */
++ if (ret == 0 && (gfp_mask & __GFP_WAIT) && (gfp_mask & __GFP_FS)) {
++ journal_wait_for_transaction_sync_data(journal);
++ ret = try_to_free_buffers(page);
++ }
++
+ busy:
+ return ret;
+ }
+--- a/mm/filemap.c
++++ b/mm/filemap.c
+@@ -2574,9 +2574,8 @@ out:
+ * Otherwise return zero.
+ *
+ * The @gfp_mask argument specifies whether I/O may be performed to release
+- * this page (__GFP_IO), and whether the call may block (__GFP_WAIT).
++ * this page (__GFP_IO), and whether the call may block (__GFP_WAIT & __GFP_FS).
+ *
+- * NOTE: @gfp_mask may go away, and this function may become non-blocking.
+ */
+ int try_to_release_page(struct page *page, gfp_t gfp_mask)
+ {
+
+--
+
+From gregkh@mini.kroah.org Mon Aug 4 13:06:54 2008
+Message-Id: <20080804200653.926386486@mini.kroah.org>
+References: <20080804200515.110033151@mini.kroah.org>
+User-Agent: quilt/0.46-1
+Date: Mon, 04 Aug 2008 13:05:24 -0700
+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>,
+ Domenico Andreoli <cavokz@gmail.com>,
+ Willy Tarreau <w@1wt.eu>,
+ Rodrigo Rubira Branco <rbranco@la.checkpoint.com>,
+ Jake Edge <jake@lwn.net>,
+ Eugene Teo <eteo@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Josef Bacik <jbacik@redhat.com>,
+ <linux-ext4@vger.kernel.org>,
+ Jan Kara <jack@ucw.cz>
+Subject: [patch 09/33] jbd: fix possible journal overflow issues
+Content-Disposition: inline; filename=jbd-fix-possible-journal-overflow-issues.patch
+Content-Length: 3904
+Lines: 116
+
+2.6.25-stable review patch. If anyone has any objections, please let us
+know.
+
+------------------
+
+From: Josef Bacik <jbacik@redhat.com>
+
+commit 5b9a499d77e9dd39c9e6611ea10c56a31604f274 upstream
+
+There are several cases where the running transaction can get buffers added to
+its BJ_Metadata list which it never dirtied, which makes its t_nr_buffers
+counter end up larger than its t_outstanding_credits counter.
+
+This will cause issues when starting new transactions as while we are logging
+buffers we decrement t_outstanding_buffers, so when t_outstanding_buffers goes
+negative, we will report that we need less space in the journal than we
+actually need, so transactions will be started even though there may not be
+enough room for them. In the worst case scenario (which admittedly is almost
+impossible to reproduce) this will result in the journal running out of space.
+
+The fix is to only
+refile buffers from the committing transaction to the running transactions
+BJ_Modified list when b_modified is set on that journal, which is the only way
+to be sure if the running transaction has modified that buffer.
+
+This patch also fixes an accounting error in journal_forget, it is possible
+that we can call journal_forget on a buffer without having modified it, only
+gotten write access to it, so instead of freeing a credit, we only do so if
+the buffer was modified. The assert will help catch if this problem occurs.
+Without these two patches I could hit this assert within minutes of running
+postmark, with them this issue no longer arises. Thank you,
+
+Signed-off-by: Josef Bacik <jbacik@redhat.com>
+Cc: <linux-ext4@vger.kernel.org>
+Acked-by: Jan Kara <jack@ucw.cz>
+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>
+
+---
+ fs/jbd/commit.c | 3 +++
+ fs/jbd/transaction.c | 21 ++++++++++++++++++---
+ 2 files changed, 21 insertions(+), 3 deletions(-)
+
+--- a/fs/jbd/commit.c
++++ b/fs/jbd/commit.c
+@@ -472,6 +472,9 @@ void journal_commit_transaction(journal_
+ */
+ commit_transaction->t_state = T_COMMIT;
+
++ J_ASSERT(commit_transaction->t_nr_buffers <=
++ commit_transaction->t_outstanding_credits);
++
+ descriptor = NULL;
+ bufs = 0;
+ while (commit_transaction->t_buffers) {
+--- a/fs/jbd/transaction.c
++++ b/fs/jbd/transaction.c
+@@ -1235,6 +1235,7 @@ int journal_forget (handle_t *handle, st
+ struct journal_head *jh;
+ int drop_reserve = 0;
+ int err = 0;
++ int was_modified = 0;
+
+ BUFFER_TRACE(bh, "entry");
+
+@@ -1253,6 +1254,9 @@ int journal_forget (handle_t *handle, st
+ goto not_jbd;
+ }
+
++ /* keep track of wether or not this transaction modified us */
++ was_modified = jh->b_modified;
++
+ /*
+ * The buffer's going from the transaction, we must drop
+ * all references -bzzz
+@@ -1270,7 +1274,12 @@ int journal_forget (handle_t *handle, st
+
+ JBUFFER_TRACE(jh, "belongs to current transaction: unfile");
+
+- drop_reserve = 1;
++ /*
++ * we only want to drop a reference if this transaction
++ * modified the buffer
++ */
++ if (was_modified)
++ drop_reserve = 1;
+
+ /*
+ * We are no longer going to journal this buffer.
+@@ -1310,7 +1319,13 @@ int journal_forget (handle_t *handle, st
+ if (jh->b_next_transaction) {
+ J_ASSERT(jh->b_next_transaction == transaction);
+ jh->b_next_transaction = NULL;
+- drop_reserve = 1;
++
++ /*
++ * only drop a reference if this transaction modified
++ * the buffer
++ */
++ if (was_modified)
++ drop_reserve = 1;
+ }
+ }
+
+@@ -2135,7 +2150,7 @@ void __journal_refile_buffer(struct jour
+ jh->b_transaction = jh->b_next_transaction;
+ jh->b_next_transaction = NULL;
+ __journal_file_buffer(jh, jh->b_transaction,
+- was_dirty ? BJ_Metadata : BJ_Reserved);
++ jh->b_modified ? BJ_Metadata : BJ_Reserved);
+ J_ASSERT_JH(jh, jh->b_transaction->t_state == T_RUNNING);
+
+ if (was_dirty)
+
+--
+
+From gregkh@mini.kroah.org Mon Aug 4 13:06:54 2008
+Message-Id: <20080804200654.114480363@mini.kroah.org>
+References: <20080804200515.110033151@mini.kroah.org>
+User-Agent: quilt/0.46-1
+Date: Mon, 04 Aug 2008 13:05:25 -0700
+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>,
+ Domenico Andreoli <cavokz@gmail.com>,
+ Willy Tarreau <w@1wt.eu>,
+ Rodrigo Rubira Branco <rbranco@la.checkpoint.com>,
+ Jake Edge <jake@lwn.net>,
+ Eugene Teo <eteo@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Jiri Kosina <jkosina@suse.cz>,
+ Dmitry Torokhov <dtor@mail.ru>
+Subject: [patch 10/33] Input: i8042 - retry failed CTR writes when resuming
+Content-Disposition: inline; filename=input-i8042-retry-failed-ctr-writes-when-resuming.patch
+Content-Length: 1390
+Lines: 46
+
+2.6.25-stable review patch. If anyone has any objections, please let us
+know.
+
+------------------
+
+From: Jiri Kosina <jkosina@suse.cz>
+
+commit 2f6a77d56523c14651236bc401a99b0e2aca2fdd upstream
+
+There are systems that fail in i8042_resume() with
+
+ i8042: Can't write CTR to resume
+
+as i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR) fails even though the
+controller claimed itself to be ready before.
+
+One retry after failing write fixes the problems on the failing systems.
+
+Reported-by: Helmut Schaa <hschaa@novell.com>
+Signed-off-by: Jiri Kosina <jkosina@suse.cz>
+Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/input/serio/i8042.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+--- a/drivers/input/serio/i8042.c
++++ b/drivers/input/serio/i8042.c
+@@ -938,8 +938,12 @@ static int i8042_resume(struct platform_
+ i8042_ctr |= I8042_CTR_AUXDIS | I8042_CTR_KBDDIS;
+ i8042_ctr &= ~(I8042_CTR_AUXINT | I8042_CTR_KBDINT);
+ if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR)) {
+- printk(KERN_ERR "i8042: Can't write CTR to resume\n");
+- return -EIO;
++ printk(KERN_WARNING "i8042: Can't write CTR to resume, retrying...\n");
++ msleep(50);
++ if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR)) {
++ printk(KERN_ERR "i8042: CTR write retry failed\n");
++ return -EIO;
++ }
+ }
+
+ if (i8042_mux_present) {
+
+--
+
+From gregkh@mini.kroah.org Mon Aug 4 13:06:54 2008
+Message-Id: <20080804200654.301479759@mini.kroah.org>
+References: <20080804200515.110033151@mini.kroah.org>
+User-Agent: quilt/0.46-1
+Date: Mon, 04 Aug 2008 13:05:26 -0700
+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>,
+ Domenico Andreoli <cavokz@gmail.com>,
+ Willy Tarreau <w@1wt.eu>,
+ Rodrigo Rubira Branco <rbranco@la.checkpoint.com>,
+ Jake Edge <jake@lwn.net>,
+ Eugene Teo <eteo@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Jiri Kosina <jkosina@suse.cz>,
+ Dmitry Torokhov <dtor@mail.ru>
+Subject: [patch 11/33] Input: i8042 - add Intel D845PESV to nopnp list
+Content-Disposition: inline; filename=input-i8042-add-intel-d845pesv-to-nopnp-list.patch
+Content-Length: 2529
+Lines: 102
+
+2.6.25-stable review patch. If anyone has any objections, please let us
+know.
+
+------------------
+
+From: Jiri Kosina <jkosina@suse.cz>
+
+commit c3a34f4390396a4bede3f8b7bcc5153f50b974bb upstream
+
+This patch introduces i8042_dmi_nopnp_table to make it possible to perform
+DMI matches for systems that need 'i8042.nopnp' to work correctly, and
+introduces such an entry for Intel D845PESV -- this system doesn't
+detect PS2 mouse reliably without this option, as reported by Robert
+Lewis.
+
+[dtor@mail.ru - make it compile if CONFIG_PNP is off - reported
+ by Randy Dunlap]
+
+Signed-off-by: Jiri Kosina <jkosina@suse.cz>
+Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/input/serio/i8042-x86ia64io.h | 29 ++++++++++++++++++-----------
+ 1 file changed, 18 insertions(+), 11 deletions(-)
+
+--- a/drivers/input/serio/i8042-x86ia64io.h
++++ b/drivers/input/serio/i8042-x86ia64io.h
+@@ -63,7 +63,7 @@ static inline void i8042_write_command(i
+ outb(val, I8042_COMMAND_REG);
+ }
+
+-#if defined(__i386__) || defined(__x86_64__)
++#ifdef CONFIG_X86
+
+ #include <linux/dmi.h>
+
+@@ -287,14 +287,19 @@ static struct dmi_system_id __initdata i
+ { }
+ };
+
+-
+-
++#ifdef CONFIG_PNP
++static struct dmi_system_id __initdata i8042_dmi_nopnp_table[] = {
++ {
++ .ident = "Intel MBO Desktop D845PESV",
++ .matches = {
++ DMI_MATCH(DMI_BOARD_NAME, "D845PESV"),
++ DMI_MATCH(DMI_BOARD_VENDOR, "Intel Corporation"),
++ },
++ },
++ { }
++};
+ #endif
+
+-#ifdef CONFIG_X86
+-
+-#include <linux/dmi.h>
+-
+ /*
+ * Some Wistron based laptops need us to explicitly enable the 'Dritek
+ * keyboard extension' to make their extra keys start generating scancodes.
+@@ -342,7 +347,6 @@ static struct dmi_system_id __initdata i
+
+ #endif /* CONFIG_X86 */
+
+-
+ #ifdef CONFIG_PNP
+ #include <linux/pnp.h>
+
+@@ -452,6 +456,11 @@ static int __init i8042_pnp_init(void)
+ int pnp_data_busted = 0;
+ int err;
+
++#ifdef CONFIG_X86
++ if (dmi_check_system(i8042_dmi_nopnp_table))
++ i8042_nopnp = 1;
++#endif
++
+ if (i8042_nopnp) {
+ printk(KERN_INFO "i8042: PNP detection disabled\n");
+ return 0;
+@@ -577,15 +586,13 @@ static int __init i8042_platform_init(vo
+ i8042_reset = 1;
+ #endif
+
+-#if defined(__i386__) || defined(__x86_64__)
++#ifdef CONFIG_X86
+ if (dmi_check_system(i8042_dmi_noloop_table))
+ i8042_noloop = 1;
+
+ if (dmi_check_system(i8042_dmi_nomux_table))
+ i8042_nomux = 1;
+-#endif
+
+-#ifdef CONFIG_X86
+ if (dmi_check_system(i8042_dmi_dritek_table))
+ i8042_dritek = 1;
+ #endif /* CONFIG_X86 */
+
+--
+
+From gregkh@mini.kroah.org Mon Aug 4 13:06:54 2008
+Message-Id: <20080804200654.486303528@mini.kroah.org>
+References: <20080804200515.110033151@mini.kroah.org>
+User-Agent: quilt/0.46-1
+Date: Mon, 04 Aug 2008 13:05:27 -0700
+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>,
+ Domenico Andreoli <cavokz@gmail.com>,
+ Willy Tarreau <w@1wt.eu>,
+ Rodrigo Rubira Branco <rbranco@la.checkpoint.com>,
+ Jake Edge <jake@lwn.net>,
+ Eugene Teo <eteo@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Jiri Kosina <jkosina@suse.cz>,
+ Dmitry Torokhov <dtor@mail.ru>
+Subject: [patch 12/33] Input: i8042 - add Gericom Bellagio to nomux blacklist
+Content-Disposition: inline; filename=input-i8042-add-gericom-bellagio-to-nomux-blacklist.patch
+Content-Length: 965
+Lines: 39
+
+2.6.25-stable review patch. If anyone has any objections, please let us
+know.
+
+------------------
+
+From: Jiri Kosina <jkosina@suse.cz>
+
+commit 5b5b43d0b32ea586036638288c31179f00de5443 upstream
+
+Gericom Bellagio needs to be added to nomux blacklist, otherwise its
+touchpad misbehaves.
+
+Reported-by: Roland Kletzing <roland.kletzing@materna.de>
+Signed-off-by: Jiri Kosina <jkosina@suse.cz>
+Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/input/serio/i8042-x86ia64io.h | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+--- a/drivers/input/serio/i8042-x86ia64io.h
++++ b/drivers/input/serio/i8042-x86ia64io.h
+@@ -296,6 +296,13 @@ static struct dmi_system_id __initdata i
+ DMI_MATCH(DMI_BOARD_VENDOR, "Intel Corporation"),
+ },
+ },
++ {
++ .ident = "Gericom Bellagio",
++ .matches = {
++ DMI_MATCH(DMI_SYS_VENDOR, "Gericom"),
++ DMI_MATCH(DMI_PRODUCT_NAME, "N34AS6"),
++ },
++ },
+ { }
+ };
+ #endif
+
+--
+
+From gregkh@mini.kroah.org Mon Aug 4 13:06:54 2008
+Message-Id: <20080804200654.644137695@mini.kroah.org>
+References: <20080804200515.110033151@mini.kroah.org>
+User-Agent: quilt/0.46-1
+Date: Mon, 04 Aug 2008 13:05:28 -0700
+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>,
+ Domenico Andreoli <cavokz@gmail.com>,
+ Willy Tarreau <w@1wt.eu>,
+ Rodrigo Rubira Branco <rbranco@la.checkpoint.com>,
+ Jake Edge <jake@lwn.net>,
+ Eugene Teo <eteo@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Jiri Kosina <jkosina@suse.cz>,
+ Dmitry Torokhov <dtor@mail.ru>
+Subject: [patch 13/33] Input: i8042 - add Fujitsu-Siemens Amilo Pro V2030 to nomux table
+Content-Disposition: inline; filename=input-i8042-add-fujitsu-siemens-amilo-pro-v2030-to-nomux-table.patch
+Content-Length: 1108
+Lines: 40
+
+2.6.25-stable review patch. If anyone has any objections, please let us
+know.
+
+------------------
+
+From: Jiri Kosina <jkosina@suse.cz>
+
+Commit efd5184646d5d400fc538d093e9a0bec22a75551 upstream
+
+Fujitsu Siemens Amilo Pro V2030 needs nomux table entry, in addition to
+already existing entry for V2010 model (note that Fujitsu-Siemens changed
+the capitalization in the DMI data for product).
+
+Tested-by: Jiri Mleziva <jmleziva@tiscali.cz>
+Signed-off-by: Jiri Kosina <jkosina@suse.cz>
+Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/input/serio/i8042-x86ia64io.h | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+--- a/drivers/input/serio/i8042-x86ia64io.h
++++ b/drivers/input/serio/i8042-x86ia64io.h
+@@ -193,6 +193,13 @@ static struct dmi_system_id __initdata i
+ },
+ },
+ {
++ .ident = "Fujitsu-Siemens Amilo Pro 2030",
++ .matches = {
++ DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
++ DMI_MATCH(DMI_PRODUCT_NAME, "AMILO PRO V2030"),
++ },
++ },
++ {
+ /*
+ * No data is coming from the touchscreen unless KBC
+ * is in legacy mode.
+
+--
+
+From gregkh@mini.kroah.org Mon Aug 4 13:06:54 2008
+Message-Id: <20080804200654.817506097@mini.kroah.org>
+References: <20080804200515.110033151@mini.kroah.org>
+User-Agent: quilt/0.46-1
+Date: Mon, 04 Aug 2008 13:05:29 -0700
+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>,
+ Domenico Andreoli <cavokz@gmail.com>,
+ Willy Tarreau <w@1wt.eu>,
+ Rodrigo Rubira Branco <rbranco@la.checkpoint.com>,
+ Jake Edge <jake@lwn.net>,
+ Eugene Teo <eteo@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Jiri Kosina <jkosina@suse.cz>,
+ Dmitry Torokhov <dtor@mail.ru>
+Subject: [patch 14/33] Input: i8042 - add Fujitsu-Siemens Amilo Pro 2010 to nomux list
+Content-Disposition: inline; filename=input-i8042-add-fujitsu-siemens-amilo-pro-2010-to-nomux-list.patch
+Content-Length: 916
+Lines: 36
+
+2.6.25-stable review patch. If anyone has any objections, please let us
+know.
+
+------------------
+
+From: Jiri Kosina <jkosina@suse.cz>
+
+commit 3f79b1e94002791a42837a46b5817e87a0ac0873 upstream
+
+Reported-by: Hans Aschauer <Hans.Aschauer@web.de>
+Signed-off-by: Jiri Kosina <jkosina@suse.cz>
+Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/input/serio/i8042-x86ia64io.h | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+--- a/drivers/input/serio/i8042-x86ia64io.h
++++ b/drivers/input/serio/i8042-x86ia64io.h
+@@ -200,6 +200,13 @@ static struct dmi_system_id __initdata i
+ },
+ },
+ {
++ .ident = "Fujitsu-Siemens Amilo Pro 2010",
++ .matches = {
++ DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
++ DMI_MATCH(DMI_PRODUCT_NAME, "AMILO Pro V2010"),
++ },
++ },
++ {
+ /*
+ * No data is coming from the touchscreen unless KBC
+ * is in legacy mode.
+
+--
+
+From gregkh@mini.kroah.org Mon Aug 4 13:06:55 2008
+Message-Id: <20080804200654.989313478@mini.kroah.org>
+References: <20080804200515.110033151@mini.kroah.org>
+User-Agent: quilt/0.46-1
+Date: Mon, 04 Aug 2008 13:05:30 -0700
+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>,
+ Domenico Andreoli <cavokz@gmail.com>,
+ Willy Tarreau <w@1wt.eu>,
+ Rodrigo Rubira Branco <rbranco@la.checkpoint.com>,
+ Jake Edge <jake@lwn.net>,
+ Eugene Teo <eteo@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Jiri Kosina <jkosina@suse.cz>,
+ Dmitry Torokhov <dtor@mail.ru>
+Subject: [patch 15/33] Input: i8042 - add Acer Aspire 1360 to nomux blacklist
+Content-Disposition: inline; filename=input-i8042-add-acer-aspire-1360-to-nomux-blacklist.patch
+Content-Length: 945
+Lines: 39
+
+2.6.25-stable review patch. If anyone has any objections, please let us
+know.
+
+------------------
+
+From: Jiri Kosina <jkosina@suse.cz>
+
+commit 0376bce7b0659fe1e80d045860087072583ab93f upstream.
+
+Acer Aspire 1360 needs to be added to nomux blacklist, otherwise its
+touchpad misbehaves.
+
+Reported-by: Clark Tompsett <clarkt@cnsp.com>
+Signed-off-by: Jiri Kosina <jkosina@suse.cz>
+Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/input/serio/i8042-x86ia64io.h | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+--- a/drivers/input/serio/i8042-x86ia64io.h
++++ b/drivers/input/serio/i8042-x86ia64io.h
+@@ -298,6 +298,13 @@ static struct dmi_system_id __initdata i
+ DMI_MATCH(DMI_PRODUCT_VERSION, "3000 N100"),
+ },
+ },
++ {
++ .ident = "Acer Aspire 1360",
++ .matches = {
++ DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
++ DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 1360"),
++ },
++ },
+ { }
+ };
+
+
+--
+
+From gregkh@mini.kroah.org Mon Aug 4 13:06:55 2008
+Message-Id: <20080804200655.143046774@mini.kroah.org>
+References: <20080804200515.110033151@mini.kroah.org>
+User-Agent: quilt/0.46-1
+Date: Mon, 04 Aug 2008 13:05:31 -0700
+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>,
+ Domenico Andreoli <cavokz@gmail.com>,
+ Willy Tarreau <w@1wt.eu>,
+ Rodrigo Rubira Branco <rbranco@la.checkpoint.com>,
+ Jake Edge <jake@lwn.net>,
+ Eugene Teo <eteo@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Frank Seidel <fseidel@suse.de>,
+ OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
+Subject: [patch 16/33] FAT_VALID_MEDIA(): remove pointless test
+Content-Disposition: inline; filename=fat_valid_media-remove-pointless-test.patch
+Content-Length: 1734
+Lines: 56
+
+2.6.25-stable review patch. If anyone has any objections, please let us
+know.
+
+------------------
+
+From: Andrew Morton <akpm@linux-foundation.org>
+
+commit 73f20e58b1d586e9f6d3ddc3aad872829aca7743 upstream
+
+The on-disk media specification field in FAT is only 8-bits, so testing for
+<=0xff is pointless, and can generate a "comparison is always true due to
+limited range of data type" warning.
+
+While we're there, convert FAT_VALID_MEDIA() into a C function - the present
+implementation is buggy: it generates either one or two references to its
+argument.
+
+Cc: Frank Seidel <fseidel@suse.de>
+Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
+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>
+
+---
+ fs/fat/inode.c | 2 +-
+ include/linux/msdos_fs.h | 6 +++++-
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+--- a/fs/fat/inode.c
++++ b/fs/fat/inode.c
+@@ -1208,7 +1208,7 @@ int fat_fill_super(struct super_block *s
+ */
+
+ media = b->media;
+- if (!FAT_VALID_MEDIA(media)) {
++ if (!fat_valid_media(media)) {
+ if (!silent)
+ printk(KERN_ERR "FAT: invalid media value (0x%02x)\n",
+ media);
+--- a/include/linux/msdos_fs.h
++++ b/include/linux/msdos_fs.h
+@@ -58,7 +58,11 @@
+ #define MSDOS_DOTDOT ".. " /* "..", padded to MSDOS_NAME chars */
+
+ /* media of boot sector */
+-#define FAT_VALID_MEDIA(x) ((0xF8 <= (x) && (x) <= 0xFF) || (x) == 0xF0)
++static inline int fat_valid_media(u8 media)
++{
++ return 0xf8 <= media || media == 0xf0;
++}
++
+ #define FAT_FIRST_ENT(s, x) ((MSDOS_SB(s)->fat_bits == 32 ? 0x0FFFFF00 : \
+ MSDOS_SB(s)->fat_bits == 16 ? 0xFF00 : 0xF00) | (x))
+
+
+--
+
+From gregkh@mini.kroah.org Mon Aug 4 13:06:55 2008
+Message-Id: <20080804200655.299883956@mini.kroah.org>
+References: <20080804200515.110033151@mini.kroah.org>
+User-Agent: quilt/0.46-1
+Date: Mon, 04 Aug 2008 13:05:32 -0700
+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>,
+ Domenico Andreoli <cavokz@gmail.com>,
+ Willy Tarreau <w@1wt.eu>,
+ Rodrigo Rubira Branco <rbranco@la.checkpoint.com>,
+ Jake Edge <jake@lwn.net>,
+ Eugene Teo <eteo@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Frank Seidel <fseidel@suse.de>,
+ Andreas Dilger <adilger@sun.com>,
+ OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
+Subject: [patch 17/33] fat: detect media without partition table correctly
+Content-Disposition: inline; filename=fat-detect-media-without-partition-table-correctly.patch
+Content-Length: 2772
+Lines: 88
+
+2.6.25-stable review patch. If anyone has any objections, please let us
+know.
+
+------------------
+
+From: Frank Seidel <fseidel@suse.de>
+
+commit 0607fd02587a6b4b086dc746d63123c1f284db68 upstream
+
+I received a complaint that some FAT formated medias (e.g. sd memory cards)
+trigger a "unknown partition table" message even though there is no partition
+table and they work correctly, while in general (when e.g. formated with
+mkdosfs or even Windows Vista) this message is not shown.
+
+Currently this seems only to happen when the medias get formatted with Windows
+XP (and possibly Win 2000). Then the boot indicator byte contains garbage
+(part of text message) and so do the other parts checked by msdos_paritition
+which then later triggers this message.
+
+References: novell bug #364365
+
+Most fat formatted media without partition table contains zeros in the boot
+indication and the other tested bytes and so falls through the checks in
+msdos_partition, leading it to return with 1 (all is fine).
+
+But some (e.g. WinXP formatted) fat fomated medias don't use boot_ind and so
+the check fails and causes a "unkown partition table" warning eventhough there
+is none and everything would be fine.
+
+This additional check directly verifies if there is a fat formatted medium
+without a partition table.
+
+Signed-off-by: Frank Seidel <fseidel@suse.de>
+Cc: Andreas Dilger <adilger@sun.com>
+Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
+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>
+
+---
+ fs/partitions/msdos.c | 20 +++++++++++++++++---
+ 1 file changed, 17 insertions(+), 3 deletions(-)
+
+--- a/fs/partitions/msdos.c
++++ b/fs/partitions/msdos.c
+@@ -18,7 +18,7 @@
+ *
+ * Re-organised Feb 1998 Russell King
+ */
+-
++#include <linux/msdos_fs.h>
+
+ #include "check.h"
+ #include "msdos.h"
+@@ -419,6 +419,7 @@ int msdos_partition(struct parsed_partit
+ Sector sect;
+ unsigned char *data;
+ struct partition *p;
++ struct fat_boot_sector *fb;
+ int slot;
+
+ data = read_dev_sector(bdev, 0, §);
+@@ -444,8 +445,21 @@ int msdos_partition(struct parsed_partit
+ p = (struct partition *) (data + 0x1be);
+ for (slot = 1; slot <= 4; slot++, p++) {
+ if (p->boot_ind != 0 && p->boot_ind != 0x80) {
+- put_dev_sector(sect);
+- return 0;
++ /*
++ * Even without a valid boot inidicator value
++ * its still possible this is valid FAT filesystem
++ * without a partition table.
++ */
++ fb = (struct fat_boot_sector *) data;
++ if (slot == 1 && fb->reserved && fb->fats
++ && fat_valid_media(fb->media)) {
++ printk("\n");
++ put_dev_sector(sect);
++ return 1;
++ } else {
++ put_dev_sector(sect);
++ return 0;
++ }
+ }
+ }
+
+
+--
+
+From gregkh@mini.kroah.org Mon Aug 4 13:06:55 2008
+Message-Id: <20080804200655.476859381@mini.kroah.org>
+References: <20080804200515.110033151@mini.kroah.org>
+User-Agent: quilt/0.46-1
+Date: Mon, 04 Aug 2008 13:05:33 -0700
+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>,
+ Domenico Andreoli <cavokz@gmail.com>,
+ Willy Tarreau <w@1wt.eu>,
+ Rodrigo Rubira Branco <rbranco@la.checkpoint.com>,
+ Jake Edge <jake@lwn.net>,
+ Eugene Teo <eteo@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Marcel Holtmann <marcel@holtmann.org>
+Subject: [patch 18/33] Bluetooth: Signal user-space for HIDP and BNEP socket errors
+Content-Disposition: inline; filename=bluetooth-signal-user-space-for-hidp-and-bnep-socket-errors.patch
+Content-Length: 1879
+Lines: 64
+
+2.6.25-stable review patch. If anyone has any objections, please let us
+know.
+
+------------------
+
+From: Marcel Holtmann <marcel@holtmann.org>
+
+commit ec8dab36e0738d3059980d144e34f16a26bbda7d upstream
+
+When using the HIDP or BNEP kernel support, the user-space needs to
+know if the connection has been terminated for some reasons. Wake up
+the application if that happens. Otherwise kernel and user-space are
+no longer on the same page and weird behaviors can happen.
+
+Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ net/bluetooth/bnep/core.c | 5 +++++
+ net/bluetooth/hidp/core.c | 10 ++++++++++
+ 2 files changed, 15 insertions(+)
+
+--- a/net/bluetooth/bnep/core.c
++++ b/net/bluetooth/bnep/core.c
+@@ -507,6 +507,11 @@ static int bnep_session(void *arg)
+ /* Delete network device */
+ unregister_netdev(dev);
+
++ /* Wakeup user-space polling for socket errors */
++ s->sock->sk->sk_err = EUNATCH;
++
++ wake_up_interruptible(s->sock->sk->sk_sleep);
++
+ /* Release the socket */
+ fput(s->sock->file);
+
+--- a/net/bluetooth/hidp/core.c
++++ b/net/bluetooth/hidp/core.c
+@@ -581,6 +581,12 @@ static int hidp_session(void *arg)
+ hid_free_device(session->hid);
+ }
+
++ /* Wakeup user-space polling for socket errors */
++ session->intr_sock->sk->sk_err = EUNATCH;
++ session->ctrl_sock->sk->sk_err = EUNATCH;
++
++ hidp_schedule(session);
++
+ fput(session->intr_sock->file);
+
+ wait_event_timeout(*(ctrl_sk->sk_sleep),
+@@ -879,6 +885,10 @@ int hidp_del_connection(struct hidp_conn
+ skb_queue_purge(&session->ctrl_transmit);
+ skb_queue_purge(&session->intr_transmit);
+
++ /* Wakeup user-space polling for socket errors */
++ session->intr_sock->sk->sk_err = EUNATCH;
++ session->ctrl_sock->sk->sk_err = EUNATCH;
++
+ /* Kill session thread */
+ atomic_inc(&session->terminate);
+ hidp_schedule(session);
+
+--
+
+From gregkh@mini.kroah.org Mon Aug 4 13:06:55 2008
+Message-Id: <20080804200655.662808363@mini.kroah.org>
+References: <20080804200515.110033151@mini.kroah.org>
+User-Agent: quilt/0.46-1
+Date: Mon, 04 Aug 2008 13:05:34 -0700
+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>,
+ Domenico Andreoli <cavokz@gmail.com>,
+ Willy Tarreau <w@1wt.eu>,
+ Rodrigo Rubira Branco <rbranco@la.checkpoint.com>,
+ Jake Edge <jake@lwn.net>,
+ Eugene Teo <eteo@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Holger Macht <hmacht@suse.de>,
+ Len Brown <len.brown@intel.com>
+Subject: [patch 19/33] bay: exit if notify handler cannot be installed
+Content-Disposition: inline; filename=bay-exit-if-notify-handler-cannot-be-installed.patch
+Content-Length: 1771
+Lines: 56
+
+2.6.25-stable review patch. If anyone has any objections, please let us
+know.
+
+------------------
+
+From: Holger Macht <hmacht@suse.de>
+
+commit 7efd52a407bed6a2b02015b8ebbff7beba155392 upstream
+
+If acpi_install_notify_handler() for a bay device fails, the bay driver is
+superfluous. Most likely, another driver (like libata) is already caring
+about this device anyway. Furthermore,
+register_hotplug_dock_device(acpi_handle) from the dock driver must not be
+called twice with the same handler. This would result in an endless loop
+consuming 100% of CPU. So clean up and exit.
+
+Signed-off-by: Holger Macht <hmacht@suse.de>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Len Brown <len.brown@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/acpi/bay.c | 16 ++++++++++------
+ 1 file changed, 10 insertions(+), 6 deletions(-)
+
+--- a/drivers/acpi/bay.c
++++ b/drivers/acpi/bay.c
+@@ -299,16 +299,20 @@ static int bay_add(acpi_handle handle, i
+ */
+ pdev->dev.uevent_suppress = 0;
+
+- if (acpi_bay_add_fs(new_bay)) {
+- platform_device_unregister(new_bay->pdev);
+- goto bay_add_err;
+- }
+-
+ /* register for events on this device */
+ status = acpi_install_notify_handler(handle, ACPI_SYSTEM_NOTIFY,
+ bay_notify, new_bay);
+ if (ACPI_FAILURE(status)) {
+- printk(KERN_ERR PREFIX "Error installing bay notify handler\n");
++ printk(KERN_INFO PREFIX "Error installing bay notify handler\n");
++ platform_device_unregister(new_bay->pdev);
++ goto bay_add_err;
++ }
++
++ if (acpi_bay_add_fs(new_bay)) {
++ acpi_remove_notify_handler(handle, ACPI_SYSTEM_NOTIFY,
++ bay_notify);
++ platform_device_unregister(new_bay->pdev);
++ goto bay_add_err;
+ }
+
+ /* if we are on a dock station, we should register for dock
+
+--
+
+From gregkh@mini.kroah.org Mon Aug 4 13:06:55 2008
+Message-Id: <20080804200655.844731136@mini.kroah.org>
+References: <20080804200515.110033151@mini.kroah.org>
+User-Agent: quilt/0.46-1
+Date: Mon, 04 Aug 2008 13:05:35 -0700
+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>,
+ Domenico Andreoli <cavokz@gmail.com>,
+ Willy Tarreau <w@1wt.eu>,
+ Rodrigo Rubira Branco <rbranco@la.checkpoint.com>,
+ Jake Edge <jake@lwn.net>,
+ Eugene Teo <eteo@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ "Luis R. Rodriguez" <mcgrof@winlab.rutgers.edu>,
+ "John W. Linville" <linville@tuxdriver.com>,
+ Jiri Benc <jbenc@suse.cz>
+Subject: [patch 20/33] ath5k: Use software encryption for now
+Content-Disposition: inline; filename=ath5k-use-software-encryption-for-now.patch
+Content-Length: 983
+Lines: 38
+
+2.6.25-stable review patch. If anyone has any objections, please let us
+know.
+
+------------------
+
+From: Luis R. Rodriguez <mcgrof@winlab.rutgers.edu>
+
+Commit 6844e63a9458d15b4437aa467c99128d994b0f6c
+
+Hardware encryption doesn't work yet so lets use software
+encryption for now.
+
+Changes-licensed-under: 3-Clause-BSD
+
+Signed-off-by: Luis R. Rodriguez <mcgrof@winlab.rutgers.edu>
+Signed-off-by: John W. Linville <linville@tuxdriver.com>
+Cc: Jiri Benc <jbenc@suse.cz>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/net/wireless/ath5k/base.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/wireless/ath5k/base.c
++++ b/drivers/net/wireless/ath5k/base.c
+@@ -2864,7 +2864,9 @@ ath5k_set_key(struct ieee80211_hw *hw, e
+
+ switch(key->alg) {
+ case ALG_WEP:
+- break;
++ /* XXX: fix hardware encryption, its not working. For now
++ * allow software encryption */
++ /* break; */
+ case ALG_TKIP:
+ case ALG_CCMP:
+ return -EOPNOTSUPP;
+
+--
+
+From gregkh@mini.kroah.org Mon Aug 4 13:06:56 2008
+Message-Id: <20080804200656.003092324@mini.kroah.org>
+References: <20080804200515.110033151@mini.kroah.org>
+User-Agent: quilt/0.46-1
+Date: Mon, 04 Aug 2008 13:05:36 -0700
+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>,
+ Domenico Andreoli <cavokz@gmail.com>,
+ Willy Tarreau <w@1wt.eu>,
+ Rodrigo Rubira Branco <rbranco@la.checkpoint.com>,
+ Jake Edge <jake@lwn.net>,
+ Eugene Teo <eteo@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Andreas Schwab <schwab@suse.de>,
+ Paul Mackerras <paulus@samba.org>
+Subject: [patch 21/33] Add compat handler for PTRACE_GETSIGINFO
+Content-Disposition: inline; filename=add-compat-handler-for-ptrace_getsiginfo.patch
+Content-Length: 2436
+Lines: 89
+
+2.6.25-stable review patch. If anyone has any objections, please let us
+know.
+
+------------------
+
+From: Andreas Schwab <schwab@suse.de>
+
+commit e4cc58944c1e2ce41e3079d4eb60c95e7ce04b2b upstream
+
+Current versions of gdb require a working implementation of
+PTRACE_GETSIGINFO for proper watchpoint support. Since struct siginfo
+contains pointers it must be converted when passed to a 32-bit debugger.
+
+Signed-off-by: Andreas Schwab <schwab@suse.de>
+Signed-off-by: Paul Mackerras <paulus@samba.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/powerpc/kernel/ppc32.h | 2 ++
+ arch/powerpc/kernel/ptrace32.c | 27 +++++++++++++++++++++++++++
+ 2 files changed, 29 insertions(+)
+
+--- a/arch/powerpc/kernel/ppc32.h
++++ b/arch/powerpc/kernel/ppc32.h
+@@ -135,4 +135,6 @@ struct ucontext32 {
+ struct mcontext32 uc_mcontext;
+ };
+
++extern int copy_siginfo_to_user32(struct compat_siginfo __user *d, siginfo_t *s);
++
+ #endif /* _PPC64_PPC32_H */
+--- a/arch/powerpc/kernel/ptrace32.c
++++ b/arch/powerpc/kernel/ptrace32.c
+@@ -29,12 +29,15 @@
+ #include <linux/security.h>
+ #include <linux/signal.h>
+ #include <linux/compat.h>
++#include <linux/elf.h>
+
+ #include <asm/uaccess.h>
+ #include <asm/page.h>
+ #include <asm/pgtable.h>
+ #include <asm/system.h>
+
++#include "ppc32.h"
++
+ /*
+ * does not yet catch signals sent when the child dies.
+ * in exit.c or in signal.c.
+@@ -64,6 +67,27 @@ static long compat_ptrace_old(struct tas
+ return -EPERM;
+ }
+
++static int compat_ptrace_getsiginfo(struct task_struct *child, compat_siginfo_t __user *data)
++{
++ siginfo_t lastinfo;
++ int error = -ESRCH;
++
++ read_lock(&tasklist_lock);
++ if (likely(child->sighand != NULL)) {
++ error = -EINVAL;
++ spin_lock_irq(&child->sighand->siglock);
++ if (likely(child->last_siginfo != NULL)) {
++ lastinfo = *child->last_siginfo;
++ error = 0;
++ }
++ spin_unlock_irq(&child->sighand->siglock);
++ }
++ read_unlock(&tasklist_lock);
++ if (!error)
++ return copy_siginfo_to_user32(data, &lastinfo);
++ return error;
++}
++
+ long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
+ compat_ulong_t caddr, compat_ulong_t cdata)
+ {
+@@ -282,6 +306,9 @@ long compat_arch_ptrace(struct task_stru
+ 0, PT_REGS_COUNT * sizeof(compat_long_t),
+ compat_ptr(data));
+
++ case PTRACE_GETSIGINFO:
++ return compat_ptrace_getsiginfo(child, compat_ptr(data));
++
+ case PTRACE_GETFPREGS:
+ case PTRACE_SETFPREGS:
+ case PTRACE_GETVRREGS:
+
+--
+
+From gregkh@mini.kroah.org Mon Aug 4 13:06:56 2008
+Message-Id: <20080804200656.187872512@mini.kroah.org>
+References: <20080804200515.110033151@mini.kroah.org>
+User-Agent: quilt/0.46-1
+Date: Mon, 04 Aug 2008 13:05:37 -0700
+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>,
+ Domenico Andreoli <cavokz@gmail.com>,
+ Willy Tarreau <w@1wt.eu>,
+ Rodrigo Rubira Branco <rbranco@la.checkpoint.com>,
+ Jake Edge <jake@lwn.net>,
+ Eugene Teo <eteo@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Arjan van de Ven <arjan@linux.intel.com>,
+ Zhang Rui <rui.zhang@intel.com>,
+ Len Brown <len.brown@intel.com>
+Subject: [patch 22/33] ACPI: Reject below-freezing temperatures as invalid critical temperatures
+Content-Disposition: inline; filename=acpi-reject-below-freezing-temperatures-as-invalid-critical-temperatures.patch
+Content-Length: 1613
+Lines: 49
+
+2.6.25-stable review patch. If anyone has any objections, please let us
+know.
+
+------------------
+
+From: Arjan van de Ven <arjan@linux.intel.com>
+
+commit a39a2d7c72b358c6253a2ec28e17b023b7f6f41c upstream
+
+My laptop thinks that it's a good idea to give -73C as the critical
+CPU temperature.... which isn't the best thing since it causes a shutdown
+right at bootup.
+
+Temperatures below freezing are clearly invalid critical thresholds
+so just reject these as such.
+
+Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
+Acked-by: Zhang Rui <rui.zhang@intel.com>
+Signed-off-by: Len Brown <len.brown@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/acpi/thermal.c | 11 +++++++++--
+ 1 file changed, 9 insertions(+), 2 deletions(-)
+
+--- a/drivers/acpi/thermal.c
++++ b/drivers/acpi/thermal.c
+@@ -359,10 +359,17 @@ static int acpi_thermal_trips_update(str
+ if (flag & ACPI_TRIPS_CRITICAL) {
+ status = acpi_evaluate_integer(tz->device->handle,
+ "_CRT", NULL, &tz->trips.critical.temperature);
+- if (ACPI_FAILURE(status)) {
++ /*
++ * Treat freezing temperatures as invalid as well; some
++ * BIOSes return really low values and cause reboots at startup.
++ * Below zero (Celcius) values clearly aren't right for sure..
++ * ... so lets discard those as invalid.
++ */
++ if (ACPI_FAILURE(status) ||
++ tz->trips.critical.temperature <= 2732) {
+ tz->trips.critical.flags.valid = 0;
+ ACPI_EXCEPTION((AE_INFO, status,
+- "No critical threshold"));
++ "No or invalid critical threshold"));
+ return -ENODEV;
+ } else {
+ tz->trips.critical.flags.valid = 1;
+
+--
+
+From gregkh@mini.kroah.org Mon Aug 4 13:06:56 2008
+Message-Id: <20080804200656.365702586@mini.kroah.org>
+References: <20080804200515.110033151@mini.kroah.org>
+User-Agent: quilt/0.46-1
+Date: Mon, 04 Aug 2008 13:05:38 -0700
+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>,
+ Domenico Andreoli <cavokz@gmail.com>,
+ Willy Tarreau <w@1wt.eu>,
+ Rodrigo Rubira Branco <rbranco@la.checkpoint.com>,
+ Jake Edge <jake@lwn.net>,
+ Eugene Teo <eteo@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Zhang Rui <rui.zhang@intel.com>,
+ Jean Delvare <khali@linux-fr.org>,
+ Len Brown <len.brown@intel.com>
+Subject: [patch 23/33] ACPI: update thermal temperature
+Content-Disposition: inline; filename=acpi-update-thermal-temperature.patch
+Content-Length: 1048
+Lines: 41
+
+2.6.25-stable review patch. If anyone has any objections, please let us
+know.
+
+------------------
+
+From: Zhang, Rui <rui.zhang@intel.com>
+
+commit 76ecb4f2d7ea5c3aac8970b9529775316507c6d2 upstream
+
+Fix the problem that thermal_get_temp returns the cached value,
+which causes the temperature in generic thermal never updates.
+
+Signed-off-by: Zhang Rui <rui.zhang@intel.com>
+Acked-by: Jean Delvare <khali@linux-fr.org>
+Signed-off-by: Len Brown <len.brown@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/acpi/thermal.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+--- a/drivers/acpi/thermal.c
++++ b/drivers/acpi/thermal.c
+@@ -891,10 +891,15 @@ static void acpi_thermal_check(void *dat
+ static int thermal_get_temp(struct thermal_zone_device *thermal, char *buf)
+ {
+ struct acpi_thermal *tz = thermal->devdata;
++ int result;
+
+ if (!tz)
+ return -EINVAL;
+
++ result = acpi_thermal_get_temperature(tz);
++ if (result)
++ return result;
++
+ return sprintf(buf, "%ld\n", KELVIN_TO_MILLICELSIUS(tz->temperature));
+ }
+
+
+--
+
+From gregkh@mini.kroah.org Mon Aug 4 13:06:56 2008
+Message-Id: <20080804200656.536500132@mini.kroah.org>
+References: <20080804200515.110033151@mini.kroah.org>
+User-Agent: quilt/0.46-1
+Date: Mon, 04 Aug 2008 13:05:39 -0700
+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>,
+ Domenico Andreoli <cavokz@gmail.com>,
+ Willy Tarreau <w@1wt.eu>,
+ Rodrigo Rubira Branco <rbranco@la.checkpoint.com>,
+ Jake Edge <jake@lwn.net>,
+ Eugene Teo <eteo@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Oliver Neukum <oneukum@suse.de>,
+ Dmitry Torokhov <dtor@mail.ru>
+Subject: [patch 24/33] Input: appletouch - implement reset-resume logic
+Content-Disposition: inline; filename=input-appletouch-implement-reset-resume-logic.patch
+Content-Length: 3272
+Lines: 127
+
+2.6.25-stable review patch. If anyone has any objections, please let us
+know.
+
+------------------
+
+From: Oliver Neukum <oliver@neukum.org>
+
+commit 90d95ef617a535a8832bdcb8dee07bf591e5dd82 upstream
+
+On some boxes the touchpad needs to be reinitialized after resume to make
+it function again. This fixes bugzilla #10825.
+
+Signed-off-by: Oliver Neukum <oneukum@suse.de>
+Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/input/mouse/appletouch.c | 49 ++++++++++++++++++++++++++++++++-------
+ drivers/usb/core/quirks.c | 3 ++
+ 2 files changed, 44 insertions(+), 8 deletions(-)
+
+--- a/drivers/input/mouse/appletouch.c
++++ b/drivers/input/mouse/appletouch.c
+@@ -589,6 +589,21 @@ static void atp_close(struct input_dev *
+ dev->open = 0;
+ }
+
++static int atp_handle_geyser(struct atp *dev)
++{
++ struct usb_device *udev = dev->udev;
++
++ if (!atp_is_fountain(dev)) {
++ /* switch to raw sensor mode */
++ if (atp_geyser_init(udev))
++ return -EIO;
++
++ printk(KERN_INFO "appletouch: Geyser mode initialized.\n");
++ }
++
++ return 0;
++}
++
+ static int atp_probe(struct usb_interface *iface, const struct usb_device_id *id)
+ {
+ struct atp *dev;
+@@ -633,14 +648,6 @@ static int atp_probe(struct usb_interfac
+ else
+ dev->datalen = 81;
+
+- if (!atp_is_fountain(dev)) {
+- /* switch to raw sensor mode */
+- if (atp_geyser_init(udev))
+- goto err_free_devs;
+-
+- printk(KERN_INFO "appletouch: Geyser mode initialized.\n");
+- }
+-
+ dev->urb = usb_alloc_urb(0, GFP_KERNEL);
+ if (!dev->urb)
+ goto err_free_devs;
+@@ -654,6 +661,10 @@ static int atp_probe(struct usb_interfac
+ usb_rcvintpipe(udev, int_in_endpointAddr),
+ dev->data, dev->datalen, atp_complete, dev, 1);
+
++ error = atp_handle_geyser(dev);
++ if (error)
++ goto err_free_buffer;
++
+ usb_make_path(udev, dev->phys, sizeof(dev->phys));
+ strlcat(dev->phys, "/input0", sizeof(dev->phys));
+
+@@ -744,6 +755,20 @@ static void atp_disconnect(struct usb_in
+ printk(KERN_INFO "input: appletouch disconnected\n");
+ }
+
++static int atp_recover(struct atp *dev)
++{
++ int error;
++
++ error = atp_handle_geyser(dev);
++ if (error)
++ return error;
++
++ if (dev->open && usb_submit_urb(dev->urb, GFP_ATOMIC))
++ return -EIO;
++
++ return 0;
++}
++
+ static int atp_suspend(struct usb_interface *iface, pm_message_t message)
+ {
+ struct atp *dev = usb_get_intfdata(iface);
+@@ -764,12 +789,20 @@ static int atp_resume(struct usb_interfa
+ return 0;
+ }
+
++static int atp_reset_resume(struct usb_interface *iface)
++{
++ struct atp *dev = usb_get_intfdata(iface);
++
++ return atp_recover(dev);
++}
++
+ static struct usb_driver atp_driver = {
+ .name = "appletouch",
+ .probe = atp_probe,
+ .disconnect = atp_disconnect,
+ .suspend = atp_suspend,
+ .resume = atp_resume,
++ .reset_resume = atp_reset_resume,
+ .id_table = atp_table,
+ };
+
+--- a/drivers/usb/core/quirks.c
++++ b/drivers/usb/core/quirks.c
+@@ -47,6 +47,9 @@ static const struct usb_device_id usb_qu
+ /* Edirol SD-20 */
+ { USB_DEVICE(0x0582, 0x0027), .driver_info = USB_QUIRK_RESET_RESUME },
+
++ /* appletouch */
++ { USB_DEVICE(0x05ac, 0x021a), .driver_info = USB_QUIRK_RESET_RESUME },
++
+ /* M-Systems Flash Disk Pioneers */
+ { USB_DEVICE(0x08ec, 0x1000), .driver_info = USB_QUIRK_RESET_RESUME },
+
+
+--
+
+From gregkh@mini.kroah.org Mon Aug 4 13:06:56 2008
+Message-Id: <20080804200656.696068387@mini.kroah.org>
+References: <20080804200515.110033151@mini.kroah.org>
+User-Agent: quilt/0.46-1
+Date: Mon, 04 Aug 2008 13:05:40 -0700
+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>,
+ Domenico Andreoli <cavokz@gmail.com>,
+ Willy Tarreau <w@1wt.eu>,
+ Rodrigo Rubira Branco <rbranco@la.checkpoint.com>,
+ Jake Edge <jake@lwn.net>,
+ Eugene Teo <eteo@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Alan Stern <stern@rowland.harvard.edu>,
+ David Brownell <dbrownell@users.sourceforge.net>
+Subject: [patch 25/33] USB: EHCI: fix remote-wakeup regression
+Content-Disposition: inline; filename=usb-ehci-fix-remote-wakeup-regression.patch
+Content-Length: 2391
+Lines: 69
+
+2.6.25-stable review patch. If anyone has any objections, please let us
+know.
+
+------------------
+
+From: Alan Stern <stern@rowland.harvard.edu>
+
+commit d1f114d12bb4db3147e1b1342ae31083c5a79c84 upstream
+
+This patch (as1097) fixes a bug in the remote-wakeup handling in
+ehci-hcd. The driver currently does not keep track of whether the
+change-suspend feature is enabled for each port; the feature is
+automatically reset the first time it is read. But recent changes to
+the hub driver require that the feature be read at least twice in
+order to work properly.
+
+A bit-vector is added for storing the change-suspend feature values.
+
+Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
+Acked-by: David Brownell <dbrownell@users.sourceforge.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/host/ehci-hub.c | 6 ++++--
+ drivers/usb/host/ehci.h | 2 ++
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+--- a/drivers/usb/host/ehci.h
++++ b/drivers/usb/host/ehci.h
+@@ -97,6 +97,8 @@ struct ehci_hcd { /* one per controlle
+ dedicated to the companion controller */
+ unsigned long owned_ports; /* which ports are
+ owned by the companion during a bus suspend */
++ unsigned long port_c_suspend; /* which ports have
++ the change-suspend feature turned on */
+
+ /* per-HC memory pools (could be per-bus, but ...) */
+ struct dma_pool *qh_pool; /* qh per active urb */
+--- a/drivers/usb/host/ehci-hub.c
++++ b/drivers/usb/host/ehci-hub.c
+@@ -621,7 +621,7 @@ static int ehci_hub_control (
+ }
+ break;
+ case USB_PORT_FEAT_C_SUSPEND:
+- /* we auto-clear this feature */
++ clear_bit(wIndex, &ehci->port_c_suspend);
+ break;
+ case USB_PORT_FEAT_POWER:
+ if (HCS_PPC (ehci->hcs_params))
+@@ -700,7 +700,7 @@ static int ehci_hub_control (
+ /* resume completed? */
+ else if (time_after_eq(jiffies,
+ ehci->reset_done[wIndex])) {
+- status |= 1 << USB_PORT_FEAT_C_SUSPEND;
++ set_bit(wIndex, &ehci->port_c_suspend);
+ ehci->reset_done[wIndex] = 0;
+
+ /* stop resume signaling */
+@@ -777,6 +777,8 @@ static int ehci_hub_control (
+ status |= 1 << USB_PORT_FEAT_RESET;
+ if (temp & PORT_POWER)
+ status |= 1 << USB_PORT_FEAT_POWER;
++ if (test_bit(wIndex, &ehci->port_c_suspend))
++ status |= 1 << USB_PORT_FEAT_C_SUSPEND;
+
+ #ifndef EHCI_VERBOSE_DEBUG
+ if (status & ~0xffff) /* only if wPortChange is interesting */
+
+--
+
+From gregkh@mini.kroah.org Mon Aug 4 13:06:56 2008
+Message-Id: <20080804200656.864183888@mini.kroah.org>
+References: <20080804200515.110033151@mini.kroah.org>
+User-Agent: quilt/0.46-1
+Date: Mon, 04 Aug 2008 13:05:41 -0700
+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>,
+ Domenico Andreoli <cavokz@gmail.com>,
+ Willy Tarreau <w@1wt.eu>,
+ Rodrigo Rubira Branco <rbranco@la.checkpoint.com>,
+ Jake Edge <jake@lwn.net>,
+ Eugene Teo <eteo@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Tejun Heo <tj@kernel.org>,
+ Jesse Barnes <jbarnes@virtuousgeek.org>
+Subject: [patch 26/33] pci: VT3336 cant do MSI either
+Content-Disposition: inline; filename=pci-vt3336-can-t-do-msi-either.patch
+Content-Length: 1360
+Lines: 36
+
+2.6.25-stable review patch. If anyone has any objections, please let us
+know.
+
+------------------
+
+From: Tejun Heo <tj@kernel.org>
+
+commit 66d715c95a39e84cd25204a665915621457d9691 upstream
+
+It seems VT3336 can't do msi either as with its bro 3351. Disable it.
+Reported in the following SUSE bug.
+
+ https://bugzilla.novell.com/show_bug.cgi?id=300001
+
+Signed-off-by: Tejun Heo <tj@kernel.org>
+Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
+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/pci/quirks.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/pci/quirks.c
++++ b/drivers/pci/quirks.c
+@@ -1675,6 +1675,7 @@ static void __init quirk_disable_all_msi
+ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_GCNB_LE, quirk_disable_all_msi);
+ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS400_200, quirk_disable_all_msi);
+ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS480, quirk_disable_all_msi);
++DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_VT3336, quirk_disable_all_msi);
+ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_VT3351, quirk_disable_all_msi);
+
+ /* Disable MSI on chipsets that are known to not support it */
+
+--
+
+From gregkh@mini.kroah.org Mon Aug 4 13:06:57 2008
+Message-Id: <20080804200657.013427576@mini.kroah.org>
+References: <20080804200515.110033151@mini.kroah.org>
+User-Agent: quilt/0.46-1
+Date: Mon, 04 Aug 2008 13:05:42 -0700
+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>,
+ Domenico Andreoli <cavokz@gmail.com>,
+ Willy Tarreau <w@1wt.eu>,
+ Rodrigo Rubira Branco <rbranco@la.checkpoint.com>,
+ Jake Edge <jake@lwn.net>,
+ Eugene Teo <eteo@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Takashi Iwai <tiwai@suse.de>
+Subject: [patch 27/33] ALSA: ac97 - Fix ASUS A9T laptop output
+Content-Disposition: inline; filename=alsa-ac97-fix-asus-a9t-laptop-output.patch
+Content-Length: 4190
+Lines: 119
+
+2.6.25-stable review patch. If anyone has any objections, please let us
+know.
+
+------------------
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit e48d6d97bb6bd8c008045ea0522ea8278fdccc55 upstream
+
+ASUS A9T laptop uses line-out pin as the real front-output while
+other devices use it as the surround.
+
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ include/sound/ac97_codec.h | 1
+ sound/pci/ac97/ac97_patch.c | 48 +++++++++++++++++++++++++++++++-------------
+ 2 files changed, 35 insertions(+), 14 deletions(-)
+
+--- a/include/sound/ac97_codec.h
++++ b/include/sound/ac97_codec.h
+@@ -504,6 +504,7 @@ struct snd_ac97 {
+ unsigned short pcmreg[3]; // PCM registers
+ unsigned short codec_cfg[3]; // CODEC_CFG bits
+ unsigned char swap_mic_linein; // AD1986/AD1986A only
++ unsigned char lo_as_master; /* LO as master */
+ } ad18xx;
+ unsigned int dev_flags; /* device specific */
+ } spec;
+--- a/sound/pci/ac97/ac97_patch.c
++++ b/sound/pci/ac97/ac97_patch.c
+@@ -1960,6 +1960,9 @@ static int snd_ac97_ad1888_lohpsel_get(s
+
+ val = ac97->regs[AC97_AD_MISC];
+ ucontrol->value.integer.value[0] = !(val & AC97_AD198X_LOSEL);
++ if (ac97->spec.ad18xx.lo_as_master)
++ ucontrol->value.integer.value[0] =
++ !ucontrol->value.integer.value[0];
+ return 0;
+ }
+
+@@ -1968,8 +1971,10 @@ static int snd_ac97_ad1888_lohpsel_put(s
+ struct snd_ac97 *ac97 = snd_kcontrol_chip(kcontrol);
+ unsigned short val;
+
+- val = !ucontrol->value.integer.value[0]
+- ? (AC97_AD198X_LOSEL | AC97_AD198X_HPSEL) : 0;
++ val = !ucontrol->value.integer.value[0];
++ if (ac97->spec.ad18xx.lo_as_master)
++ val = !val;
++ val = val ? (AC97_AD198X_LOSEL | AC97_AD198X_HPSEL) : 0;
+ return snd_ac97_update_bits(ac97, AC97_AD_MISC,
+ AC97_AD198X_LOSEL | AC97_AD198X_HPSEL, val);
+ }
+@@ -2020,7 +2025,7 @@ static void ad1888_update_jacks(struct s
+ {
+ unsigned short val = 0;
+ /* clear LODIS if shared jack is to be used for Surround out */
+- if (is_shared_linein(ac97))
++ if (!ac97->spec.ad18xx.lo_as_master && is_shared_linein(ac97))
+ val |= (1 << 12);
+ /* clear CLDIS if shared jack is to be used for C/LFE out */
+ if (is_shared_micin(ac97))
+@@ -2056,9 +2061,13 @@ static const struct snd_kcontrol_new snd
+
+ static int patch_ad1888_specific(struct snd_ac97 *ac97)
+ {
+- /* rename 0x04 as "Master" and 0x02 as "Master Surround" */
+- snd_ac97_rename_vol_ctl(ac97, "Master Playback", "Master Surround Playback");
+- snd_ac97_rename_vol_ctl(ac97, "Headphone Playback", "Master Playback");
++ if (!ac97->spec.ad18xx.lo_as_master) {
++ /* rename 0x04 as "Master" and 0x02 as "Master Surround" */
++ snd_ac97_rename_vol_ctl(ac97, "Master Playback",
++ "Master Surround Playback");
++ snd_ac97_rename_vol_ctl(ac97, "Headphone Playback",
++ "Master Playback");
++ }
+ return patch_build_controls(ac97, snd_ac97_ad1888_controls, ARRAY_SIZE(snd_ac97_ad1888_controls));
+ }
+
+@@ -2077,16 +2086,27 @@ static int patch_ad1888(struct snd_ac97
+
+ patch_ad1881(ac97);
+ ac97->build_ops = &patch_ad1888_build_ops;
+- /* Switch FRONT/SURROUND LINE-OUT/HP-OUT default connection */
+- /* it seems that most vendors connect line-out connector to headphone out of AC'97 */
++
++ /*
++ * LO can be used as a real line-out on some devices,
++ * and we need to revert the front/surround mixer switches
++ */
++ if (ac97->subsystem_vendor == 0x1043 &&
++ ac97->subsystem_device == 0x1193) /* ASUS A9T laptop */
++ ac97->spec.ad18xx.lo_as_master = 1;
++
++ misc = snd_ac97_read(ac97, AC97_AD_MISC);
+ /* AD-compatible mode */
+ /* Stereo mutes enabled */
+- misc = snd_ac97_read(ac97, AC97_AD_MISC);
+- snd_ac97_write_cache(ac97, AC97_AD_MISC, misc |
+- AC97_AD198X_LOSEL |
+- AC97_AD198X_HPSEL |
+- AC97_AD198X_MSPLT |
+- AC97_AD198X_AC97NC);
++ misc |= AC97_AD198X_MSPLT | AC97_AD198X_AC97NC;
++ if (!ac97->spec.ad18xx.lo_as_master)
++ /* Switch FRONT/SURROUND LINE-OUT/HP-OUT default connection */
++ /* it seems that most vendors connect line-out connector to
++ * headphone out of AC'97
++ */
++ misc |= AC97_AD198X_LOSEL | AC97_AD198X_HPSEL;
++
++ snd_ac97_write_cache(ac97, AC97_AD_MISC, misc);
+ ac97->flags |= AC97_STEREO_MUTES;
+ return 0;
+ }
+
+--
+
+From gregkh@mini.kroah.org Mon Aug 4 13:06:57 2008
+Message-Id: <20080804200657.182638467@mini.kroah.org>
+References: <20080804200515.110033151@mini.kroah.org>
+User-Agent: quilt/0.46-1
+Date: Mon, 04 Aug 2008 13:05:43 -0700
+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>,
+ Domenico Andreoli <cavokz@gmail.com>,
+ Willy Tarreau <w@1wt.eu>,
+ Rodrigo Rubira Branco <rbranco@la.checkpoint.com>,
+ Jake Edge <jake@lwn.net>,
+ Eugene Teo <eteo@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Takashi Iwai <tiwai@suse.de>
+Subject: [patch 28/33] ALSA: Add more fallbacks to OSS PHONEOUT mixer map
+Content-Disposition: inline; filename=alsa-add-more-fallbacks-to-oss-phoneout-mixer-map.patch
+Content-Length: 1027
+Lines: 33
+
+2.6.25-stable review patch. If anyone has any objections, please let us
+know.
+
+------------------
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit 6c4cc3a8ed15aacc06a5fd369639fef633cee2bc upstream
+
+Added more fallbacks to OSS PHONEOUT mixer mapping. This corresponds
+to the speaker output in general, so now "Mono" and "Speaker" are
+assigned.
+
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ sound/core/oss/mixer_oss.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/sound/core/oss/mixer_oss.c
++++ b/sound/core/oss/mixer_oss.c
+@@ -1257,6 +1257,8 @@ static void snd_mixer_oss_build(struct s
+ { SOUND_MIXER_DIGITAL3, "Digital", 2 },
+ { SOUND_MIXER_PHONEIN, "Phone", 0 },
+ { SOUND_MIXER_PHONEOUT, "Master Mono", 0 },
++ { SOUND_MIXER_PHONEOUT, "Speaker", 0 }, /*fallback*/
++ { SOUND_MIXER_PHONEOUT, "Mono", 0 }, /*fallback*/
+ { SOUND_MIXER_PHONEOUT, "Phone", 0 }, /* fallback */
+ { SOUND_MIXER_VIDEO, "Video", 0 },
+ { SOUND_MIXER_RADIO, "Radio", 0 },
+
+--
+
+From gregkh@mini.kroah.org Mon Aug 4 13:06:57 2008
+Message-Id: <20080804200657.355985569@mini.kroah.org>
+References: <20080804200515.110033151@mini.kroah.org>
+User-Agent: quilt/0.46-1
+Date: Mon, 04 Aug 2008 13:05:44 -0700
+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>,
+ Domenico Andreoli <cavokz@gmail.com>,
+ Willy Tarreau <w@1wt.eu>,
+ Rodrigo Rubira Branco <rbranco@la.checkpoint.com>,
+ Jake Edge <jake@lwn.net>,
+ Eugene Teo <eteo@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Takashi Iwai <tiwai@suse.de>
+Subject: [patch 29/33] ALSA: emu10k1 - Fix inverted Analog/Digital mixer switch on Audigy2
+Content-Disposition: inline; filename=alsa-emu10k1-fix-inverted-analog-digital-mixer-switch-on-audigy2.patch
+Content-Length: 3128
+Lines: 91
+
+2.6.25-stable review patch. If anyone has any objections, please let us
+know.
+
+------------------
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit d2cd74b158d7214a556226e3312f9fb1de64d7ae upstream
+
+On Audigy2 Platinum, the Analog/Digital mixer switch is inverted.
+ https://bugzilla.novell.com/show_bug.cgi?id=396204
+
+The patch adds a simple workaround.
+
+There might be another device requiring a similar fix, too (or fix for
+audigy2 generically), but right now I fix only the known broken one.
+
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ include/sound/emu10k1.h | 1 +
+ sound/pci/emu10k1/emu10k1_main.c | 1 +
+ sound/pci/emu10k1/emumixer.c | 13 ++++++++++---
+ 3 files changed, 12 insertions(+), 3 deletions(-)
+
+--- a/include/sound/emu10k1.h
++++ b/include/sound/emu10k1.h
+@@ -1670,6 +1670,7 @@ struct snd_emu_chip_details {
+ unsigned char spi_dac; /* SPI interface for DAC */
+ unsigned char i2c_adc; /* I2C interface for ADC */
+ unsigned char adc_1361t; /* Use Philips 1361T ADC */
++ unsigned char invert_shared_spdif; /* analog/digital switch inverted */
+ const char *driver;
+ const char *name;
+ const char *id; /* for backward compatibility - can be NULL if not needed */
+--- a/sound/pci/emu10k1/emu10k1_main.c
++++ b/sound/pci/emu10k1/emu10k1_main.c
+@@ -1527,6 +1527,7 @@ static struct snd_emu_chip_details emu_c
+ .ca0151_chip = 1,
+ .spk71 = 1,
+ .spdif_bug = 1,
++ .invert_shared_spdif = 1, /* digital/analog switch swapped */
+ .adc_1361t = 1, /* 24 bit capture instead of 16bit. Fixes ALSA bug#324 */
+ .ac97_chip = 1} ,
+ {.vendor = 0x1102, .device = 0x0004, .revision = 0x04,
+--- a/sound/pci/emu10k1/emumixer.c
++++ b/sound/pci/emu10k1/emumixer.c
+@@ -1578,6 +1578,10 @@ static int snd_emu10k1_shared_spdif_get(
+ ucontrol->value.integer.value[0] = inl(emu->port + A_IOCFG) & A_IOCFG_GPOUT0 ? 1 : 0;
+ else
+ ucontrol->value.integer.value[0] = inl(emu->port + HCFG) & HCFG_GPOUT0 ? 1 : 0;
++ if (emu->card_capabilities->invert_shared_spdif)
++ ucontrol->value.integer.value[0] =
++ !ucontrol->value.integer.value[0];
++
+ return 0;
+ }
+
+@@ -1586,15 +1590,18 @@ static int snd_emu10k1_shared_spdif_put(
+ {
+ unsigned long flags;
+ struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol);
+- unsigned int reg, val;
++ unsigned int reg, val, sw;
+ int change = 0;
+
++ sw = ucontrol->value.integer.value[0];
++ if (emu->card_capabilities->invert_shared_spdif)
++ sw = !sw;
+ spin_lock_irqsave(&emu->reg_lock, flags);
+ if ( emu->card_capabilities->i2c_adc) {
+ /* Do nothing for Audigy 2 ZS Notebook */
+ } else if (emu->audigy) {
+ reg = inl(emu->port + A_IOCFG);
+- val = ucontrol->value.integer.value[0] ? A_IOCFG_GPOUT0 : 0;
++ val = sw ? A_IOCFG_GPOUT0 : 0;
+ change = (reg & A_IOCFG_GPOUT0) != val;
+ if (change) {
+ reg &= ~A_IOCFG_GPOUT0;
+@@ -1603,7 +1610,7 @@ static int snd_emu10k1_shared_spdif_put(
+ }
+ }
+ reg = inl(emu->port + HCFG);
+- val = ucontrol->value.integer.value[0] ? HCFG_GPOUT0 : 0;
++ val = sw ? HCFG_GPOUT0 : 0;
+ change |= (reg & HCFG_GPOUT0) != val;
+ if (change) {
+ reg &= ~HCFG_GPOUT0;
+
+--
+
+From gregkh@mini.kroah.org Mon Aug 4 13:06:57 2008
+Message-Id: <20080804200657.532945420@mini.kroah.org>
+References: <20080804200515.110033151@mini.kroah.org>
+User-Agent: quilt/0.46-1
+Date: Mon, 04 Aug 2008 13:05:45 -0700
+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>,
+ Domenico Andreoli <cavokz@gmail.com>,
+ Willy Tarreau <w@1wt.eu>,
+ Rodrigo Rubira Branco <rbranco@la.checkpoint.com>,
+ Jake Edge <jake@lwn.net>,
+ Eugene Teo <eteo@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Takashi Iwai <tiwai@suse.de>
+Subject: [patch 30/33] ALSA: Fix Oops with usb-audio reconnection
+Content-Disposition: inline; filename=alsa-fix-oops-with-usb-audio-reconnection.patch
+Content-Length: 8226
+Lines: 310
+
+2.6.25-stable review patch. If anyone has any objections, please let us
+know.
+
+------------------
+
+From: Takashi Iwai <tiwai@suse.de>
+
+Backport fixes for usb-audio Oops at reconnection.
+
+9eb70e6... [ALSA] usb-audio - Fix race in reconnection
+f18638d... [ALSA] Clean up snd_card_free*()
+73d38b1... [ALSA] Fix the race of card instance unregistration
+
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ sound/core/init.c | 36 ++++++++++--------------
+ sound/usb/usbaudio.c | 35 +++++++++++++++++------
+ sound/usb/usbquirks.h | 75 +++++++++++++++++++++++++-------------------------
+ 3 files changed, 79 insertions(+), 67 deletions(-)
+
+--- a/sound/core/init.c
++++ b/sound/core/init.c
+@@ -311,6 +311,9 @@ int snd_card_disconnect(struct snd_card
+ struct file *file;
+ int err;
+
++ if (!card)
++ return -EINVAL;
++
+ spin_lock(&card->files_lock);
+ if (card->shutdown) {
+ spin_unlock(&card->files_lock);
+@@ -322,6 +325,7 @@ int snd_card_disconnect(struct snd_card
+ /* phase 1: disable fops (user space) operations for ALSA API */
+ mutex_lock(&snd_card_mutex);
+ snd_cards[card->number] = NULL;
++ snd_cards_lock &= ~(1 << card->number);
+ mutex_unlock(&snd_card_mutex);
+
+ /* phase 2: replace file->f_op with special dummy operations */
+@@ -360,6 +364,15 @@ int snd_card_disconnect(struct snd_card
+ snd_printk(KERN_ERR "not all devices for card %i can be disconnected\n", card->number);
+
+ snd_info_card_disconnect(card);
++#ifndef CONFIG_SYSFS_DEPRECATED
++ if (card->card_dev) {
++ device_unregister(card->card_dev);
++ card->card_dev = NULL;
++ }
++#endif
++#ifdef CONFIG_PM
++ wake_up(&card->power_sleep);
++#endif
+ return 0;
+ }
+
+@@ -401,33 +414,14 @@ static int snd_card_do_free(struct snd_c
+ snd_printk(KERN_WARNING "unable to free card info\n");
+ /* Not fatal error */
+ }
+-#ifndef CONFIG_SYSFS_DEPRECATED
+- if (card->card_dev)
+- device_unregister(card->card_dev);
+-#endif
+ kfree(card);
+ return 0;
+ }
+
+-static int snd_card_free_prepare(struct snd_card *card)
+-{
+- if (card == NULL)
+- return -EINVAL;
+- (void) snd_card_disconnect(card);
+- mutex_lock(&snd_card_mutex);
+- snd_cards[card->number] = NULL;
+- snd_cards_lock &= ~(1 << card->number);
+- mutex_unlock(&snd_card_mutex);
+-#ifdef CONFIG_PM
+- wake_up(&card->power_sleep);
+-#endif
+- return 0;
+-}
+-
+ int snd_card_free_when_closed(struct snd_card *card)
+ {
+ int free_now = 0;
+- int ret = snd_card_free_prepare(card);
++ int ret = snd_card_disconnect(card);
+ if (ret)
+ return ret;
+
+@@ -447,7 +441,7 @@ EXPORT_SYMBOL(snd_card_free_when_closed)
+
+ int snd_card_free(struct snd_card *card)
+ {
+- int ret = snd_card_free_prepare(card);
++ int ret = snd_card_disconnect(card);
+ if (ret)
+ return ret;
+
+--- a/sound/usb/usbaudio.c
++++ b/sound/usb/usbaudio.c
+@@ -1762,8 +1762,10 @@ static int check_hw_params_convention(st
+
+ channels = kcalloc(MAX_MASK, sizeof(u32), GFP_KERNEL);
+ rates = kcalloc(MAX_MASK, sizeof(u32), GFP_KERNEL);
+- if (!channels || !rates)
++ if (!channels || !rates) {
++ err = -ENOMEM;
+ goto __out;
++ }
+
+ list_for_each(p, &subs->fmt_list) {
+ struct audioformat *f;
+@@ -1916,7 +1918,10 @@ static int setup_hw_info(struct snd_pcm_
+ 1000 * MIN_PACKS_URB,
+ /*(nrpacks * MAX_URBS) * 1000*/ UINT_MAX);
+
+- if (check_hw_params_convention(subs)) {
++ err = check_hw_params_convention(subs);
++ if (err < 0)
++ return err;
++ else if (err) {
+ hwc_debug("setting extra hw constraints...\n");
+ if ((err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_RATE,
+ hw_rule_rate, subs,
+@@ -2463,11 +2468,12 @@ static int parse_audio_format_i_type(str
+ }
+ break;
+ case USB_AUDIO_FORMAT_PCM8:
+- /* Dallas DS4201 workaround */
++ pcm_format = SNDRV_PCM_FORMAT_U8;
++
++ /* Dallas DS4201 workaround: it advertises U8 format, but really
++ supports S8. */
+ if (chip->usb_id == USB_ID(0x04fa, 0x4201))
+ pcm_format = SNDRV_PCM_FORMAT_S8;
+- else
+- pcm_format = SNDRV_PCM_FORMAT_U8;
+ break;
+ case USB_AUDIO_FORMAT_IEEE_FLOAT:
+ pcm_format = SNDRV_PCM_FORMAT_FLOAT_LE;
+@@ -2671,12 +2677,23 @@ static int parse_audio_endpoints(struct
+ int format;
+ struct audioformat *fp;
+ unsigned char *fmt, *csep;
++ int num;
+
+ dev = chip->dev;
+
+ /* parse the interface's altsettings */
+ iface = usb_ifnum_to_if(dev, iface_no);
+- for (i = 0; i < iface->num_altsetting; i++) {
++
++ num = iface->num_altsetting;
++
++ /*
++ * Dallas DS4201 workaround: It presents 5 altsettings, but the last
++ * one misses syncpipe, and does not produce any sound.
++ */
++ if (chip->usb_id == USB_ID(0x04fa, 0x4201))
++ num = 4;
++
++ for (i = 0; i < num; i++) {
+ alts = &iface->altsetting[i];
+ altsd = get_iface_desc(alts);
+ /* skip invalid one */
+@@ -3406,7 +3423,6 @@ static void snd_usb_audio_create_proc(st
+
+ static int snd_usb_audio_free(struct snd_usb_audio *chip)
+ {
+- usb_chip[chip->index] = NULL;
+ kfree(chip);
+ return 0;
+ }
+@@ -3600,8 +3616,8 @@ static void *snd_usb_audio_probe(struct
+ snd_card_set_dev(chip->card, &intf->dev);
+ break;
+ }
+- if (! chip) {
+- snd_printk(KERN_ERR "no available usb audio device\n");
++ if (!chip) {
++ printk(KERN_ERR "no available usb audio device\n");
+ goto __error;
+ }
+ }
+@@ -3671,6 +3687,7 @@ static void snd_usb_audio_disconnect(str
+ list_for_each(p, &chip->mixer_list) {
+ snd_usb_mixer_disconnect(p);
+ }
++ usb_chip[chip->index] = NULL;
+ mutex_unlock(®ister_mutex);
+ snd_card_free_when_closed(card);
+ } else {
+--- a/sound/usb/usbquirks.h
++++ b/sound/usb/usbquirks.h
+@@ -39,6 +39,30 @@
+ .idProduct = prod, \
+ .bInterfaceClass = USB_CLASS_VENDOR_SPEC
+
++/* Creative/E-Mu devices */
++{
++ USB_DEVICE(0x041e, 0x3010),
++ .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
++ .vendor_name = "Creative Labs",
++ .product_name = "Sound Blaster MP3+",
++ .ifnum = QUIRK_NO_INTERFACE
++ }
++},
++{
++ /* E-Mu 0202 USB */
++ .match_flags = USB_DEVICE_ID_MATCH_DEVICE,
++ .idVendor = 0x041e,
++ .idProduct = 0x3f02,
++ .bInterfaceClass = USB_CLASS_AUDIO,
++},
++{
++ /* E-Mu 0404 USB */
++ .match_flags = USB_DEVICE_ID_MATCH_DEVICE,
++ .idVendor = 0x041e,
++ .idProduct = 0x3f04,
++ .bInterfaceClass = USB_CLASS_AUDIO,
++},
++
+ /*
+ * Logitech QuickCam: bDeviceClass is vendor-specific, so generic interface
+ * class matches do not take effect without an explicit ID match.
+@@ -97,19 +121,7 @@
+ .bInterfaceClass = USB_CLASS_AUDIO,
+ .bInterfaceSubClass = USB_SUBCLASS_AUDIO_CONTROL
+ },
+-/* E-Mu devices */
+-{
+- .match_flags = USB_DEVICE_ID_MATCH_DEVICE,
+- .idVendor = 0x041e,
+- .idProduct = 0x3f02,
+- .bInterfaceClass = USB_CLASS_AUDIO,
+-},
+-{
+- .match_flags = USB_DEVICE_ID_MATCH_DEVICE,
+- .idVendor = 0x041e,
+- .idProduct = 0x3f04,
+- .bInterfaceClass = USB_CLASS_AUDIO,
+-},
++
+ /*
+ * Yamaha devices
+ */
+@@ -1165,19 +1177,6 @@ YAMAHA_DEVICE(0x7010, "UB99"),
+ }
+ }
+ },
+-{
+- USB_DEVICE(0x582, 0x00a6),
+- .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
+- .vendor_name = "Roland",
+- .product_name = "Juno-G",
+- .ifnum = 0,
+- .type = QUIRK_MIDI_FIXED_ENDPOINT,
+- .data = & (const struct snd_usb_midi_endpoint_info) {
+- .out_cables = 0x0001,
+- .in_cables = 0x0001
+- }
+- }
+-},
+ { /*
+ * This quirk is for the "Advanced" modes of the Edirol UA-25.
+ * If the switch is not in an advanced setting, the UA-25 has
+@@ -1336,6 +1335,19 @@ YAMAHA_DEVICE(0x7010, "UB99"),
+ },
+ /* TODO: add Edirol MD-P1 support */
+ {
++ USB_DEVICE(0x582, 0x00a6),
++ .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
++ .vendor_name = "Roland",
++ .product_name = "Juno-G",
++ .ifnum = 0,
++ .type = QUIRK_MIDI_FIXED_ENDPOINT,
++ .data = & (const struct snd_usb_midi_endpoint_info) {
++ .out_cables = 0x0001,
++ .in_cables = 0x0001
++ }
++ }
++},
++{
+ /* Roland SH-201 */
+ USB_DEVICE(0x0582, 0x00ad),
+ .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
+@@ -1719,17 +1731,6 @@ YAMAHA_DEVICE(0x7010, "UB99"),
+ }
+ },
+
+-{
+- /* Creative Sound Blaster MP3+ */
+- USB_DEVICE(0x041e, 0x3010),
+- .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
+- .vendor_name = "Creative Labs",
+- .product_name = "Sound Blaster MP3+",
+- .ifnum = QUIRK_NO_INTERFACE
+- }
+-
+-},
+-
+ /* Emagic devices */
+ {
+ USB_DEVICE(0x086a, 0x0001),
+
+--
+
+From gregkh@mini.kroah.org Mon Aug 4 13:06:57 2008
+Message-Id: <20080804200657.715695741@mini.kroah.org>
+References: <20080804200515.110033151@mini.kroah.org>
+User-Agent: quilt/0.46-1
+Date: Mon, 04 Aug 2008 13:05:46 -0700
+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>,
+ Domenico Andreoli <cavokz@gmail.com>,
+ Willy Tarreau <w@1wt.eu>,
+ Rodrigo Rubira Branco <rbranco@la.checkpoint.com>,
+ Jake Edge <jake@lwn.net>,
+ Eugene Teo <eteo@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Takashi Iwai <tiwai@suse.de>,
+ Jaroslav Kysela <perex@perex.cz>
+Subject: [patch 31/33] ALSA: hda - Add missing Thinkpad Z60m support
+Content-Disposition: inline; filename=alsa-hda-add-missing-thinkpad-z60m-support.patch
+Content-Length: 943
+Lines: 32
+
+2.6.25-stable review patch. If anyone has any objections, please let us
+know.
+
+------------------
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit 470eaf6be78424fc499a5039e5d5fe58bace2bc3 upstream
+
+Added the missing SSID of Thinkpad Z60m for model=thinkpad with
+AD1981HD.
+
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Jaroslav Kysela <perex@perex.cz>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ sound/pci/hda/patch_analog.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/sound/pci/hda/patch_analog.c
++++ b/sound/pci/hda/patch_analog.c
+@@ -1563,6 +1563,7 @@ static const char *ad1981_models[AD1981_
+
+ static struct snd_pci_quirk ad1981_cfg_tbl[] = {
+ SND_PCI_QUIRK(0x1014, 0x0597, "Lenovo Z60", AD1981_THINKPAD),
++ SND_PCI_QUIRK(0x1014, 0x05b7, "Lenovo Z60m", AD1981_THINKPAD),
+ /* All HP models */
+ SND_PCI_QUIRK(0x103c, 0, "HP nx", AD1981_HP),
+ SND_PCI_QUIRK(0x1179, 0x0001, "Toshiba U205", AD1981_TOSHIBA),
+
+--
+
+From gregkh@mini.kroah.org Mon Aug 4 13:06:58 2008
+Message-Id: <20080804200657.886888379@mini.kroah.org>
+References: <20080804200515.110033151@mini.kroah.org>
+User-Agent: quilt/0.46-1
+Date: Mon, 04 Aug 2008 13:05:47 -0700
+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>,
+ Domenico Andreoli <cavokz@gmail.com>,
+ Willy Tarreau <w@1wt.eu>,
+ Rodrigo Rubira Branco <rbranco@la.checkpoint.com>,
+ Jake Edge <jake@lwn.net>,
+ Eugene Teo <eteo@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Takashi Iwai <tiwai@suse.de>,
+ Jaroslav Kysela <perex@perex.cz>
+Subject: [patch 32/33] ALSA: hda - Fix wrong volumes in AD1988 auto-probe mode
+Content-Disposition: inline; filename=alsa-hda-fix-wrong-volumes-in-ad1988-auto-probe-mode.patch
+Content-Length: 2307
+Lines: 72
+
+2.6.25-stable review patch. If anyone has any objections, please let us
+know.
+
+------------------
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit 43785eaeb1cfb8aed3cf8027f298b242f88fdc45 upstream
+
+Don't create mixer volume elements for Headphone and Speaker if they
+use the same DAC as normal line-outs on AD1988. Otherwise the amp
+value gets screwed up, e.g.
+ https://bugzilla.novell.com/show_bug.cgi?id=398255
+
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Jaroslav Kysela <perex@perex.cz>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ sound/pci/hda/patch_analog.c | 32 +++++++++++++++++++++-----------
+ 1 file changed, 21 insertions(+), 11 deletions(-)
+
+--- a/sound/pci/hda/patch_analog.c
++++ b/sound/pci/hda/patch_analog.c
+@@ -2558,7 +2558,7 @@ static int ad1988_auto_create_extra_out(
+ {
+ struct ad198x_spec *spec = codec->spec;
+ hda_nid_t nid;
+- int idx, err;
++ int i, idx, err;
+ char name[32];
+
+ if (! pin)
+@@ -2566,16 +2566,26 @@ static int ad1988_auto_create_extra_out(
+
+ idx = ad1988_pin_idx(pin);
+ nid = ad1988_idx_to_dac(codec, idx);
+- /* specify the DAC as the extra output */
+- if (! spec->multiout.hp_nid)
+- spec->multiout.hp_nid = nid;
+- else
+- spec->multiout.extra_out_nid[0] = nid;
+- /* control HP volume/switch on the output mixer amp */
+- sprintf(name, "%s Playback Volume", pfx);
+- if ((err = add_control(spec, AD_CTL_WIDGET_VOL, name,
+- HDA_COMPOSE_AMP_VAL(nid, 3, 0, HDA_OUTPUT))) < 0)
+- return err;
++ /* check whether the corresponding DAC was already taken */
++ for (i = 0; i < spec->autocfg.line_outs; i++) {
++ hda_nid_t pin = spec->autocfg.line_out_pins[i];
++ hda_nid_t dac = ad1988_idx_to_dac(codec, ad1988_pin_idx(pin));
++ if (dac == nid)
++ break;
++ }
++ if (i >= spec->autocfg.line_outs) {
++ /* specify the DAC as the extra output */
++ if (!spec->multiout.hp_nid)
++ spec->multiout.hp_nid = nid;
++ else
++ spec->multiout.extra_out_nid[0] = nid;
++ /* control HP volume/switch on the output mixer amp */
++ sprintf(name, "%s Playback Volume", pfx);
++ err = add_control(spec, AD_CTL_WIDGET_VOL, name,
++ HDA_COMPOSE_AMP_VAL(nid, 3, 0, HDA_OUTPUT));
++ if (err < 0)
++ return err;
++ }
+ nid = ad1988_mixer_nids[idx];
+ sprintf(name, "%s Playback Switch", pfx);
+ if ((err = add_control(spec, AD_CTL_BIND_MUTE, name,
+
+--
+
+From gregkh@mini.kroah.org Mon Aug 4 13:06:58 2008
+Message-Id: <20080804200658.058302763@mini.kroah.org>
+References: <20080804200515.110033151@mini.kroah.org>
+User-Agent: quilt/0.46-1
+Date: Mon, 04 Aug 2008 13:05:48 -0700
+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>,
+ Domenico Andreoli <cavokz@gmail.com>,
+ Willy Tarreau <w@1wt.eu>,
+ Rodrigo Rubira Branco <rbranco@la.checkpoint.com>,
+ Jake Edge <jake@lwn.net>,
+ Eugene Teo <eteo@redhat.com>,
+ torvalds@linux-foundation.org,
+ akpm@linux-foundation.org,
+ alan@lxorguk.ukuu.org.uk,
+ Miklos Szeredi <mszeredi@suse.cz>,
+ Al Viro <viro@zeniv.linux.org.uk>
+Subject: [patch 33/33] vfs: fix lookup on deleted directory
+Content-Disposition: inline; filename=vfs-fix-lookup-on-deleted-directory.patch
+Content-Length: 2280
+Lines: 78
+
+2.6.25-stable review patch. If anyone has any objections, please let us
+know.
+
+------------------
+
+From: Miklos Szeredi <mszeredi@suse.cz>
+
+commit d70b67c8bc72ee23b55381bd6a884f4796692f77 upstream
+
+Lookup can install a child dentry for a deleted directory. This keeps
+the directory dentry alive, and the inode pinned in the cache and on
+disk, even after all external references have gone away.
+
+This isn't a big problem normally, since memory pressure or umount
+will clear out the directory dentry and its children, releasing the
+inode. But for UBIFS this causes problems because its orphan area can
+overflow.
+
+Fix this by returning ENOENT for all lookups on a S_DEAD directory
+before creating a child dentry.
+
+Thanks to Zoltan Sogor for noticing this while testing UBIFS, and
+Artem for the excellent analysis of the problem and testing.
+
+Reported-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
+Tested-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
+Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
+Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ fs/namei.c | 19 +++++++++++++++++--
+ 1 file changed, 17 insertions(+), 2 deletions(-)
+
+--- a/fs/namei.c
++++ b/fs/namei.c
+@@ -514,7 +514,14 @@ static struct dentry * real_lookup(struc
+ */
+ result = d_lookup(parent, name);
+ if (!result) {
+- struct dentry * dentry = d_alloc(parent, name);
++ struct dentry *dentry;
++
++ /* Don't create child dentry for a dead directory. */
++ result = ERR_PTR(-ENOENT);
++ if (IS_DEADDIR(dir))
++ goto out_unlock;
++
++ dentry = d_alloc(parent, name);
+ result = ERR_PTR(-ENOMEM);
+ if (dentry) {
+ result = dir->i_op->lookup(dir, dentry, nd);
+@@ -523,6 +530,7 @@ static struct dentry * real_lookup(struc
+ else
+ result = dentry;
+ }
++out_unlock:
+ mutex_unlock(&dir->i_mutex);
+ return result;
+ }
+@@ -1313,7 +1321,14 @@ static struct dentry *__lookup_hash(stru
+
+ dentry = cached_lookup(base, name, nd);
+ if (!dentry) {
+- struct dentry *new = d_alloc(base, name);
++ struct dentry *new;
++
++ /* Don't create child dentry for a dead directory. */
++ dentry = ERR_PTR(-ENOENT);
++ if (IS_DEADDIR(inode))
++ goto out;
++
++ new = d_alloc(base, name);
+ dentry = ERR_PTR(-ENOMEM);
+ if (!new)
+ goto out;
+
+--
+