All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Aleksander Morgado <aleksander@aleksander.es>
To: Loic Poulain <loic.poulain@linaro.org>
Cc: "Oliver Neukum" <oliver@neukum.org>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	"Bjørn Mork" <bjorn@mork.no>,
	"Network Development" <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next v2 2/2] usb: class: cdc-wdm: WWAN framework integration
Date: Wed, 12 May 2021 09:30:43 +0200	[thread overview]
Message-ID: <CAAP7ucJah5qJXpjyP9gYmnYDyBWS7Qe3ck2SCBonJhJB2NgS5A@mail.gmail.com> (raw)
In-Reply-To: <1620744143-26075-2-git-send-email-loic.poulain@linaro.org>

Hey Loic,

On Tue, May 11, 2021 at 4:33 PM Loic Poulain <loic.poulain@linaro.org> wrote:
>
> The WWAN framework provides a unified way to handle WWAN/modems and its
> control port(s). It has initially been introduced to support MHI/PCI
> modems, offering the same control protocols as the USB variants such as
> MBIM, QMI, AT... The WWAN framework exposes these control protocols as
> character devices, similarly to cdc-wdm, but in a bus agnostic fashion.
>
> This change adds registration of the USB modem cdc-wdm control endpoints
> to the WWAN framework as standard control ports (wwanXpY...).
>
> Exposing cdc-wdm through WWAN framework normally maintains backward
> compatibility, e.g:
>     $ qmicli --device-open-qmi -d /dev/wwan0p1QMI --dms-get-ids
> instead of
>     $ qmicli --device-open-qmi -d /dev/cdc-wdm0 --dms-get-ids
>

I have some questions regarding how all this would be seen from userspace.

Does the MBIM control port retain the ability to query the maximum
message size with an ioctl like IOCTL_WDM_MAX_COMMAND? Or is that
lost? For the libmbim case this may not be a big deal, as we have a
fallback mechanism to read this value from the USB descriptor itself,
so just wondering.

Is the sysfs hierarchy maintained for this new port type? i.e. if
doing "udevadm info -p /sys/class/wwan/wwan0p1QMI -a", would we still
see the immediate parent device with DRIVERS=="qmi_wwan" and the
correct interface number/class/subclass/protocol attributes?

> However, some tools may rely on cdc-wdm driver/device name for device
> detection. It is then safer to keep the 'legacy' cdc-wdm character
> device to prevent any breakage. This is handled in this change by
> API mutual exclusion, only one access method can be used at a time,
> either cdc-wdm chardev or WWAN API.

How does this mutual exclusion API work? Is the kernel going to expose
2 different chardevs always for the single control port? If so, do we
really want to do that? How would we know from userspace that the 2
chardevs apply to the same port? And, which of the chardevs would be
exposed first (and notified first by udev), the wwan one or the
cdc-wdm one?

-- 
Aleksander
https://aleksander.es

  reply	other threads:[~2021-05-12  7:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-11 14:42 [PATCH net-next v2 1/2] net: wwan: Add unknown port type Loic Poulain
2021-05-11 14:42 ` [PATCH net-next v2 2/2] usb: class: cdc-wdm: WWAN framework integration Loic Poulain
2021-05-12  7:30   ` Aleksander Morgado [this message]
     [not found]     ` <CAMZdPi_2PdM9+_RQi0hL=eQauXfN3wFJVyHwSWGsfnK2QBaHbw@mail.gmail.com>
2021-05-12  9:04       ` Aleksander Morgado
2021-05-12 11:01         ` Loic Poulain
2021-05-12 11:05           ` Bjørn Mork
2021-05-12 16:34           ` Dan Williams
2021-05-19  9:25             ` Loic Poulain
2021-05-19  9:40               ` Aleksander Morgado
2021-05-11 23:33 ` [PATCH net-next v2 1/2] net: wwan: Add unknown port type patchwork-bot+netdevbpf

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=CAAP7ucJah5qJXpjyP9gYmnYDyBWS7Qe3ck2SCBonJhJB2NgS5A@mail.gmail.com \
    --to=aleksander@aleksander.es \
    --cc=bjorn@mork.no \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=loic.poulain@linaro.org \
    --cc=netdev@vger.kernel.org \
    --cc=oliver@neukum.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.