<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/i2c, branch v4.17.1</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.17.1</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.17.1'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2018-05-29T18:14:32+00:00</updated>
<entry>
<title>i2c: ocores: update HDL sources URL</title>
<updated>2018-05-29T18:14:32+00:00</updated>
<author>
<name>Federico Vaga</name>
<email>federico.vaga@vaga.pv.it</email>
</author>
<published>2018-05-28T08:59:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a0ccb6b54bdde16885ac99f49ee8031cf1c71abe'/>
<id>urn:sha1:a0ccb6b54bdde16885ac99f49ee8031cf1c71abe</id>
<content type='text'>
The URL is broken. This patch fixes it.

Signed-off-by: Federico Vaga &lt;federico.vaga@vaga.pv.it&gt;
[wsa: shortened the URL a bit]
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</content>
</entry>
<entry>
<title>i2c: viperboard: return message count on master_xfer success</title>
<updated>2018-05-15T07:31:26+00:00</updated>
<author>
<name>Peter Rosin</name>
<email>peda@axentia.se</email>
</author>
<published>2018-05-09T19:47:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=35cd67a0caf767aba472452865dcb4471fcce2b1'/>
<id>urn:sha1:35cd67a0caf767aba472452865dcb4471fcce2b1</id>
<content type='text'>
Returning zero is wrong in this case.

Signed-off-by: Peter Rosin &lt;peda@axentia.se&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Fixes: 174a13aa8669 ("i2c: Add viperboard i2c master driver")
</content>
</entry>
<entry>
<title>i2c: pmcmsp: fix error return from master_xfer</title>
<updated>2018-05-15T07:31:19+00:00</updated>
<author>
<name>Peter Rosin</name>
<email>peda@axentia.se</email>
</author>
<published>2018-05-09T19:46:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=12d9bbc5a7f347eaa65ff2a9d34995cadc05eb1b'/>
<id>urn:sha1:12d9bbc5a7f347eaa65ff2a9d34995cadc05eb1b</id>
<content type='text'>
Returning -1 (-EPERM) is not appropriate here, go with -EIO.

Signed-off-by: Peter Rosin &lt;peda@axentia.se&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Fixes: 1b144df1d7d6 ("i2c: New PMC MSP71xx TWI bus driver")
</content>
</entry>
<entry>
<title>i2c: pmcmsp: return message count on master_xfer success</title>
<updated>2018-05-15T07:30:34+00:00</updated>
<author>
<name>Peter Rosin</name>
<email>peda@axentia.se</email>
</author>
<published>2018-05-09T19:46:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=de9a8634f1cb4560a35696d472cc7f1383d9b866'/>
<id>urn:sha1:de9a8634f1cb4560a35696d472cc7f1383d9b866</id>
<content type='text'>
Returning zero is wrong in this case.

Signed-off-by: Peter Rosin &lt;peda@axentia.se&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Fixes: 1b144df1d7d6 ("i2c: New PMC MSP71xx TWI bus driver")
</content>
</entry>
<entry>
<title>i2c: designware: fix poll-after-enable regression</title>
<updated>2018-05-10T10:30:20+00:00</updated>
<author>
<name>Alexander Monakov</name>
<email>amonakov@ispras.ru</email>
</author>
<published>2018-04-28T13:56:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=06cb616b1bca7080824acfedb3d4c898e7a64836'/>
<id>urn:sha1:06cb616b1bca7080824acfedb3d4c898e7a64836</id>
<content type='text'>
Not all revisions of DW I2C controller implement the enable status register.
On platforms where that's the case (e.g. BG2CD and SPEAr ARM SoCs), waiting
for enable will time out as reading the unimplemented register yields zero.

It was observed that reading the IC_ENABLE_STATUS register once suffices to
avoid getting it stuck on Bay Trail hardware, so replace polling with one
dummy read of the register.

Fixes: fba4adbbf670 ("i2c: designware: must wait for enable")
Signed-off-by: Alexander Monakov &lt;amonakov@ispras.ru&gt;
Tested-by: Ben Gardner &lt;gardner.ben@gmail.com&gt;
Acked-by: Jarkko Nikula &lt;jarkko.nikula@linux.intel.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Cc: stable@kernel.org
</content>
</entry>
<entry>
<title>i2c: core: ACPI: Log device not acking errors at dbg loglevel</title>
<updated>2018-04-30T08:53:31+00:00</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2018-04-22T17:58:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7781edaed63e9396fc913e0899cb197562e6f1a0'/>
<id>urn:sha1:7781edaed63e9396fc913e0899cb197562e6f1a0</id>
<content type='text'>
Unfortunately some DSDTs issue bogus i2c reads to non existing devices
resulting in -EREMOTEIO errors because the non existing device of course
does not ack.

This happens e.g. from the The Asus T100TA's _BIX method, the DSDT on
the T100TA defines 2 resources on the I2C1 bus:

        Name (EHID, ResourceTemplate ()
        {
            I2cSerialBusV2 (0x005B, ControllerInitiated, 0x00061A80,
                AddressingMode7Bit, "\\_SB.I2C1",
                0x00, ResourceConsumer, , Exclusive,
                )
        })
        OperationRegion (EHOR, GenericSerialBus, Zero, 0x0100)
        Field (EHOR, BufferAcc, NoLock, Preserve)
        {
            Connection (EHID),
            Offset (0x01),
            AccessAs (BufferAcc, AttribBytes (0x10)),
            ABCD,   8
        }

        Name (UMPC, ResourceTemplate ()
        {
            I2cSerialBusV2 (0x0066, ControllerInitiated, 0x00061A80,
                AddressingMode7Bit, "\\_SB.I2C1",
                0x00, ResourceConsumer, , Exclusive,
                )
        })

The _BIX method does a single read (on each BIX() call) from the EHID
device through the ABCD Field, only to completely ignore the result.
This read always fails as there is no i2c client at address 0x5b.

The _BIX method also does several reads from the UMPC device and actually
uses the results of those to provide battery information.

IIRC I've also seen some DSTDs which do an i2c read to detect if a device
is present, also leading to false positive errors being logged.

Esp. the _BIX use is problematic as the _BIX method gets called
periodically to monitor battery status.

This commit stops the logs from filling up with errors like these:

[   57.327858] i2c i2c-0: i2c read 16 bytes from client@0x5b starting at
               reg 0x1 failed, error: -121

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Reviewed-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</content>
</entry>
<entry>
<title>i2c: core: ACPI: Improve OpRegion read errors</title>
<updated>2018-04-30T08:53:26+00:00</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2018-04-22T17:57:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c8016fa215d2d50920a58de07da2d00f7cb982f3'/>
<id>urn:sha1:c8016fa215d2d50920a58de07da2d00f7cb982f3</id>
<content type='text'>
When we get an error doing an ACPI SerialBus I2C OpRegion read log some
useful details, like the client address and which register is being
read.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Reviewed-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</content>
</entry>
<entry>
<title>i2c: sprd: Fix the i2c count issue</title>
<updated>2018-04-27T12:12:43+00:00</updated>
<author>
<name>Baolin Wang</name>
<email>baolin.wang@linaro.org</email>
</author>
<published>2018-04-09T06:40:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2a010461207cc96bee5ab81748325dec1972976f'/>
<id>urn:sha1:2a010461207cc96bee5ab81748325dec1972976f</id>
<content type='text'>
We found the I2C controller count register is unreliable sometimes,
that will cause I2C to lose data. Thus we can read the data count
from 'i2c_dev-&gt;count' instead of the I2C controller count register.

Signed-off-by: Baolin Wang &lt;baolin.wang@linaro.org&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</content>
</entry>
<entry>
<title>i2c: sprd: Prevent i2c accesses after suspend is called</title>
<updated>2018-04-27T12:12:17+00:00</updated>
<author>
<name>Baolin Wang</name>
<email>baolin.wang@linaro.org</email>
</author>
<published>2018-04-09T06:40:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=da33aa03fa34c918faf2c371ebda0dd961d7ccb2'/>
<id>urn:sha1:da33aa03fa34c918faf2c371ebda0dd961d7ccb2</id>
<content type='text'>
Add one flag to indicate if the i2c controller has been in suspend state,
which can prevent i2c accesses after i2c controller is suspended following
system suspend.

Signed-off-by: Baolin Wang &lt;baolin.wang@linaro.org&gt;
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</content>
</entry>
<entry>
<title>i2c: dev: prevent ZERO_SIZE_PTR deref in i2cdev_ioctl_rdwr()</title>
<updated>2018-04-27T12:04:10+00:00</updated>
<author>
<name>Alexander Popov</name>
<email>alex.popov@linux.com</email>
</author>
<published>2018-04-19T12:29:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=23a27722b5292ef0b27403c87a109feea8296a5c'/>
<id>urn:sha1:23a27722b5292ef0b27403c87a109feea8296a5c</id>
<content type='text'>
i2cdev_ioctl_rdwr() allocates i2c_msg.buf using memdup_user(), which
returns ZERO_SIZE_PTR if i2c_msg.len is zero.

Currently i2cdev_ioctl_rdwr() always dereferences the buf pointer in case
of I2C_M_RD | I2C_M_RECV_LEN transfer. That causes a kernel oops in
case of zero len.

Let's check the len against zero before dereferencing buf pointer.

This issue was triggered by syzkaller.

Signed-off-by: Alexander Popov &lt;alex.popov@linux.com&gt;
Reviewed-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
[wsa: use '&lt; 1' instead of '!' for easier readability]
Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
</content>
</entry>
</feed>
