<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/mfd/dln2.c, branch v6.18.21</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.21</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.21'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2023-11-01T10:02:13+00:00</updated>
<entry>
<title>mfd: dln2: Fix double put in dln2_probe</title>
<updated>2023-11-01T10:02:13+00:00</updated>
<author>
<name>Dinghao Liu</name>
<email>dinghao.liu@zju.edu.cn</email>
</author>
<published>2023-09-25T02:41:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=759c409bc5fc496cbc22cd0b392d3cbb0c0e23eb'/>
<id>urn:sha1:759c409bc5fc496cbc22cd0b392d3cbb0c0e23eb</id>
<content type='text'>
The dln2_free() already contains usb_put_dev(). Therefore,
the redundant usb_put_dev() before dln2_free() may lead to
a double free.

Fixes: 96da8f148396 ("mfd: dln2: Fix memory leak in dln2_probe()")
Signed-off-by: Dinghao Liu &lt;dinghao.liu@zju.edu.cn&gt;
Link: https://lore.kernel.org/r/20230925024134.9683-1-dinghao.liu@zju.edu.cn
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
</entry>
<entry>
<title>mfd: dln2: Remove the unneeded include &lt;linux/i2c.h&gt;</title>
<updated>2023-06-15T08:19:36+00:00</updated>
<author>
<name>Christophe JAILLET</name>
<email>christophe.jaillet@wanadoo.fr</email>
</author>
<published>2023-04-24T06:48:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=df2aac1573b57cde4475b587fbb22e1256080bac'/>
<id>urn:sha1:df2aac1573b57cde4475b587fbb22e1256080bac</id>
<content type='text'>
This driver does not use i2c, so there is no point in including
&lt;linux/i2c.h&gt;

Remove it.

Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
Link: https://lore.kernel.org/r/baf28e7f0fb57e918b76eaa92b94a2ae1a02cce0.1682318879.git.christophe.jaillet@wanadoo.fr
</content>
</entry>
<entry>
<title>mfd: dln2: Fix memory leak in dln2_probe()</title>
<updated>2023-04-26T10:40:34+00:00</updated>
<author>
<name>Qiang Ning</name>
<email>qning0106@126.com</email>
</author>
<published>2023-03-30T02:43:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=96da8f148396329ba769246cb8ceaa35f1ddfc48'/>
<id>urn:sha1:96da8f148396329ba769246cb8ceaa35f1ddfc48</id>
<content type='text'>
When dln2_setup_rx_urbs() in dln2_probe() fails, error out_free forgets
to call usb_put_dev() to decrease the refcount of dln2-&gt;usb_dev.

Fix this by adding usb_put_dev() in the error handling code of
dln2_probe().

Signed-off-by: Qiang Ning &lt;qning0106@126.com&gt;
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
Link: https://lore.kernel.org/r/20230330024353.4503-1-qning0106@126.com
</content>
</entry>
<entry>
<title>mfd: dln2: Automatically detect and fill endpoint pointers</title>
<updated>2022-07-19T09:54:40+00:00</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2022-06-17T18:23:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=99a7ec2f362261be1ccca702da099f39127a3388'/>
<id>urn:sha1:99a7ec2f362261be1ccca702da099f39127a3388</id>
<content type='text'>
The usb_find_common_endpoints() finds and fills the endpoints
in accordance with their types. Use it to automatically detect
and fill endpoint pointers.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
Link: https://lore.kernel.org/r/20220617182338.32402-1-andriy.shevchenko@linux.intel.com
</content>
</entry>
<entry>
<title>mfd: dln2: Add cell for initializing DLN2 ADC</title>
<updated>2021-11-05T14:40:27+00:00</updated>
<author>
<name>Jack Andersen</name>
<email>jackoalan@gmail.com</email>
</author>
<published>2021-10-18T11:25:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=313c84b5ae4104e48c661d5d706f9f4c425fd50f'/>
<id>urn:sha1:313c84b5ae4104e48c661d5d706f9f4c425fd50f</id>
<content type='text'>
This patch extends the DLN2 driver; adding cell for adc_dln2 module.

The original patch[1] fell through the cracks when the driver was added
so ADC has never actually been usable. That patch did not have ACPI
support which was added in v5.9, so the oldest supported version this
current patch can be backported to is 5.10.

[1] https://www.spinics.net/lists/linux-iio/msg33975.html

Cc: &lt;stable@vger.kernel.org&gt; # 5.10+
Signed-off-by: Jack Andersen &lt;jackoalan@gmail.com&gt;
Signed-off-by: Noralf Trønnes &lt;noralf@tronnes.org&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
Link: https://lore.kernel.org/r/20211018112541.25466-1-noralf@tronnes.org
</content>
</entry>
<entry>
<title>mfd: dln2: Run event handler loop under spinlock</title>
<updated>2020-08-13T06:50:56+00:00</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2020-07-23T13:02:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3d858942250820b9adc35f963a257481d6d4c81d'/>
<id>urn:sha1:3d858942250820b9adc35f963a257481d6d4c81d</id>
<content type='text'>
The event handler loop must be run with interrupts disabled.
Otherwise we will have a warning:

[ 1970.785649] irq 31 handler lineevent_irq_handler+0x0/0x20 enabled interrupts
[ 1970.792739] WARNING: CPU: 0 PID: 0 at kernel/irq/handle.c:159 __handle_irq_event_percpu+0x162/0x170
[ 1970.860732] RIP: 0010:__handle_irq_event_percpu+0x162/0x170
...
[ 1970.946994] Call Trace:
[ 1970.949446]  &lt;IRQ&gt;
[ 1970.951471]  handle_irq_event_percpu+0x2c/0x80
[ 1970.955921]  handle_irq_event+0x23/0x43
[ 1970.959766]  handle_simple_irq+0x57/0x70
[ 1970.963695]  generic_handle_irq+0x42/0x50
[ 1970.967717]  dln2_rx+0xc1/0x210 [dln2]
[ 1970.971479]  ? usb_hcd_unmap_urb_for_dma+0xa6/0x1c0
[ 1970.976362]  __usb_hcd_giveback_urb+0x77/0xe0
[ 1970.980727]  usb_giveback_urb_bh+0x8e/0xe0
[ 1970.984837]  tasklet_action_common.isra.0+0x4a/0xe0
...

Recently xHCI driver switched to tasklets in the commit 36dc01657b49
("usb: host: xhci: Support running urb giveback in tasklet context").

The handle_irq_event_* functions are expected to be called with interrupts
disabled and they rightfully complain here because we run in tasklet context
with interrupts enabled.

Use a event spinlock to protect event handler from being interrupted.

Note, that there are only two users of this GPIO and ADC drivers and both of
them are using generic_handle_irq() which makes above happen.

Fixes: 338a12814297 ("mfd: Add support for Diolan DLN-2 devices")
Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</content>
</entry>
<entry>
<title>mfd: dln2: Allow to be enumerated via ACPI</title>
<updated>2020-03-30T06:35:28+00:00</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2020-03-23T20:02:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e3fadb35bc1be0078e9ff5f9a55811f7eb1a5d05'/>
<id>urn:sha1:e3fadb35bc1be0078e9ff5f9a55811f7eb1a5d05</id>
<content type='text'>
On some platforms user may want to enumerate DLN2 device, its children,
to be enumerated via ACPI. In order to achieve this, let's distinguish
children by _ADR value.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</content>
</entry>
<entry>
<title>mfd: dln2: Fix sanity checking for endpoints</title>
<updated>2020-03-30T06:35:28+00:00</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2020-02-26T14:51:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fb945c95a482200876993977008b67ea658bd938'/>
<id>urn:sha1:fb945c95a482200876993977008b67ea658bd938</id>
<content type='text'>
While the commit 2b8bd606b1e6 ("mfd: dln2: More sanity checking for endpoints")
tries to harden the sanity checks it made at the same time a regression,
i.e.  mixed in and out endpoints. Obviously it should have been not tested on
real hardware at that time, but unluckily it didn't happen.

So, fix above mentioned typo and make device being enumerated again.

While here, introduce an enumerator for magic values to prevent similar issue
to happen in the future.

Fixes: 2b8bd606b1e6 ("mfd: dln2: More sanity checking for endpoints")
Cc: Oliver Neukum &lt;oneukum@suse.com&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</content>
</entry>
<entry>
<title>mfd: dln2: More sanity checking for endpoints</title>
<updated>2020-01-24T07:33:57+00:00</updated>
<author>
<name>Oliver Neukum</name>
<email>oneukum@suse.com</email>
</author>
<published>2019-11-21T10:28:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2b8bd606b1e60ca28c765f69c1eedd7d2a2e9dca'/>
<id>urn:sha1:2b8bd606b1e60ca28c765f69c1eedd7d2a2e9dca</id>
<content type='text'>
It is not enough to check for the number of endpoints.
The types must also be correct.

Reported-and-tested-by: syzbot+48a2851be24583b864dc@syzkaller.appspotmail.com
Signed-off-by: Oliver Neukum &lt;oneukum@suse.com&gt;
Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
</content>
</entry>
<entry>
<title>treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 372</title>
<updated>2019-06-05T15:37:10+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2019-05-31T08:09:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a10e763b87134a9a4ca3a38b5c4b533e75ec63a3'/>
<id>urn:sha1:a10e763b87134a9a4ca3a38b5c4b533e75ec63a3</id>
<content type='text'>
Based on 1 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license as published by
  the free software foundation version 2

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

has been chosen to replace the boilerplate/reference in 135 file(s).

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Allison Randal &lt;allison@lohutok.net&gt;
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190531081036.435762997@linutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
