mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3 0/6] USB: serial: mxuport: add MUX50U support and updates
@ 2026-08-11  6:04 Crescent Hsieh
  2026-08-11  6:04 ` [PATCH v3 1/6] USB: serial: mxuport: clean up product ID definitions and device table Crescent Hsieh
                   ` (6 more replies)
  0 siblings, 7 replies; 12+ messages in thread
From: Crescent Hsieh @ 2026-08-11  6:04 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Johan Hovold
  Cc: FangpingFP.Cheng, Epson.Chiang, EddieSY.Lin, linux-usb,
	linux-kernel, Crescent Hsieh

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/20260623080138.166398-2-crescentcy.hsieh@moxa.com/
v1: https://lore.kernel.org/all/20260324035041.352190-1-crescentcy.hsieh@moxa.com/

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


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

end of thread, other threads:[~2026-10-05  8:15 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-11  6:04 [PATCH v3 0/6] USB: serial: mxuport: add MUX50U support and updates Crescent Hsieh
2026-08-11  6:04 ` [PATCH v3 1/6] USB: serial: mxuport: clean up product ID definitions and device table Crescent Hsieh
2026-08-11  6:04 ` [PATCH v3 2/6] USB: serial: mxuport: clean up firmware version handling Crescent Hsieh
2026-08-11  6:04 ` [PATCH v3 3/6] USB: serial: mxuport: add MUX50U-based device support Crescent Hsieh
2026-08-11  6:04 ` [PATCH v3 4/6] USB: serial: add generic write control callbacks Crescent Hsieh
2026-08-11  6:05 ` [PATCH v3 5/6] USB: serial: mxuport: handle SEND_NEXT transmit flow control Crescent Hsieh
2026-08-11  6:05 ` [PATCH v3 6/6] USB: serial: mxuport: support RS485 mode configuration Crescent Hsieh
2026-09-10  3:03 ` [PATCH v3 0/6] USB: serial: mxuport: add MUX50U support and updates Crescent Hsieh
2026-09-10 12:56   ` Johan Hovold
2026-09-10 12:57     ` Johan Hovold
2026-10-05  5:43       ` Crescent Hsieh
2026-10-05  8:15         ` Johan Hovold

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®