linux-i3c.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Vitor Soares <Vitor.Soares@synopsys.com>
To: Przemyslaw Gaj <pgaj@cadence.com>
Cc: "linux-i3c@lists.infradead.org" <linux-i3c@lists.infradead.org>,
	Boris Brezillon <boris.brezillon@collabora.com>,
	"bbrezillon@kernel.org" <bbrezillon@kernel.org>
Subject: RE: I3C Mastership RFC
Date: Mon, 25 Nov 2019 15:22:36 +0000	[thread overview]
Message-ID: <CH2PR12MB42160734344C24D340BC0980AE4A0@CH2PR12MB4216.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20191125145924.GA24606@global.cadence.com>

From: Przemyslaw Gaj <pgaj@cadence.com>
Date: Mon, Nov 25, 2019 at 14:59:26

> The 11/25/2019 14:27, Vitor Soares wrote:
> > 
> > From: Boris Brezillon <boris.brezillon@collabora.com>
> > Date: Mon, Nov 25, 2019 at 13:09:36
> > 
> > > On Mon, 25 Nov 2019 13:00:17 +0000
> > > Vitor Soares <Vitor.Soares@synopsys.com> wrote:
> > > 
> > > > > > > > > I'm pretty sure we solved that already (that's what
> > > > > > > > > i3c_master_acquire_bus_ownership() calls are supposed to take care of).
> > > > > > > > > Can you be a bit more specific? What makes you think the master might
> > > > > > > > > not be in control of the bus when i3c_dev_do_priv_xfers_locked() is
> > > > > > > > > called?    
> > > > > > > > 
> > > > > > > > You are assuming that after i3c_master_acquire_bus_ownership() return, 
> > > > > > > > secondary master already owns the bus. Main master can ack the MR request 
> > > > > > > > and not send the CETACCMST immediately.
> > > > > > > >    
> > > > > > > 
> > > > > > > In Cadence HC driver, I'm waiting for GETACCMST longer, polling the
> > > > > > > status and after I exit from ->request_mastership(), I'm the bus owner.
> > > > > > > If not, error exit code is returned and we can't make the transfers.
> > > > > > > Are you able to implement the same behavior?    
> > > > > > 
> > > > > > You can assume everyone will do in that way. What happen if you receive a 
> > > > > > request or an information from current master?  
> > > > > 
> > > > > We have this ->request_mastership() method so controllers that have
> > > > > this logic (MR+wait(GETACCMST) automated can still interface with the
> > > > > subsystem.   
> > > > 
> > > > I can also poll the GETACCMST but we are assuming nothing will happen 
> > > > between MR and GETACCMST.
> > > 
> > > Nothing coming from the master that tries to acquire the bus, yes.
> > > Nothing coming from the current master, no, and that shouldn't be a
> > > problem as long as those operations don't involve acquiring bus->lock.
> > > And if some of those operation involve acquiring the lock (I'd still
> > > need to understand which operation that would be) they'll just be
> > > delayed/rejected.
> > 
> > You are assuming this is straight forward which is not the case. Between 
> > MR and GETACCMST may happen everything as in a Master-Slave topology.
> > For me, poll the controller to check when GETACCMST arrive and lock 
> > everything is not a solution.
> > 
> 
> I understand your point. I'm sure that one of my patchset supported
> your use case. I introduced the function which lets the subsystem
> takeover the bus. Even when we receive GETACCMST without requesting
> mastership. I assume you are trying do the same thing now.
> 
> The only thing I remember when you reviewed my patch, you wanted to pass
> device list to that function.
> 

That is not my concern. That is working fine in my side.
Please check spec 1.1 and see if what you are implementing fits on it.

> > > 
> > > > 
> > > > > If your controller handles the MR/GETACCMST separately, it
> > > > > shouldn't be hard to implement, and we can even provide an helper if
> > > > > people end up duplicating the code.  
> > > > 
> > > > I already implement a callback in my code so each controller be able to 
> > > > do their stuff in that in request/deliver mastership.
> > > 
> > > Can you share some details here? What would those callbacks supposed to
> > > do and when would they be called?
> > 
> > My understanding is that different controllers may have different ways to 
> > deliver the bus ownership hence I implemented that.
> > 
> > Best regards,
> > Vitor Soares
> 
> -- 
> -- 
> Przemyslaw Gaj


Best regards,
Vitor Soares

_______________________________________________
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c

  reply	other threads:[~2019-11-25 15:29 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-06  9:33 I3C Mastership RFC Przemyslaw Gaj
2019-11-10 10:30 ` Boris Brezillon
2019-11-11 12:30   ` Vitor Soares
2019-11-12  7:41     ` Boris Brezillon
2019-11-14  6:10       ` Przemyslaw Gaj
2019-11-14 11:56         ` Vitor Soares
2019-11-14 12:32           ` Boris Brezillon
2019-11-14 12:59             ` Przemyslaw Gaj
2019-11-14 14:17             ` Vitor Soares
2019-11-14 14:50               ` Boris Brezillon
2019-11-14 20:15                 ` Przemyslaw Gaj
2019-11-25  8:02               ` Przemyslaw Gaj
2019-11-25 11:19                 ` Vitor Soares
2019-11-25 11:34                   ` Boris Brezillon
2019-11-25 11:42                     ` Vitor Soares
2019-11-25 11:55                       ` Przemyslaw Gaj
2019-11-25 12:03                         ` Vitor Soares
2019-11-25 12:22                           ` Boris Brezillon
2019-11-25 13:00                             ` Vitor Soares
2019-11-25 13:09                               ` Boris Brezillon
2019-11-25 14:27                                 ` Vitor Soares
2019-11-25 14:50                                   ` Boris Brezillon
2019-11-25 14:59                                   ` Przemyslaw Gaj
2019-11-25 15:22                                     ` Vitor Soares [this message]
2019-11-25 12:25                           ` Przemyslaw Gaj
2019-11-25 12:56                             ` Vitor Soares
2019-11-25 11:50                     ` Przemyslaw Gaj

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=CH2PR12MB42160734344C24D340BC0980AE4A0@CH2PR12MB4216.namprd12.prod.outlook.com \
    --to=vitor.soares@synopsys.com \
    --cc=bbrezillon@kernel.org \
    --cc=boris.brezillon@collabora.com \
    --cc=linux-i3c@lists.infradead.org \
    --cc=pgaj@cadence.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;
as well as URLs for NNTP newsgroup(s).