linux-i3c.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@collabora.com>
To: "Przemysław Gaj" <pgaj@cadence.com>
Cc: linux-i3c@lists.infradead.org, vitor.soares@synopsys.com,
	rafalc@cadence.com, bbrezillon@kernel.org
Subject: Re: [PATCH] i3c: make sure the PID is set before registering the device
Date: Mon, 9 Dec 2019 10:47:11 +0100	[thread overview]
Message-ID: <20191209104711.5a549d31@collabora.com> (raw)
In-Reply-To: <20191208141834.10310-1-pgaj@cadence.com>

On Sun, 8 Dec 2019 15:18:34 +0100
Przemysław Gaj <pgaj@cadence.com> wrote:

> From: Przemyslaw Gaj <pgaj@cadence.com>
> 
> Provisioned ID (PID) is the value with which device drivers are
> matched. I check the value before registering the device.
> 

Can this situation (having a device with a DA but without a valid PID)
happen right now or is this something you need to support secondary
masters who receive device DA (through DEFSVLS) without being able to
query extra information until they own the bus?

> Signed-off-by: Przemyslaw Gaj <pgaj@cadence.com>
> ---
>  drivers/i3c/master.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c
> index 043691656245..07ea8b0b7736 100644
> --- a/drivers/i3c/master.c
> +++ b/drivers/i3c/master.c
> @@ -1449,7 +1449,8 @@ i3c_master_register_new_i3c_devs(struct i3c_master_controller *master)
>  		return;
>  
>  	i3c_bus_for_each_i3cdev(&master->bus, desc) {
> -		if (desc->dev || !desc->info.dyn_addr || desc == master->this)
> +		if (desc->dev || !desc->info.dyn_addr ||
> +		    desc == master->this || !desc->info.pid)
>  			continue;
>  
>  		desc->dev = kzalloc(sizeof(*desc->dev), GFP_KERNEL);


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

  reply	other threads:[~2019-12-09  9:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-08 14:18 [PATCH] i3c: make sure the PID is set before registering the device Przemysław Gaj
2019-12-09  9:47 ` Boris Brezillon [this message]
2019-12-09 12:20   ` Vitor Soares
2019-12-09 12:26     ` Boris Brezillon
2019-12-10 14:28       ` Vitor Soares
2019-12-10 14:42         ` Przemysław Gaj
2019-12-10 15:23           ` Vitor Soares
2019-12-11  9:33             ` Przemysław Gaj
2019-12-11 12:21               ` Vitor Soares

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=20191209104711.5a549d31@collabora.com \
    --to=boris.brezillon@collabora.com \
    --cc=bbrezillon@kernel.org \
    --cc=linux-i3c@lists.infradead.org \
    --cc=pgaj@cadence.com \
    --cc=rafalc@cadence.com \
    --cc=vitor.soares@synopsys.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).