linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* An inquiry on supporting USB CDC ACM on Host PC as USB Host/Master
@ 2021-12-09 13:09 Maggie Maralit
  2021-12-09 13:30 ` Oliver Neukum
  0 siblings, 1 reply; 5+ messages in thread
From: Maggie Maralit @ 2021-12-09 13:09 UTC (permalink / raw)
  To: linux-usb

Hi,

Sorry for the sudden email.
I would like to confirm the difference of CONFIG_USB_ACM and
CONFIG_USB_CDC_COMPOSITE.

Basically, we are developing a product and that product uses an
MCP2221A USB-UART adapter
(http://ww1.microchip.com/downloads/en/devicedoc/20005565b.pdf) that
supports "USB Protocol Composite Device: Communication Device Class
(CDC) for USB-to-UART conversion".
Our product with MCP2221A will connect to a Linux-based Host PC
(either x86_4 laptop or INTEL NUC, arm64 like Jetson Nano or armhf
like RPi) via a USB 2.0 cable.

Our product is the USB slave/peripheral.
According to MCP2221A specifications, for a Linux-based Host PC to
properly detect it, it should have "Linux® – any distribution with
support for CDC and HID classes".

So we are assuming that for users to use our product, their
Linux-based Host PC should be using Linux Kernel that supports CDC but
we are confused whether that meant CONFIG_USB_ACM or
CONFIG_USB_CDC_COMPOSITE, thus our question above (asking for the
background on these two).

From my understanding of:
- CONFIG_USB_ACM (reference, how to enable in kernel) that produces
cdc-acm.ko under /lib/modules/<kernel
version>/kernel/drivers/usb/class
- CONFIG_USB_CDC_COMPOSITE (reference, how to enable in kernel) that
produces g_cdc.ko under /lib/modules/<kernel
version>/kernel/drivers/usb/gadget/legacy

CONFIG_USB_ACM is the one the user needs to have in their Linux-based
Host PC's Linux Kernel  because this is the USB CDC ACM handler for
the Host PC side (having USB Host/Master settings).

CONFIG_USB_CDC_COMPOSITE seems to be the USB CDC ACM handler for the
device side (having USB Device/Slave settings) which is on the side of
our Product.

We assume that as an outcome of enabling our users enabling
CONFIG_USB_ACM in their Linux Kernels, the Linux-based Host PC don't
have to install any extra USB drivers to communicate with our product.

Hoping for your guidance.

Thank you very much.

Regards,
Maggie

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: An inquiry on supporting USB CDC ACM on Host PC as USB Host/Master
  2021-12-09 13:09 An inquiry on supporting USB CDC ACM on Host PC as USB Host/Master Maggie Maralit
@ 2021-12-09 13:30 ` Oliver Neukum
  2021-12-09 14:24   ` Maggie Maralit
  0 siblings, 1 reply; 5+ messages in thread
From: Oliver Neukum @ 2021-12-09 13:30 UTC (permalink / raw)
  To: Maggie Maralit, linux-usb


On 09.12.21 14:09, Maggie Maralit wrote:
> From my understanding of:
> - CONFIG_USB_ACM (reference, how to enable in kernel) that produces
> cdc-acm.ko under /lib/modules/<kernel
> version>/kernel/drivers/usb/class
Correct
> - CONFIG_USB_CDC_COMPOSITE (reference, how to enable in kernel) that
> produces g_cdc.ko under /lib/modules/<kernel
> version>/kernel/drivers/usb/gadget/legacy
Yes, though that driver is the older of the two versions available
> CONFIG_USB_ACM is the one the user needs to have in their Linux-based
> Host PC's Linux Kernel  because this is the USB CDC ACM handler for
> the Host PC side (having USB Host/Master settings).
Correct
>
> CONFIG_USB_CDC_COMPOSITE seems to be the USB CDC ACM handler for the
> device side (having USB Device/Slave settings) which is on the side of
> our Product.
Yes
>
> We assume that as an outcome of enabling our users enabling
> CONFIG_USB_ACM in their Linux Kernels, the Linux-based Host PC don't
> have to install any extra USB drivers to communicate with our product.
Correct. This driver is for all devices which advertise a the correct
interfaces for the CDC ACM class of devices.

    HTH
        Oliver


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: An inquiry on supporting USB CDC ACM on Host PC as USB Host/Master
  2021-12-09 13:30 ` Oliver Neukum
@ 2021-12-09 14:24   ` Maggie Maralit
  2021-12-09 15:29     ` Oliver Neukum
  0 siblings, 1 reply; 5+ messages in thread
From: Maggie Maralit @ 2021-12-09 14:24 UTC (permalink / raw)
  To: Oliver Neukum; +Cc: linux-usb

Hi Oliver,

Thank you for your very quick response and straightforward answers -
they're very helpful.

I am not sure if my next (and possibly last) set of questions makes
sense - and that is, I've noticed that only a few platforms have
enabled CONFIG_USB_ACM in their *_defconfigs.
I've checked Linux Kernel version 5.10.83 and only about 28 out of the
390 there have this enabled (of course I do get that some might not
have USB ports in the first place).
For one, the x86_64_defconfig there doesn't have CONFIG_USB_ACM
enabled, but weirdly, my laptop is an x86_64 but I can see cdc_acm in
my modinfo (I have Ubuntu 18.04 LTS and my Linux Kernel version is
5.4.0.91).
I'm sure I have not changed my laptop's Linux Kernel before - though
it does seem to be updating for some reason because Ubuntu 18.04's
tagged kernel version is v4.15.

My questions are:
1. With CONFIG_USB_ACM very common and useful, why is it not enabled
by default in most platforms with USB ports like the x86_64 (normal
for laptops and Intel NUCs)?
2. Is there any rule or official statement from Linux Kernel
maintainers/experts, highly recommending platform developers (or
specific Ubuntu releases) to support this? (if there is, may I have a
link of the documentation mentioning such?)
3. And is there a possibility for that module to get installed in the
Linux Kernel just by the usual Linux commands (eg, "apt get
update/upgrade")?

Again, thank you very much for your assistance.

Regards,
Maggie



On Thu, Dec 9, 2021 at 9:30 PM Oliver Neukum <oneukum@suse.com> wrote:
>
>
> On 09.12.21 14:09, Maggie Maralit wrote:
> > From my understanding of:
> > - CONFIG_USB_ACM (reference, how to enable in kernel) that produces
> > cdc-acm.ko under /lib/modules/<kernel
> > version>/kernel/drivers/usb/class
> Correct
> > - CONFIG_USB_CDC_COMPOSITE (reference, how to enable in kernel) that
> > produces g_cdc.ko under /lib/modules/<kernel
> > version>/kernel/drivers/usb/gadget/legacy
> Yes, though that driver is the older of the two versions available
> > CONFIG_USB_ACM is the one the user needs to have in their Linux-based
> > Host PC's Linux Kernel  because this is the USB CDC ACM handler for
> > the Host PC side (having USB Host/Master settings).
> Correct
> >
> > CONFIG_USB_CDC_COMPOSITE seems to be the USB CDC ACM handler for the
> > device side (having USB Device/Slave settings) which is on the side of
> > our Product.
> Yes
> >
> > We assume that as an outcome of enabling our users enabling
> > CONFIG_USB_ACM in their Linux Kernels, the Linux-based Host PC don't
> > have to install any extra USB drivers to communicate with our product.
> Correct. This driver is for all devices which advertise a the correct
> interfaces for the CDC ACM class of devices.
>
>     HTH
>         Oliver
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: An inquiry on supporting USB CDC ACM on Host PC as USB Host/Master
  2021-12-09 14:24   ` Maggie Maralit
@ 2021-12-09 15:29     ` Oliver Neukum
  2021-12-10  2:50       ` Maggie Maralit
  0 siblings, 1 reply; 5+ messages in thread
From: Oliver Neukum @ 2021-12-09 15:29 UTC (permalink / raw)
  To: Maggie Maralit, Oliver Neukum; +Cc: linux-usb


On 09.12.21 15:24, Maggie Maralit wrote:
Hi,
> My questions are:
> 1. With CONFIG_USB_ACM very common and useful, why is it not enabled
> by default in most platforms with USB ports like the x86_64 (normal
> for laptops and Intel NUCs)?

The upstream config is supposed to be minimal. Doing optimal
configs is a task for distributions or people who compile their own kernel.

> 2. Is there any rule or official statement from Linux Kernel
> maintainers/experts, highly recommending platform developers (or
> specific Ubuntu releases) to support this? (if there is, may I have a
> link of the documentation mentioning such?)
That is Ubuntu's job.
> 3. And is there a possibility for that module to get installed in the
> Linux Kernel just by the usual Linux commands (eg, "apt get
> update/upgrade")?
>
That question depends on your distribution. I suppose every sane general
purpose Linux distribution will compile and deliver cdc-acm, but I haven't
checked.

The configuration of your running kernel is in /proc/config.gz and is chosen
by the developer's of Ubuntu if you are running their kernel.

    HTH
        Oliver


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: An inquiry on supporting USB CDC ACM on Host PC as USB Host/Master
  2021-12-09 15:29     ` Oliver Neukum
@ 2021-12-10  2:50       ` Maggie Maralit
  0 siblings, 0 replies; 5+ messages in thread
From: Maggie Maralit @ 2021-12-10  2:50 UTC (permalink / raw)
  To: Oliver Neukum; +Cc: linux-usb

Hi Oliver,

These are all noted and understood.
Again, thank you for all your answers on this!

Regards,
Maggie

On Thu, Dec 9, 2021 at 11:29 PM Oliver Neukum <oneukum@suse.com> wrote:
>
>
> On 09.12.21 15:24, Maggie Maralit wrote:
> Hi,
> > My questions are:
> > 1. With CONFIG_USB_ACM very common and useful, why is it not enabled
> > by default in most platforms with USB ports like the x86_64 (normal
> > for laptops and Intel NUCs)?
>
> The upstream config is supposed to be minimal. Doing optimal
> configs is a task for distributions or people who compile their own kernel.
>
> > 2. Is there any rule or official statement from Linux Kernel
> > maintainers/experts, highly recommending platform developers (or
> > specific Ubuntu releases) to support this? (if there is, may I have a
> > link of the documentation mentioning such?)
> That is Ubuntu's job.
> > 3. And is there a possibility for that module to get installed in the
> > Linux Kernel just by the usual Linux commands (eg, "apt get
> > update/upgrade")?
> >
> That question depends on your distribution. I suppose every sane general
> purpose Linux distribution will compile and deliver cdc-acm, but I haven't
> checked.
>
> The configuration of your running kernel is in /proc/config.gz and is chosen
> by the developer's of Ubuntu if you are running their kernel.
>
>     HTH
>         Oliver
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-12-10  2:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-09 13:09 An inquiry on supporting USB CDC ACM on Host PC as USB Host/Master Maggie Maralit
2021-12-09 13:30 ` Oliver Neukum
2021-12-09 14:24   ` Maggie Maralit
2021-12-09 15:29     ` Oliver Neukum
2021-12-10  2:50       ` Maggie Maralit

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).