From patchwork Mon Sep 14 17:36:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tobias Diedrich X-Patchwork-Id: 297004 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5A095C43461 for ; Mon, 14 Sep 2020 17:36:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0665820732 for ; Mon, 14 Sep 2020 17:36:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ffMCqrPE" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726011AbgINRgh (ORCPT ); Mon, 14 Sep 2020 13:36:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38794 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725990AbgINRgc (ORCPT ); Mon, 14 Sep 2020 13:36:32 -0400 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 39146C06174A for ; Mon, 14 Sep 2020 10:36:32 -0700 (PDT) Received: by mail-wr1-x42d.google.com with SMTP id g4so539701wrs.5 for ; Mon, 14 Sep 2020 10:36:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mime-version:content-disposition; bh=0jt/+aSyhg5ihvcDZ3XfwyTyutSv3odQ9jd9Uwy0IRw=; b=ffMCqrPEEFlimFK/y9l3PrbQ1xF0Zvdc1M4r8aNSYNQvgYb9Y9wbWBONq1mngiiawt oda3FZCc1bxY55DGsLOYnBwJW4S+/cJgXbF3+2RBWDPpCbERVQnDdCLlYs800mZgDETd /rrjUGCMi2G6ym0M2VlPXp0D1V81bbwjA5jEDH+Fj/vuqoTeNJ7NEWhzguPgpeXMgQ3A xja01xZjOSCEymVMVSNqXc+6EFdd0qBjvcgnNAtG5H1pcJt6GrfyUI8bAqM62s0yfBUd Odkg3nmCCCKU1Z0+Eg/lWTt+RYnJ7hYg4sdZL/e90zQ1BF1+WvKuAVzPpryCXiFeEnrW yfkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition; bh=0jt/+aSyhg5ihvcDZ3XfwyTyutSv3odQ9jd9Uwy0IRw=; b=X1w2s3swe15gVUDomb6ly83y2jZ+XteHefVus7fi2Wyg1MCggi6liHSx90w6a+BFsP R8KKOUxGV1oaIxmAlwgaVyFEwokfvys4UF7wym9RupMhW8MzRfmu30kEdj5wbxTRMINI 4RRAvX4Sx9osJjHD8E8oE3rtd0F4yk51FEty/On1+pDQJCaVZhuwJBzOafrvYFXeqgNf GIFN17O/T7nRggIpIM5zoReVc0KwSlP+Uv83rPc/XTWP54J+Q3U5BmZ2SJu7XWCqSuA1 M4YV3Ib5qSdqsl367CekSW21Ej7CPngyUB90FXNc7b5ACdO/8UxjgrVMMR1CXo+f0/1h L64A== X-Gm-Message-State: AOAM530lkVXiq1yAFLwvsu3tHtG0YfDM+9xkAcr/e+Qmo6DnLTynbIsU I01ui7XRqZkLrHyUW+VE5XA6AzPsFjdBtA== X-Google-Smtp-Source: ABdhPJyMNn7bShKupin/1JW7unBk+RHqW9UF2vR8+J3Zbf1YClzl2EKOwn9U7QxyHO/sP023K6r24Q== X-Received: by 2002:a5d:5042:: with SMTP id h2mr17314047wrt.409.1600104990876; Mon, 14 Sep 2020 10:36:30 -0700 (PDT) Received: from yamamaya.is-a-geek.org (212-51-140-49.fiber7.init7.net. [212.51.140.49]) by smtp.gmail.com with ESMTPSA id n3sm3537529wmn.39.2020.09.14.10.36.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Sep 2020 10:36:30 -0700 (PDT) Date: Mon, 14 Sep 2020 19:36:28 +0200 From: Tobias Diedrich To: Greg Kroah-Hartman , linux-serial@vger.kernel.org Subject: PATCH: serial: 8250_pci: Add Realtek 816a and 816b Message-ID: <20200914173628.GA22508@yamamaya.is-a-geek.org> MIME-Version: 1.0 Content-Disposition: inline Sender: linux-serial-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org 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- --- drivers/tty/serial/8250/8250_pci.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c index 3eb2d485eaeb..55bb7b897d97 100644 --- 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_tbl[] = { 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 },