History log of /src/sys/dev/usb/serial/usb_serial.c (Results 1 – 25 of 211)
Revision Date Author Comments
# ca48e43b 04-Mar-2025 Warner Losh <imp@FreeBSD.org>

usb: Kill left-over cdefs.h includes

These includes were for __FBSD_RCSID() macro. They weren't formatted
like the rest of the tree so weren't trimmed automatically when that
script was run. Trim th

usb: Kill left-over cdefs.h includes

These includes were for __FBSD_RCSID() macro. They weren't formatted
like the rest of the tree so weren't trimmed automatically when that
script was run. Trim them now.

MFC After: 1 week
Sponsored by: Netflix

show more ...


# 36a80f42 11-Dec-2024 Kyle Evans <kevans@FreeBSD.org>

usb: serial: make more commands execute synchronously

The termios layer wants some level of guarantee that we've actually
submitted param changes to the hardware when our functions return, so we
nee

usb: serial: make more commands execute synchronously

The termios layer wants some level of guarantee that we've actually
submitted param changes to the hardware when our functions return, so we
need to do a little more waiting to avoid violating those guarantees.

This is especially important as some hardware has some minimum timing
specifications around this stuff, and without being less asynchronous
the software dealing with these devices can't reasonably operate the
hardware without more excessive delays than they should need.

More specifically, we make sure that:
- The command to start transfers is finished before we toggle DTR/RTS
- The status_change command finishes before we return, which may change
some fields in the softc that we need for a subsequent call into
usb_serial
- cfg_param finishes before we re-enable transfers, and we ensure that
RTS is appropriately toggled before we return to userland

This has been observed to fix some flakiness in connecting to some
ESP32 devices.

Tested by: kenrap from Libera
Reviewed by: imp, kib
Differential Revision: https://reviews.freebsd.org/D47952

show more ...


# 729eb176 11-Dec-2024 Kyle Evans <kevans@FreeBSD.org>

usb: serial: allow the open/close sleep to be interruptible

ucom_queue_command will issue commands for open/close, then wait on them
to be finished. In the spirit of playing it safe, allow
ucom_que

usb: serial: allow the open/close sleep to be interruptible

ucom_queue_command will issue commands for open/close, then wait on them
to be finished. In the spirit of playing it safe, allow
ucom_queue_command's wait to be interrupted in case the usb process gets
jammed up waiting on the hardware -- we can at least recover the user
thread that initiated it, even if we can't recover the usb process.

Reviewed by: imp, kib
Differential Revision: https://reviews.freebsd.org/D47951

show more ...


# 51f3d087 11-Dec-2024 Kyle Evans <kevans@FreeBSD.org>

usb: serial: propagate errors from ucom_queue_command()

There's only one error that we can get back right now, but future
changes will add some more cases that we need to watch out for. Start
by re

usb: serial: propagate errors from ucom_queue_command()

There's only one error that we can get back right now, but future
changes will add some more cases that we need to watch out for. Start
by returning errors and propagating them back.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D47950

show more ...


# 4722ceb7 17-Aug-2023 Ed Maste <emaste@FreeBSD.org>

Use 115200 bps by default for serial communication

9600 was a standard baud rate decades ago, but 115200 is now more common
so choose defaults that are useful to the largest number of users.

Note t

Use 115200 bps by default for serial communication

9600 was a standard baud rate decades ago, but 115200 is now more common
so choose defaults that are useful to the largest number of users.

Note that boot0sio does not support rates above 9600 so it remains
unchanged.

Reviewed by: bz, imp, manu
Relnotes: Yes
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D36295

show more ...


# 685dc743 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# eebd9d53 10-May-2023 Warner Losh <imp@FreeBSD.org>

spdx: Simplify BSD-2-Clause AND BSD-2-Clause

After removing the -FreeBSD and -NetBSD, we're left with a nuber of
BSD-2-Clause AND BSD-2-Clause, so tidy that up.

Discussed with: pfg
MFC After: 3 d

spdx: Simplify BSD-2-Clause AND BSD-2-Clause

After removing the -FreeBSD and -NetBSD, we're left with a nuber of
BSD-2-Clause AND BSD-2-Clause, so tidy that up.

Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix

show more ...


# b61a5730 10-May-2023 Warner Losh <imp@FreeBSD.org>

spdx: The BSD-2-Clause-NetBSD identifier is obsolete, drop -NetBSD

The SPDX folks have obsoleted the BSD-2-Clause-NetBSD identifier. Catch
up to that fact and revert to their recommended match of BS

spdx: The BSD-2-Clause-NetBSD identifier is obsolete, drop -NetBSD

The SPDX folks have obsoleted the BSD-2-Clause-NetBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix

show more ...


# 4d846d26 10-May-2023 Warner Losh <imp@FreeBSD.org>

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix

show more ...


# 62d42655 07-Oct-2022 Hans Petter Selasky <hselasky@FreeBSD.org>

usb(4): Substitute "unsigned int" using the equivalent and shorter "unsigned" keyword.

MFC after: 1 week
Sponsored by: NVIDIA Networking


# cbc53503 30-Aug-2022 Dave Baukus <daveb@spectralogic.com>

ucom(4): Make sure the open routine is executed synchronously.

To avoid issues starting any USB transfers before the open
function is complete.

Differential Revision: https://reviews.freebsd.org/D3

ucom(4): Make sure the open routine is executed synchronously.

To avoid issues starting any USB transfers before the open
function is complete.

Differential Revision: https://reviews.freebsd.org/D36391
MFC after: 1 week
Sponsored by: NVIDIA Networking

show more ...


# e43d081f 06-Dec-2021 Mitchell Horne <mhorne@FreeBSD.org>

ucom: s/sio/ucom/

Seems like a copy-paste error, or at least this made more sense when the
sio(4) driver still existed. This modifies the debug port name displayed
at boot, but otherwise has no func

ucom: s/sio/ucom/

Seems like a copy-paste error, or at least this made more sense when the
sio(4) driver still existed. This modifies the debug port name displayed
at boot, but otherwise has no functional change.

Reviewed by: hselasky
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D33278

show more ...


# 9dd3156e 01-Sep-2020 Mateusz Guzik <mjg@FreeBSD.org>

usb: clean up empty lines in .c and .h files


# b33a8b38 16-Feb-2020 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r357966 through r357999.


# f8d2b1f3 15-Feb-2020 Pawel Biernacki <kaktus@FreeBSD.org>

Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (2 of many)

r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are
still not MPSAFE (or already are but aren’t properly marke

Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (2 of many)

r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are
still not MPSAFE (or already are but aren’t properly marked). Use it in
preparation for a general review of all nodes.
This is non-functional change that adds annotations to SYSCTL_NODE and
SYSCTL_PROC nodes using one of the soon-to-be-required flags.

Reviewed by: hselasky, kib
Approved by: kib (mentor)
Differential Revision: https://reviews.freebsd.org/D23632

show more ...


# e532a999 20-Jun-2019 Alan Somers <asomers@FreeBSD.org>

MFHead @349234

Sponsored by: The FreeBSD Foundation


# 705aad98 12-Jun-2019 Stephen Hurd <shurd@FreeBSD.org>

Some devices take undesired actions when RTS and DTR are
asserted. Some development boards for example will reset on DTR,
and some radio interfaces will transmit on RTS.

This patch allows "stty -f /

Some devices take undesired actions when RTS and DTR are
asserted. Some development boards for example will reset on DTR,
and some radio interfaces will transmit on RTS.

This patch allows "stty -f /dev/ttyu9.init -rtsdtr" to prevent
RTS and DTR from being asserted on open(), allowing these devices
to be used without problems.

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D20031

show more ...


# ca48e43b 04-Mar-2025 Warner Losh <imp@FreeBSD.org>

usb: Kill left-over cdefs.h includes

These includes were for __FBSD_RCSID() macro. They weren't formatted
like the rest of the tree so weren't trimmed automatically when that
script was run. Trim th

usb: Kill left-over cdefs.h includes

These includes were for __FBSD_RCSID() macro. They weren't formatted
like the rest of the tree so weren't trimmed automatically when that
script was run. Trim them now.

MFC After: 1 week
Sponsored by: Netflix

show more ...


# 36a80f42 11-Dec-2024 Kyle Evans <kevans@FreeBSD.org>

usb: serial: make more commands execute synchronously

The termios layer wants some level of guarantee that we've actually
submitted param changes to the hardware when our functions return, so we
nee

usb: serial: make more commands execute synchronously

The termios layer wants some level of guarantee that we've actually
submitted param changes to the hardware when our functions return, so we
need to do a little more waiting to avoid violating those guarantees.

This is especially important as some hardware has some minimum timing
specifications around this stuff, and without being less asynchronous
the software dealing with these devices can't reasonably operate the
hardware without more excessive delays than they should need.

More specifically, we make sure that:
- The command to start transfers is finished before we toggle DTR/RTS
- The status_change command finishes before we return, which may change
some fields in the softc that we need for a subsequent call into
usb_serial
- cfg_param finishes before we re-enable transfers, and we ensure that
RTS is appropriately toggled before we return to userland

This has been observed to fix some flakiness in connecting to some
ESP32 devices.

Tested by: kenrap from Libera
Reviewed by: imp, kib
Differential Revision: https://reviews.freebsd.org/D47952

show more ...


# 729eb176 11-Dec-2024 Kyle Evans <kevans@FreeBSD.org>

usb: serial: allow the open/close sleep to be interruptible

ucom_queue_command will issue commands for open/close, then wait on them
to be finished. In the spirit of playing it safe, allow
ucom_que

usb: serial: allow the open/close sleep to be interruptible

ucom_queue_command will issue commands for open/close, then wait on them
to be finished. In the spirit of playing it safe, allow
ucom_queue_command's wait to be interrupted in case the usb process gets
jammed up waiting on the hardware -- we can at least recover the user
thread that initiated it, even if we can't recover the usb process.

Reviewed by: imp, kib
Differential Revision: https://reviews.freebsd.org/D47951

show more ...


# 51f3d087 11-Dec-2024 Kyle Evans <kevans@FreeBSD.org>

usb: serial: propagate errors from ucom_queue_command()

There's only one error that we can get back right now, but future
changes will add some more cases that we need to watch out for. Start
by re

usb: serial: propagate errors from ucom_queue_command()

There's only one error that we can get back right now, but future
changes will add some more cases that we need to watch out for. Start
by returning errors and propagating them back.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D47950

show more ...


# 4722ceb7 17-Aug-2023 Ed Maste <emaste@FreeBSD.org>

Use 115200 bps by default for serial communication

9600 was a standard baud rate decades ago, but 115200 is now more common
so choose defaults that are useful to the largest number of users.

Note t

Use 115200 bps by default for serial communication

9600 was a standard baud rate decades ago, but 115200 is now more common
so choose defaults that are useful to the largest number of users.

Note that boot0sio does not support rates above 9600 so it remains
unchanged.

Reviewed by: bz, imp, manu
Relnotes: Yes
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D36295

show more ...


# 685dc743 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# eebd9d53 10-May-2023 Warner Losh <imp@FreeBSD.org>

spdx: Simplify BSD-2-Clause AND BSD-2-Clause

After removing the -FreeBSD and -NetBSD, we're left with a nuber of
BSD-2-Clause AND BSD-2-Clause, so tidy that up.

Discussed with: pfg
MFC After: 3 d

spdx: Simplify BSD-2-Clause AND BSD-2-Clause

After removing the -FreeBSD and -NetBSD, we're left with a nuber of
BSD-2-Clause AND BSD-2-Clause, so tidy that up.

Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix

show more ...


# b61a5730 10-May-2023 Warner Losh <imp@FreeBSD.org>

spdx: The BSD-2-Clause-NetBSD identifier is obsolete, drop -NetBSD

The SPDX folks have obsoleted the BSD-2-Clause-NetBSD identifier. Catch
up to that fact and revert to their recommended match of BS

spdx: The BSD-2-Clause-NetBSD identifier is obsolete, drop -NetBSD

The SPDX folks have obsoleted the BSD-2-Clause-NetBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix

show more ...


123456789