From nobody Fri Oct 28 21:49:28 2022 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MzbmW6D6sz4g02c for ; Fri, 28 Oct 2022 21:49:31 +0000 (UTC) (envelope-from cperciva@freebsd.org) Received: from mail.tarsnap.com (mail.tarsnap.com [54.86.246.204]) by mx1.freebsd.org (Postfix) with SMTP id 4MzbmV3rrQz3L0T for ; Fri, 28 Oct 2022 21:49:30 +0000 (UTC) (envelope-from cperciva@freebsd.org) Received: (qmail 16507 invoked from network); 28 Oct 2022 21:49:28 -0000 Received: from unknown (HELO dell7390.daemonology.net) (127.0.0.1) by mail.tarsnap.com with SMTP; 28 Oct 2022 21:49:28 -0000 Received: (qmail 35977 invoked from network); 28 Oct 2022 21:49:28 -0000 Received: from unknown (HELO ?127.0.0.1?) (127.0.0.1) by localhost with SMTP; 28 Oct 2022 21:49:28 -0000 Message-ID: Date: Fri, 28 Oct 2022 14:49:28 -0700 List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 Subject: Re: ns8250: UART FCR is broken Content-Language: en-US From: Colin Percival To: freebsd-current@freebsd.org References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4MzbmV3rrQz3L0T X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=softfail (mx1.freebsd.org: 54.86.246.204 is neither permitted nor denied by domain of cperciva@freebsd.org) smtp.mailfrom=cperciva@freebsd.org X-Spamd-Result: default: False [0.50 / 15.00]; VIOLATED_DIRECT_SPF(3.50)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCVD_NO_TLS_LAST(0.10)[]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; RCVD_IN_DNSWL_NONE(0.00)[54.86.246.204:from]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[freebsd-current@freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:14618, ipnet:54.86.0.0/16, country:US]; ARC_NA(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; RCPT_COUNT_ONE(0.00)[1]; FROM_HAS_DN(0.00)[]; FREEFALL_USER(0.00)[cperciva]; MID_RHS_MATCH_FROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DMARC_NA(0.00)[freebsd.org]; TO_DN_NONE(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all]; TO_DOM_EQ_FROM_DOM(0.00)[] X-ThisMailContainsUnwantedMimeParts: N >> On Mon, 24 Oct 2022 at 22:11, void wrote: >>> this started appearing in dmesg >>> >>> ns8250: UART FCR is broken >>> ns8250: UART FCR is broken For the list: While I was correct that bhyve didn't emulate FCR_XMT_RST, this warning was actually caused by a bug in my earlier commit. It should be fixed now: > commit 5ad8c32c722b58da4c153f241201af51b11f3152 > Author: Colin Percival > AuthorDate: 2022-10-28 04:42:44 +0000 > Commit: Colin Percival > CommitDate: 2022-10-28 19:20:28 +0000 > > ns8250: Fix sense of LSR_TEMT FCR check > > When flushing the UART, we need to drain manually if LSR_TEMT is > *not* asserted, aka. if the transmit FIFO is not empty. > > Reported by: void > Fixes: c4b68e7e53bb "ns8250: Check if flush via FCR succeeded" > Differential Revision: https://reviews.freebsd.org/D37185 -- Colin Percival Security Officer Emeritus, FreeBSD | The power to serve Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid