From: Wolfram Sang <wsa@the-dreams.de>
To: Peter Rosin <peda@axentia.se>
Cc: linux-kernel@vger.kernel.org,
Vadim Pasternak <vadimp@mellanox.com>,
Michael Shych <michaelsh@mellanox.com>,
linux-i2c@vger.kernel.org
Subject: Re: [PATCH] i2c: mux: mlxcpld: fix i2c mux selection caching
Date: Sun, 18 Dec 2016 08:56:23 +0100 [thread overview]
Message-ID: <20161218075622.GA4165@katana> (raw)
In-Reply-To: <1482006551-23108-1-git-send-email-peda@axentia.se>
[-- Attachment #1: Type: text/plain, Size: 911 bytes --]
On Sat, Dec 17, 2016 at 09:29:11PM +0100, Peter Rosin wrote:
> smbus functions return -ve on error, 0 on success. However,
> __i2c_transfer() have a different return signature - -ve on error, or
> number of buffers transferred (which may be zero or greater.)
>
> The upshot of this is that the sense of the text is reversed when using
> the mux on a bus supporting the master_xfer method: we cache the value
> and never retry if we fail to transfer any buffers, but if we succeed,
> we clear the cached value
>
> Fix this by making mlxcpld_mux_reg_write() return a -ve error code for
> all failure cases, just as was done in commit 7f638c1cb0a1 ("i2c: mux:
> pca954x: fix i2c mux selection caching")
>
> This also aligns the implementations of these two muxes in this area.
>
> Signed-off-by: Peter Rosin <peda@axentia.se>
Fixed the commit message and applied to for-current, thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
prev parent reply other threads:[~2016-12-18 7:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-17 20:29 [PATCH] i2c: mux: mlxcpld: fix i2c mux selection caching Peter Rosin
2016-12-17 20:34 ` Peter Rosin
2016-12-17 20:56 ` Vadim Pasternak
2016-12-18 7:56 ` Wolfram Sang [this message]
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=20161218075622.GA4165@katana \
--to=wsa@the-dreams.de \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michaelsh@mellanox.com \
--cc=peda@axentia.se \
--cc=vadimp@mellanox.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.