Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1357442

Re: [PATCH v3 05/14] i2c-octeon: Make adapter timeout tunable

From "Swain, Peter" <Peter.Swain@caviumnetworks.com>
Newsgroups linux.kernel
Subject Re: [PATCH v3 05/14] i2c-octeon: Make adapter timeout tunable
Date 2016-03-14 18:40 +0100
Message-ID <rcEDf-6WL-1@gated-at.bofh.it> (permalink)
References <ra56W-4wc-3@gated-at.bofh.it> <ra56X-4wc-33@gated-at.bofh.it> <rcEDf-6WL-3@gated-at.bofh.it> <rcA6C-3Ng-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Agreed, this timeout modparam can go, it serves no purpose which can't be achieved with existing ioctl.

It was introduced during debug to reduce spurious error count while hunting an issue finally resolved by the 80uS IFLG re-poll. But the same effect is achieved by (for example) the at24 driver's retry at 25mS timeout. The issue there is not timeout _within_ command, but failure to respect a 25mS post-write recovery time before next access to the at24, and the existing at24-level retry works well (though delaying the presentation of the next at24 transaction _within_ the at24 driver would have lead to less bus-level churn).
Leaving this adapter tuning out affects nothing but the (normally invisible) adapter-level retry count, which is better addressed within the target device's code, like at24 does. Default is ioctl-tweakable, so users wanting fine tuning have a mechanism.

-pete

________________________________________
From: Jan Glauber <jan.glauber@caviumnetworks.com>
Sent: Monday, March 14, 2016 5:45 AM
To: Wolfram Sang
Cc: linux-kernel@vger.kernel.org; linux-i2c@vger.kernel.org; Daney, David; Peter Swain
Subject: Re: [PATCH v3 05/14] i2c-octeon: Make adapter timeout tunable

On Sat, Mar 12, 2016 at 04:46:12PM +0100, Wolfram Sang wrote:
> On Mon, Mar 07, 2016 at 04:10:48PM +0100, Jan Glauber wrote:
> > From: Peter Swain <pswain@cavium.com>
> >
> > Make the i2c adapter timeout a module parameter to allow upper-level
> > target device drivers to retry with their own logic before their own
> > timeouts abort operations.
> >
> > For example, at24 eeprom driver retries for 25ms when -EAGAIN
> > indicates that an eeprom has gone unresponsive while committing
> > a newly written page (5ms on typical devices).
> >
> > Signed-off-by: Peter Swain <pswain@cavium.com>
> > Signed-off-by: Jan Glauber <jglauber@cavium.com>
>
> i2c-dev has IOCTLs for timeout and retries. Can't you use those?
>

Yes, with these IOCTLs we don't need to add a module parameter
so I'll drop that.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v3 00/14] i2c-octeon and i2c-thunderx drivers Jan Glauber <jglauber@cavium.com> - 2016-03-07 16:20 +0100
  [PATCH v3 13/14] i2c-thunderx: Add i2c driver for ThunderX SOC Jan Glauber <jglauber@cavium.com> - 2016-03-07 16:20 +0100
  [PATCH v3 11/14] i2c-octeon: Add workaround for broken irqs on CN3860 Jan Glauber <jglauber@cavium.com> - 2016-03-07 16:20 +0100
  [PATCH v3 14/14] i2c-thunderx: Add smbus support Jan Glauber <jglauber@cavium.com> - 2016-03-07 16:20 +0100
  [PATCH v3 04/14] i2c-octeon: Support I2C_M_RECV_LEN Jan Glauber <jglauber@cavium.com> - 2016-03-07 16:20 +0100
    Re: [PATCH v3 04/14] i2c-octeon: Support I2C_M_RECV_LEN Wolfram Sang <wsa@the-dreams.de> - 2016-03-12 16:50 +0100
  [PATCH v3 10/14] i2c-octeon: Faster operation when IFLG signals late Jan Glauber <jglauber@cavium.com> - 2016-03-07 16:20 +0100
  [PATCH v3 05/14] i2c-octeon: Make adapter timeout tunable Jan Glauber <jglauber@cavium.com> - 2016-03-07 16:20 +0100
    Re: [PATCH v3 05/14] i2c-octeon: Make adapter timeout tunable Wolfram Sang <wsa@the-dreams.de> - 2016-03-12 16:50 +0100
      Re: [PATCH v3 05/14] i2c-octeon: Make adapter timeout tunable Jan Glauber <jan.glauber@caviumnetworks.com> - 2016-03-14 13:50 +0100
        Re: [PATCH v3 05/14] i2c-octeon: Make adapter timeout tunable "Swain, Peter" <Peter.Swain@caviumnetworks.com> - 2016-03-14 18:40 +0100
  [PATCH v3 06/14] i2c-octeon: Enable high-level controller and improve on bus contention Jan Glauber <jglauber@cavium.com> - 2016-03-07 16:20 +0100
  [PATCH v3 09/14] i2c-octeon: Flush TWSI writes with readback Jan Glauber <jglauber@cavium.com> - 2016-03-07 16:20 +0100
  [PATCH v3 03/14] i2c-octeon: Cleanup resource allocation code Jan Glauber <jglauber@cavium.com> - 2016-03-07 16:20 +0100
    Re: [PATCH v3 03/14] i2c-octeon: Cleanup resource allocation code Wolfram Sang <wsa@the-dreams.de> - 2016-03-12 16:40 +0100
      Re: [PATCH v3 03/14] i2c-octeon: Cleanup resource allocation code Jan Glauber <jan.glauber@caviumnetworks.com> - 2016-03-14 10:30 +0100
  [PATCH v3 01/14] i2c-octeon: Cleanup kerneldoc comments Jan Glauber <jglauber@cavium.com> - 2016-03-07 16:20 +0100
    Re: [PATCH v3 01/14] i2c-octeon: Cleanup kerneldoc comments Wolfram Sang <wsa@the-dreams.de> - 2016-03-12 16:40 +0100
  [PATCH v3 08/14] i2c-octeon: Add support for cn78XX chips Jan Glauber <jglauber@cavium.com> - 2016-03-07 16:20 +0100
  [PATCH v3 02/14] i2c-octeon: Cleanup i2c-octeon driver Jan Glauber <jglauber@cavium.com> - 2016-03-07 16:20 +0100
    Re: [PATCH v3 02/14] i2c-octeon: Cleanup i2c-octeon driver Wolfram Sang <wsa@the-dreams.de> - 2016-03-12 16:40 +0100
      Re: [PATCH v3 02/14] i2c-octeon: Cleanup i2c-octeon driver Jan Glauber <jan.glauber@caviumnetworks.com> - 2016-03-14 10:00 +0100

csiph-web