--- /dev/null
+From 20d5a39929232a715f29e6cb7e3f0d0c790f41eb Mon Sep 17 00:00:00 2001
+From: Jeff Layton <jlayton@redhat.com>
+Date: Wed, 21 Jan 2009 11:34:50 -0500
+Subject: dlm: initialize file_lock struct in GETLK before copying conflicting lock
+
+From: Jeff Layton <jlayton@redhat.com>
+
+commit 20d5a39929232a715f29e6cb7e3f0d0c790f41eb upstream.
+
+dlm_posix_get fills out the relevant fields in the file_lock before
+returning when there is a lock conflict, but doesn't clean out any of
+the other fields in the file_lock.
+
+When nfsd does a NFSv4 lockt call, it sets the fl_lmops to
+nfsd_posix_mng_ops before calling the lower fs. When the lock comes back
+after testing a lock on GFS2, it still has that field set. This confuses
+nfsd into thinking that the file_lock is a nfsd4 lock.
+
+Fix this by making DLM reinitialize the file_lock before copying the
+fields from the conflicting lock.
+
+Signed-off-by: Jeff Layton <jlayton@redhat.com>
+Signed-off-by: David Teigland <teigland@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ fs/dlm/plock.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/fs/dlm/plock.c
++++ b/fs/dlm/plock.c
+@@ -304,7 +304,9 @@ int dlm_posix_get(dlm_lockspace_t *locks
+ if (rv == -ENOENT)
+ rv = 0;
+ else if (rv > 0) {
++ locks_init_lock(fl);
+ fl->fl_type = (op->info.ex) ? F_WRLCK : F_RDLCK;
++ fl->fl_flags = FL_POSIX;
+ fl->fl_pid = op->info.pid;
+ fl->fl_start = op->info.start;
+ fl->fl_end = op->info.end;
--- /dev/null
+From 8d993eaa9c3c61b8a5929a7f695078a1fcfb4869 Mon Sep 17 00:00:00 2001
+From: Tejun Heo <tj@kernel.org>
+Date: Sun, 1 Feb 2009 10:56:31 +0900
+Subject: sata_nv: ck804 has borked hardreset too
+
+From: Tejun Heo <tj@kernel.org>
+
+commit 8d993eaa9c3c61b8a5929a7f695078a1fcfb4869 upstream.
+
+While playing with nvraid, I found out that rmmoding and insmoding
+often trigger hardreset failure on the first port (the second one was
+always okay). Seriously, how diverse can you get with hardreset
+behaviors? Anyways, make ck804 use noclassify variant too.
+
+Signed-off-by: Tejun Heo <tj@kernel.org>
+Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/ata/sata_nv.c | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+--- a/drivers/ata/sata_nv.c
++++ b/drivers/ata/sata_nv.c
+@@ -436,11 +436,16 @@ static struct ata_port_operations nv_nf2
+ .hardreset = nv_noclassify_hardreset,
+ };
+
+-/* CK804 finally gets hardreset right */
++/* For initial probing after boot and hot plugging, hardreset mostly
++ * works fine on CK804 but curiously, reprobing on the initial port by
++ * rescanning or rmmod/insmod fails to acquire the initial D2H Reg FIS
++ * in somewhat undeterministic way. Use noclassify hardreset.
++ */
+ static struct ata_port_operations nv_ck804_ops = {
+ .inherits = &nv_common_ops,
+ .freeze = nv_ck804_freeze,
+ .thaw = nv_ck804_thaw,
++ .hardreset = nv_noclassify_hardreset,
+ .host_stop = nv_ck804_host_stop,
+ };
+
--- /dev/null
+From e8caa3c70e94d867ca2efe9e53fd388b52d6d0c8 Mon Sep 17 00:00:00 2001
+From: Tejun Heo <tj@kernel.org>
+Date: Sun, 25 Jan 2009 11:25:22 +0900
+Subject: sata_nv: rename nv_nf2_hardreset()
+
+From: Tejun Heo <tj@kernel.org>
+
+commit e8caa3c70e94d867ca2efe9e53fd388b52d6d0c8 upstream.
+
+nv_nf2_hardreset() will be used by other flavors too. Rename it to
+nv_noclassify_hardreset().
+
+Signed-off-by: Tejun Heo <tj@kernel.org>
+Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/ata/sata_nv.c | 28 ++++++++++++++--------------
+ 1 file changed, 14 insertions(+), 14 deletions(-)
+
+--- a/drivers/ata/sata_nv.c
++++ b/drivers/ata/sata_nv.c
+@@ -305,10 +305,10 @@ static irqreturn_t nv_ck804_interrupt(in
+ static int nv_scr_read(struct ata_link *link, unsigned int sc_reg, u32 *val);
+ static int nv_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val);
+
++static int nv_noclassify_hardreset(struct ata_link *link, unsigned int *class,
++ unsigned long deadline);
+ static void nv_nf2_freeze(struct ata_port *ap);
+ static void nv_nf2_thaw(struct ata_port *ap);
+-static int nv_nf2_hardreset(struct ata_link *link, unsigned int *class,
+- unsigned long deadline);
+ static void nv_ck804_freeze(struct ata_port *ap);
+ static void nv_ck804_thaw(struct ata_port *ap);
+ static int nv_adma_slave_config(struct scsi_device *sdev);
+@@ -432,7 +432,7 @@ static struct ata_port_operations nv_nf2
+ .inherits = &nv_common_ops,
+ .freeze = nv_nf2_freeze,
+ .thaw = nv_nf2_thaw,
+- .hardreset = nv_nf2_hardreset,
++ .hardreset = nv_noclassify_hardreset,
+ };
+
+ /* CK804 finally gets hardreset right */
+@@ -1530,6 +1530,17 @@ static int nv_scr_write(struct ata_link
+ return 0;
+ }
+
++static int nv_noclassify_hardreset(struct ata_link *link, unsigned int *class,
++ unsigned long deadline)
++{
++ bool online;
++ int rc;
++
++ rc = sata_link_hardreset(link, sata_deb_timing_hotplug, deadline,
++ &online, NULL);
++ return online ? -EAGAIN : rc;
++}
++
+ static void nv_nf2_freeze(struct ata_port *ap)
+ {
+ void __iomem *scr_addr = ap->host->ports[0]->ioaddr.scr_addr;
+@@ -1554,17 +1565,6 @@ static void nv_nf2_thaw(struct ata_port
+ iowrite8(mask, scr_addr + NV_INT_ENABLE);
+ }
+
+-static int nv_nf2_hardreset(struct ata_link *link, unsigned int *class,
+- unsigned long deadline)
+-{
+- bool online;
+- int rc;
+-
+- rc = sata_link_hardreset(link, sata_deb_timing_hotplug, deadline,
+- &online, NULL);
+- return online ? -EAGAIN : rc;
+-}
+-
+ static void nv_ck804_freeze(struct ata_port *ap)
+ {
+ void __iomem *mmio_base = ap->host->iomap[NV_MMIO_BAR];
orinoco-move-kmalloc-outside-spinlock-in-orinoco_ioctl_set_genie.patch
fbdev-atyfb-fix-dsp-config-on-some-powermacs-powerbooks.patch
kmalloc-return-null-instead-of-link-failure.patch
+sata_nv-rename-nv_nf2_hardreset.patch
sata_nv-fix-mcp5x-reset.patch
+sata_nv-ck804-has-borked-hardreset-too.patch
fix-memory-corruption-in-console-selection.patch
add-enable_ms-to-jsm-driver.patch
input-atkbd-samsung-nc10-key-repeat-fix.patch
video-always-update-the-brightness-when-poking-brightness.patch
newly-inserted-battery-might-differ-from-one-just-removed-so.patch
acpi-do-not-modify-sci_en-directly.patch
+dlm-initialize-file_lock-struct-in-getlk-before-copying-conflicting-lock.patch