From: Greg Kroah-Hartman Date: Sun, 8 Dec 2013 20:18:03 +0000 (-0800) Subject: 3.4-stable patches X-Git-Tag: v3.4.74~24 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7e78a0fb2206e3ce5b1e7e46c321192aff432eff;p=thirdparty%2Fkernel%2Fstable-queue.git 3.4-stable patches added patches: irq-enable-all-irqs-unconditionally-in-irq_resume.patch net-update-consumers-of-msg_more-to-recognize-msg_sendpage_notlast.patch nfsv4-update-list-of-irrecoverable-errors-on-delegreturn.patch powerpc-gpio-fix-the-wrong-gpio-input-data-on-mpc8572-mpc8536.patch --- diff --git a/queue-3.4/irq-enable-all-irqs-unconditionally-in-irq_resume.patch b/queue-3.4/irq-enable-all-irqs-unconditionally-in-irq_resume.patch new file mode 100644 index 00000000000..7be5c32e6ae --- /dev/null +++ b/queue-3.4/irq-enable-all-irqs-unconditionally-in-irq_resume.patch @@ -0,0 +1,58 @@ +From ac01810c9d2814238f08a227062e66a35a0e1ea2 Mon Sep 17 00:00:00 2001 +From: Laxman Dewangan +Date: Mon, 25 Nov 2013 19:39:47 +0530 +Subject: irq: Enable all irqs unconditionally in irq_resume + +From: Laxman Dewangan + +commit ac01810c9d2814238f08a227062e66a35a0e1ea2 upstream. + +When the system enters suspend, it disables all interrupts in +suspend_device_irqs(), including the interrupts marked EARLY_RESUME. + +On the resume side things are different. The EARLY_RESUME interrupts +are reenabled in sys_core_ops->resume and the non EARLY_RESUME +interrupts are reenabled in the normal system resume path. + +When suspend_noirq() failed or suspend is aborted for any other +reason, we might omit the resume side call to sys_core_ops->resume() +and therefor the interrupts marked EARLY_RESUME are not reenabled and +stay disabled forever. + +To solve this, enable all irqs unconditionally in irq_resume() +regardless whether interrupts marked EARLY_RESUMEhave been already +enabled or not. + +This might try to reenable already enabled interrupts in the non +failure case, but the only affected platform is XEN and it has been +confirmed that it does not cause any side effects. + +[ tglx: Massaged changelog. ] + +Signed-off-by: Laxman Dewangan +Acked-by-and-tested-by: Konrad Rzeszutek Wilk +Acked-by: Heiko Stuebner +Reviewed-by: Pavel Machek +Cc: +Cc: +Cc: +Cc: +Link: http://lkml.kernel.org/r/1385388587-16442-1-git-send-email-ldewangan@nvidia.com +Signed-off-by: Thomas Gleixner +Signed-off-by: Greg Kroah-Hartman + +--- + kernel/irq/pm.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/kernel/irq/pm.c ++++ b/kernel/irq/pm.c +@@ -50,7 +50,7 @@ static void resume_irqs(bool want_early) + bool is_early = desc->action && + desc->action->flags & IRQF_EARLY_RESUME; + +- if (is_early != want_early) ++ if (!is_early && want_early) + continue; + + raw_spin_lock_irqsave(&desc->lock, flags); diff --git a/queue-3.4/net-update-consumers-of-msg_more-to-recognize-msg_sendpage_notlast.patch b/queue-3.4/net-update-consumers-of-msg_more-to-recognize-msg_sendpage_notlast.patch new file mode 100644 index 00000000000..872865b1601 --- /dev/null +++ b/queue-3.4/net-update-consumers-of-msg_more-to-recognize-msg_sendpage_notlast.patch @@ -0,0 +1,71 @@ +From d3f7d56a7a4671d395e8af87071068a195257bf6 Mon Sep 17 00:00:00 2001 +From: Shawn Landden +Date: Sun, 24 Nov 2013 22:36:28 -0800 +Subject: net: update consumers of MSG_MORE to recognize MSG_SENDPAGE_NOTLAST + +From: Shawn Landden + +commit d3f7d56a7a4671d395e8af87071068a195257bf6 upstream. + +Commit 35f9c09fe (tcp: tcp_sendpages() should call tcp_push() once) +added an internal flag MSG_SENDPAGE_NOTLAST, similar to +MSG_MORE. + +algif_hash, algif_skcipher, and udp used MSG_MORE from tcp_sendpages() +and need to see the new flag as identical to MSG_MORE. + +This fixes sendfile() on AF_ALG. + +v3: also fix udp + +Cc: Tom Herbert +Cc: Eric Dumazet +Cc: David S. Miller +Reported-and-tested-by: Shawn Landden +Original-patch: Richard Weinberger +Signed-off-by: Shawn Landden +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + crypto/algif_hash.c | 3 +++ + crypto/algif_skcipher.c | 3 +++ + net/ipv4/udp.c | 3 +++ + 3 files changed, 9 insertions(+) + +--- a/crypto/algif_hash.c ++++ b/crypto/algif_hash.c +@@ -117,6 +117,9 @@ static ssize_t hash_sendpage(struct sock + if (flags & MSG_SENDPAGE_NOTLAST) + flags |= MSG_MORE; + ++ if (flags & MSG_SENDPAGE_NOTLAST) ++ flags |= MSG_MORE; ++ + lock_sock(sk); + sg_init_table(ctx->sgl.sg, 1); + sg_set_page(ctx->sgl.sg, page, size, offset); +--- a/crypto/algif_skcipher.c ++++ b/crypto/algif_skcipher.c +@@ -381,6 +381,9 @@ static ssize_t skcipher_sendpage(struct + if (flags & MSG_SENDPAGE_NOTLAST) + flags |= MSG_MORE; + ++ if (flags & MSG_SENDPAGE_NOTLAST) ++ flags |= MSG_MORE; ++ + lock_sock(sk); + if (!ctx->more && ctx->used) + goto unlock; +--- a/net/ipv4/udp.c ++++ b/net/ipv4/udp.c +@@ -1042,6 +1042,9 @@ int udp_sendpage(struct sock *sk, struct + if (flags & MSG_SENDPAGE_NOTLAST) + flags |= MSG_MORE; + ++ if (flags & MSG_SENDPAGE_NOTLAST) ++ flags |= MSG_MORE; ++ + if (!up->pending) { + struct msghdr msg = { .msg_flags = flags|MSG_MORE }; + diff --git a/queue-3.4/nfsv4-update-list-of-irrecoverable-errors-on-delegreturn.patch b/queue-3.4/nfsv4-update-list-of-irrecoverable-errors-on-delegreturn.patch new file mode 100644 index 00000000000..40e2464adf5 --- /dev/null +++ b/queue-3.4/nfsv4-update-list-of-irrecoverable-errors-on-delegreturn.patch @@ -0,0 +1,44 @@ +From c97cf606e43b85a6cf158b810375dd77312024db Mon Sep 17 00:00:00 2001 +From: Trond Myklebust +Date: Tue, 19 Nov 2013 16:34:14 -0500 +Subject: NFSv4: Update list of irrecoverable errors on DELEGRETURN + +From: Trond Myklebust + +commit c97cf606e43b85a6cf158b810375dd77312024db upstream. + +If the DELEGRETURN errors out with something like NFS4ERR_BAD_STATEID +then there is no recovery possible. Just quit without returning an error. + +Also, note that the client must not assume that the NFSv4 lease has been +renewed when it sees an error on DELEGRETURN. + +Signed-off-by: Trond Myklebust +Signed-off-by: Greg Kroah-Hartman + +--- + fs/nfs/nfs4proc.c | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +--- a/fs/nfs/nfs4proc.c ++++ b/fs/nfs/nfs4proc.c +@@ -4041,11 +4041,17 @@ static void nfs4_delegreturn_done(struct + return; + + switch (task->tk_status) { +- case -NFS4ERR_STALE_STATEID: +- case -NFS4ERR_EXPIRED: + case 0: + renew_lease(data->res.server, data->timestamp); + break; ++ case -NFS4ERR_ADMIN_REVOKED: ++ case -NFS4ERR_DELEG_REVOKED: ++ case -NFS4ERR_BAD_STATEID: ++ case -NFS4ERR_OLD_STATEID: ++ case -NFS4ERR_STALE_STATEID: ++ case -NFS4ERR_EXPIRED: ++ task->tk_status = 0; ++ break; + default: + if (nfs4_async_handle_error(task, data->res.server, NULL) == + -EAGAIN) { diff --git a/queue-3.4/powerpc-gpio-fix-the-wrong-gpio-input-data-on-mpc8572-mpc8536.patch b/queue-3.4/powerpc-gpio-fix-the-wrong-gpio-input-data-on-mpc8572-mpc8536.patch new file mode 100644 index 00000000000..0b7efcbda55 --- /dev/null +++ b/queue-3.4/powerpc-gpio-fix-the-wrong-gpio-input-data-on-mpc8572-mpc8536.patch @@ -0,0 +1,57 @@ +From 1aeef303b5d9e243c41d5b80f8bb059366514a10 Mon Sep 17 00:00:00 2001 +From: Liu Gang +Date: Fri, 22 Nov 2013 16:12:40 +0800 +Subject: powerpc/gpio: Fix the wrong GPIO input data on MPC8572/MPC8536 + +From: Liu Gang + +commit 1aeef303b5d9e243c41d5b80f8bb059366514a10 upstream. + +For MPC8572/MPC8536, the status of GPIOs defined as output +cannot be determined by reading GPDAT register, so the code +use shadow data register instead. But the code may give the +wrong status of GPIOs defined as input under some scenarios: + +1. If some pins were configured as inputs and were asserted +high before booting the kernel, the shadow data has been +initialized with those pin values. +2. Some pins have been configured as output first and have +been set to the high value, then reconfigured as input. + +The above cases will make the shadow data for those input +pins to be set to high. Then reading the pin status will +always return high even if the actual pin status is low. + +The code should eliminate the effects of the shadow data to +the input pins, and the status of those pins should be +read directly from GPDAT. + +Acked-by: Scott Wood +Acked-by: Anatolij Gustschin +Signed-off-by: Liu Gang +Signed-off-by: Linus Walleij +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpio/gpio-mpc8xxx.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +--- a/drivers/gpio/gpio-mpc8xxx.c ++++ b/drivers/gpio/gpio-mpc8xxx.c +@@ -69,10 +69,14 @@ static int mpc8572_gpio_get(struct gpio_ + u32 val; + struct of_mm_gpio_chip *mm = to_of_mm_gpio_chip(gc); + struct mpc8xxx_gpio_chip *mpc8xxx_gc = to_mpc8xxx_gpio_chip(mm); ++ u32 out_mask, out_shadow; + +- val = in_be32(mm->regs + GPIO_DAT) & ~in_be32(mm->regs + GPIO_DIR); ++ out_mask = in_be32(mm->regs + GPIO_DIR); + +- return (val | mpc8xxx_gc->data) & mpc8xxx_gpio2mask(gpio); ++ val = in_be32(mm->regs + GPIO_DAT) & ~out_mask; ++ out_shadow = mpc8xxx_gc->data & out_mask; ++ ++ return (val | out_shadow) & mpc8xxx_gpio2mask(gpio); + } + + static int mpc8xxx_gpio_get(struct gpio_chip *gc, unsigned int gpio) diff --git a/queue-3.4/series b/queue-3.4/series index 2133c8dea2f..d55b216e7f0 100644 --- a/queue-3.4/series +++ b/queue-3.4/series @@ -8,3 +8,7 @@ scsi-libsas-fix-usage-of-ata_tf_to_fis.patch scsi-hpsa-do-not-discard-scsi-status-on-aborted-commands.patch scsi-hpsa-return-0-from-driver-probe-function-on-success-not-1.patch net-smc91-fix-crash-regression-on-the-versatile.patch +nfsv4-update-list-of-irrecoverable-errors-on-delegreturn.patch +powerpc-gpio-fix-the-wrong-gpio-input-data-on-mpc8572-mpc8536.patch +irq-enable-all-irqs-unconditionally-in-irq_resume.patch +net-update-consumers-of-msg_more-to-recognize-msg_sendpage_notlast.patch