netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Andrew Lunn <andrew@lunn.ch>
Cc: netdev@vger.kernel.org, linux-wireless@vger.kernel.org,
	Alex Elder <elder@linaro.org>,
	m.chetan.kumar@intel.com, Dan Williams <dcbw@redhat.com>,
	Bjorn Andersson <bjorn.andersson@linaro.org>
Subject: Re: [RFC] wwan: add a new WWAN subsystem
Date: Mon, 02 Mar 2020 14:06:14 +0100	[thread overview]
Message-ID: <994a47b89df306d3ce126655805d9c163cd5daa0.camel@sipsolutions.net> (raw)
In-Reply-To: <20200225151521.GA7663@lunn.ch>

Hi Andrew,

To completely my response here, sorry for the delay.

> Looking at it bottom up, is the WWAN device itself made up of multiple
> devices? Are the TTYs separate drivers to the packet moving engines?
> They have there own USB end points, and could just be standard CDC
> ACM?

Depends on the device, must often yes; Yes and yes.

In fact, they _are_ often just the standard drivers, so sometimes you
don't even know if that thing is part of the modem or not, without
further out-of-band information.

For the netdevs that was partially solved by USB ID matching and netdev
"wwan" type.

> driver/base/component.c could be useful for bringing together these
> individual devices to form the whole WWAN device. This is often used
> for graphics drivers, where there can be i2c devices, display pipeline
> devices, acceleration drivers etc, which each probe separately, but
> need to be brought together to form a gpu driver as a whole.

I looked at this now, but ... Hmm. It's not really clear that really is
usable directly.

The component framework really wants to have a 'master' and a bunch of
'components', whereas in the WWAN case you don't really have a master,
necessarily? Each part _may_ contribute something to the overall
picture, but it could also just be one of those ACM drivers that doesn't
really know if it's part of a modem or not, so it just tentatively adds
something without knowing if there will even _be_ an overall WWAN
device.

Also, I don't think a WWAN device is necessarily "done" at some point.
It may be, for example, that the netdev sub-device knows that it's part
of a modem so it registers "yes I know this is a modem", but then the
other pieces are only discovered later, without knowing what they might
even be. Could be that they aren't, however, but even then the WWAN
device would still exist and be useful to some extent.

I don't see a way of expressing any of this with the component
framework. Yes, all of the pieces could register there, but then why
should any particular one of them register as a component master? That
would at the very least have to be hidden under some other abstraction,
but even if it is, it's not clear that we might not - in the future, not
in my code now - have some sort of "if there are certain pieces that we
know belong together then it must be a modem" logic...

And once it decided that it's "done" (a master is 'bound'), the
component framework will not add further components to a master or
similar, and it doesn't really seem suited to doing that either.

> Plus you need to avoid confusion by not adding another "component
> framework" which means something totally different to the existing
> component framework.

Fair point. I guess I can rename this somehow, or clarify the
differences in the code.

johannes


  parent reply	other threads:[~2020-03-02 13:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-25 10:00 [RFC] wwan subsystem Johannes Berg
2020-02-25 10:00 ` [RFC] wwan: add a new WWAN subsystem Johannes Berg
2020-02-25 15:15   ` Andrew Lunn
2020-02-25 15:39     ` Johannes Berg
2020-02-26 22:15       ` Dan Williams
2020-03-02 13:06     ` Johannes Berg [this message]
2020-02-25 19:00   ` David Miller
2020-02-25 19:40     ` Johannes Berg

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=994a47b89df306d3ce126655805d9c163cd5daa0.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=andrew@lunn.ch \
    --cc=bjorn.andersson@linaro.org \
    --cc=dcbw@redhat.com \
    --cc=elder@linaro.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=m.chetan.kumar@intel.com \
    --cc=netdev@vger.kernel.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 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).