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 v4 05/14] i2c-octeon: Enable high-level controller and improve on bus contention
Date: Wed, 23 Mar 2016 21:32:15 +0100 [thread overview]
Message-ID: <20160323203215.GF19849@katana> (raw)
In-Reply-To: <27b7d9015f8165da0371e4d26c9acc72772ae3a0.1458289385.git.jglauber@cavium.com>
[-- Attachment #1: Type: text/plain, Size: 1788 bytes --]
On Fri, Mar 18, 2016 at 09:46:30AM +0100, Jan Glauber wrote:
> From: David Daney <david.daney@cavium.com>
>
> Use High Level Controller when possible.
Can you give me a one line description what this Controller is? I'd
assume it can do simple write-then-read messages with less setup?
> i2c-octeon was reacting badly to bus contention: when in
> direct-access mode (for transfers > 8 bytes, which cannot use the
> high-level controller) some !ACK or arbitration-loss states were
> not causing the current transfer to be aborted, and the bus released.
So, what does this patch do? Enable HLC for transfers < 8 byte? And for
all other transfers we still suffer from the same problem?
Such information should be here, too. It helps reviewing when I already
have the big picture.
> There's one place in i2c protocol that !ACK is an acceptable
> response: in the final byte of a read cycle. In this case the
> destination is not saying that the transfer failed, just that it
> doesn't want more data.
Ehrm, no? For reads, the MASTER is saying it doesn't need any more data.
And an I2C eeprom can legally NACK a write, e.g. when it is still
processing the previous write. Also, NACK is a valid response after the
address phase, meaning there is no device listening.
Does the implementation cover the above cases?
> This enables correct behavior of ACK on final byte of non-final read
> msgs too.
The patch is huge and very hard to review. Maybe it needs to be split
up. Brainstorming example: a) move functions like octeon_i2c_set_clock()
upwards, b) change them if needed, c) implement HLC functions, d) add
switching logic to use HLC or non-HLC functions...
But first we need to be clear on the big picture view.
Thanks,
Wolfram
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-03-23 20:32 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-18 8:46 [PATCH v4 00/14] i2c-octeon and i2c-thunderx drivers Jan Glauber
2016-03-18 8:46 ` [PATCH v4 01/14] i2c-octeon: Cleanup i2c-octeon driver Jan Glauber
2016-03-23 19:51 ` Wolfram Sang
2016-03-18 8:46 ` [PATCH v4 02/14] i2c-octeon: Cleanup resource allocation code Jan Glauber
2016-03-23 19:52 ` Wolfram Sang
2016-03-18 8:46 ` [PATCH v4 03/14] i2c-octeon: Change adapter timeout and retry default values Jan Glauber
2016-03-23 19:55 ` Wolfram Sang
2016-03-31 10:13 ` Jan Glauber
2016-03-18 8:46 ` [PATCH v4 04/14] i2c-octeon: Support I2C_M_RECV_LEN Jan Glauber
2016-03-23 19:52 ` Wolfram Sang
2016-03-18 8:46 ` [PATCH v4 05/14] i2c-octeon: Enable high-level controller and improve on bus contention Jan Glauber
2016-03-23 20:32 ` Wolfram Sang [this message]
2016-03-31 10:24 ` Jan Glauber
2016-03-18 8:46 ` [PATCH v4 06/14] dt-bindings: i2c: Add Octeon cn78xx TWSI Jan Glauber
2016-03-18 8:46 ` [PATCH v4 07/14] i2c-octeon: Add support for cn78xx chips Jan Glauber
2016-03-18 8:46 ` [PATCH v4 08/14] i2c-octeon: Flush TWSI writes with readback Jan Glauber
2016-03-18 8:46 ` [PATCH v4 09/14] i2c-octeon: Faster operation when IFLG signals late Jan Glauber
2016-03-18 8:46 ` [PATCH v4 10/14] i2c-octeon: Add workaround for broken irqs on CN3860 Jan Glauber
2016-03-18 8:46 ` [PATCH v4 11/14] i2c-octeon: Rename driver to prepare for split Jan Glauber
2016-03-18 17:11 ` David Daney
2016-03-18 8:46 ` [PATCH v4 12/14] i2c-octeon: Split the driver into two parts Jan Glauber
2016-03-18 8:46 ` [PATCH v4 13/14] i2c-thunderx: Add i2c driver for ThunderX SOC Jan Glauber
2016-03-18 8:46 ` [PATCH v4 14/14] i2c-thunderx: Add smbus alert 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=20160323203215.GF19849@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).