From nobody Thu Apr 16 20:17:03 2026 X-Original-To: dev-commits-src-main@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 4fxTnb1bjgz6ZYlc; Thu, 16 Apr 2026 20:17:07 +0000 (UTC) (envelope-from markj@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fxTnZ69FVz44tp; Thu, 16 Apr 2026 20:17:06 +0000 (UTC) (envelope-from markj@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776370626; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=y82ULl9BGmOL4tZCi2ADs7hceo/iLX6iui0zXncto9M=; b=Hnz1cdKu+hcyp61NFssKC8PLSJhorIawk+S6/W3tJ5MO5VS7jsx0/sPPEDKLznKCLv0Wez kpG8m18rI2aBl5xoXAScwhaM3mVtNXYGnjMISRxxQ85j58CtiLOMbuylki0VuJ+59eggbZ ZLBKMNdjEW3Q9Q5y/QgWa0huWlVIxiLiqivkv2Gp7dcviOQPYqdcZoxyysKEtDg7Vz+FVM DBD3am61jdzqw4PKJ8HSBP7ADONv+4bb99WaWF5XFJv0HBTcoRatu3dugmB7KrbUuJGsKA vdWyv+4eP6G94p2SumarCrwTbaeDbqr4rU9R/tkFxs+FKDI0/jrSEVAkvtOlyA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776370626; a=rsa-sha256; cv=none; b=b+JUnpQiRzvao8NTOVKXASkb6CEtHgwTxdBb99wyoiI6521hBiz1g2lYKkeL17dIsZjjmE FZR6Hkyb8jaA0/oTc1pUyg9xGMUuYf7nkym9Z2yP/rUxZBo3YeT1mAkl0gwFjdS9AZ0J2p rh6ZRoFp8oHOj7IZqPb7ytyHeRIkfZKBuNNNQyluU+ZDmTvmDXABCW+fbEa06ryGBilxOm wg7sAIsZDi2vJ9L/XIUKz14DKhUMwlKAEZAjWlB6ti1c2DvK8zSnCO9fXpnn1ywFyjHwIL igF4u3RIYke+veJvkFVAXtbO5uUNnba4w/ycjVo3RIgU3y9L5JVsB/BgEGVetQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776370626; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=y82ULl9BGmOL4tZCi2ADs7hceo/iLX6iui0zXncto9M=; b=WFRcgrikKQp/6XprBV91KWoKMaRnOR5FMvrWwtyKtabudRVYrENeXoyT52xIoU08Zd2kQv hleozZrvrKjkY0nmztTFHfeMxtzvyefTUQ8K1YN3quC/pjaXPGpLG2iCP4UZCGGyJIlTOZ 1TQvgH4wfxNg1gX6gVMTwtdGHNIpjM8SSa7zfWBmnf8PpdgDCn72052yaW50kfXl8EeR3g MyA7gcTpYMsMEvi52ZJrAtpH4E0B9xyjKGGDjiW1TvbbiyqzUgVg9nbvkW9oHYUXcFPlkI wrsG3AaJto7vIdT+k+KZ3b23YMk3K3+P1GIRR2LGGxOwVhHOjqPL7dInoYAC5w== Received: from nuc (192-0-220-237.cpe.teksavvy.com [192.0.220.237]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: markj) by smtp.freebsd.org (Postfix) with ESMTPSA id 4fxTnZ3M0JzFFp; Thu, 16 Apr 2026 20:17:06 +0000 (UTC) (envelope-from markj@freebsd.org) Date: Thu, 16 Apr 2026 16:17:03 -0400 From: Mark Johnston To: Roger Pau =?iso-8859-1?Q?Monn=E9?= Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, imp@freebsd.org Subject: Re: git: 1491fe8f864a - main - uart/pci: support 16550A PCI serial devices Message-ID: References: <69c640e1.1fc2b.4542bc24@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <69c640e1.1fc2b.4542bc24@gitrepo.freebsd.org> On Fri, Mar 27, 2026 at 08:33:37AM +0000, Roger Pau Monné wrote: > The branch main has been updated by royger: > > URL: https://cgit.FreeBSD.org/src/commit/?id=1491fe8f864af5af37e83f1d12459905fb6097fd > > commit 1491fe8f864af5af37e83f1d12459905fb6097fd > Author: Roger Pau Monné > AuthorDate: 2026-03-26 10:01:57 +0000 > Commit: Roger Pau Monné > CommitDate: 2026-03-27 08:26:32 +0000 > > uart/pci: support 16550A PCI serial devices > > Expand the current check to also attach the ns8250 driver to devices > reporting as 16550A. This has been tested to work on a real device. > > From an inspection of the code in the ns8250 driver it seems like it should > support up to 16950A devices, but I don't have hardware to ensure that, > hence be conservative with the change. I have a system which hangs in uart_bus_probe() after this change. It has a 2-port UART PCI card installed: puc0@pci0:6:0:0: class=0x070002 rev=0x00 hdr=0x00 vendor=0x1415 device=0xc158 subvendor=0x1415 subdevice=0xc158 vendor = 'Oxford Semiconductor Ltd' device = 'OXPCIe952 Dual Native 950 UART' class = simple comms subclass = UART Normally puc(4) attaches to it and creates two child uart devices: puc0 Interrupt request lines: 0x11 pcib7 memory window: 0x84000000-0x841fffff 0x84200000-0x843fffff 0x84400000-0x84403fff uart2 puc0 I/O memory mapping: 0x84401000-0x844011ff puc0 port numbers: 0x1 uart3 puc0 I/O memory mapping: 0x84401200-0x844013ff puc0 port numbers: 0x2 After this change, though, uart(4) tries to probe the device directly and hangs. Presumably we still want to exclude at least multi-port devices here? > MFC: 2 weeks > Reviewed by: imp > Differential revision: https://reviews.freebsd.org/D56095 > --- > sys/dev/uart/uart_bus_pci.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/sys/dev/uart/uart_bus_pci.c b/sys/dev/uart/uart_bus_pci.c > index 22af8ee8663c..7087958cbfa9 100644 > --- a/sys/dev/uart/uart_bus_pci.c > +++ b/sys/dev/uart/uart_bus_pci.c > @@ -297,7 +297,7 @@ uart_pci_probe(device_t dev) > } > if (pci_get_class(dev) == PCIC_SIMPLECOMM && > pci_get_subclass(dev) == PCIS_SIMPLECOMM_UART && > - pci_get_progif(dev) < PCIP_SIMPLECOMM_UART_16550A) { > + pci_get_progif(dev) <= PCIP_SIMPLECOMM_UART_16550A) { > /* XXX rclk what to do */ > id = &cid; > sc->sc_class = &uart_ns8250_class; >