All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 4.4 00/23] 4.4.83-stable review
@ 2017-08-15  1:18 Greg Kroah-Hartman
  2017-08-15  1:18 ` [PATCH 4.4 01/23] cpuset: fix a deadlock due to incomplete patching of cpusets_enabled() Greg Kroah-Hartman
                   ` (24 more replies)
  0 siblings, 25 replies; 27+ messages in thread
From: Greg Kroah-Hartman @ 2017-08-15  1:18 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, torvalds, akpm, linux, shuahkh, patches,
	ben.hutchings, stable

This is the start of the stable review cycle for the 4.4.83 release.
There are 23 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 me know.

Responses should be made by Thu Aug 17 01:17:45 UTC 2017.
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/v4.x/stable-review/patch-4.4.83-rc1.gz
or in the git tree and branch at:
  git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.4.y
and the diffstat can be found below.

thanks,

greg k-h

-------------
Pseudo-Shortlog of commits:

Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Linux 4.4.83-rc1

Thomas Gleixner <tglx@linutronix.de>
    pinctrl: samsung: Remove bogus irq_[un]mask from resource management

Icenowy Zheng <icenowy@aosc.io>
    pinctrl: sunxi: add a missing function of A10/A20 pinctrl driver

Christoph Hellwig <hch@lst.de>
    pnfs/blocklayout: require 64-bit sector_t

Stefan-Gabriel Mirea <stefan-gabriel.mirea@nxp.com>
    iio: adc: vf610_adc: Fix VALT selection value for REFSEL bits

Sandeep Singh <sandeep.singh@amd.com>
    usb:xhci:Add quirk for Certain failing HP keyboard on reset after resume

Kai-Heng Feng <kai.heng.feng@canonical.com>
    usb: quirks: Add no-lpm quirk for Moshi USB to Ethernet Adapter

Bin Liu <b-liu@ti.com>
    usb: core: unlink urbs from the tail of the endpoint's urb_list

Alan Stern <stern@rowland.harvard.edu>
    USB: Check for dropped connection before switching to full speed

Alan Swanson <reiver@improbability.net>
    uas: Add US_FL_IGNORE_RESIDUE for Initio Corporation INIC-3069

Akinobu Mita <akinobu.mita@gmail.com>
    iio: light: tsl2563: use correct event code

Hans de Goede <hdegoede@redhat.com>
    iio: accel: bmc150: Always restore device to normal mode after suspend-resume

Arnd Bergmann <arnd@arndb.de>
    staging:iio:resolver:ad2s1210 fix negative IIO_ANGL_VEL read

Rafael J. Wysocki <rafael.j.wysocki@intel.com>
    USB: hcd: Mark secondary HCD as dead if the primary one died

Bin Liu <b-liu@ti.com>
    usb: musb: fix tx fifo flush handling again

Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    USB: serial: pl2303: add new ATEN device id

Stefan Triller <github@stefantriller.de>
    USB: serial: cp210x: add support for Qivicon USB ZigBee dongle

Hector Martin <marcan@marcan.st>
    USB: serial: option: add D-Link DWM-222 device ID

Weston Andros Adamson <dros@monkey.org>
    nfs/flexfiles: fix leak of nfs4_ff_ds_version arrays

Mateusz Jurczyk <mjurczyk@google.com>
    fuse: initialize the flock flag in fuse_file on allocation

Nicholas Bellinger <nab@linux-iscsi.org>
    iscsi-target: Fix iscsi_np reset hung task during parallel delete

Varun Prakash <varun@chelsio.com>
    iscsi-target: fix memory leak in iscsit_setup_text_cmd()

Jonathan Toppins <jtoppins@redhat.com>
    mm: ratelimit PFNs busy info message

Dima Zavin <dmitriyz@waymo.com>
    cpuset: fix a deadlock due to incomplete patching of cpusets_enabled()


-------------

Diffstat:

 Makefile                                  |  4 ++--
 drivers/iio/accel/bmc150-accel-core.c     |  9 +--------
 drivers/iio/adc/vf610_adc.c               |  2 +-
 drivers/iio/light/tsl2563.c               |  2 +-
 drivers/pinctrl/samsung/pinctrl-exynos.c  |  4 ----
 drivers/pinctrl/sunxi/pinctrl-sun4i-a10.c |  1 +
 drivers/staging/iio/resolver/ad2s1210.c   |  2 +-
 drivers/target/iscsi/iscsi_target.c       |  2 ++
 drivers/target/iscsi/iscsi_target_login.c |  7 +++++--
 drivers/usb/core/hcd.c                    |  4 +++-
 drivers/usb/core/hub.c                    | 10 ++++++----
 drivers/usb/core/quirks.c                 |  4 ++++
 drivers/usb/host/pci-quirks.c             | 17 ++++++++++++-----
 drivers/usb/musb/musb_host.c              |  1 +
 drivers/usb/serial/cp210x.c               |  1 +
 drivers/usb/serial/option.c               |  2 ++
 drivers/usb/serial/pl2303.c               |  1 +
 drivers/usb/serial/pl2303.h               |  1 +
 drivers/usb/storage/unusual_uas.h         |  4 ++--
 fs/fuse/file.c                            |  2 +-
 fs/nfs/Kconfig                            |  1 +
 fs/nfs/flexfilelayout/flexfilelayoutdev.c |  1 +
 include/linux/cpuset.h                    |  7 +++++--
 include/target/iscsi/iscsi_target_core.h  |  1 +
 kernel/cpuset.c                           |  1 +
 mm/page_alloc.c                           |  2 +-
 26 files changed, 58 insertions(+), 35 deletions(-)

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH 4.4 01/23] cpuset: fix a deadlock due to incomplete patching of cpusets_enabled()
  2017-08-15  1:18 [PATCH 4.4 00/23] 4.4.83-stable review Greg Kroah-Hartman
@ 2017-08-15  1:18 ` Greg Kroah-Hartman
  2017-08-15  1:18 ` [PATCH 4.4 02/23] mm: ratelimit PFNs busy info message Greg Kroah-Hartman
                   ` (23 subsequent siblings)
  24 siblings, 0 replies; 27+ messages in thread
From: Greg Kroah-Hartman @ 2017-08-15  1:18 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Dima Zavin, Cliff Spradlin,
	Vlastimil Babka, Peter Zijlstra, Christopher Lameter, Li Zefan,
	Pekka Enberg, David Rientjes, Joonsoo Kim, Mel Gorman,
	Andrew Morton, Linus Torvalds

4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Dima Zavin <dmitriyz@waymo.com>

commit 89affbf5d9ebb15c6460596822e8857ea2f9e735 upstream.

In codepaths that use the begin/retry interface for reading
mems_allowed_seq with irqs disabled, there exists a race condition that
stalls the patch process after only modifying a subset of the
static_branch call sites.

This problem manifested itself as a deadlock in the slub allocator,
inside get_any_partial.  The loop reads mems_allowed_seq value (via
read_mems_allowed_begin), performs the defrag operation, and then
verifies the consistency of mem_allowed via the read_mems_allowed_retry
and the cookie returned by xxx_begin.

The issue here is that both begin and retry first check if cpusets are
enabled via cpusets_enabled() static branch.  This branch can be
rewritted dynamically (via cpuset_inc) if a new cpuset is created.  The
x86 jump label code fully synchronizes across all CPUs for every entry
it rewrites.  If it rewrites only one of the callsites (specifically the
one in read_mems_allowed_retry) and then waits for the
smp_call_function(do_sync_core) to complete while a CPU is inside the
begin/retry section with IRQs off and the mems_allowed value is changed,
we can hang.

This is because begin() will always return 0 (since it wasn't patched
yet) while retry() will test the 0 against the actual value of the seq
counter.

The fix is to use two different static keys: one for begin
(pre_enable_key) and one for retry (enable_key).  In cpuset_inc(), we
first bump the pre_enable key to ensure that cpuset_mems_allowed_begin()
always return a valid seqcount if are enabling cpusets.  Similarly, when
disabling cpusets via cpuset_dec(), we first ensure that callers of
cpuset_mems_allowed_retry() will start ignoring the seqcount value
before we let cpuset_mems_allowed_begin() return 0.

The relevant stack traces of the two stuck threads:

  CPU: 1 PID: 1415 Comm: mkdir Tainted: G L  4.9.36-00104-g540c51286237 #4
  Hardware name: Default string Default string/Hardware, BIOS 4.29.1-20170526215256 05/26/2017
  task: ffff8817f9c28000 task.stack: ffffc9000ffa4000
  RIP: smp_call_function_many+0x1f9/0x260
  Call Trace:
    smp_call_function+0x3b/0x70
    on_each_cpu+0x2f/0x90
    text_poke_bp+0x87/0xd0
    arch_jump_label_transform+0x93/0x100
    __jump_label_update+0x77/0x90
    jump_label_update+0xaa/0xc0
    static_key_slow_inc+0x9e/0xb0
    cpuset_css_online+0x70/0x2e0
    online_css+0x2c/0xa0
    cgroup_apply_control_enable+0x27f/0x3d0
    cgroup_mkdir+0x2b7/0x420
    kernfs_iop_mkdir+0x5a/0x80
    vfs_mkdir+0xf6/0x1a0
    SyS_mkdir+0xb7/0xe0
    entry_SYSCALL_64_fastpath+0x18/0xad

  ...

  CPU: 2 PID: 1 Comm: init Tainted: G L  4.9.36-00104-g540c51286237 #4
  Hardware name: Default string Default string/Hardware, BIOS 4.29.1-20170526215256 05/26/2017
  task: ffff8818087c0000 task.stack: ffffc90000030000
  RIP: int3+0x39/0x70
  Call Trace:
    <#DB> ? ___slab_alloc+0x28b/0x5a0
    <EOE> ? copy_process.part.40+0xf7/0x1de0
    __slab_alloc.isra.80+0x54/0x90
    copy_process.part.40+0xf7/0x1de0
    copy_process.part.40+0xf7/0x1de0
    kmem_cache_alloc_node+0x8a/0x280
    copy_process.part.40+0xf7/0x1de0
    _do_fork+0xe7/0x6c0
    _raw_spin_unlock_irq+0x2d/0x60
    trace_hardirqs_on_caller+0x136/0x1d0
    entry_SYSCALL_64_fastpath+0x5/0xad
    do_syscall_64+0x27/0x350
    SyS_clone+0x19/0x20
    do_syscall_64+0x60/0x350
    entry_SYSCALL64_slow_path+0x25/0x25

Link: http://lkml.kernel.org/r/20170731040113.14197-1-dmitriyz@waymo.com
Fixes: 46e700abc44c ("mm, page_alloc: remove unnecessary taking of a seqlock when cpusets are disabled")
Signed-off-by: Dima Zavin <dmitriyz@waymo.com>
Reported-by: Cliff Spradlin <cspradlin@waymo.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Christopher Lameter <cl@linux.com>
Cc: Li Zefan <lizefan@huawei.com>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: David Rientjes <rientjes@google.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Mel Gorman <mgorman@techsingularity.net>
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@linuxfoundation.org>


---
 include/linux/cpuset.h |    7 +++++--
 kernel/cpuset.c        |    1 +
 2 files changed, 6 insertions(+), 2 deletions(-)

--- a/include/linux/cpuset.h
+++ b/include/linux/cpuset.h
@@ -16,6 +16,7 @@
 
 #ifdef CONFIG_CPUSETS
 
+extern struct static_key cpusets_pre_enable_key;
 extern struct static_key cpusets_enabled_key;
 static inline bool cpusets_enabled(void)
 {
@@ -30,12 +31,14 @@ static inline int nr_cpusets(void)
 
 static inline void cpuset_inc(void)
 {
+	static_key_slow_inc(&cpusets_pre_enable_key);
 	static_key_slow_inc(&cpusets_enabled_key);
 }
 
 static inline void cpuset_dec(void)
 {
 	static_key_slow_dec(&cpusets_enabled_key);
+	static_key_slow_dec(&cpusets_pre_enable_key);
 }
 
 extern int cpuset_init(void);
@@ -104,7 +107,7 @@ extern void cpuset_print_current_mems_al
  */
 static inline unsigned int read_mems_allowed_begin(void)
 {
-	if (!cpusets_enabled())
+	if (!static_key_false(&cpusets_pre_enable_key))
 		return 0;
 
 	return read_seqcount_begin(&current->mems_allowed_seq);
@@ -118,7 +121,7 @@ static inline unsigned int read_mems_all
  */
 static inline bool read_mems_allowed_retry(unsigned int seq)
 {
-	if (!cpusets_enabled())
+	if (!static_key_false(&cpusets_enabled_key))
 		return false;
 
 	return read_seqcount_retry(&current->mems_allowed_seq, seq);
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -60,6 +60,7 @@
 #include <linux/cgroup.h>
 #include <linux/wait.h>
 
+struct static_key cpusets_pre_enable_key __read_mostly = STATIC_KEY_INIT_FALSE;
 struct static_key cpusets_enabled_key __read_mostly = STATIC_KEY_INIT_FALSE;
 
 /* See "Frequency meter" comments, below. */

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH 4.4 02/23] mm: ratelimit PFNs busy info message
  2017-08-15  1:18 [PATCH 4.4 00/23] 4.4.83-stable review Greg Kroah-Hartman
  2017-08-15  1:18 ` [PATCH 4.4 01/23] cpuset: fix a deadlock due to incomplete patching of cpusets_enabled() Greg Kroah-Hartman
@ 2017-08-15  1:18 ` Greg Kroah-Hartman
  2017-08-15  1:18 ` [PATCH 4.4 03/23] iscsi-target: fix memory leak in iscsit_setup_text_cmd() Greg Kroah-Hartman
                   ` (22 subsequent siblings)
  24 siblings, 0 replies; 27+ messages in thread
From: Greg Kroah-Hartman @ 2017-08-15  1:18 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Jonathan Toppins, Doug Ledford,
	Michal Hocko, Vlastimil Babka, Mel Gorman, Hillf Danton,
	Andrew Morton, Linus Torvalds

4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Jonathan Toppins <jtoppins@redhat.com>

commit 75dddef32514f7aa58930bde6a1263253bc3d4ba upstream.

The RDMA subsystem can generate several thousand of these messages per
second eventually leading to a kernel crash.  Ratelimit these messages
to prevent this crash.

Doug said:
 "I've been carrying a version of this for several kernel versions. I
  don't remember when they started, but we have one (and only one) class
  of machines: Dell PE R730xd, that generate these errors. When it
  happens, without a rate limit, we get rcu timeouts and kernel oopses.
  With the rate limit, we just get a lot of annoying kernel messages but
  the machine continues on, recovers, and eventually the memory
  operations all succeed"

And:
 "> Well... why are all these EBUSY's occurring? It sounds inefficient
  > (at least) but if it is expected, normal and unavoidable then
  > perhaps we should just remove that message altogether?

  I don't have an answer to that question. To be honest, I haven't
  looked real hard. We never had this at all, then it started out of the
  blue, but only on our Dell 730xd machines (and it hits all of them),
  but no other classes or brands of machines. And we have our 730xd
  machines loaded up with different brands and models of cards (for
  instance one dedicated to mlx4 hardware, one for qib, one for mlx5, an
  ocrdma/cxgb4 combo, etc), so the fact that it hit all of the machines
  meant it wasn't tied to any particular brand/model of RDMA hardware.
  To me, it always smelled of a hardware oddity specific to maybe the
  CPUs or mainboard chipsets in these machines, so given that I'm not an
  mm expert anyway, I never chased it down.

  A few other relevant details: it showed up somewhere around 4.8/4.9 or
  thereabouts. It never happened before, but the prinkt has been there
  since the 3.18 days, so possibly the test to trigger this message was
  changed, or something else in the allocator changed such that the
  situation started happening on these machines?

  And, like I said, it is specific to our 730xd machines (but they are
  all identical, so that could mean it's something like their specific
  ram configuration is causing the allocator to hit this on these
  machine but not on other machines in the cluster, I don't want to say
  it's necessarily the model of chipset or CPU, there are other bits of
  identicalness between these machines)"

Link: http://lkml.kernel.org/r/499c0f6cc10d6eb829a67f2a4d75b4228a9b356e.1501695897.git.jtoppins@redhat.com
Signed-off-by: Jonathan Toppins <jtoppins@redhat.com>
Reviewed-by: Doug Ledford <dledford@redhat.com>
Tested-by: Doug Ledford <dledford@redhat.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Hillf Danton <hillf.zj@alibaba-inc.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 mm/page_alloc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -6804,7 +6804,7 @@ int alloc_contig_range(unsigned long sta
 
 	/* Make sure the range is really isolated. */
 	if (test_pages_isolated(outer_start, end, false)) {
-		pr_info("%s: [%lx, %lx) PFNs busy\n",
+		pr_info_ratelimited("%s: [%lx, %lx) PFNs busy\n",
 			__func__, outer_start, end);
 		ret = -EBUSY;
 		goto done;

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH 4.4 03/23] iscsi-target: fix memory leak in iscsit_setup_text_cmd()
  2017-08-15  1:18 [PATCH 4.4 00/23] 4.4.83-stable review Greg Kroah-Hartman
  2017-08-15  1:18 ` [PATCH 4.4 01/23] cpuset: fix a deadlock due to incomplete patching of cpusets_enabled() Greg Kroah-Hartman
  2017-08-15  1:18 ` [PATCH 4.4 02/23] mm: ratelimit PFNs busy info message Greg Kroah-Hartman
@ 2017-08-15  1:18 ` Greg Kroah-Hartman
  2017-08-15  1:18 ` [PATCH 4.4 04/23] iscsi-target: Fix iscsi_np reset hung task during parallel delete Greg Kroah-Hartman
                   ` (21 subsequent siblings)
  24 siblings, 0 replies; 27+ messages in thread
From: Greg Kroah-Hartman @ 2017-08-15  1:18 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Varun Prakash, Nicholas Bellinger

4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Varun Prakash <varun@chelsio.com>

commit ea8dc5b4cd2195ee582cae28afa4164c6dea1738 upstream.

On receiving text request iscsi-target allocates buffer for
payload in iscsit_handle_text_cmd() and assigns buffer pointer
to cmd->text_in_ptr, this buffer is currently freed in
iscsit_release_cmd(), if iscsi-target sets 'C' bit in text
response then it will receive another text request from the
initiator with ttt != 0xffffffff in this case iscsi-target
will find cmd using itt and call iscsit_setup_text_cmd()
which will set cmd->text_in_ptr to NULL without freeing
previously allocated buffer.

This patch fixes this issue by calling kfree(cmd->text_in_ptr)
in iscsit_setup_text_cmd() before assigning NULL to it.

For the first text request cmd->text_in_ptr is NULL as
cmd is memset to 0 in iscsit_allocate_cmd().

Signed-off-by: Varun Prakash <varun@chelsio.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/target/iscsi/iscsi_target.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/target/iscsi/iscsi_target.c
+++ b/drivers/target/iscsi/iscsi_target.c
@@ -1996,6 +1996,7 @@ iscsit_setup_text_cmd(struct iscsi_conn
 	cmd->cmd_sn		= be32_to_cpu(hdr->cmdsn);
 	cmd->exp_stat_sn	= be32_to_cpu(hdr->exp_statsn);
 	cmd->data_direction	= DMA_NONE;
+	kfree(cmd->text_in_ptr);
 	cmd->text_in_ptr	= NULL;
 
 	return 0;

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH 4.4 04/23] iscsi-target: Fix iscsi_np reset hung task during parallel delete
  2017-08-15  1:18 [PATCH 4.4 00/23] 4.4.83-stable review Greg Kroah-Hartman
                   ` (2 preceding siblings ...)
  2017-08-15  1:18 ` [PATCH 4.4 03/23] iscsi-target: fix memory leak in iscsit_setup_text_cmd() Greg Kroah-Hartman
@ 2017-08-15  1:18 ` Greg Kroah-Hartman
  2017-08-15  1:18 ` [PATCH 4.4 05/23] fuse: initialize the flock flag in fuse_file on allocation Greg Kroah-Hartman
                   ` (20 subsequent siblings)
  24 siblings, 0 replies; 27+ messages in thread
From: Greg Kroah-Hartman @ 2017-08-15  1:18 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Gary Guo, Mike Christie,
	Hannes Reinecke, Nicholas Bellinger

4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Nicholas Bellinger <nab@linux-iscsi.org>

commit 978d13d60c34818a41fc35962602bdfa5c03f214 upstream.

This patch fixes a bug associated with iscsit_reset_np_thread()
that can occur during parallel configfs rmdir of a single iscsi_np
used across multiple iscsi-target instances, that would result in
hung task(s) similar to below where configfs rmdir process context
was blocked indefinately waiting for iscsi_np->np_restart_comp
to finish:

[ 6726.112076] INFO: task dcp_proxy_node_:15550 blocked for more than 120 seconds.
[ 6726.119440]       Tainted: G        W  O     4.1.26-3321 #2
[ 6726.125045] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 6726.132927] dcp_proxy_node_ D ffff8803f202bc88     0 15550      1 0x00000000
[ 6726.140058]  ffff8803f202bc88 ffff88085c64d960 ffff88083b3b1ad0 ffff88087fffeb08
[ 6726.147593]  ffff8803f202c000 7fffffffffffffff ffff88083f459c28 ffff88083b3b1ad0
[ 6726.155132]  ffff88035373c100 ffff8803f202bca8 ffffffff8168ced2 ffff8803f202bcb8
[ 6726.162667] Call Trace:
[ 6726.165150]  [<ffffffff8168ced2>] schedule+0x32/0x80
[ 6726.170156]  [<ffffffff8168f5b4>] schedule_timeout+0x214/0x290
[ 6726.176030]  [<ffffffff810caef2>] ? __send_signal+0x52/0x4a0
[ 6726.181728]  [<ffffffff8168d7d6>] wait_for_completion+0x96/0x100
[ 6726.187774]  [<ffffffff810e7c80>] ? wake_up_state+0x10/0x10
[ 6726.193395]  [<ffffffffa035d6e2>] iscsit_reset_np_thread+0x62/0xe0 [iscsi_target_mod]
[ 6726.201278]  [<ffffffffa0355d86>] iscsit_tpg_disable_portal_group+0x96/0x190 [iscsi_target_mod]
[ 6726.210033]  [<ffffffffa0363f7f>] lio_target_tpg_store_enable+0x4f/0xc0 [iscsi_target_mod]
[ 6726.218351]  [<ffffffff81260c5a>] configfs_write_file+0xaa/0x110
[ 6726.224392]  [<ffffffff811ea364>] vfs_write+0xa4/0x1b0
[ 6726.229576]  [<ffffffff811eb111>] SyS_write+0x41/0xb0
[ 6726.234659]  [<ffffffff8169042e>] system_call_fastpath+0x12/0x71

It would happen because each iscsit_reset_np_thread() sets state
to ISCSI_NP_THREAD_RESET, sends SIGINT, and then blocks waiting
for completion on iscsi_np->np_restart_comp.

However, if iscsi_np was active processing a login request and
more than a single iscsit_reset_np_thread() caller to the same
iscsi_np was blocked on iscsi_np->np_restart_comp, iscsi_np
kthread process context in __iscsi_target_login_thread() would
flush pending signals and only perform a single completion of
np->np_restart_comp before going back to sleep within transport
specific iscsit_transport->iscsi_accept_np code.

To address this bug, add a iscsi_np->np_reset_count and update
__iscsi_target_login_thread() to keep completing np->np_restart_comp
until ->np_reset_count has reached zero.

Reported-by: Gary Guo <ghg@datera.io>
Tested-by: Gary Guo <ghg@datera.io>
Cc: Mike Christie <mchristi@redhat.com>
Cc: Hannes Reinecke <hare@suse.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/target/iscsi/iscsi_target.c       |    1 +
 drivers/target/iscsi/iscsi_target_login.c |    7 +++++--
 include/target/iscsi/iscsi_target_core.h  |    1 +
 3 files changed, 7 insertions(+), 2 deletions(-)

--- a/drivers/target/iscsi/iscsi_target.c
+++ b/drivers/target/iscsi/iscsi_target.c
@@ -418,6 +418,7 @@ int iscsit_reset_np_thread(
 		return 0;
 	}
 	np->np_thread_state = ISCSI_NP_THREAD_RESET;
+	atomic_inc(&np->np_reset_count);
 
 	if (np->np_thread) {
 		spin_unlock_bh(&np->np_thread_lock);
--- a/drivers/target/iscsi/iscsi_target_login.c
+++ b/drivers/target/iscsi/iscsi_target_login.c
@@ -1219,9 +1219,11 @@ static int __iscsi_target_login_thread(s
 	flush_signals(current);
 
 	spin_lock_bh(&np->np_thread_lock);
-	if (np->np_thread_state == ISCSI_NP_THREAD_RESET) {
+	if (atomic_dec_if_positive(&np->np_reset_count) >= 0) {
 		np->np_thread_state = ISCSI_NP_THREAD_ACTIVE;
+		spin_unlock_bh(&np->np_thread_lock);
 		complete(&np->np_restart_comp);
+		return 1;
 	} else if (np->np_thread_state == ISCSI_NP_THREAD_SHUTDOWN) {
 		spin_unlock_bh(&np->np_thread_lock);
 		goto exit;
@@ -1254,7 +1256,8 @@ static int __iscsi_target_login_thread(s
 		goto exit;
 	} else if (rc < 0) {
 		spin_lock_bh(&np->np_thread_lock);
-		if (np->np_thread_state == ISCSI_NP_THREAD_RESET) {
+		if (atomic_dec_if_positive(&np->np_reset_count) >= 0) {
+			np->np_thread_state = ISCSI_NP_THREAD_ACTIVE;
 			spin_unlock_bh(&np->np_thread_lock);
 			complete(&np->np_restart_comp);
 			iscsit_put_transport(conn->conn_transport);
--- a/include/target/iscsi/iscsi_target_core.h
+++ b/include/target/iscsi/iscsi_target_core.h
@@ -784,6 +784,7 @@ struct iscsi_np {
 	int			np_sock_type;
 	enum np_thread_state_table np_thread_state;
 	bool                    enabled;
+	atomic_t		np_reset_count;
 	enum iscsi_timer_flags_table np_login_timer_flags;
 	u32			np_exports;
 	enum np_flags_table	np_flags;

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH 4.4 05/23] fuse: initialize the flock flag in fuse_file on allocation
  2017-08-15  1:18 [PATCH 4.4 00/23] 4.4.83-stable review Greg Kroah-Hartman
                   ` (3 preceding siblings ...)
  2017-08-15  1:18 ` [PATCH 4.4 04/23] iscsi-target: Fix iscsi_np reset hung task during parallel delete Greg Kroah-Hartman
@ 2017-08-15  1:18 ` Greg Kroah-Hartman
  2017-08-15  1:18 ` [PATCH 4.4 06/23] nfs/flexfiles: fix leak of nfs4_ff_ds_version arrays Greg Kroah-Hartman
                   ` (19 subsequent siblings)
  24 siblings, 0 replies; 27+ messages in thread
From: Greg Kroah-Hartman @ 2017-08-15  1:18 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Mateusz Jurczyk, Miklos Szeredi

4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Mateusz Jurczyk <mjurczyk@google.com>

commit 68227c03cba84a24faf8a7277d2b1a03c8959c2c upstream.

Before the patch, the flock flag could remain uninitialized for the
lifespan of the fuse_file allocation. Unless set to true in
fuse_file_flock(), it would remain in an indeterminate state until read in
an if statement in fuse_release_common(). This could consequently lead to
taking an unexpected branch in the code.

The bug was discovered by a runtime instrumentation designed to detect use
of uninitialized memory in the kernel.

Signed-off-by: Mateusz Jurczyk <mjurczyk@google.com>
Fixes: 37fb3a30b462 ("fuse: fix flock")
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/fuse/file.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -46,7 +46,7 @@ struct fuse_file *fuse_file_alloc(struct
 {
 	struct fuse_file *ff;
 
-	ff = kmalloc(sizeof(struct fuse_file), GFP_KERNEL);
+	ff = kzalloc(sizeof(struct fuse_file), GFP_KERNEL);
 	if (unlikely(!ff))
 		return NULL;
 

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH 4.4 06/23] nfs/flexfiles: fix leak of nfs4_ff_ds_version arrays
  2017-08-15  1:18 [PATCH 4.4 00/23] 4.4.83-stable review Greg Kroah-Hartman
                   ` (4 preceding siblings ...)
  2017-08-15  1:18 ` [PATCH 4.4 05/23] fuse: initialize the flock flag in fuse_file on allocation Greg Kroah-Hartman
@ 2017-08-15  1:18 ` Greg Kroah-Hartman
  2017-08-15  1:18 ` [PATCH 4.4 07/23] USB: serial: option: add D-Link DWM-222 device ID Greg Kroah-Hartman
                   ` (18 subsequent siblings)
  24 siblings, 0 replies; 27+ messages in thread
From: Greg Kroah-Hartman @ 2017-08-15  1:18 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Weston Andros Adamson, Anna Schumaker

4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Weston Andros Adamson <dros@monkey.org>

commit 1feb26162bee7b2f110facfec71b5c7bdbc7d14d upstream.

The client was freeing the nfs4_ff_layout_ds, but not the contained
nfs4_ff_ds_version array.

Signed-off-by: Weston Andros Adamson <dros@primarydata.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/nfs/flexfilelayout/flexfilelayoutdev.c |    1 +
 1 file changed, 1 insertion(+)

--- a/fs/nfs/flexfilelayout/flexfilelayoutdev.c
+++ b/fs/nfs/flexfilelayout/flexfilelayoutdev.c
@@ -30,6 +30,7 @@ void nfs4_ff_layout_free_deviceid(struct
 {
 	nfs4_print_deviceid(&mirror_ds->id_node.deviceid);
 	nfs4_pnfs_ds_put(mirror_ds->ds);
+	kfree(mirror_ds->ds_versions);
 	kfree_rcu(mirror_ds, id_node.rcu);
 }
 

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH 4.4 07/23] USB: serial: option: add D-Link DWM-222 device ID
  2017-08-15  1:18 [PATCH 4.4 00/23] 4.4.83-stable review Greg Kroah-Hartman
                   ` (5 preceding siblings ...)
  2017-08-15  1:18 ` [PATCH 4.4 06/23] nfs/flexfiles: fix leak of nfs4_ff_ds_version arrays Greg Kroah-Hartman
@ 2017-08-15  1:18 ` Greg Kroah-Hartman
  2017-08-15  1:18 ` [PATCH 4.4 08/23] USB: serial: cp210x: add support for Qivicon USB ZigBee dongle Greg Kroah-Hartman
                   ` (17 subsequent siblings)
  24 siblings, 0 replies; 27+ messages in thread
From: Greg Kroah-Hartman @ 2017-08-15  1:18 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Hector Martin, Johan Hovold

4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Hector Martin <marcan@marcan.st>

commit fd1b8668af59a11bb754a6c9b0051c6c5ce73b74 upstream.

Add device id for D-Link DWM-222.

Signed-off-by: Hector Martin <marcan@marcan.st>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/serial/option.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -2025,6 +2025,8 @@ static const struct usb_device_id option
 	{ USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d04, 0xff) },			/* D-Link DWM-158 */
 	{ USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7e19, 0xff),			/* D-Link DWM-221 B1 */
 	  .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
+	{ USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7e35, 0xff),			/* D-Link DWM-222 */
+	  .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
 	{ USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x3e01, 0xff, 0xff, 0xff) }, /* D-Link DWM-152/C1 */
 	{ USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x3e02, 0xff, 0xff, 0xff) }, /* D-Link DWM-156/C1 */
 	{ USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x7e11, 0xff, 0xff, 0xff) }, /* D-Link DWM-156/A3 */

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH 4.4 08/23] USB: serial: cp210x: add support for Qivicon USB ZigBee dongle
  2017-08-15  1:18 [PATCH 4.4 00/23] 4.4.83-stable review Greg Kroah-Hartman
                   ` (6 preceding siblings ...)
  2017-08-15  1:18 ` [PATCH 4.4 07/23] USB: serial: option: add D-Link DWM-222 device ID Greg Kroah-Hartman
@ 2017-08-15  1:18 ` Greg Kroah-Hartman
  2017-08-15  1:18 ` [PATCH 4.4 09/23] USB: serial: pl2303: add new ATEN device id Greg Kroah-Hartman
                   ` (16 subsequent siblings)
  24 siblings, 0 replies; 27+ messages in thread
From: Greg Kroah-Hartman @ 2017-08-15  1:18 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Stefan Triller, Frans Klaver, Johan Hovold

4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Stefan Triller <github@stefantriller.de>

commit 9585e340db9f6cc1c0928d82c3a23cc4460f0a3f upstream.

The German Telekom offers a ZigBee USB Stick under the brand name Qivicon
for their SmartHome Home Base in its 1. Generation. The productId is not
known by the according kernel module, this patch adds support for it.

Signed-off-by: Stefan Triller <github@stefantriller.de>
Reviewed-by: Frans Klaver <fransklaver@gmail.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/serial/cp210x.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/usb/serial/cp210x.c
+++ b/drivers/usb/serial/cp210x.c
@@ -135,6 +135,7 @@ static const struct usb_device_id id_tab
 	{ USB_DEVICE(0x10C4, 0x8998) }, /* KCF Technologies PRN */
 	{ USB_DEVICE(0x10C4, 0x8A2A) }, /* HubZ dual ZigBee and Z-Wave dongle */
 	{ USB_DEVICE(0x10C4, 0x8A5E) }, /* CEL EM3588 ZigBee USB Stick Long Range */
+	{ USB_DEVICE(0x10C4, 0x8B34) }, /* Qivicon ZigBee USB Radio Stick */
 	{ USB_DEVICE(0x10C4, 0xEA60) }, /* Silicon Labs factory default */
 	{ USB_DEVICE(0x10C4, 0xEA61) }, /* Silicon Labs factory default */
 	{ USB_DEVICE(0x10C4, 0xEA70) }, /* Silicon Labs factory default */

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH 4.4 09/23] USB: serial: pl2303: add new ATEN device id
  2017-08-15  1:18 [PATCH 4.4 00/23] 4.4.83-stable review Greg Kroah-Hartman
                   ` (7 preceding siblings ...)
  2017-08-15  1:18 ` [PATCH 4.4 08/23] USB: serial: cp210x: add support for Qivicon USB ZigBee dongle Greg Kroah-Hartman
@ 2017-08-15  1:18 ` Greg Kroah-Hartman
  2017-08-15  1:18 ` [PATCH 4.4 10/23] usb: musb: fix tx fifo flush handling again Greg Kroah-Hartman
                   ` (15 subsequent siblings)
  24 siblings, 0 replies; 27+ messages in thread
From: Greg Kroah-Hartman @ 2017-08-15  1:18 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Peter Kuo, Johan Hovold

4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 3b6bcd3d093c698d32e93d4da57679b8fbc5e01e upstream.

This adds a new ATEN device id for a new pl2303-based device.

Reported-by: Peter Kuo <PeterKuo@aten.com.tw>
Cc: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/serial/pl2303.c |    1 +
 drivers/usb/serial/pl2303.h |    1 +
 2 files changed, 2 insertions(+)

--- a/drivers/usb/serial/pl2303.c
+++ b/drivers/usb/serial/pl2303.c
@@ -49,6 +49,7 @@ static const struct usb_device_id id_tab
 	{ USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID) },
 	{ USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID_RSAQ5) },
 	{ USB_DEVICE(ATEN_VENDOR_ID, ATEN_PRODUCT_ID) },
+	{ USB_DEVICE(ATEN_VENDOR_ID, ATEN_PRODUCT_UC485) },
 	{ USB_DEVICE(ATEN_VENDOR_ID, ATEN_PRODUCT_ID2) },
 	{ USB_DEVICE(ATEN_VENDOR_ID2, ATEN_PRODUCT_ID) },
 	{ USB_DEVICE(ELCOM_VENDOR_ID, ELCOM_PRODUCT_ID) },
--- a/drivers/usb/serial/pl2303.h
+++ b/drivers/usb/serial/pl2303.h
@@ -27,6 +27,7 @@
 #define ATEN_VENDOR_ID		0x0557
 #define ATEN_VENDOR_ID2		0x0547
 #define ATEN_PRODUCT_ID		0x2008
+#define ATEN_PRODUCT_UC485	0x2021
 #define ATEN_PRODUCT_ID2	0x2118
 
 #define IODATA_VENDOR_ID	0x04bb

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH 4.4 10/23] usb: musb: fix tx fifo flush handling again
  2017-08-15  1:18 [PATCH 4.4 00/23] 4.4.83-stable review Greg Kroah-Hartman
                   ` (8 preceding siblings ...)
  2017-08-15  1:18 ` [PATCH 4.4 09/23] USB: serial: pl2303: add new ATEN device id Greg Kroah-Hartman
@ 2017-08-15  1:18 ` Greg Kroah-Hartman
  2017-08-15  1:18 ` [PATCH 4.4 11/23] USB: hcd: Mark secondary HCD as dead if the primary one died Greg Kroah-Hartman
                   ` (14 subsequent siblings)
  24 siblings, 0 replies; 27+ messages in thread
From: Greg Kroah-Hartman @ 2017-08-15  1:18 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Bin Liu

4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Bin Liu <b-liu@ti.com>

commit 45d73860530a14c608f410b91c6c341777bfa85d upstream.

commit 68fe05e2a451 ("usb: musb: fix tx fifo flush handling") drops the
1ms delay trying to solve the long disconnect time issue when
application queued many tx urbs. However, the 1ms delay is needed for
some use cases, for example, without the delay, reconnecting AR9271 WIFI
dongle no longer works if the connection is dropped from the AP.

So let's add back the 1ms delay in musb_h_tx_flush_fifo(), and solve the
long disconnect time problem with a separate patch for
usb_hcd_flush_endpoint().

Signed-off-by: Bin Liu <b-liu@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/musb/musb_host.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/usb/musb/musb_host.c
+++ b/drivers/usb/musb/musb_host.c
@@ -138,6 +138,7 @@ static void musb_h_tx_flush_fifo(struct
 				"Could not flush host TX%d fifo: csr: %04x\n",
 				ep->epnum, csr))
 			return;
+		mdelay(1);
 	}
 }
 

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH 4.4 11/23] USB: hcd: Mark secondary HCD as dead if the primary one died
  2017-08-15  1:18 [PATCH 4.4 00/23] 4.4.83-stable review Greg Kroah-Hartman
                   ` (9 preceding siblings ...)
  2017-08-15  1:18 ` [PATCH 4.4 10/23] usb: musb: fix tx fifo flush handling again Greg Kroah-Hartman
@ 2017-08-15  1:18 ` Greg Kroah-Hartman
  2017-08-15  1:18 ` [PATCH 4.4 12/23] staging:iio:resolver:ad2s1210 fix negative IIO_ANGL_VEL read Greg Kroah-Hartman
                   ` (13 subsequent siblings)
  24 siblings, 0 replies; 27+ messages in thread
From: Greg Kroah-Hartman @ 2017-08-15  1:18 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Alan Stern, Rafael J. Wysocki

4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

commit cd5a6a4fdaba150089af2afc220eae0fef74878a upstream.

Make usb_hc_died() clear the HCD_FLAG_RH_RUNNING flag for the shared
HCD and set HCD_FLAG_DEAD for it, in analogy with what is done for
the primary one.

Among other thigs, this prevents check_root_hub_suspended() from
returning -EBUSY for dead HCDs which helps to work around system
suspend issues in some situations.

This actually fixes occasional suspend failures on one of my test
machines.

Suggested-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/core/hcd.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -2448,6 +2448,8 @@ void usb_hc_died (struct usb_hcd *hcd)
 	}
 	if (usb_hcd_is_primary_hcd(hcd) && hcd->shared_hcd) {
 		hcd = hcd->shared_hcd;
+		clear_bit(HCD_FLAG_RH_RUNNING, &hcd->flags);
+		set_bit(HCD_FLAG_DEAD, &hcd->flags);
 		if (hcd->rh_registered) {
 			clear_bit(HCD_FLAG_POLL_RH, &hcd->flags);
 

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH 4.4 12/23] staging:iio:resolver:ad2s1210 fix negative IIO_ANGL_VEL read
  2017-08-15  1:18 [PATCH 4.4 00/23] 4.4.83-stable review Greg Kroah-Hartman
                   ` (10 preceding siblings ...)
  2017-08-15  1:18 ` [PATCH 4.4 11/23] USB: hcd: Mark secondary HCD as dead if the primary one died Greg Kroah-Hartman
@ 2017-08-15  1:18 ` Greg Kroah-Hartman
  2017-08-15  1:18 ` [PATCH 4.4 13/23] iio: accel: bmc150: Always restore device to normal mode after suspend-resume Greg Kroah-Hartman
                   ` (12 subsequent siblings)
  24 siblings, 0 replies; 27+ messages in thread
From: Greg Kroah-Hartman @ 2017-08-15  1:18 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Arnd Bergmann, Jonathan Cameron

4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Arnd Bergmann <arnd@arndb.de>

commit 105967ad68d2eb1a041bc041f9cf96af2a653b65 upstream.

gcc-7 points out an older regression:

drivers/staging/iio/resolver/ad2s1210.c: In function 'ad2s1210_read_raw':
drivers/staging/iio/resolver/ad2s1210.c:515:42: error: '<<' in boolean context, did you mean '<' ? [-Werror=int-in-bool-context]

The original code had 'unsigned short' here, but incorrectly got
converted to 'bool'. This reverts the regression and uses a normal
type instead.

Fixes: 29148543c521 ("staging:iio:resolver:ad2s1210 minimal chan spec conversion.")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/staging/iio/resolver/ad2s1210.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/staging/iio/resolver/ad2s1210.c
+++ b/drivers/staging/iio/resolver/ad2s1210.c
@@ -468,7 +468,7 @@ static int ad2s1210_read_raw(struct iio_
 			     long m)
 {
 	struct ad2s1210_state *st = iio_priv(indio_dev);
-	bool negative;
+	u16 negative;
 	int ret = 0;
 	u16 pos;
 	s16 vel;

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH 4.4 13/23] iio: accel: bmc150: Always restore device to normal mode after suspend-resume
  2017-08-15  1:18 [PATCH 4.4 00/23] 4.4.83-stable review Greg Kroah-Hartman
                   ` (11 preceding siblings ...)
  2017-08-15  1:18 ` [PATCH 4.4 12/23] staging:iio:resolver:ad2s1210 fix negative IIO_ANGL_VEL read Greg Kroah-Hartman
@ 2017-08-15  1:18 ` Greg Kroah-Hartman
  2017-08-15  1:18 ` [PATCH 4.4 14/23] iio: light: tsl2563: use correct event code Greg Kroah-Hartman
                   ` (11 subsequent siblings)
  24 siblings, 0 replies; 27+ messages in thread
From: Greg Kroah-Hartman @ 2017-08-15  1:18 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Hans de Goede, Srinivas Pandruvada,
	Jonathan Cameron

4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Hans de Goede <hdegoede@redhat.com>

commit e59e18989c68a8d7941005f81ad6abc4ca682de0 upstream.

After probe we would put the device in normal mode, after a runtime
suspend-resume we would put it back in normal mode. But for a regular
suspend-resume we would only put it back in normal mode if triggers
or events have been requested.  This is not consistent and breaks
reading raw values after a suspend-resume.

This commit changes the regular resume path to also unconditionally put
the device back in normal mode, fixing reading of raw values not working
after a regular suspend-resume cycle.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/iio/accel/bmc150-accel-core.c |    9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

--- a/drivers/iio/accel/bmc150-accel-core.c
+++ b/drivers/iio/accel/bmc150-accel-core.c
@@ -194,7 +194,6 @@ struct bmc150_accel_data {
 	struct device *dev;
 	int irq;
 	struct bmc150_accel_interrupt interrupts[BMC150_ACCEL_INTERRUPTS];
-	atomic_t active_intr;
 	struct bmc150_accel_trigger triggers[BMC150_ACCEL_TRIGGERS];
 	struct mutex mutex;
 	u8 fifo_mode, watermark;
@@ -489,11 +488,6 @@ static int bmc150_accel_set_interrupt(st
 		goto out_fix_power_state;
 	}
 
-	if (state)
-		atomic_inc(&data->active_intr);
-	else
-		atomic_dec(&data->active_intr);
-
 	return 0;
 
 out_fix_power_state:
@@ -1704,8 +1698,7 @@ static int bmc150_accel_resume(struct de
 	struct bmc150_accel_data *data = iio_priv(indio_dev);
 
 	mutex_lock(&data->mutex);
-	if (atomic_read(&data->active_intr))
-		bmc150_accel_set_mode(data, BMC150_ACCEL_SLEEP_MODE_NORMAL, 0);
+	bmc150_accel_set_mode(data, BMC150_ACCEL_SLEEP_MODE_NORMAL, 0);
 	bmc150_accel_fifo_set_mode(data);
 	mutex_unlock(&data->mutex);
 

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH 4.4 14/23] iio: light: tsl2563: use correct event code
  2017-08-15  1:18 [PATCH 4.4 00/23] 4.4.83-stable review Greg Kroah-Hartman
                   ` (12 preceding siblings ...)
  2017-08-15  1:18 ` [PATCH 4.4 13/23] iio: accel: bmc150: Always restore device to normal mode after suspend-resume Greg Kroah-Hartman
@ 2017-08-15  1:18 ` Greg Kroah-Hartman
  2017-08-15  1:18 ` [PATCH 4.4 15/23] uas: Add US_FL_IGNORE_RESIDUE for Initio Corporation INIC-3069 Greg Kroah-Hartman
                   ` (10 subsequent siblings)
  24 siblings, 0 replies; 27+ messages in thread
From: Greg Kroah-Hartman @ 2017-08-15  1:18 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Jonathan Cameron, Akinobu Mita

4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Akinobu Mita <akinobu.mita@gmail.com>

commit a3507e48d3f99a93a3056a34a5365f310434570f upstream.

The TSL2563 driver provides three iio channels, two of which are raw ADC
channels (channel 0 and channel 1) in the device and the remaining one
is calculated by the two.  The ADC channel 0 only supports programmable
interrupt with threshold settings and this driver supports the event but
the generated event code does not contain the corresponding iio channel
type.

This is going to change userspace ABI.  Hopefully fixing this to be
what it should always have been won't break any userspace code.

Cc: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/iio/light/tsl2563.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/iio/light/tsl2563.c
+++ b/drivers/iio/light/tsl2563.c
@@ -626,7 +626,7 @@ static irqreturn_t tsl2563_event_handler
 	struct tsl2563_chip *chip = iio_priv(dev_info);
 
 	iio_push_event(dev_info,
-		       IIO_UNMOD_EVENT_CODE(IIO_LIGHT,
+		       IIO_UNMOD_EVENT_CODE(IIO_INTENSITY,
 					    0,
 					    IIO_EV_TYPE_THRESH,
 					    IIO_EV_DIR_EITHER),

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH 4.4 15/23] uas: Add US_FL_IGNORE_RESIDUE for Initio Corporation INIC-3069
  2017-08-15  1:18 [PATCH 4.4 00/23] 4.4.83-stable review Greg Kroah-Hartman
                   ` (13 preceding siblings ...)
  2017-08-15  1:18 ` [PATCH 4.4 14/23] iio: light: tsl2563: use correct event code Greg Kroah-Hartman
@ 2017-08-15  1:18 ` Greg Kroah-Hartman
  2017-08-15  1:18 ` [PATCH 4.4 16/23] USB: Check for dropped connection before switching to full speed Greg Kroah-Hartman
                   ` (9 subsequent siblings)
  24 siblings, 0 replies; 27+ messages in thread
From: Greg Kroah-Hartman @ 2017-08-15  1:18 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Alan Swanson, Oliver Neukum

4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Alan Swanson <reiver@improbability.net>

commit 89f23d51defcb94a5026d4b5da13faf4e1150a6f upstream.

Similar to commit d595259fbb7a ("usb-storage: Add ignore-residue quirk for
Initio INIC-3619") for INIC-3169 in unusual_devs.h but INIC-3069 already
present in unusual_uas.h. Both in same controller IC family.

Issue is that MakeMKV fails during key exchange with installed bluray drive
with following error:

002004:0000 Error 'Scsi error - ILLEGAL REQUEST:COPY PROTECTION KEY EXCHANGE FAILURE - KEY NOT ESTABLISHED'
occurred while issuing SCSI command AD010..080002400 to device 'SG:dev_11:0'

Signed-off-by: Alan Swanson <reiver@improbability.net>
Acked-by: Oliver Neukum <oneukum@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/storage/unusual_uas.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/usb/storage/unusual_uas.h
+++ b/drivers/usb/storage/unusual_uas.h
@@ -123,9 +123,9 @@ UNUSUAL_DEV(0x0bc2, 0xab2a, 0x0000, 0x99
 /* Reported-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> */
 UNUSUAL_DEV(0x13fd, 0x3940, 0x0000, 0x9999,
 		"Initio Corporation",
-		"",
+		"INIC-3069",
 		USB_SC_DEVICE, USB_PR_DEVICE, NULL,
-		US_FL_NO_ATA_1X),
+		US_FL_NO_ATA_1X | US_FL_IGNORE_RESIDUE),
 
 /* Reported-by: Tom Arild Naess <tanaess@gmail.com> */
 UNUSUAL_DEV(0x152d, 0x0539, 0x0000, 0x9999,

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH 4.4 16/23] USB: Check for dropped connection before switching to full speed
  2017-08-15  1:18 [PATCH 4.4 00/23] 4.4.83-stable review Greg Kroah-Hartman
                   ` (14 preceding siblings ...)
  2017-08-15  1:18 ` [PATCH 4.4 15/23] uas: Add US_FL_IGNORE_RESIDUE for Initio Corporation INIC-3069 Greg Kroah-Hartman
@ 2017-08-15  1:18 ` Greg Kroah-Hartman
  2017-08-15  1:18 ` [PATCH 4.4 17/23] usb: core: unlink urbs from the tail of the endpoints urb_list Greg Kroah-Hartman
                   ` (8 subsequent siblings)
  24 siblings, 0 replies; 27+ messages in thread
From: Greg Kroah-Hartman @ 2017-08-15  1:18 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Alan Stern, Guenter Roeck

4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Alan Stern <stern@rowland.harvard.edu>

commit 94c43b9897abf4ea366ed4dba027494e080c7050 upstream.

Some buggy USB disk adapters disconnect and reconnect multiple times
during the enumeration procedure.  This may lead to a device
connecting at full speed instead of high speed, because when the USB
stack sees that a device isn't able to enumerate at high speed, it
tries to hand the connection over to a full-speed companion
controller.

The logic for doing this is careful to check that the device is still
connected.  But this check is inadequate if the device disconnects and
reconnects before the check is done.  The symptom is that a device
works, but much more slowly than it is capable of operating.

The situation was made worse recently by commit 22547c4cc4fe ("usb:
hub: Wait for connection to be reestablished after port reset"), which
increases the delay following a reset before a disconnect is
recognized, thus giving the device more time to reconnect.

This patch makes the check more robust.  If the device was
disconnected at any time during enumeration, we will now skip the
full-speed handover.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Reported-and-tested-by: Zdenek Kabelac <zkabelac@redhat.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/core/hub.c |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -4661,7 +4661,8 @@ hub_power_remaining(struct usb_hub *hub)
 static void hub_port_connect(struct usb_hub *hub, int port1, u16 portstatus,
 		u16 portchange)
 {
-	int status, i;
+	int status = -ENODEV;
+	int i;
 	unsigned unit_load;
 	struct usb_device *hdev = hub->hdev;
 	struct usb_hcd *hcd = bus_to_hcd(hdev->bus);
@@ -4865,9 +4866,10 @@ loop:
 
 done:
 	hub_port_disable(hub, port1, 1);
-	if (hcd->driver->relinquish_port && !hub->hdev->parent)
-		hcd->driver->relinquish_port(hcd, port1);
-
+	if (hcd->driver->relinquish_port && !hub->hdev->parent) {
+		if (status != -ENOTCONN && status != -ENODEV)
+			hcd->driver->relinquish_port(hcd, port1);
+	}
 }
 
 /* Handle physical or logical connection change events.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH 4.4 17/23] usb: core: unlink urbs from the tail of the endpoints urb_list
  2017-08-15  1:18 [PATCH 4.4 00/23] 4.4.83-stable review Greg Kroah-Hartman
                   ` (15 preceding siblings ...)
  2017-08-15  1:18 ` [PATCH 4.4 16/23] USB: Check for dropped connection before switching to full speed Greg Kroah-Hartman
@ 2017-08-15  1:18 ` Greg Kroah-Hartman
  2017-08-15  1:18 ` [PATCH 4.4 18/23] usb: quirks: Add no-lpm quirk for Moshi USB to Ethernet Adapter Greg Kroah-Hartman
                   ` (7 subsequent siblings)
  24 siblings, 0 replies; 27+ messages in thread
From: Greg Kroah-Hartman @ 2017-08-15  1:18 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Alan Stern, Bin Liu

4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Bin Liu <b-liu@ti.com>

commit 2eac13624364db5b5e1666ae0bb3a4d36bc56b6e upstream.

While unlink an urb, if the urb has been programmed in the controller,
the controller driver might do some hw related actions to tear down the
urb.

Currently usb_hcd_flush_endpoint() passes each urb from the head of the
endpoint's urb_list to the controller driver, which could make the
controller driver think each urb has been programmed and take the
unnecessary actions for each urb.

This patch changes the behavior in usb_hcd_flush_endpoint() to pass the
urbs from the tail of the list, to avoid any unnecessary actions in an
controller driver.

Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Bin Liu <b-liu@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/core/hcd.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -1851,7 +1851,7 @@ void usb_hcd_flush_endpoint(struct usb_d
 	/* No more submits can occur */
 	spin_lock_irq(&hcd_urb_list_lock);
 rescan:
-	list_for_each_entry (urb, &ep->urb_list, urb_list) {
+	list_for_each_entry_reverse(urb, &ep->urb_list, urb_list) {
 		int	is_in;
 
 		if (urb->unlinked)

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH 4.4 18/23] usb: quirks: Add no-lpm quirk for Moshi USB to Ethernet Adapter
  2017-08-15  1:18 [PATCH 4.4 00/23] 4.4.83-stable review Greg Kroah-Hartman
                   ` (16 preceding siblings ...)
  2017-08-15  1:18 ` [PATCH 4.4 17/23] usb: core: unlink urbs from the tail of the endpoints urb_list Greg Kroah-Hartman
@ 2017-08-15  1:18 ` Greg Kroah-Hartman
  2017-08-15  1:18 ` [PATCH 4.4 19/23] usb:xhci:Add quirk for Certain failing HP keyboard on reset after resume Greg Kroah-Hartman
                   ` (6 subsequent siblings)
  24 siblings, 0 replies; 27+ messages in thread
From: Greg Kroah-Hartman @ 2017-08-15  1:18 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Kai-Heng Feng

4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Kai-Heng Feng <kai.heng.feng@canonical.com>

commit 7496cfe5431f21da5d27a8388c326397e3f0a5db upstream.

Moshi USB to Ethernet Adapter internally uses a Genesys Logic hub to
connect to Realtek r8153.

The Realtek r8153 ethernet does not work on the internal hub, no-lpm quirk
can make it work.

Since another r8153 dongle at my hand does not have the issue, so add
the quirk to the Genesys Logic hub instead.

Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/core/quirks.c |    3 +++
 1 file changed, 3 insertions(+)

--- a/drivers/usb/core/quirks.c
+++ b/drivers/usb/core/quirks.c
@@ -150,6 +150,9 @@ static const struct usb_device_id usb_qu
 	/* appletouch */
 	{ USB_DEVICE(0x05ac, 0x021a), .driver_info = USB_QUIRK_RESET_RESUME },
 
+	/* Genesys Logic hub, internally used by Moshi USB to Ethernet Adapter */
+	{ USB_DEVICE(0x05e3, 0x0616), .driver_info = USB_QUIRK_NO_LPM },
+
 	/* Avision AV600U */
 	{ USB_DEVICE(0x0638, 0x0a13), .driver_info =
 	  USB_QUIRK_STRING_FETCH_255 },

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH 4.4 19/23] usb:xhci:Add quirk for Certain failing HP keyboard on reset after resume
  2017-08-15  1:18 [PATCH 4.4 00/23] 4.4.83-stable review Greg Kroah-Hartman
                   ` (17 preceding siblings ...)
  2017-08-15  1:18 ` [PATCH 4.4 18/23] usb: quirks: Add no-lpm quirk for Moshi USB to Ethernet Adapter Greg Kroah-Hartman
@ 2017-08-15  1:18 ` Greg Kroah-Hartman
  2017-08-15  1:18 ` [PATCH 4.4 20/23] iio: adc: vf610_adc: Fix VALT selection value for REFSEL bits Greg Kroah-Hartman
                   ` (5 subsequent siblings)
  24 siblings, 0 replies; 27+ messages in thread
From: Greg Kroah-Hartman @ 2017-08-15  1:18 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Sandeep Singh, Shyam Sundar S K,
	Nehal Shah, Felipe Balbi

4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Sandeep Singh <sandeep.singh@amd.com>

commit e788787ef4f9c24aafefc480a8da5f92b914e5e6 upstream.

Certain HP keyboards would keep inputting a character automatically which
is the wake-up key after S3 resume

On some AMD platforms USB host fails to respond (by holding resume-K) to
USB device (an HP keyboard) resume request within 1ms (TURSM) and ensures
that resume is signaled for at least 20 ms (TDRSMDN), which is defined in
USB 2.0 spec. The result is that the keyboard is out of function.

In SNPS USB design, the host responds to the resume request only after
system gets back to S0 and the host gets to functional after the internal
HW restore operation that is more than 1 second after the initial resume
request from the USB device.

As a workaround for specific keyboard ID(HP Keyboards), applying port reset
after resume when the keyboard is plugged in.

Signed-off-by: Sandeep Singh <Sandeep.Singh@amd.com>
Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
cc: Nehal Shah <Nehal-bakulchandra.Shah@amd.com>
Reviewed-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/core/quirks.c     |    1 +
 drivers/usb/host/pci-quirks.c |   17 ++++++++++++-----
 2 files changed, 13 insertions(+), 5 deletions(-)

--- a/drivers/usb/core/quirks.c
+++ b/drivers/usb/core/quirks.c
@@ -252,6 +252,7 @@ static const struct usb_device_id usb_am
 	{ USB_DEVICE(0x093a, 0x2500), .driver_info = USB_QUIRK_RESET_RESUME },
 	{ USB_DEVICE(0x093a, 0x2510), .driver_info = USB_QUIRK_RESET_RESUME },
 	{ USB_DEVICE(0x093a, 0x2521), .driver_info = USB_QUIRK_RESET_RESUME },
+	{ USB_DEVICE(0x03f0, 0x2b4a), .driver_info = USB_QUIRK_RESET_RESUME },
 
 	/* Logitech Optical Mouse M90/M100 */
 	{ USB_DEVICE(0x046d, 0xc05a), .driver_info = USB_QUIRK_RESET_RESUME },
--- a/drivers/usb/host/pci-quirks.c
+++ b/drivers/usb/host/pci-quirks.c
@@ -89,6 +89,7 @@ enum amd_chipset_gen {
 	AMD_CHIPSET_HUDSON2,
 	AMD_CHIPSET_BOLTON,
 	AMD_CHIPSET_YANGTZE,
+	AMD_CHIPSET_TAISHAN,
 	AMD_CHIPSET_UNKNOWN,
 };
 
@@ -132,6 +133,11 @@ static int amd_chipset_sb_type_init(stru
 			pinfo->sb_type.gen = AMD_CHIPSET_SB700;
 		else if (rev >= 0x40 && rev <= 0x4f)
 			pinfo->sb_type.gen = AMD_CHIPSET_SB800;
+	}
+	pinfo->smbus_dev = pci_get_device(PCI_VENDOR_ID_AMD,
+					  0x145c, NULL);
+	if (pinfo->smbus_dev) {
+		pinfo->sb_type.gen = AMD_CHIPSET_TAISHAN;
 	} else {
 		pinfo->smbus_dev = pci_get_device(PCI_VENDOR_ID_AMD,
 				PCI_DEVICE_ID_AMD_HUDSON2_SMBUS, NULL);
@@ -251,11 +257,12 @@ int usb_hcd_amd_remote_wakeup_quirk(stru
 {
 	/* Make sure amd chipset type has already been initialized */
 	usb_amd_find_chipset_info();
-	if (amd_chipset.sb_type.gen != AMD_CHIPSET_YANGTZE)
-		return 0;
-
-	dev_dbg(&pdev->dev, "QUIRK: Enable AMD remote wakeup fix\n");
-	return 1;
+	if (amd_chipset.sb_type.gen == AMD_CHIPSET_YANGTZE ||
+	    amd_chipset.sb_type.gen == AMD_CHIPSET_TAISHAN) {
+		dev_dbg(&pdev->dev, "QUIRK: Enable AMD remote wakeup fix\n");
+		return 1;
+	}
+	return 0;
 }
 EXPORT_SYMBOL_GPL(usb_hcd_amd_remote_wakeup_quirk);
 

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH 4.4 20/23] iio: adc: vf610_adc: Fix VALT selection value for REFSEL bits
  2017-08-15  1:18 [PATCH 4.4 00/23] 4.4.83-stable review Greg Kroah-Hartman
                   ` (18 preceding siblings ...)
  2017-08-15  1:18 ` [PATCH 4.4 19/23] usb:xhci:Add quirk for Certain failing HP keyboard on reset after resume Greg Kroah-Hartman
@ 2017-08-15  1:18 ` Greg Kroah-Hartman
  2017-08-15  1:18 ` [PATCH 4.4 21/23] pnfs/blocklayout: require 64-bit sector_t Greg Kroah-Hartman
                   ` (4 subsequent siblings)
  24 siblings, 0 replies; 27+ messages in thread
From: Greg Kroah-Hartman @ 2017-08-15  1:18 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Stefan-Gabriel Mirea, Jonathan Cameron

4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Stefan-Gabriel Mirea <stefan-gabriel.mirea@nxp.com>

commit d466d3c1217406b14b834335b5b4b33c0d45bd09 upstream.

In order to select the alternate voltage reference pair (VALTH/VALTL), the
right value for the REFSEL field in the ADCx_CFG register is "01", leading
to 0x800 as register mask. See section 8.2.6.4 in the reference manual[1].

[1] http://www.nxp.com/docs/en/reference-manual/VFXXXRM.pdf

Fixes: a775427632fd ("iio:adc:imx: add Freescale Vybrid vf610 adc driver")
Signed-off-by: Stefan-Gabriel Mirea <stefan-gabriel.mirea@nxp.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/iio/adc/vf610_adc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/iio/adc/vf610_adc.c
+++ b/drivers/iio/adc/vf610_adc.c
@@ -77,7 +77,7 @@
 #define VF610_ADC_ADSTS_MASK		0x300
 #define VF610_ADC_ADLPC_EN		0x80
 #define VF610_ADC_ADHSC_EN		0x400
-#define VF610_ADC_REFSEL_VALT		0x100
+#define VF610_ADC_REFSEL_VALT		0x800
 #define VF610_ADC_REFSEL_VBG		0x1000
 #define VF610_ADC_ADTRG_HARD		0x2000
 #define VF610_ADC_AVGS_8		0x4000

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH 4.4 21/23] pnfs/blocklayout: require 64-bit sector_t
  2017-08-15  1:18 [PATCH 4.4 00/23] 4.4.83-stable review Greg Kroah-Hartman
                   ` (19 preceding siblings ...)
  2017-08-15  1:18 ` [PATCH 4.4 20/23] iio: adc: vf610_adc: Fix VALT selection value for REFSEL bits Greg Kroah-Hartman
@ 2017-08-15  1:18 ` Greg Kroah-Hartman
  2017-08-15  1:18 ` [PATCH 4.4 22/23] pinctrl: sunxi: add a missing function of A10/A20 pinctrl driver Greg Kroah-Hartman
                   ` (3 subsequent siblings)
  24 siblings, 0 replies; 27+ messages in thread
From: Greg Kroah-Hartman @ 2017-08-15  1:18 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Christoph Hellwig, Arnd Bergmann,
	Anna Schumaker

4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Christoph Hellwig <hch@lst.de>

commit 8a9d6e964d318533ba3d2901ce153ba317c99a89 upstream.

The blocklayout code does not compile cleanly for a 32-bit sector_t,
and also has no reliable checks for devices sizes, which makes it
unsafe to use with a kernel that doesn't support large block devices.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reported-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 5c83746a0cf2 ("pnfs/blocklayout: in-kernel GETDEVICEINFO XDR parsing")
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/nfs/Kconfig |    1 +
 1 file changed, 1 insertion(+)

--- a/fs/nfs/Kconfig
+++ b/fs/nfs/Kconfig
@@ -121,6 +121,7 @@ config PNFS_FILE_LAYOUT
 config PNFS_BLOCK
 	tristate
 	depends on NFS_V4_1 && BLK_DEV_DM
+	depends on 64BIT || LBDAF
 	default NFS_V4
 
 config PNFS_OBJLAYOUT

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH 4.4 22/23] pinctrl: sunxi: add a missing function of A10/A20 pinctrl driver
  2017-08-15  1:18 [PATCH 4.4 00/23] 4.4.83-stable review Greg Kroah-Hartman
                   ` (20 preceding siblings ...)
  2017-08-15  1:18 ` [PATCH 4.4 21/23] pnfs/blocklayout: require 64-bit sector_t Greg Kroah-Hartman
@ 2017-08-15  1:18 ` Greg Kroah-Hartman
  2017-08-15  1:18   ` Greg Kroah-Hartman
                   ` (2 subsequent siblings)
  24 siblings, 0 replies; 27+ messages in thread
From: Greg Kroah-Hartman @ 2017-08-15  1:18 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Icenowy Zheng, Chen-Yu Tsai, Linus Walleij

4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Icenowy Zheng <icenowy@aosc.io>

commit d81ece747d8727bb8b1cfc9a20dbe62f09a4e35a upstream.

The PH16 pin has a function with mux id 0x5, which is the DET pin of the
"sim" (smart card reader) IP block.

This function is missing in old versions of A10/A20 SoCs' datasheets and
user manuals, so it's also missing in the old drivers. The newest A10
Datasheet V1.70 and A20 Datasheet V1.41 contain this pin function, and
it's discovered during implementing R40 pinctrl driver.

Add it to the driver. As we now merged A20 pinctrl driver to the A10
one, we need to only fix the A10 driver now.

Fixes: f2821b1ca3a2 ("pinctrl: sunxi: Move Allwinner A10 pinctrl
driver to a driver of its own")

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/pinctrl/sunxi/pinctrl-sun4i-a10.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/pinctrl/sunxi/pinctrl-sun4i-a10.c
+++ b/drivers/pinctrl/sunxi/pinctrl-sun4i-a10.c
@@ -811,6 +811,7 @@ static const struct sunxi_desc_pin sun4i
 		  SUNXI_FUNCTION(0x2, "lcd1"),		/* D16 */
 		  SUNXI_FUNCTION(0x3, "pata"),		/* ATAD12 */
 		  SUNXI_FUNCTION(0x4, "keypad"),	/* IN6 */
+		  SUNXI_FUNCTION(0x5, "sim"),		/* DET */
 		  SUNXI_FUNCTION_IRQ(0x6, 16),		/* EINT16 */
 		  SUNXI_FUNCTION(0x7, "csi1")),		/* D16 */
 	SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 17),

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH 4.4 23/23] pinctrl: samsung: Remove bogus irq_[un]mask from resource management
  2017-08-15  1:18 [PATCH 4.4 00/23] 4.4.83-stable review Greg Kroah-Hartman
@ 2017-08-15  1:18   ` Greg Kroah-Hartman
  2017-08-15  1:18 ` [PATCH 4.4 02/23] mm: ratelimit PFNs busy info message Greg Kroah-Hartman
                     ` (23 subsequent siblings)
  24 siblings, 0 replies; 27+ messages in thread
From: Greg Kroah-Hartman @ 2017-08-15  1:18 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Thomas Gleixner, Krzysztof Kozlowski,
	Sylwester Nawrocki, Linus Walleij, Kukjin Kim, linux-arm-kernel,
	linux-samsung-soc, linux-gpio, Tomasz Figa

4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Thomas Gleixner <tglx@linutronix.de>

commit 3fa53ec2ed885b0aec3f0472e3b4a8a6f1cd748c upstream.

The irq chip callbacks irq_request/release_resources() have absolutely no
business with masking and unmasking the irq.

The core code unmasks the interrupt after complete setup and masks it
before invoking irq_release_resources().

The unmask is actually harmful as it happens before the interrupt is
completely initialized in __setup_irq().

Remove it.

Fixes: f6a8249f9e55 ("pinctrl: exynos: Lock GPIOs as interrupts when used as EINTs")
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Kukjin Kim <kgene@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
Cc: linux-gpio@vger.kernel.org
Acked-by: Tomasz Figa <tomasz.figa@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/pinctrl/samsung/pinctrl-exynos.c |    4 ----
 1 file changed, 4 deletions(-)

--- a/drivers/pinctrl/samsung/pinctrl-exynos.c
+++ b/drivers/pinctrl/samsung/pinctrl-exynos.c
@@ -194,8 +194,6 @@ static int exynos_irq_request_resources(
 
 	spin_unlock_irqrestore(&bank->slock, flags);
 
-	exynos_irq_unmask(irqd);
-
 	return 0;
 }
 
@@ -216,8 +214,6 @@ static void exynos_irq_release_resources
 	shift = irqd->hwirq * bank_type->fld_width[PINCFG_TYPE_FUNC];
 	mask = (1 << bank_type->fld_width[PINCFG_TYPE_FUNC]) - 1;
 
-	exynos_irq_mask(irqd);
-
 	spin_lock_irqsave(&bank->slock, flags);
 
 	con = readl(d->virt_base + reg_con);

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH 4.4 23/23] pinctrl: samsung: Remove bogus irq_[un]mask from resource management
@ 2017-08-15  1:18   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 27+ messages in thread
From: Greg Kroah-Hartman @ 2017-08-15  1:18 UTC (permalink / raw)
  To: linux-arm-kernel

4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Thomas Gleixner <tglx@linutronix.de>

commit 3fa53ec2ed885b0aec3f0472e3b4a8a6f1cd748c upstream.

The irq chip callbacks irq_request/release_resources() have absolutely no
business with masking and unmasking the irq.

The core code unmasks the interrupt after complete setup and masks it
before invoking irq_release_resources().

The unmask is actually harmful as it happens before the interrupt is
completely initialized in __setup_irq().

Remove it.

Fixes: f6a8249f9e55 ("pinctrl: exynos: Lock GPIOs as interrupts when used as EINTs")
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Kukjin Kim <kgene@kernel.org>
Cc: linux-arm-kernel at lists.infradead.org
Cc: linux-samsung-soc at vger.kernel.org
Cc: linux-gpio at vger.kernel.org
Acked-by: Tomasz Figa <tomasz.figa@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/pinctrl/samsung/pinctrl-exynos.c |    4 ----
 1 file changed, 4 deletions(-)

--- a/drivers/pinctrl/samsung/pinctrl-exynos.c
+++ b/drivers/pinctrl/samsung/pinctrl-exynos.c
@@ -194,8 +194,6 @@ static int exynos_irq_request_resources(
 
 	spin_unlock_irqrestore(&bank->slock, flags);
 
-	exynos_irq_unmask(irqd);
-
 	return 0;
 }
 
@@ -216,8 +214,6 @@ static void exynos_irq_release_resources
 	shift = irqd->hwirq * bank_type->fld_width[PINCFG_TYPE_FUNC];
 	mask = (1 << bank_type->fld_width[PINCFG_TYPE_FUNC]) - 1;
 
-	exynos_irq_mask(irqd);
-
 	spin_lock_irqsave(&bank->slock, flags);
 
 	con = readl(d->virt_base + reg_con);

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH 4.4 00/23] 4.4.83-stable review
  2017-08-15  1:18 [PATCH 4.4 00/23] 4.4.83-stable review Greg Kroah-Hartman
                   ` (22 preceding siblings ...)
  2017-08-15  1:18   ` Greg Kroah-Hartman
@ 2017-08-15 10:42 ` Guenter Roeck
  2017-08-15 18:08 ` Shuah Khan
  24 siblings, 0 replies; 27+ messages in thread
From: Guenter Roeck @ 2017-08-15 10:42 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-kernel
  Cc: torvalds, akpm, shuahkh, patches, ben.hutchings, stable

On 08/14/2017 06:18 PM, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 4.4.83 release.
> There are 23 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 me know.
> 
> Responses should be made by Thu Aug 17 01:17:45 UTC 2017.
> Anything received after that time might be too late.
> 

Build results:
	total: 145 pass: 145 fail: 0
Qemu test results:
	total: 115 pass: 115 fail: 0

Details are available at http://kerneltests.org/builders.

Guenter

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH 4.4 00/23] 4.4.83-stable review
  2017-08-15  1:18 [PATCH 4.4 00/23] 4.4.83-stable review Greg Kroah-Hartman
                   ` (23 preceding siblings ...)
  2017-08-15 10:42 ` [PATCH 4.4 00/23] 4.4.83-stable review Guenter Roeck
@ 2017-08-15 18:08 ` Shuah Khan
  24 siblings, 0 replies; 27+ messages in thread
From: Shuah Khan @ 2017-08-15 18:08 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-kernel
  Cc: torvalds, akpm, linux, patches, ben.hutchings, stable, Shuah Khan

On 08/14/2017 07:18 PM, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 4.4.83 release.
> There are 23 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 me know.
> 
> Responses should be made by Thu Aug 17 01:17:45 UTC 2017.
> 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/v4.x/stable-review/patch-4.4.83-rc1.gz
> or in the git tree and branch at:
>   git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.4.y
> and the diffstat can be found below.
> 
> thanks,
> 
> greg k-h
> 

Compiled and booted on my test system. No dmesg regressions.

thanks,
-- Shuah

^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2017-08-15 18:08 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-15  1:18 [PATCH 4.4 00/23] 4.4.83-stable review Greg Kroah-Hartman
2017-08-15  1:18 ` [PATCH 4.4 01/23] cpuset: fix a deadlock due to incomplete patching of cpusets_enabled() Greg Kroah-Hartman
2017-08-15  1:18 ` [PATCH 4.4 02/23] mm: ratelimit PFNs busy info message Greg Kroah-Hartman
2017-08-15  1:18 ` [PATCH 4.4 03/23] iscsi-target: fix memory leak in iscsit_setup_text_cmd() Greg Kroah-Hartman
2017-08-15  1:18 ` [PATCH 4.4 04/23] iscsi-target: Fix iscsi_np reset hung task during parallel delete Greg Kroah-Hartman
2017-08-15  1:18 ` [PATCH 4.4 05/23] fuse: initialize the flock flag in fuse_file on allocation Greg Kroah-Hartman
2017-08-15  1:18 ` [PATCH 4.4 06/23] nfs/flexfiles: fix leak of nfs4_ff_ds_version arrays Greg Kroah-Hartman
2017-08-15  1:18 ` [PATCH 4.4 07/23] USB: serial: option: add D-Link DWM-222 device ID Greg Kroah-Hartman
2017-08-15  1:18 ` [PATCH 4.4 08/23] USB: serial: cp210x: add support for Qivicon USB ZigBee dongle Greg Kroah-Hartman
2017-08-15  1:18 ` [PATCH 4.4 09/23] USB: serial: pl2303: add new ATEN device id Greg Kroah-Hartman
2017-08-15  1:18 ` [PATCH 4.4 10/23] usb: musb: fix tx fifo flush handling again Greg Kroah-Hartman
2017-08-15  1:18 ` [PATCH 4.4 11/23] USB: hcd: Mark secondary HCD as dead if the primary one died Greg Kroah-Hartman
2017-08-15  1:18 ` [PATCH 4.4 12/23] staging:iio:resolver:ad2s1210 fix negative IIO_ANGL_VEL read Greg Kroah-Hartman
2017-08-15  1:18 ` [PATCH 4.4 13/23] iio: accel: bmc150: Always restore device to normal mode after suspend-resume Greg Kroah-Hartman
2017-08-15  1:18 ` [PATCH 4.4 14/23] iio: light: tsl2563: use correct event code Greg Kroah-Hartman
2017-08-15  1:18 ` [PATCH 4.4 15/23] uas: Add US_FL_IGNORE_RESIDUE for Initio Corporation INIC-3069 Greg Kroah-Hartman
2017-08-15  1:18 ` [PATCH 4.4 16/23] USB: Check for dropped connection before switching to full speed Greg Kroah-Hartman
2017-08-15  1:18 ` [PATCH 4.4 17/23] usb: core: unlink urbs from the tail of the endpoints urb_list Greg Kroah-Hartman
2017-08-15  1:18 ` [PATCH 4.4 18/23] usb: quirks: Add no-lpm quirk for Moshi USB to Ethernet Adapter Greg Kroah-Hartman
2017-08-15  1:18 ` [PATCH 4.4 19/23] usb:xhci:Add quirk for Certain failing HP keyboard on reset after resume Greg Kroah-Hartman
2017-08-15  1:18 ` [PATCH 4.4 20/23] iio: adc: vf610_adc: Fix VALT selection value for REFSEL bits Greg Kroah-Hartman
2017-08-15  1:18 ` [PATCH 4.4 21/23] pnfs/blocklayout: require 64-bit sector_t Greg Kroah-Hartman
2017-08-15  1:18 ` [PATCH 4.4 22/23] pinctrl: sunxi: add a missing function of A10/A20 pinctrl driver Greg Kroah-Hartman
2017-08-15  1:18 ` [PATCH 4.4 23/23] pinctrl: samsung: Remove bogus irq_[un]mask from resource management Greg Kroah-Hartman
2017-08-15  1:18   ` Greg Kroah-Hartman
2017-08-15 10:42 ` [PATCH 4.4 00/23] 4.4.83-stable review Guenter Roeck
2017-08-15 18:08 ` Shuah Khan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.