<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/i2c, branch linux-4.15.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>i2c: i2c-stm32f7: fix no check on returned setup</title>
<updated>2018-04-08T12:27:33+00:00</updated>
<author>
<name>Pierre-Yves MORDRET</name>
<email>pierre-yves.mordret@st.com</email>
</author>
<published>2018-03-21T16:48:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=b61312ebb1c9db164cf1a72eb5dcac4464330665'/>
<id>b61312ebb1c9db164cf1a72eb5dcac4464330665</id>
<content type='text'>
commit 771b7bf05339081019d22452ebcab6929372e13e upstream.

Before assigning returned setup structure check if not null

Fixes: 463a9215f3ca7600b5ff ("i2c: stm32f7: fix setup structure")
Signed-off-by: Pierre-Yves MORDRET &lt;pierre-yves.mordret@st.com&gt;
Acked-by: Alexandre TORGUE &lt;alexandre.torgue@st.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Cc: stable@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 771b7bf05339081019d22452ebcab6929372e13e upstream.

Before assigning returned setup structure check if not null

Fixes: 463a9215f3ca7600b5ff ("i2c: stm32f7: fix setup structure")
Signed-off-by: Pierre-Yves MORDRET &lt;pierre-yves.mordret@st.com&gt;
Acked-by: Alexandre TORGUE &lt;alexandre.torgue@st.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Cc: stable@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>i2c: bcm2835: Set up the rising/falling edge delays</title>
<updated>2018-02-28T09:21:32+00:00</updated>
<author>
<name>Eric Anholt</name>
<email>eric@anholt.net</email>
</author>
<published>2018-02-08T13:54:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=1af6a672734780177109b0e194a9265eb5e31719'/>
<id>1af6a672734780177109b0e194a9265eb5e31719</id>
<content type='text'>
commit fe32a815f05c8568669a062587435e15f9345764 upstream.

We were leaving them in the power on state (or the state the firmware
had set up for some client, if we were taking over from them).  The
boot state was 30 core clocks, when we actually want to sample some
time after (to make sure that the new input bit has actually arrived).

Signed-off-by: Eric Anholt &lt;eric@anholt.net&gt;
Signed-off-by: Boris Brezillon &lt;boris.brezillon@bootlin.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Cc: stable@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit fe32a815f05c8568669a062587435e15f9345764 upstream.

We were leaving them in the power on state (or the state the firmware
had set up for some client, if we were taking over from them).  The
boot state was 30 core clocks, when we actually want to sample some
time after (to make sure that the new input bit has actually arrived).

Signed-off-by: Eric Anholt &lt;eric@anholt.net&gt;
Signed-off-by: Boris Brezillon &lt;boris.brezillon@bootlin.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Cc: stable@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>i2c: designware: must wait for enable</title>
<updated>2018-02-28T09:21:32+00:00</updated>
<author>
<name>Ben Gardner</name>
<email>gardner.ben@gmail.com</email>
</author>
<published>2018-02-14T15:29:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=13f741a22d4ffcdce2003e0438204f74e2d31451'/>
<id>13f741a22d4ffcdce2003e0438204f74e2d31451</id>
<content type='text'>
commit fba4adbbf670577e605f9ad306629db6031cd48b upstream.

One I2C bus on my Atom E3845 board has been broken since 4.9.
It has two devices, both declared by ACPI and with built-in drivers.

There are two back-to-back transactions originating from the kernel, one
targeting each device. The first transaction works, the second one locks
up the I2C controller. The controller never recovers.

These kernel logs show up whenever an I2C transaction is attempted after
this failure.
i2c-designware-pci 0000:00:18.3: timeout in disabling adapter
i2c-designware-pci 0000:00:18.3: timeout waiting for bus ready

Waiting for the I2C controller status to indicate that it is enabled
before programming it fixes the issue.

I have tested this patch on 4.14 and 4.15.

Fixes: commit 2702ea7dbec5 ("i2c: designware: wait for disable/enable only if necessary")
Cc: linux-stable &lt;stable@vger.kernel.org&gt; #4.13+
Signed-off-by: Ben Gardner &lt;gardner.ben@gmail.com&gt;
Acked-by: Jarkko Nikula &lt;jarkko.nikula@linux.intel.com&gt;
Reviewed-by: José Roberto de Souza &lt;jose.souza@intel.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit fba4adbbf670577e605f9ad306629db6031cd48b upstream.

One I2C bus on my Atom E3845 board has been broken since 4.9.
It has two devices, both declared by ACPI and with built-in drivers.

There are two back-to-back transactions originating from the kernel, one
targeting each device. The first transaction works, the second one locks
up the I2C controller. The controller never recovers.

These kernel logs show up whenever an I2C transaction is attempted after
this failure.
i2c-designware-pci 0000:00:18.3: timeout in disabling adapter
i2c-designware-pci 0000:00:18.3: timeout waiting for bus ready

Waiting for the I2C controller status to indicate that it is enabled
before programming it fixes the issue.

I have tested this patch on 4.14 and 4.15.

Fixes: commit 2702ea7dbec5 ("i2c: designware: wait for disable/enable only if necessary")
Cc: linux-stable &lt;stable@vger.kernel.org&gt; #4.13+
Signed-off-by: Ben Gardner &lt;gardner.ben@gmail.com&gt;
Acked-by: Jarkko Nikula &lt;jarkko.nikula@linux.intel.com&gt;
Reviewed-by: José Roberto de Souza &lt;jose.souza@intel.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>i2c: core-smbus: prevent stack corruption on read I2C_BLOCK_DATA</title>
<updated>2018-01-17T14:35:21+00:00</updated>
<author>
<name>Jeremy Compostella</name>
<email>jeremy.compostella@intel.com</email>
</author>
<published>2017-11-15T19:31:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=89c6efa61f5709327ecfa24bff18e57a4e80c7fa'/>
<id>89c6efa61f5709327ecfa24bff18e57a4e80c7fa</id>
<content type='text'>
On a I2C_SMBUS_I2C_BLOCK_DATA read request, if data-&gt;block[0] is
greater than I2C_SMBUS_BLOCK_MAX + 1, the underlying I2C driver writes
data out of the msgbuf1 array boundary.

It is possible from a user application to run into that issue by
calling the I2C_SMBUS ioctl with data.block[0] greater than
I2C_SMBUS_BLOCK_MAX + 1.

This patch makes the code compliant with
Documentation/i2c/dev-interface by raising an error when the requested
size is larger than 32 bytes.

Call Trace:
 [&lt;ffffffff8139f695&gt;] dump_stack+0x67/0x92
 [&lt;ffffffff811802a4&gt;] panic+0xc5/0x1eb
 [&lt;ffffffff810ecb5f&gt;] ? vprintk_default+0x1f/0x30
 [&lt;ffffffff817456d3&gt;] ? i2cdev_ioctl_smbus+0x303/0x320
 [&lt;ffffffff8109a68b&gt;] __stack_chk_fail+0x1b/0x20
 [&lt;ffffffff817456d3&gt;] i2cdev_ioctl_smbus+0x303/0x320
 [&lt;ffffffff81745aed&gt;] i2cdev_ioctl+0x4d/0x1e0
 [&lt;ffffffff811f761a&gt;] do_vfs_ioctl+0x2ba/0x490
 [&lt;ffffffff81336e43&gt;] ? security_file_ioctl+0x43/0x60
 [&lt;ffffffff811f7869&gt;] SyS_ioctl+0x79/0x90
 [&lt;ffffffff81a22e97&gt;] entry_SYSCALL_64_fastpath+0x12/0x6a

Signed-off-by: Jeremy Compostella &lt;jeremy.compostella@intel.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Cc: stable@kernel.org
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On a I2C_SMBUS_I2C_BLOCK_DATA read request, if data-&gt;block[0] is
greater than I2C_SMBUS_BLOCK_MAX + 1, the underlying I2C driver writes
data out of the msgbuf1 array boundary.

It is possible from a user application to run into that issue by
calling the I2C_SMBUS ioctl with data.block[0] greater than
I2C_SMBUS_BLOCK_MAX + 1.

This patch makes the code compliant with
Documentation/i2c/dev-interface by raising an error when the requested
size is larger than 32 bytes.

Call Trace:
 [&lt;ffffffff8139f695&gt;] dump_stack+0x67/0x92
 [&lt;ffffffff811802a4&gt;] panic+0xc5/0x1eb
 [&lt;ffffffff810ecb5f&gt;] ? vprintk_default+0x1f/0x30
 [&lt;ffffffff817456d3&gt;] ? i2cdev_ioctl_smbus+0x303/0x320
 [&lt;ffffffff8109a68b&gt;] __stack_chk_fail+0x1b/0x20
 [&lt;ffffffff817456d3&gt;] i2cdev_ioctl_smbus+0x303/0x320
 [&lt;ffffffff81745aed&gt;] i2cdev_ioctl+0x4d/0x1e0
 [&lt;ffffffff811f761a&gt;] do_vfs_ioctl+0x2ba/0x490
 [&lt;ffffffff81336e43&gt;] ? security_file_ioctl+0x43/0x60
 [&lt;ffffffff811f7869&gt;] SyS_ioctl+0x79/0x90
 [&lt;ffffffff81a22e97&gt;] entry_SYSCALL_64_fastpath+0x12/0x6a

Signed-off-by: Jeremy Compostella &lt;jeremy.compostella@intel.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Cc: stable@kernel.org
</pre>
</div>
</content>
</entry>
<entry>
<title>i2c: core: decrease reference count of device node in i2c_unregister_device</title>
<updated>2018-01-17T14:23:31+00:00</updated>
<author>
<name>Lixin Wang</name>
<email>alan.1.wang@nokia-sbell.com</email>
</author>
<published>2017-11-27T07:06:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=e0638fa400eaccf9fa8060f67140264c4e276552'/>
<id>e0638fa400eaccf9fa8060f67140264c4e276552</id>
<content type='text'>
Reference count of device node was increased in of_i2c_register_device,
but without decreasing it in i2c_unregister_device. Then the added
device node will never be released. Fix this by adding the of_node_put.

Signed-off-by: Lixin Wang &lt;alan.1.wang@nokia-sbell.com&gt;
Tested-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Cc: stable@kernel.org
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reference count of device node was increased in of_i2c_register_device,
but without decreasing it in i2c_unregister_device. Then the added
device node will never be released. Fix this by adding the of_node_put.

Signed-off-by: Lixin Wang &lt;alan.1.wang@nokia-sbell.com&gt;
Tested-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Cc: stable@kernel.org
</pre>
</div>
</content>
</entry>
<entry>
<title>i2c: piix4: Fix port number check on release</title>
<updated>2017-12-12T22:27:04+00:00</updated>
<author>
<name>Jean Delvare</name>
<email>jdelvare@suse.de</email>
</author>
<published>2017-12-07T11:25:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=45fd4470ba86e9ca2837b666a52cc65dc69f0fa3'/>
<id>45fd4470ba86e9ca2837b666a52cc65dc69f0fa3</id>
<content type='text'>
The port number shift is still hard-coded to 1 while it now depends
on the hardware.

Thankfully 0 is always 0 no matter how you shift it, so this was a
bug without consequences.

Signed-off-by: Jean Delvare &lt;jdelvare@suse.de&gt;
Fixes: 0fe16195f891 ("i2c: piix4: Fix SMBus port selection for AMD Family 17h chips")
Reviewed-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The port number shift is still hard-coded to 1 while it now depends
on the hardware.

Thankfully 0 is always 0 no matter how you shift it, so this was a
bug without consequences.

Signed-off-by: Jean Delvare &lt;jdelvare@suse.de&gt;
Fixes: 0fe16195f891 ("i2c: piix4: Fix SMBus port selection for AMD Family 17h chips")
Reviewed-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>i2c: stm32: Fix copyrights</title>
<updated>2017-12-12T22:16:04+00:00</updated>
<author>
<name>Benjamin Gaignard</name>
<email>benjamin.gaignard@linaro.org</email>
</author>
<published>2017-11-30T08:43:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=9c41e452188339989c2c9ca5fc54f10935207968'/>
<id>9c41e452188339989c2c9ca5fc54f10935207968</id>
<content type='text'>
Uniformize STMicroelectronics copyrights headers and add SPDX
identifier.

Signed-off-by: Benjamin Gaignard &lt;benjamin.gaignard@st.com&gt;
Acked-by: Alexandre TORGUE &lt;alexandre.torgue@st.com&gt;
Acked-by: Pierre-Yves MORDRET &lt;pierre-yves.mordret@st.com&gt;
Acked-by: M'boumba Cedric Madianga &lt;cedric.madianga@gmail.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Uniformize STMicroelectronics copyrights headers and add SPDX
identifier.

Signed-off-by: Benjamin Gaignard &lt;benjamin.gaignard@st.com&gt;
Acked-by: Alexandre TORGUE &lt;alexandre.torgue@st.com&gt;
Acked-by: Pierre-Yves MORDRET &lt;pierre-yves.mordret@st.com&gt;
Acked-by: M'boumba Cedric Madianga &lt;cedric.madianga@gmail.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>i2c-cht-wc: constify platform_device_id</title>
<updated>2017-12-07T11:00:35+00:00</updated>
<author>
<name>Arvind Yadav</name>
<email>arvind.yadav.cs@gmail.com</email>
</author>
<published>2017-11-28T10:25:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=04271ce9601f1686db480ea11ea1848394d9e6a2'/>
<id>04271ce9601f1686db480ea11ea1848394d9e6a2</id>
<content type='text'>
platform_device_id are not supposed to change at runtime. All functions
working with platform_device_id provided by &lt;linux/platform_device.h&gt;
work with const platform_device_id. So mark the non-const structs as
const.

Signed-off-by: Arvind Yadav &lt;arvind.yadav.cs@gmail.com&gt;
Reviewed-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
platform_device_id are not supposed to change at runtime. All functions
working with platform_device_id provided by &lt;linux/platform_device.h&gt;
work with const platform_device_id. So mark the non-const structs as
const.

Signed-off-by: Arvind Yadav &lt;arvind.yadav.cs@gmail.com&gt;
Reviewed-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>i2c: i2c-boardinfo: fix memory leaks on devinfo</title>
<updated>2017-11-27T18:14:29+00:00</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2017-11-22T17:52:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=66a7c84d677e8e4a5a2ef4afdb9bd52e1399a866'/>
<id>66a7c84d677e8e4a5a2ef4afdb9bd52e1399a866</id>
<content type='text'>
Currently when an error occurs devinfo is still allocated but is
unused when the error exit paths break out of the for-loop. Fix
this by kfree'ing devinfo to avoid the leak.

Detected by CoverityScan, CID#1416590 ("Resource Leak")

Fixes: 4124c4eba402 ("i2c: allow attaching IRQ resources to i2c_board_info")
Fixes: 0daaf99d8424 ("i2c: copy device properties when using i2c_register_board_info()")
Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently when an error occurs devinfo is still allocated but is
unused when the error exit paths break out of the for-loop. Fix
this by kfree'ing devinfo to avoid the leak.

Detected by CoverityScan, CID#1416590 ("Resource Leak")

Fixes: 4124c4eba402 ("i2c: allow attaching IRQ resources to i2c_board_info")
Fixes: 0daaf99d8424 ("i2c: copy device properties when using i2c_register_board_info()")
Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>i2c: i801: Fix Failed to allocate irq -2147483648 error</title>
<updated>2017-11-27T18:11:27+00:00</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2017-11-22T11:28:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=6e0c9507bf51e1517a80ad0ac171e5402528fcef'/>
<id>6e0c9507bf51e1517a80ad0ac171e5402528fcef</id>
<content type='text'>
On Apollo Lake devices the BIOS does not set up IRQ routing for the i801
SMBUS controller IRQ, so we end up with dev-&gt;irq set to IRQ_NOTCONNECTED.

Detect this and do not try to use the irq in this case silencing:
i801_smbus 0000:00:1f.1: Failed to allocate irq -2147483648: -107

Cc: stable@vger.kernel.org
BugLink: https://communities.intel.com/thread/114759
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Reviewed-by: Jean Delvare &lt;jdelvare@suse.de&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On Apollo Lake devices the BIOS does not set up IRQ routing for the i801
SMBUS controller IRQ, so we end up with dev-&gt;irq set to IRQ_NOTCONNECTED.

Detect this and do not try to use the irq in this case silencing:
i801_smbus 0000:00:1f.1: Failed to allocate irq -2147483648: -107

Cc: stable@vger.kernel.org
BugLink: https://communities.intel.com/thread/114759
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Reviewed-by: Jean Delvare &lt;jdelvare@suse.de&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</pre>
</div>
</content>
</entry>
</feed>
