All of lore.kernel.org
 help / color / mirror / Atom feed
From: Saravana Kannan <saravanak@google.com>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Android Kernel Team <kernel-team@android.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v1] driver core: fw_devlink: Don't create device links for devices not on a bus
Date: Wed, 1 Sep 2021 18:43:29 -0700	[thread overview]
Message-ID: <CAGETcx_EeiimxoXcN0Vw_sizeioDnBB8z4bh_3Qj4ac_tL7BRQ@mail.gmail.com> (raw)
In-Reply-To: <CAGETcx9U2M5i1CAx605fG3Qwm1xwjH2uy4kY4vrAF7YSRSSg+w@mail.gmail.com>

On Wed, Sep 1, 2021 at 5:16 PM Saravana Kannan <saravanak@google.com> wrote:
>
> On Wed, Sep 1, 2021 at 3:17 PM Ulf Hansson <ulf.hansson@linaro.org> wrote:
> >
> > On Wed, 1 Sept 2021 at 23:54, Saravana Kannan <saravanak@google.com> wrote:
> > >
> > > On Wed, Sep 1, 2021 at 8:45 AM Ulf Hansson <ulf.hansson@linaro.org> wrote:
> > > >
> > > > On Wed, 1 Sept 2021 at 00:45, Saravana Kannan <saravanak@google.com> wrote:
> > > > >
> > > > > Devices that are not on a bus will never have a driver bound to it. So,
> > > > > fw_devlink should not create device links for it as it can cause probe
> > > > > issues[1] or sync_state() call back issues[2].
> > > > >
> > > > > [1] - https://lore.kernel.org/lkml/CAGETcx_xJCqOWtwZ9Ee2+0sPGNLM5=F=djtbdYENkAYZa0ynqQ@mail.gmail.com/
> > > > > [2] - https://lore.kernel.org/lkml/CAPDyKFo9Bxremkb1dDrr4OcXSpE0keVze94Cm=zrkOVxHHxBmQ@mail.gmail.com/
> > > >
> > > > Unfortunately, this doesn't fix my problem in [2].
> > > >
> > > > When the "soctest" device is initialized, via of_platform_populate(),
> > > > it will be attached to the platform bus, hence the check for the bus
> > > > pointer that you suggest to add below, doesn't have an impact on my
> > > > use case. I still get the below in the log:
> > >
> > > *face palm* Right. I forgot that. I just read "bus" and my mind went
> > > to busses added as devices. It apparently also didn't help [1] which
> > > is surprising to me. I'll dig into that separately. I'll look into
> > > fixing this. The annoying part is that some devices have compatible
> > > property that's both "simple-bus" and some other string that a driver
> > > actually matches with.
> >
> > Yes, that is my view of the problem as well.
> >
> > So perhaps we should do a more fine grained check for when the
> > "simple-bus" compatible is present in the node,
>
> Exactly. Do you want to take a stab at this? There are too many things
> I want to work on, so if you can do this one, that'd be nice.

Nevermind. I already did most of it and it needs a little bit more
massaging. I'll send out a patch later.

-Saravana

>
> > and then don't create
> > a fw_devlink if we reach an ascendant with only this compatible?
>
> And you can achieve that by setting this flag for that DT node:
> fwnode->flags |= FWNODE_FLAG_NOT_DEVICE;
>
> -Saravana

      reply	other threads:[~2021-09-02  1:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-31 22:45 [PATCH v1] driver core: fw_devlink: Don't create device links for devices not on a bus Saravana Kannan
2021-09-01  6:24 ` Greg Kroah-Hartman
2021-09-01  6:57   ` Saravana Kannan
2021-09-01  7:14     ` Greg Kroah-Hartman
2021-09-01 21:55       ` Saravana Kannan
2021-09-01 22:11         ` Ulf Hansson
2021-09-01 15:44 ` Ulf Hansson
2021-09-01 21:53   ` Saravana Kannan
2021-09-01 22:17     ` Ulf Hansson
2021-09-02  0:16       ` Saravana Kannan
2021-09-02  1:43         ` Saravana Kannan [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=CAGETcx_EeiimxoXcN0Vw_sizeioDnBB8z4bh_3Qj4ac_tL7BRQ@mail.gmail.com \
    --to=saravanak@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel-team@android.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=rafael@kernel.org \
    --cc=ulf.hansson@linaro.org \
    /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.