Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3303379pxk; Mon, 21 Sep 2020 10:07:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyV/VlV19OJJADjP9qEc2zuiLdwmrAC0/apr8iWBfdnqcvNqZHpArRv0eVOy8prlbBiAhvB X-Received: by 2002:a05:6402:3050:: with SMTP id bu16mr611234edb.343.1600708027770; Mon, 21 Sep 2020 10:07:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600708027; cv=none; d=google.com; s=arc-20160816; b=Iu8L425DbipaEmZ0Yja6nFKdzTRWh1BRjWHdK+NS6PxdCCPqGQBjFA0sRcs2w4P8Xi 43h4Jb5ZVvp/2NDnBzM8Uskz8JBjEGo2pUzu3srWmnvxctbVwfC+aInMuL3MSoZPCo4c t4m1pe/jwz/8Z3Daj7SrymH75tvcPVGLE0TFlI+Evo5S7w3y31P6neJ7l9OwouNqrKYy wZ7Bc9Bu06m9ePmqFaM9Mq5B7kkwf7fEZNqFbtpPrBIExz8qc612hxDZcgENcCjobaNJ MCybpt3TZhJFhRO8MXtWhnTjgzYIbi23NDh9tBhYsH9AvgkQGOlbNUB1j8/TRAIpbWp0 Ehog== 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=WUg2ti+L18+Nq9k74hhZJatUeKU1jNio2C/yB+A4Zkg=; b=LxA6Q0FvP9DLCYrrliSlYg9okyWE+tecbi+/Ih0VnO+1GZAK+9yuGSD7bxSVp3B6T9 yBXA53Ud8Np9v6qy4QCYJlrBWfbk7mk80DQy9ZgpWYqZGMGBVxxZP0UL9cxN22NJ/C5P 5Xv5qQ8hlpYmk6AVD8ftH5OgYYpo1aySgrX0S52qmx2MvtJn2YIGOuNW7efqgLEn8YiS Btzz2lBZjn0clP78NrHeJsr36VPZOh5x44FtyqRCWFb9ajFE3LrGxG0RhWdHhsT74/aW QcWONdu7TSCOn9x053jJjpkcggX6EeiEEPjAFtzQU3NPASZO+IBzfu39IjGt1+tP5XtH hISg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="cr/sn+6W"; 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 mb19si8637316ejb.589.2020.09.21.10.06.44; Mon, 21 Sep 2020 10:07:07 -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="cr/sn+6W"; 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 S1729639AbgIURFq (ORCPT + 99 others); Mon, 21 Sep 2020 13:05:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:59824 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726886AbgIUQdf (ORCPT ); Mon, 21 Sep 2020 12:33:35 -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 BE0C12396F; Mon, 21 Sep 2020 16:33:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600706014; bh=WDhNPPEYNtmQ25KI64ic4H434rTkrIJzlLjK2327UWU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cr/sn+6WZrYD5T63nXxVvAmGLlgAz9ggHPynb0Fcb9lySnwt+aYFcCT2fTecOoYoP jfGz7cZR2oc1GMfe0SG2D65chx3ph8ogBaNyqvZdIM/QAnYolHPWYL0IwND8Wp1dRw zQy2UU+TGSjd6Tu50WA0zM3sv+/uI2LTsNEce21c= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tobias Diedrich Subject: [PATCH 4.4 43/46] serial: 8250_pci: Add Realtek 816a and 816b Date: Mon, 21 Sep 2020 18:27:59 +0200 Message-Id: <20200921162035.255862443@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200921162033.346434578@linuxfoundation.org> References: <20200921162033.346434578@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 @@ -5904,6 +5904,17 @@ static struct pci_device_id serial_pci_t 0, 0, pbn_exar_XR17V358 }, + /* + * 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 },