Linux USB
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Crescent Hsieh <crescentcy.hsieh@moxa.com>
Cc: Johan Hovold <johan@kernel.org>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 4/4] usb: serial: mxuport: add sysfs control for UART FIFO
Date: Fri, 15 May 2026 11:17:49 +0200	[thread overview]
Message-ID: <2026051557-concert-blizzard-302a@gregkh> (raw)
In-Reply-To: <agbieSXDX1wUkE4K@moxa-ThinkCentre-M90t>

On Fri, May 15, 2026 at 05:08:09PM +0800, Crescent Hsieh wrote:
> Hi Greg and Johan,
> 
> I agree that USB-to-serial cannot provide deterministic latency.
> However, the embedded UART used by Moxa UPort has a 512-byte FIFO, so
> its FIFO/trigger configuration still has a measurable effect on the
> typical latency on this hardware.

Sure, but again, you are fighting a loosing battle.

> RQ_VENDOR_SET_FIFO_DISABLE is a historical name. On the current
> firmware, it does not literally turn the UART FIFO on or off, but
> adjusts the UART RX/TX trigger levels instead. Its semantics are close
> to the trigger-level control I am currently working on for the PCI
> serial cards [1].
> 
> In a 1-byte loopback latency test under the same wiring and host setup,
> with 10,000 samples for each configuration, I measured the following
> results (in us):
> 
>        | Enable | Disable |
> --------------------------|
> Min    |    637 |     210 |
> Median |    764 |     235 |
> P95    |    811 |     238 |
> P99    |    820 |     260 |
> Max    |  4,214 |   3,807 |
> Avg    |    744 |     235 |
> --------------------------|
> 
> So while this does not make USB deterministic, it does show that this
> setting has a significant effect on the typical latency on this hardware
> and also matters for compatibility with some legacy serial equipment.

Then the traditional api for controling this in the uart should be used,
not a special-purpose one-off for a sysfs file.

thanks,

greg k-h

  reply	other threads:[~2026-05-15  9:17 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-24  3:50 [PATCH v1 0/4] usb: serial: mxuport: extend MXU50U support and runtime controls Crescent Hsieh
2026-03-24  3:50 ` [PATCH v1 1/4] usb: serial: mxuport: add support for more MXU50U UART devices Crescent Hsieh
2026-05-07 14:13   ` Johan Hovold
2026-03-24  3:50 ` [PATCH v1 2/4] usb: serial: mxuport: handle SEND_NEXT tx flow control Crescent Hsieh
2026-05-07 14:40   ` Johan Hovold
2026-03-24  3:50 ` [PATCH v1 3/4] usb: serial: mxuport: support serial interface mode configuration Crescent Hsieh
2026-05-07 15:56   ` Johan Hovold
2026-03-24  3:50 ` [PATCH v1 4/4] usb: serial: mxuport: add sysfs control for UART FIFO Crescent Hsieh
2026-05-07 15:59   ` Johan Hovold
2026-05-12 11:28     ` Crescent Hsieh
2026-05-13  8:20       ` Johan Hovold
2026-05-13  8:48         ` Greg Kroah-Hartman
2026-05-15  9:08           ` Crescent Hsieh
2026-05-15  9:17             ` Greg Kroah-Hartman [this message]
2026-03-30  7:24 ` [PATCH v1 0/4] usb: serial: mxuport: extend MXU50U support and runtime controls Crescent Hsieh
2026-03-30  7:54   ` Johan Hovold
2026-04-27  3:37     ` Crescent Hsieh
2026-04-27 10:43       ` Johan Hovold

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=2026051557-concert-blizzard-302a@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=crescentcy.hsieh@moxa.com \
    --cc=johan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox