From: Greg Kroah-Hartman Date: Wed, 4 Feb 2009 16:54:23 +0000 (-0800) Subject: .28 patches X-Git-Tag: v2.6.28.4~10 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=acae069ecfd85a36daa7c7d306eaf26e48355f01;p=thirdparty%2Fkernel%2Fstable-queue.git .28 patches --- diff --git a/queue-2.6.28/dlm-initialize-file_lock-struct-in-getlk-before-copying-conflicting-lock.patch b/queue-2.6.28/dlm-initialize-file_lock-struct-in-getlk-before-copying-conflicting-lock.patch new file mode 100644 index 00000000000..cca503732cf --- /dev/null +++ b/queue-2.6.28/dlm-initialize-file_lock-struct-in-getlk-before-copying-conflicting-lock.patch @@ -0,0 +1,41 @@ +From 20d5a39929232a715f29e6cb7e3f0d0c790f41eb Mon Sep 17 00:00:00 2001 +From: Jeff Layton +Date: Wed, 21 Jan 2009 11:34:50 -0500 +Subject: dlm: initialize file_lock struct in GETLK before copying conflicting lock + +From: Jeff Layton + +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 +Signed-off-by: David Teigland +Signed-off-by: Greg Kroah-Hartman + +--- + 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; diff --git a/queue-2.6.28/sata_nv-ck804-has-borked-hardreset-too.patch b/queue-2.6.28/sata_nv-ck804-has-borked-hardreset-too.patch new file mode 100644 index 00000000000..a3239786414 --- /dev/null +++ b/queue-2.6.28/sata_nv-ck804-has-borked-hardreset-too.patch @@ -0,0 +1,42 @@ +From 8d993eaa9c3c61b8a5929a7f695078a1fcfb4869 Mon Sep 17 00:00:00 2001 +From: Tejun Heo +Date: Sun, 1 Feb 2009 10:56:31 +0900 +Subject: sata_nv: ck804 has borked hardreset too + +From: Tejun Heo + +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 +Signed-off-by: Jeff Garzik +Signed-off-by: Greg Kroah-Hartman + +--- + 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, + }; + diff --git a/queue-2.6.28/sata_nv-rename-nv_nf2_hardreset.patch b/queue-2.6.28/sata_nv-rename-nv_nf2_hardreset.patch new file mode 100644 index 00000000000..fc133751c28 --- /dev/null +++ b/queue-2.6.28/sata_nv-rename-nv_nf2_hardreset.patch @@ -0,0 +1,80 @@ +From e8caa3c70e94d867ca2efe9e53fd388b52d6d0c8 Mon Sep 17 00:00:00 2001 +From: Tejun Heo +Date: Sun, 25 Jan 2009 11:25:22 +0900 +Subject: sata_nv: rename nv_nf2_hardreset() + +From: Tejun Heo + +commit e8caa3c70e94d867ca2efe9e53fd388b52d6d0c8 upstream. + +nv_nf2_hardreset() will be used by other flavors too. Rename it to +nv_noclassify_hardreset(). + +Signed-off-by: Tejun Heo +Signed-off-by: Jeff Garzik +Signed-off-by: Greg Kroah-Hartman + +--- + 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]; diff --git a/queue-2.6.28/series b/queue-2.6.28/series index f358b91f735..b0b17797db4 100644 --- a/queue-2.6.28/series +++ b/queue-2.6.28/series @@ -9,7 +9,9 @@ netfilter-ctnetlink-fix-scheduling-while-atomic.patch 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 @@ -26,3 +28,4 @@ acpi-avoid-array-address-overflow-when-_cst-mwait-hint-bits-are-set.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