public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Rosin <peda@axentia.se>
To: "shubhrajyoti.datta@gmail.com" <shubhrajyoti.datta@gmail.com>,
	"linux-i2c@vger.kernel.org" <linux-i2c@vger.kernel.org>
Cc: "robh+dt@kernel.org" <robh+dt@kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Subject: Re: [PATCH] i2c: mux: pca954x: Disable cacheing of the last channel
Date: Mon, 18 Nov 2019 23:05:12 +0000	[thread overview]
Message-ID: <6d135b8a-cdba-e6a6-7738-cbc94cdb7ec0@axentia.se> (raw)
In-Reply-To: <1573719422-7414-1-git-send-email-shubhrajyoti.datta@gmail.com>

On 2019-11-14 09:17, shubhrajyoti.datta@gmail.com wrote:
> From: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
> 
> In case of multimaster configuration the last channel cached value is
> not reliable. Basically the first processor/master does a write to the
> mux and then to the intended slave, it caches the value.
> Now the second processor/processor does a write to mux on another
> channel and writes to another slave.
> The first processor/master when it attempts to write the slave
> skips the mux as it relies on the mux channel being the same as the
> intended. This causes an issue.
> 
> To fix that write always to the mux address.

Thanks for your patch.

However, I don't really see how this fixes anything. If you have
multiple masters competing for the same mux, all bets are off and any
solution not involving an out-of-band channel where the masters can
coordinate will be racy, broken and dangerous. And since you need that
extra channel anyway, it might as well also be used to coordinate when
the cache needs to be invalidated.

At the very least, all limitations needs to be carefully documented,
but that does not mean that I will ever like it. In short, I'm extremely
reluctant to add a kludge like this.

Cheers,
Peter

  parent reply	other threads:[~2019-11-18 23:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-14  8:17 [PATCH] i2c: mux: pca954x: Disable cacheing of the last channel shubhrajyoti.datta
2019-11-18 22:16 ` Rob Herring
2019-11-18 23:05 ` Peter Rosin [this message]
2019-11-20  9:21   ` Shubhrajyoti Datta
2019-11-22  0:52     ` Peter Rosin
2019-11-22  4:38       ` Shubhrajyoti Datta
2019-11-22  8:43         ` Peter Rosin
2019-11-22  9:10           ` Shubhrajyoti Datta

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=6d135b8a-cdba-e6a6-7738-cbc94cdb7ec0@axentia.se \
    --to=peda@axentia.se \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=shubhrajyoti.datta@gmail.com \
    --cc=shubhrajyoti.datta@xilinx.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox