From owner-svn-src-stable@freebsd.org Fri Feb 21 04:29:51 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 23B78250E3F; Fri, 21 Feb 2020 04:29:51 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Nz5B73ttz474M; Fri, 21 Feb 2020 04:29:50 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E30CA52F6; Fri, 21 Feb 2020 04:29:50 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01L4TosI062720; Fri, 21 Feb 2020 04:29:50 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01L4ToDv062719; Fri, 21 Feb 2020 04:29:50 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202002210429.01L4ToDv062719@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 21 Feb 2020 04:29:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r358201 - stable/12/sys/dev/ntb/ntb_hw X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/dev/ntb/ntb_hw X-SVN-Commit-Revision: 358201 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Feb 2020 04:29:51 -0000 Author: mav Date: Fri Feb 21 04:29:50 2020 New Revision: 358201 URL: https://svnweb.freebsd.org/changeset/base/358201 Log: MFC r357920: Add support for Hygon NTB PCI device in ntb_hw_amd driver. Modified: stable/12/sys/dev/ntb/ntb_hw/ntb_hw_amd.c stable/12/sys/dev/ntb/ntb_hw/ntb_hw_amd.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/ntb/ntb_hw/ntb_hw_amd.c ============================================================================== --- stable/12/sys/dev/ntb/ntb_hw/ntb_hw_amd.c Fri Feb 21 04:29:07 2020 (r358200) +++ stable/12/sys/dev/ntb/ntb_hw/ntb_hw_amd.c Fri Feb 21 04:29:50 2020 (r358201) @@ -101,6 +101,16 @@ static const struct amd_ntb_hw_info amd_ntb_hw_info_li .msix_vector_count = 24, .quirks = 0, .desc = "AMD Non-Transparent Bridge"}, + + { .vendor_id = NTB_HW_HYGON_VENDOR_ID, + .device_id = NTB_HW_HYGON_DEVICE_ID1, + .mw_count = 3, + .bar_start_idx = 1, + .spad_count = 16, + .db_count = 16, + .msix_vector_count = 24, + .quirks = QUIRK_MW0_32BIT, + .desc = "Hygon Non-Transparent Bridge"}, }; static const struct pci_device_table amd_ntb_devs[] = { @@ -109,7 +119,10 @@ static const struct pci_device_table amd_ntb_devs[] = PCI_DESCR("AMD Non-Transparent Bridge") }, { PCI_DEV(NTB_HW_AMD_VENDOR_ID, NTB_HW_AMD_DEVICE_ID2), .driver_data = (uintptr_t)&amd_ntb_hw_info_list[1], - PCI_DESCR("AMD Non-Transparent Bridge") } + PCI_DESCR("AMD Non-Transparent Bridge") }, + { PCI_DEV(NTB_HW_HYGON_VENDOR_ID, NTB_HW_HYGON_DEVICE_ID1), + .driver_data = (uintptr_t)&amd_ntb_hw_info_list[0], + PCI_DESCR("Hygon Non-Transparent Bridge") } }; static unsigned g_amd_ntb_hw_debug_level; Modified: stable/12/sys/dev/ntb/ntb_hw/ntb_hw_amd.h ============================================================================== --- stable/12/sys/dev/ntb/ntb_hw/ntb_hw_amd.h Fri Feb 21 04:29:07 2020 (r358200) +++ stable/12/sys/dev/ntb/ntb_hw/ntb_hw_amd.h Fri Feb 21 04:29:50 2020 (r358201) @@ -51,6 +51,9 @@ #define NTB_HW_AMD_DEVICE_ID1 0x145B #define NTB_HW_AMD_DEVICE_ID2 0x148B +#define NTB_HW_HYGON_VENDOR_ID 0x19D4 +#define NTB_HW_HYGON_DEVICE_ID1 0x145B + #define NTB_DEF_PEER_CNT 1 #define NTB_DEF_PEER_IDX 0