Telit Linux cdc-acm fix for 3G Intel modems

A new Telit Linux kernel fix recently landed in kernel for 3G Intel based modems (e.g. HE910, UE910…): the fix targets cdc-acm driver, for usb serial ports.

Telit Linux

Symptoms of the issue

The issue happens when sending through the usb serial ports a chunk of data which size is the same than the bulk endpoint max packet size: the data gets stuck unless more data or a zero-length packet is sent.

For example, in high-speed, this means sending a chunk of 512 bytes and nothing more. The use-case is very specific and this is the reason why the issue is not easily seen in normal modem usage (e.g. a dial-up data connection through the serial port created by the cdc-acm driver). The endpoint max packet size can be identified with lsusb verbose output.

However in custom systems dedicated to specific tasks (e.g. metering) that sporadically send chunk of data , this issue could happen.

Root case of this behavior

3G Intel based modems strictly follow USB specification, so this can be considered a driver bug.

cdc-acm Telit Linux fix

Ths solution is simply to instruct the driver to sena a zero-length packet after sending a number of bytes equal to the device endpoint max packet size.The patch is available at this link and is included in Linux kernel since v5.0-rc2. It has been back-ported in all stable kernel versions.

Are there other Telit Linux enabled modems that can be affected by that issue?

4G Intel based modems have the same issue, but on the modem side a workaround seems to have been implemented (a stuck packet is sent anyway after a few seconds, even without the ZLP or other data), so the severity is lower. However a kernel patch for those 4G modems USB compositions used in Linux is something that should be preferred.