[PATCH v3 0/6] USB: serial: mxuport: add MUX50U support and updates

Crescent Hsieh <[email protected]>
Newsgroups org.kernel.vger.linux-usb,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
This series updates the mxuport driver to support MUX50U-based devices
and fixes device-specific runtime behaviours.

The first three patches clean up the USB device ID table and firmware
version handling, and add support for UPort G2 and Platform UART
devices. The device family is encoded in the USB device ID table so
that the table provides both the port count and the information needed
for firmware handling.

The fourth patch adds optional callbacks to the generic USB-serial
write path so that drivers can stop write submission based on
device-specific state and restore that state if URB submission fails.

The fifth patch uses these callbacks to implement the per-port
SEND_NEXT transmit flow-control protocol without duplicating the
generic write implementation.

The sixth patch adds RS485 mode configuration through the standard
TIOCSRS485/TIOCGRS485 interface.

---
Changes in v3:
  - [PATCH v3 1/6]:
    Rename the existing PID definitions after their corresponding
    products and introduce a helper to keep each USB device ID table
    entry on one line.
  - [PATCH v3 2/6]:
    Rename the firmware-version composition helper and retain the
    existing firmware image-size validation.
  - [PATCH v3 3/6]:
    Name the new PID definitions after their corresponding products,
    list all supported products by device family, rename the family
    definitions to describe device rather than firmware families, and
    use BIT() for the nonzero family values.
  - [PATCH v3 4/6] and [PATCH v3 5/6]:
    Replace the mxuport-specific copies of the generic write path with
    optional write_ready() and write_rollback() callbacks. Use the
    callbacks to pause SEND_NEXT writes and restore the per-port state
    if URB submission fails. Expand the SEND_NEXT commit message to
    describe the per-port protocol.

Changes in v2:
  - [PATCH v1 1/4]:
    Split into [PATCH v2 1/4] and [PATCH v2 2/4]. Clean up firmware
    version parsing and printing in the first patch, and move MUX50U
    device support to the second patch. Encode the firmware family in
    the USB device-id table and use the system-register remap state for
    the MUX50U firmware download decision.
  - [PATCH v1 2/4]:
    Moved to [PATCH v2 3/4]. Add mxuport-specific write(),
    write_start(), and write_bulk_callback() paths so SEND_NEXT can stop
    and resume transmission without returning zero from
    prepare_write_buffer().
    Drop the open-time FIFO flush.
  - [PATCH v1 3/4]:
    Moved to [PATCH v2 4/4]. Clear unsupported serial_rs485 flags and
    fields, cache the sanitized configuration, and protect it with the
    per-port mutex.
  - [PATCH v1 4/4]:
    Drop the UART FIFO sysfs interface from this revision.

v2: https://lore.kernel.org/all/[email protected]/
v1: https://lore.kernel.org/all/[email protected]/

Crescent Hsieh (6):
  USB: serial: mxuport: clean up product ID definitions and device table
  USB: serial: mxuport: clean up firmware version handling
  USB: serial: mxuport: add MUX50U-based device support
  USB: serial: add generic write control callbacks
  USB: serial: mxuport: handle SEND_NEXT transmit flow control
  USB: serial: mxuport: support RS485 mode configuration

 drivers/usb/serial/generic.c |  12 +-
 drivers/usb/serial/mxuport.c | 424 ++++++++++++++++++++++++++++++-----
 include/linux/usb/serial.h   |   9 +-
 3 files changed, 378 insertions(+), 67 deletions(-)

-- 
2.53.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.