linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa@the-dreams.de>
To: Jan Glauber <jglauber@cavium.com>
Cc: linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org,
	David Daney <ddaney@caviumnetworks.com>,
	David Daney <david.daney@cavium.com>
Subject: Re: [PATCH v3 04/14] i2c-octeon: Support I2C_M_RECV_LEN
Date: Sat, 12 Mar 2016 16:44:22 +0100	[thread overview]
Message-ID: <20160312154422.GG1661@katana> (raw)
In-Reply-To: <aa1595b6fd6b16fbc0339115b2169acb6458dd38.1457362545.git.jglauber@cavium.com>

[-- Attachment #1: Type: text/plain, Size: 684 bytes --]

On Mon, Mar 07, 2016 at 04:10:47PM +0100, Jan Glauber wrote:
> From: David Daney <david.daney@cavium.com>
> 
> If I2C_M_RECV_LEN is set consider the length byte.
> 
> Signed-off-by: David Daney <ddaney@caviumnetworks.com>
> Signed-off-by: Jan Glauber <jglauber@cavium.com>

You also might want to set "| I2C_FUNC_SMBUS_READ_BLOCK_DATA |
I2C_FUNC_SMBUS_BLOCK_PROC_CALL" in your functionality?

> +		if (recv_len && i == 0) {
> +			if (data[i] > I2C_SMBUS_BLOCK_MAX + 1) {
> +				dev_err(i2c->dev,
> +					"%s: read len > I2C_SMBUS_BLOCK_MAX %d\n",
> +					__func__, data[i]);
> +				return -EIO;

According to Documentation/i2c/fault-codes this should be -EPROTO.


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2016-03-12 15:44 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-07 15:10 [PATCH v3 00/14] i2c-octeon and i2c-thunderx drivers Jan Glauber
2016-03-07 15:10 ` [PATCH v3 01/14] i2c-octeon: Cleanup kerneldoc comments Jan Glauber
2016-03-12 15:35   ` Wolfram Sang
2016-03-07 15:10 ` [PATCH v3 02/14] i2c-octeon: Cleanup i2c-octeon driver Jan Glauber
2016-03-12 15:35   ` Wolfram Sang
2016-03-14  8:52     ` Jan Glauber
2016-03-07 15:10 ` [PATCH v3 03/14] i2c-octeon: Cleanup resource allocation code Jan Glauber
2016-03-12 15:37   ` Wolfram Sang
2016-03-14  9:21     ` Jan Glauber
2016-03-07 15:10 ` [PATCH v3 04/14] i2c-octeon: Support I2C_M_RECV_LEN Jan Glauber
2016-03-12 15:44   ` Wolfram Sang [this message]
2016-03-07 15:10 ` [PATCH v3 05/14] i2c-octeon: Make adapter timeout tunable Jan Glauber
2016-03-12 15:46   ` Wolfram Sang
2016-03-14 12:45     ` Jan Glauber
2016-03-14 17:21       ` Swain, Peter
2016-03-07 15:10 ` [PATCH v3 06/14] i2c-octeon: Enable high-level controller and improve on bus contention Jan Glauber
2016-03-07 15:10 ` [PATCH v3 07/14] dt-bindings: i2c: Add Octeon cn78xx TWSI Jan Glauber
2016-03-07 15:10 ` [PATCH v3 08/14] i2c-octeon: Add support for cn78XX chips Jan Glauber
2016-03-07 15:10 ` [PATCH v3 09/14] i2c-octeon: Flush TWSI writes with readback Jan Glauber
2016-03-07 15:10 ` [PATCH v3 10/14] i2c-octeon: Faster operation when IFLG signals late Jan Glauber
2016-03-07 15:10 ` [PATCH v3 11/14] i2c-octeon: Add workaround for broken irqs on CN3860 Jan Glauber
2016-03-07 15:10 ` [PATCH v3 12/14] i2c-octeon: Split the driver into two parts Jan Glauber
2016-03-07 15:10 ` [PATCH v3 13/14] i2c-thunderx: Add i2c driver for ThunderX SOC Jan Glauber
2016-03-07 15:10 ` [PATCH v3 14/14] i2c-thunderx: Add smbus support Jan Glauber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160312154422.GG1661@katana \
    --to=wsa@the-dreams.de \
    --cc=david.daney@cavium.com \
    --cc=ddaney@caviumnetworks.com \
    --cc=jglauber@cavium.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).