Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Apr 2026 19:37:40 +0000
From:      Roger Pau =?utf-8?Q?Monn=C3=A9?= <royger@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 45c8ddc874bb - main - uart/pci: recover ADL AMT device after FIFO size probing
Message-ID:  <69e28c04.1bb57.42d4783d@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by royger:

URL: https://cgit.FreeBSD.org/src/commit/?id=45c8ddc874bb9149ed20cb46b6ef8bdd0567714c

commit 45c8ddc874bb9149ed20cb46b6ef8bdd0567714c
Author:     Roger Pau Monné <royger@FreeBSD.org>
AuthorDate: 2026-03-27 09:55:02 +0000
Commit:     Roger Pau Monné <royger@FreeBSD.org>
CommitDate: 2026-04-17 19:37:26 +0000

    uart/pci: recover ADL AMT device after FIFO size probing
    
    When the Alder Lake Serial-over-LAN device is put into loopback mode and
    repeated writes are performed to the data register it results in the device
    ending up in a non-functional state afterwards.
    
    Recovering the device to a working state requires re-writing the LCR
    register with it's current value (no effective change).  This should be
    harmless on all other devices.
    
    Sponsored by: Citrix Systems R&D
    Differential revision: https://reviews.freebsd.org/D56107
    Reviewed by: imp
---
 sys/dev/uart/uart_dev_ns8250.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/sys/dev/uart/uart_dev_ns8250.c b/sys/dev/uart/uart_dev_ns8250.c
index b0c7cd4b44e1..c13eabe9055e 100644
--- a/sys/dev/uart/uart_dev_ns8250.c
+++ b/sys/dev/uart/uart_dev_ns8250.c
@@ -999,6 +999,15 @@ ns8250_bus_probe(struct uart_softc *sc)
 			uart_setreg(bas, REG_IER, ier);
 			uart_setreg(bas, REG_MCR, mcr);
 			uart_setreg(bas, REG_FCR, 0);
+			/*
+			 * The Alder Lake AMT SOL Redirection device will never
+			 * set LSR_OE (when in loopback mode at least) and
+			 * instead block further input by not setting LSR_TEMT.
+			 * Recovering the device afterwards into a working
+			 * state requires re-writing the LCR register.  This
+			 * should be harmless on all other devices.
+			 */
+			uart_setreg(bas, REG_LCR, uart_getreg(bas, REG_LCR));
 			uart_barrier(bas);
 			count = 0;
 			goto describe;


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69e28c04.1bb57.42d4783d>