Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3289407pxk; Mon, 21 Sep 2020 09:47:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwAg6YecSaOlcPhkUDTIB/qdrsaBc2QzYWsGSLZHxvDS5Q98iQvDNLfehtD4d/hivDQ5QZe X-Received: by 2002:a17:906:bcd5:: with SMTP id lw21mr346855ejb.430.1600706874454; Mon, 21 Sep 2020 09:47:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600706874; cv=none; d=google.com; s=arc-20160816; b=oc/mb6zaSG1qvKTLHTusvTQ4PcFOqwLf6DS1lsDkgAWT2PIszNQ0FzoSa47jcBEsYY NA1KJElKZua2JOklbVtnx4Jc0EzSa4PjzWcKC0YADHfTwwZrcZbq7NE59glcrIt/tRu8 4nQ662f2X0XKW0yP25wAqJphdsf8uzKRlIJveh9ICCmse7aquqbxdR7kqG9ve3aGacwq 1ENg/k+2ICGbKO8paQWfGf9oAgtnck7CzEtgJ+clJxipvS40s8eB4oX++lxZn+X2L5Oa CV/Vciwl0aVEUoX9ePp8hO36dIBy7JnQHIPZJAcobh7NNBBJ/n/BexQtnuAY88ZMMvIK XOZg== 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=VK8bu263U97Tr0xaiSTSbj2NN2i5pEixY+InbhIEetI=; b=a1QfSBQK2VexmqrWODM1+XUDdOYykItoPZ2N9LnScxcoeC7AGYcnPlJK8/m8Oh3nNX sqQ+kK1TwIAxqe7T9bhwxghO8SbaDpB1kOAQOtLgrWKZcljfJCgtnj+OJy6WB3Bt8eI3 8d8UF/KUQZOkHLnM3fmO0xMzwuf3M/iboB032yIJwkXVA6VMJbycschFBIXLYiYL2Nag wKmEklpcXLL7NuAj6XYmTTcu2OtrCB49llM48GWnxh7aSD3ajiE9S2kcDl3SY0oSxTlS Ua106nSf83RbKC89cAxbkk1SfSqPeOzlHnwri3l/9U6CvDCCo25KqA45jtG5N+V32quM rlag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=TfAAr8L9; 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 ox9si8543736ejb.97.2020.09.21.09.47.30; Mon, 21 Sep 2020 09:47:54 -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=TfAAr8L9; 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 S1729396AbgIUQqk (ORCPT + 99 others); Mon, 21 Sep 2020 12:46:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:53014 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727317AbgIUQqi (ORCPT ); Mon, 21 Sep 2020 12:46:38 -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 F198A2388B; Mon, 21 Sep 2020 16:46:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600706797; bh=tEhWqY7fWe6KsUtgThma0+0N5gZo+SotkZzA/3BgOgE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TfAAr8L9JhNXLfuJkfeY/2GwS07qyGjPhWEmj8+yQ/mxHRDqfn4j00DTIfPznxBh9 rbQZEpqI7OTOYQIDOCwvovVre+1zEsemaeqB2bxFdFgKuHa3qdS8LSjHdW+0KuZ7iJ eEo3JEONO524hybNY8dPEhW8KcqjCiBwjgrfj3Ks= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tobias Diedrich Subject: [PATCH 5.8 099/118] serial: 8250_pci: Add Realtek 816a and 816b Date: Mon, 21 Sep 2020 18:28:31 +0200 Message-Id: <20200921162040.972972356@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200921162036.324813383@linuxfoundation.org> References: <20200921162036.324813383@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 @@ -5566,6 +5566,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 },