<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/dev/uart/uart_dev_ns8250.c, branch release/12.3.0</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=release%2F12.3.0</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=release%2F12.3.0'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2021-03-16T17:56:03Z</updated>
<entry>
<title>ns8250: don't drop IER_TXRDY on bus_grab/ungrab</title>
<updated>2021-03-16T17:56:03Z</updated>
<author>
<name>Mitchell Horne</name>
<email>mhorne@FreeBSD.org</email>
</author>
<published>2021-03-10T14:57:12Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=a54c346ff3e80ff8f2f3d0ec56b5374a7dc34429'/>
<id>urn:sha1:a54c346ff3e80ff8f2f3d0ec56b5374a7dc34429</id>
<content type='text'>
It has been observed that some systems are often unable to resume from
ddb after entering with debug.kdb.enter=1. Checking the status further
shows the terminal is blocked waiting in tty_drain(), but it never makes
progress in clearing the output queue, because sc-&gt;sc_txbusy is high.

I noticed that when entering polling mode for the debugger, IER_TXRDY is
set in the failure case. Since this bit is never tracked by the softc,
it will not be restored by ns8250_bus_ungrab(). This creates a race in
which a TX interrupt can be lost, creating the hang described above.
Ensuring that this bit is restored is enough to prevent this, and resume
from ddb as expected.

The solution is to track this bit in the sc-&gt;ier field, for the same
lifetime that TX interrupts are enabled.

PR:		223917, 240122
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit 7e7f7beee732810d3afcc83828341ac3e139b5bd)
</content>
</entry>
<entry>
<title>MFC 359899: Correct baud rate error calculation.</title>
<updated>2020-09-08T22:19:06Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2020-09-08T22:19:06Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=db246688667a2c3c38030f20b3f85739071d8950'/>
<id>urn:sha1:db246688667a2c3c38030f20b3f85739071d8950</id>
<content type='text'>
Shifting right by 1 is not the same as dividing by 2 for signed
values.  In particular, dividing a signed value by 2 gives the integer
ceiling of the (e.g. -5 / 2 == -2) whereas shifting right by 1 always
gives the floor (-5 &gt;&gt; 1 == -3).

An embedded board with a 25 Mhz base clock results in an error of
-30.5% when used with a baud rate of 115200.  Using division, this
truncates to -30% and is permitted.  Using the shift, this fails and
is rejected causing TIOCSETA requests to fail with EINVAL and breaking
getty(8).

Using division gives the same error range for both over and under baud
rates and also makes the code match the behavior documented in the
existing comment about supporting boards with 25 Mhz clocks.
</content>
</entry>
<entry>
<title>MFC r352369: Relax TX draining in ns8250_bus_transmit().</title>
<updated>2019-09-29T02:55:57Z</updated>
<author>
<name>Alexander Motin</name>
<email>mav@FreeBSD.org</email>
</author>
<published>2019-09-29T02:55:57Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=30dc01a762e6f9868e3e69928d266e77e2cad5a4'/>
<id>urn:sha1:30dc01a762e6f9868e3e69928d266e77e2cad5a4</id>
<content type='text'>
Since TX interrupt is generated when THRE is set, wait for TEMT set means
wait for full character transmission time.  At low speeds that may take
awhile, burning CPU time while holding sc_hwmtx lock, also congested.

This is partial revert of r317659.
</content>
</entry>
<entry>
<title>add snps IP uart support / genaralize UART</title>
<updated>2018-08-19T21:10:21Z</updated>
<author>
<name>Matt Macy</name>
<email>mmacy@FreeBSD.org</email>
</author>
<published>2018-08-19T21:10:21Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=381388b9c48b07b08199b07b7657d46e8fcb59b0'/>
<id>urn:sha1:381388b9c48b07b08199b07b7657d46e8fcb59b0</id>
<content type='text'>
This is an amalgam of a patch by Doug Ambrisko to
generalize uart_acpi_find_device, imp moving the
ACPI table to uart_dev_ns8250.c and advice by jhb
to work around a bug in the EPYC 3151 BIOS
(the BIOS incorrectly marks the serial ports as
disabled)

Reviewed by: imp
MFC after: 8 weeks
Differential Revision: https://reviews.freebsd.org/D16432
</content>
</entry>
<entry>
<title>Add busy detect quirk to list of console options</title>
<updated>2018-07-22T23:32:21Z</updated>
<author>
<name>Matt Macy</name>
<email>mmacy@FreeBSD.org</email>
</author>
<published>2018-07-22T23:32:21Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=f30f0f2b4792e63ffa8d07e2e791122bfb20fdbf'/>
<id>urn:sha1:f30f0f2b4792e63ffa8d07e2e791122bfb20fdbf</id>
<content type='text'>
This change allows one to set the busy_detect flag
required by the synopsys UART at the loader prompt.
This is needed by the EPYC 3000 SoC.

This will give users a working console up to the point where getty is required:
hw.uart.console="mm:0xfedc9000,rs:2,bd:1"

Reviewed by:	imp
MFC after:	4 weeks
Differential Revision:	https://reviews.freebsd.org/D16399
</content>
</entry>
<entry>
<title>sys/dev: further adoption of SPDX licensing ID tags.</title>
<updated>2017-11-27T14:52:40Z</updated>
<author>
<name>Pedro F. Giffuni</name>
<email>pfg@FreeBSD.org</email>
</author>
<published>2017-11-27T14:52:40Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=718cf2ccb9956613756ab15d7a0e28f2c8e91cab'/>
<id>urn:sha1:718cf2ccb9956613756ab15d7a0e28f2c8e91cab</id>
<content type='text'>
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.
</content>
</entry>
<entry>
<title>uart: detect 256-byte FIFOs</title>
<updated>2017-10-10T20:08:30Z</updated>
<author>
<name>Ed Maste</name>
<email>emaste@FreeBSD.org</email>
</author>
<published>2017-10-10T20:08:30Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=6e71b3c3edd15b1a66f4dccb91e545a098c3c822'/>
<id>urn:sha1:6e71b3c3edd15b1a66f4dccb91e545a098c3c822</id>
<content type='text'>
Submitted by:	Zakary Nafziger &lt;worldofzak@gmail.com&gt;
Sponsored by:	The FreeBSD Foundation
</content>
</entry>
<entry>
<title>Make some UART consoles to not spin wait for data to be sent.</title>
<updated>2017-05-01T19:47:10Z</updated>
<author>
<name>Alexander Motin</name>
<email>mav@FreeBSD.org</email>
</author>
<published>2017-05-01T19:47:10Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=4e352a4583126e07a4f69012a275f17c01c585a8'/>
<id>urn:sha1:4e352a4583126e07a4f69012a275f17c01c585a8</id>
<content type='text'>
At least with Tx FIFO enabled it shows me ~10% reduction of verbose boot
time with serial console at 115200 baud.

Reviewed by:	marcel
MFC after:	2 weeks
</content>
</entry>
<entry>
<title>Add support for UART found in the Ingenic XBurst system on chips.</title>
<updated>2016-11-17T14:41:22Z</updated>
<author>
<name>Ruslan Bukin</name>
<email>br@FreeBSD.org</email>
</author>
<published>2016-11-17T14:41:22Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=b192bae67ea835b7e431225bad375b5d5fe4297f'/>
<id>urn:sha1:b192bae67ea835b7e431225bad375b5d5fe4297f</id>
<content type='text'>
These CPUs has non-standard UART enable bit hidden in the UART FIFO
Control Register.

Sponsored by:	DARPA, AFRL
</content>
</entry>
<entry>
<title>sys/dev: minor spelling fixes.</title>
<updated>2016-05-03T03:41:25Z</updated>
<author>
<name>Pedro F. Giffuni</name>
<email>pfg@FreeBSD.org</email>
</author>
<published>2016-05-03T03:41:25Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=453130d9bfc1c6d68b366dfcb041689d69f81295'/>
<id>urn:sha1:453130d9bfc1c6d68b366dfcb041689d69f81295</id>
<content type='text'>
Most affect comments, very few have user-visible effects.
</content>
</entry>
</feed>
