Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3287720pxk; Mon, 21 Sep 2020 09:45:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJypgXvafDsLr9FyIwR9hxQGCJEu+FwkrcBsyygQq+CBYTJ0dp7ZOMcTZTjl45dmaIowfcAi X-Received: by 2002:aa7:c347:: with SMTP id j7mr550048edr.185.1600706722971; Mon, 21 Sep 2020 09:45:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600706722; cv=none; d=google.com; s=arc-20160816; b=PtT967lr5X/3xDDWweHE0j2Pv25qqCypSW1JweIRtSPkTAhwf1OZi96WYTWJI+LQqS ZVWZ7h0s/GGA0NwUN2xvjwFC9aXabLh6PtlFFoUogoVzpsDZZATFHhN2ZOfZPLUjZOnl 2sICRH82jR/DQwZslERf7YDjCb8jlsHsJ/XgoOZqMcNMszwpcIf10vKfHpwSvairqTcI q7DDt4eN8YXG+e1neWl81xcvDOBMNKtja3t2dNllT7DgvQrJd+vjtaXO3znpqDozCgB/ Ytv7yDRRAU0eJYt+0fLh4Zyt0whM1m8iw8L+ZDn+a6aZfkJZhkuAfMk9kJZQDVUWsVxp RdRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=aRjLDRsIbcOrILhQu/y4pJvMmV+SVCI2ngvRJ/snRNY=; b=PcTH1iA59eKoL/Tr2W2Xa5Iw9pijjC4dNlBhXsMm2xEGm5UxVVByhm4ce7lvoZ23yq H5A/jXUzfLqd1ocnnZhrR+jbtZ4RrdnRPJL2k0hJL2F7dpvV87OmznJbdrdtm6qxIMpz PjHYxMGQ3U4PSROXHC2yxwKmnukxJe1Hno9gWftq+8GwofrAiEjANZtJ4briF0qAZNWj Y+QUPryNkJmPOOpEeyHuo3pb6Kz0ZIRPQ9tkYkF9gwRGXhp4Sl42bXkWev9thMahbnX/ 8EdszziASDRuEVDvn5j7XHT0bFXhpyvGGROXlb0FEsoxvZLis8CVovAMbJk4vy6chReR fnkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=HmUzAKpp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d15si8689406ejr.178.2020.09.21.09.44.58; Mon, 21 Sep 2020 09:45:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=HmUzAKpp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729407AbgIUQlE (ORCPT + 99 others); Mon, 21 Sep 2020 12:41:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:43514 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729356AbgIUQkg (ORCPT ); Mon, 21 Sep 2020 12:40:36 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 57845206DC; Mon, 21 Sep 2020 16:40:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600706435; bh=poiixR4animJ/XwiqEJ7P+19+f3quN0zfv/0mYgbqpY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HmUzAKppVrYggFa/njK62Q1dOOqry1BwIP4ntxAE58uXtAmwKUAKuvrNhCbQx2Bq6 XMZ0OpGhSTA+fW3AOq+mwT2ZdSs1qLrG4OiJiDpHybNmO123EI7dk3bP+Lg8GGZq8O 6rmwOTjyZ9YPtAkY3MVLXtTnzIBreMFqrmMdVv+I= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tobias Diedrich Subject: [PATCH 4.14 91/94] serial: 8250_pci: Add Realtek 816a and 816b Date: Mon, 21 Sep 2020 18:28:18 +0200 Message-Id: <20200921162039.730571604@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200921162035.541285330@linuxfoundation.org> References: <20200921162035.541285330@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tobias Diedrich commit 3c5a87be170aba8ac40982182f812dcff6ed1ad1 upstream. These serial ports are exposed by the OOB-management-engine on RealManage-enabled network cards (e.g. AMD DASH enabled systems using Realtek cards). Because these have 3 BARs, they fail the "num_iomem <= 1" check in serial_pci_guess_board. I've manually checked the two IOMEM regions and BAR 2 doesn't seem to respond to reads, but BAR 4 seems to be an MMIO version of the IO ports (untested). With this change, the ports are detected: 0000:02:00.1: ttyS0 at I/O 0x2200 (irq = 82, base_baud = 115200) is a 16550A 0000:02:00.2: ttyS1 at I/O 0x2100 (irq = 55, base_baud = 115200) is a 16550A lspci output: 02:00.1 0700: 10ec:816a (rev 0e) (prog-if 02 [16550]) Subsystem: 17aa:5082 Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort+ SERR- Cc: stable Link: https://lore.kernel.org/r/20200914173628.GA22508@yamamaya.is-a-geek.org Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/8250/8250_pci.c | 11 +++++++++++ 1 file changed, 11 insertions(+) --- a/drivers/tty/serial/8250/8250_pci.c +++ b/drivers/tty/serial/8250/8250_pci.c @@ -5247,6 +5247,17 @@ static const struct pci_device_id serial PCI_ANY_ID, PCI_ANY_ID, 0, 0, pbn_wch384_4 }, + /* + * Realtek RealManage + */ + { PCI_VENDOR_ID_REALTEK, 0x816a, + PCI_ANY_ID, PCI_ANY_ID, + 0, 0, pbn_b0_1_115200 }, + + { PCI_VENDOR_ID_REALTEK, 0x816b, + PCI_ANY_ID, PCI_ANY_ID, + 0, 0, pbn_b0_1_115200 }, + /* Fintek PCI serial cards */ { PCI_DEVICE(0x1c29, 0x1104), .driver_data = pbn_fintek_4 }, { PCI_DEVICE(0x1c29, 0x1108), .driver_data = pbn_fintek_8 },