From owner-svn-src-stable@freebsd.org Sun Mar 1 18:02:00 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 96797247655; Sun, 1 Mar 2020 18:02:00 +0000 (UTC) (envelope-from scottl@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 48Vrh83Yrdz43x8; Sun, 1 Mar 2020 18:02:00 +0000 (UTC) (envelope-from scottl@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 74EA9771C; Sun, 1 Mar 2020 18:02:00 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 021I20wR099268; Sun, 1 Mar 2020 18:02:00 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 021I20Io099267; Sun, 1 Mar 2020 18:02:00 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <202003011802.021I20Io099267@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Sun, 1 Mar 2020 18:02:00 +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: r358489 - stable/12/sys/cam/ata X-SVN-Group: stable-12 X-SVN-Commit-Author: scottl X-SVN-Commit-Paths: stable/12/sys/cam/ata X-SVN-Commit-Revision: 358489 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: Sun, 01 Mar 2020 18:02:00 -0000 Author: scottl Date: Sun Mar 1 18:02:00 2020 New Revision: 358489 URL: https://svnweb.freebsd.org/changeset/base/358489 Log: Add a quirk for the WDC Green series of SSDs to disable NCQ TRIM, as this avoids silent data corruption. PR: 225666 Submitted by: anders lundgren Modified: stable/12/sys/cam/ata/ata_da.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cam/ata/ata_da.c ============================================================================== --- stable/12/sys/cam/ata/ata_da.c Sun Mar 1 17:46:28 2020 (r358488) +++ stable/12/sys/cam/ata/ata_da.c Sun Mar 1 18:02:00 2020 (r358489) @@ -782,6 +782,11 @@ static struct ada_quirk_entry ada_quirk_table[] = /*quirks*/ADA_Q_SMR_DM }, { + /* WD Green SSD */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "WDC WDS?????G0*", "*" }, + /*quirks*/ADA_Q_4K | ADA_Q_NCQ_TRIM_BROKEN + }, + { /* Default */ { T_ANY, SIP_MEDIA_REMOVABLE|SIP_MEDIA_FIXED, From owner-svn-src-stable@freebsd.org Sun Mar 1 18:03:09 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 B78BD2477BE; Sun, 1 Mar 2020 18:03:09 +0000 (UTC) (envelope-from scottl@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 48VrjT4DwZz44Xd; Sun, 1 Mar 2020 18:03:09 +0000 (UTC) (envelope-from scottl@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 8C968775D; Sun, 1 Mar 2020 18:03:09 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 021I39U3000850; Sun, 1 Mar 2020 18:03:09 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 021I39WZ000849; Sun, 1 Mar 2020 18:03:09 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <202003011803.021I39WZ000849@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Sun, 1 Mar 2020 18:03:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r358490 - stable/11/sys/cam/ata X-SVN-Group: stable-11 X-SVN-Commit-Author: scottl X-SVN-Commit-Paths: stable/11/sys/cam/ata X-SVN-Commit-Revision: 358490 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: Sun, 01 Mar 2020 18:03:09 -0000 Author: scottl Date: Sun Mar 1 18:03:09 2020 New Revision: 358490 URL: https://svnweb.freebsd.org/changeset/base/358490 Log: Add a quirk for the WDC Green series of SSDs to disable NCQ TRIM, as this avoids silent data corruption. PR: 225666 Submitted by: anders lundgren Modified: stable/11/sys/cam/ata/ata_da.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cam/ata/ata_da.c ============================================================================== --- stable/11/sys/cam/ata/ata_da.c Sun Mar 1 18:02:00 2020 (r358489) +++ stable/11/sys/cam/ata/ata_da.c Sun Mar 1 18:03:09 2020 (r358490) @@ -776,6 +776,11 @@ static struct ada_quirk_entry ada_quirk_table[] = /*quirks*/ADA_Q_SMR_DM }, { + /* WD Green SSD */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "WDC WDS?????G0*", "*" }, + /*quirks*/ADA_Q_4K | ADA_Q_NCQ_TRIM_BROKEN + }, + { /* Default */ { T_ANY, SIP_MEDIA_REMOVABLE|SIP_MEDIA_FIXED, From owner-svn-src-stable@freebsd.org Mon Mar 2 02:44:22 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 AD3AC256AE7; Mon, 2 Mar 2020 02:44:22 +0000 (UTC) (envelope-from philip@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 48W4Gt3DCbz3yQB; Mon, 2 Mar 2020 02:44:22 +0000 (UTC) (envelope-from philip@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 BB405DA89; Mon, 2 Mar 2020 02:44:21 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0222iLv2016174; Mon, 2 Mar 2020 02:44:21 GMT (envelope-from philip@FreeBSD.org) Received: (from philip@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0222iLTm016173; Mon, 2 Mar 2020 02:44:21 GMT (envelope-from philip@FreeBSD.org) Message-Id: <202003020244.0222iLTm016173@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: philip set sender to philip@FreeBSD.org using -f From: Philip Paeps Date: Mon, 2 Mar 2020 02:44:21 +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: r358513 - in stable/12/usr.sbin/bsdconfig: include share/media X-SVN-Group: stable-12 X-SVN-Commit-Author: philip X-SVN-Commit-Paths: in stable/12/usr.sbin/bsdconfig: include share/media X-SVN-Commit-Revision: 358513 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: Mon, 02 Mar 2020 02:44:22 -0000 Author: philip Date: Mon Mar 2 02:44:21 2020 New Revision: 358513 URL: https://svnweb.freebsd.org/changeset/base/358513 Log: MFC r358418: bsdconfig: remove the Italian mirror ftp.it.FreeBSD.org has been down for several years. PR: 244481 Reported by: xgeoplasma6@gmail.com Modified: stable/12/usr.sbin/bsdconfig/include/messages.subr stable/12/usr.sbin/bsdconfig/share/media/ftp.subr Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/bsdconfig/include/messages.subr ============================================================================== --- stable/12/usr.sbin/bsdconfig/include/messages.subr Mon Mar 2 02:36:41 2020 (r358512) +++ stable/12/usr.sbin/bsdconfig/include/messages.subr Mon Mar 2 02:44:21 2020 (r358513) @@ -201,7 +201,6 @@ msg_ipv6_ready="IPv6 ready" msg_irc_desc="Internet Relay Chat utilities." msg_ireland="Ireland" msg_israel="Israel" -msg_italy="Italy" msg_japan="Japan" msg_japanese_desc="Ported software for the Japanese market." msg_java_desc="Java language support." Modified: stable/12/usr.sbin/bsdconfig/share/media/ftp.subr ============================================================================== --- stable/12/usr.sbin/bsdconfig/share/media/ftp.subr Mon Mar 2 02:36:41 2020 (r358512) +++ stable/12/usr.sbin/bsdconfig/share/media/ftp.subr Mon Mar 2 02:44:21 2020 (r358513) @@ -127,7 +127,6 @@ f_dialog_menu_media_ftp() ' $msg_greece #2' 'ftp2.gr.freebsd.org' '$msg_ireland' 'ftp3.ie.freebsd.org' '$msg_israel' 'ftp.il.freebsd.org' - '$msg_italy' 'ftp.it.freebsd.org' '$msg_japan' 'ftp.jp.freebsd.org' ' $msg_japan #2' 'ftp2.jp.freebsd.org' ' $msg_japan #3' 'ftp3.jp.freebsd.org' From owner-svn-src-stable@freebsd.org Mon Mar 2 02:45:53 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 657DB256BB3; Mon, 2 Mar 2020 02:45:53 +0000 (UTC) (envelope-from philip@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 48W4Jd1VFrz42qN; Mon, 2 Mar 2020 02:45:53 +0000 (UTC) (envelope-from philip@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 1540FDA8F; Mon, 2 Mar 2020 02:45:53 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0222jqoJ016308; Mon, 2 Mar 2020 02:45:52 GMT (envelope-from philip@FreeBSD.org) Received: (from philip@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0222jquk016307; Mon, 2 Mar 2020 02:45:52 GMT (envelope-from philip@FreeBSD.org) Message-Id: <202003020245.0222jquk016307@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: philip set sender to philip@FreeBSD.org using -f From: Philip Paeps Date: Mon, 2 Mar 2020 02:45:52 +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: r358514 - stable/12/usr.sbin/bsdinstall/scripts X-SVN-Group: stable-12 X-SVN-Commit-Author: philip X-SVN-Commit-Paths: stable/12/usr.sbin/bsdinstall/scripts X-SVN-Commit-Revision: 358514 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: Mon, 02 Mar 2020 02:45:53 -0000 Author: philip Date: Mon Mar 2 02:45:52 2020 New Revision: 358514 URL: https://svnweb.freebsd.org/changeset/base/358514 Log: MFC r358419: bsdinstall: remove the Italian mirror ftp.it.FreeBSD.org has been down for several years. PR: 244481 Reported by: xgeoplasma6@gmail.com Modified: stable/12/usr.sbin/bsdinstall/scripts/mirrorselect Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/bsdinstall/scripts/mirrorselect ============================================================================== --- stable/12/usr.sbin/bsdinstall/scripts/mirrorselect Mon Mar 2 02:44:21 2020 (r358513) +++ stable/12/usr.sbin/bsdinstall/scripts/mirrorselect Mon Mar 2 02:45:52 2020 (r358514) @@ -89,7 +89,6 @@ MIRROR=`dialog --backtitle "FreeBSD Installer" \ ftp://ftp2.gr.freebsd.org "Greece #2"\ ftp://ftp3.ie.freebsd.org "Ireland #3"\ ftp://ftp.il.freebsd.org "Israel"\ - ftp://ftp.it.freebsd.org "Italy"\ ftp://ftp.jp.freebsd.org "Japan"\ ftp://ftp2.jp.freebsd.org "Japan #2"\ ftp://ftp3.jp.freebsd.org "Japan #3"\ From owner-svn-src-stable@freebsd.org Mon Mar 2 02:47:12 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 F20D5256CA9; Mon, 2 Mar 2020 02:47:12 +0000 (UTC) (envelope-from philip@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 48W4L84CXZz45hr; Mon, 2 Mar 2020 02:47:12 +0000 (UTC) (envelope-from philip@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 53A6CDAC0; Mon, 2 Mar 2020 02:47:12 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0222lC6a016482; Mon, 2 Mar 2020 02:47:12 GMT (envelope-from philip@FreeBSD.org) Received: (from philip@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0222lCuI016480; Mon, 2 Mar 2020 02:47:12 GMT (envelope-from philip@FreeBSD.org) Message-Id: <202003020247.0222lCuI016480@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: philip set sender to philip@FreeBSD.org using -f From: Philip Paeps Date: Mon, 2 Mar 2020 02:47:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r358516 - in stable/11/usr.sbin/bsdconfig: include share/media X-SVN-Group: stable-11 X-SVN-Commit-Author: philip X-SVN-Commit-Paths: in stable/11/usr.sbin/bsdconfig: include share/media X-SVN-Commit-Revision: 358516 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: Mon, 02 Mar 2020 02:47:13 -0000 Author: philip Date: Mon Mar 2 02:47:11 2020 New Revision: 358516 URL: https://svnweb.freebsd.org/changeset/base/358516 Log: MFC r358418: bsdconfig: remove the Italian mirror ftp.it.FreeBSD.org has been down for several years. PR: 244481 Reported by: xgeoplasma6@gmail.com Modified: stable/11/usr.sbin/bsdconfig/include/messages.subr stable/11/usr.sbin/bsdconfig/share/media/ftp.subr Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/bsdconfig/include/messages.subr ============================================================================== --- stable/11/usr.sbin/bsdconfig/include/messages.subr Mon Mar 2 02:45:57 2020 (r358515) +++ stable/11/usr.sbin/bsdconfig/include/messages.subr Mon Mar 2 02:47:11 2020 (r358516) @@ -201,7 +201,6 @@ msg_ipv6_ready="IPv6 ready" msg_irc_desc="Internet Relay Chat utilities." msg_ireland="Ireland" msg_israel="Israel" -msg_italy="Italy" msg_japan="Japan" msg_japanese_desc="Ported software for the Japanese market." msg_java_desc="Java language support." Modified: stable/11/usr.sbin/bsdconfig/share/media/ftp.subr ============================================================================== --- stable/11/usr.sbin/bsdconfig/share/media/ftp.subr Mon Mar 2 02:45:57 2020 (r358515) +++ stable/11/usr.sbin/bsdconfig/share/media/ftp.subr Mon Mar 2 02:47:11 2020 (r358516) @@ -127,7 +127,6 @@ f_dialog_menu_media_ftp() ' $msg_greece #2' 'ftp2.gr.freebsd.org' '$msg_ireland' 'ftp3.ie.freebsd.org' '$msg_israel' 'ftp.il.freebsd.org' - '$msg_italy' 'ftp.it.freebsd.org' '$msg_japan' 'ftp.jp.freebsd.org' ' $msg_japan #2' 'ftp2.jp.freebsd.org' ' $msg_japan #3' 'ftp3.jp.freebsd.org' From owner-svn-src-stable@freebsd.org Mon Mar 2 02:47:57 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 C93C3256D32; Mon, 2 Mar 2020 02:47:57 +0000 (UTC) (envelope-from philip@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 48W4M10Fkyz47PS; Mon, 2 Mar 2020 02:47:56 +0000 (UTC) (envelope-from philip@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 D553DDAC5; Mon, 2 Mar 2020 02:47:56 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0222lu5g016578; Mon, 2 Mar 2020 02:47:56 GMT (envelope-from philip@FreeBSD.org) Received: (from philip@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0222luGf016577; Mon, 2 Mar 2020 02:47:56 GMT (envelope-from philip@FreeBSD.org) Message-Id: <202003020247.0222luGf016577@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: philip set sender to philip@FreeBSD.org using -f From: Philip Paeps Date: Mon, 2 Mar 2020 02:47:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r358517 - stable/11/usr.sbin/bsdinstall/scripts X-SVN-Group: stable-11 X-SVN-Commit-Author: philip X-SVN-Commit-Paths: stable/11/usr.sbin/bsdinstall/scripts X-SVN-Commit-Revision: 358517 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: Mon, 02 Mar 2020 02:47:57 -0000 Author: philip Date: Mon Mar 2 02:47:56 2020 New Revision: 358517 URL: https://svnweb.freebsd.org/changeset/base/358517 Log: MFC r358419: bsdinstall: remove the Italian mirror ftp.it.FreeBSD.org has been down for several years. PR: 244481 Reported by: xgeoplasma6@gmail.com Modified: stable/11/usr.sbin/bsdinstall/scripts/mirrorselect Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/bsdinstall/scripts/mirrorselect ============================================================================== --- stable/11/usr.sbin/bsdinstall/scripts/mirrorselect Mon Mar 2 02:47:11 2020 (r358516) +++ stable/11/usr.sbin/bsdinstall/scripts/mirrorselect Mon Mar 2 02:47:56 2020 (r358517) @@ -89,7 +89,6 @@ MIRROR=`dialog --backtitle "FreeBSD Installer" \ ftp://ftp2.gr.freebsd.org "Greece #2"\ ftp://ftp3.ie.freebsd.org "Ireland #3"\ ftp://ftp.il.freebsd.org "Israel"\ - ftp://ftp.it.freebsd.org "Italy"\ ftp://ftp.jp.freebsd.org "Japan"\ ftp://ftp2.jp.freebsd.org "Japan #2"\ ftp://ftp3.jp.freebsd.org "Japan #3"\ From owner-svn-src-stable@freebsd.org Mon Mar 2 07:11:38 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 5446E25C14D; Mon, 2 Mar 2020 07:11:38 +0000 (UTC) (envelope-from dim@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 48WBCG1Yw3z3JM4; Mon, 2 Mar 2020 07:11:38 +0000 (UTC) (envelope-from dim@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 2ECCB18B18; Mon, 2 Mar 2020 07:11:38 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0227Bc0i080142; Mon, 2 Mar 2020 07:11:38 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0227Bb5E080140; Mon, 2 Mar 2020 07:11:37 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202003020711.0227Bb5E080140@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 2 Mar 2020 07:11:37 +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: r358527 - in stable/12: . share/mk X-SVN-Group: stable-12 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable/12: . share/mk X-SVN-Commit-Revision: 358527 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: Mon, 02 Mar 2020 07:11:38 -0000 Author: dim Date: Mon Mar 2 07:11:37 2020 New Revision: 358527 URL: https://svnweb.freebsd.org/changeset/base/358527 Log: MFC r358132: Take LINKER_FREEBSD_VERSION from numerical field after dash Summary: With COMPILER_FREEBSD_VERSION, we use a numeric value that we bump each time we make a change that requires re-bootstrapping, but with the linker variant, we instead take the entire part after "FreeBSD", as in this example version output: LLD 9.0.1 (FreeBSD c1a0a213378a458fbea1a5c77b315c7dce08fd05-1300006) (compatible with GNU linkers) E.g., LINKER_FREEBSD_VERSION is currently being set to "c1a0a213378a458fbea1a5c77b315c7dce08fd05-1300006". This means that *any* new upstream lld version will cause re-bootstrapping. We should only look at the numerical field we append after a dash instead. This review attempts to make it so. The only thing I am not happy about is the post-processing of awk output in Makefile.inc1. I notice that our awk does not have gensub(), so it can't substitute a numbered sub-regex with \1, \2, etc. Suggestions welcome. :) Differential Revision: https://reviews.freebsd.org/D23691 Modified: stable/12/Makefile.inc1 stable/12/share/mk/bsd.linker.mk Directory Properties: stable/12/ (props changed) Modified: stable/12/Makefile.inc1 ============================================================================== --- stable/12/Makefile.inc1 Mon Mar 2 06:35:26 2020 (r358526) +++ stable/12/Makefile.inc1 Mon Mar 2 07:11:37 2020 (r358527) @@ -280,9 +280,10 @@ WANT_LINKER_TYPE= !make(test-system-compiler) .if ${WANT_LINKER_TYPE} == "lld" WANT_LINKER_FREEBSD_VERSION_FILE= lib/clang/include/VCSVersion.inc -WANT_LINKER_FREEBSD_VERSION!= \ +_WANT_LINKER_FREEBSD_VERSION!= \ awk '$$2 == "LLD_REVISION" {gsub(/"/, "", $$3); print $$3}' \ ${SRCDIR}/${WANT_LINKER_FREEBSD_VERSION_FILE} || echo unknown +WANT_LINKER_FREEBSD_VERSION=${_WANT_LINKER_FREEBSD_VERSION:C/.*-(.*)/\1/} WANT_LINKER_VERSION_FILE= lib/clang/include/lld/Common/Version.inc WANT_LINKER_VERSION!= \ awk '$$2 == "LLD_VERSION" {split($$3, a, "."); print a[1] * 10000 + a[2] * 100 + a[3]}' \ Modified: stable/12/share/mk/bsd.linker.mk ============================================================================== --- stable/12/share/mk/bsd.linker.mk Mon Mar 2 06:35:26 2020 (r358526) +++ stable/12/share/mk/bsd.linker.mk Mon Mar 2 07:11:37 2020 (r358527) @@ -63,9 +63,11 @@ _v= ${_ld_version:M[1-9]*.[0-9]*:[1]} .elif ${_ld_version:[1]} == "LLD" ${X_}LINKER_TYPE= lld _v= ${_ld_version:[2]} -${X_}LINKER_FREEBSD_VERSION!= \ - ${${ld}} --version | \ - awk '$$3 ~ /FreeBSD/ {print substr($$4, 1, length($$4)-1)}' +.if ${_ld_version:[3]} == "(FreeBSD" +${X_}LINKER_FREEBSD_VERSION:= ${_ld_version:[4]:C/.*-(.*)\)/\1/} +.else +${X_}LINKER_FREEBSD_VERSION= 0 +.endif .else .warning Unknown linker from ${ld}=${${ld}}: ${_ld_version}, defaulting to bfd ${X_}LINKER_TYPE= bfd From owner-svn-src-stable@freebsd.org Mon Mar 2 07:13:00 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 B302325C347; Mon, 2 Mar 2020 07:13:00 +0000 (UTC) (envelope-from dim@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 48WBDr4MX9z3KdB; Mon, 2 Mar 2020 07:13:00 +0000 (UTC) (envelope-from dim@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 8F10418C93; Mon, 2 Mar 2020 07:13:00 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0227D0HF080337; Mon, 2 Mar 2020 07:13:00 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0227D0ig080336; Mon, 2 Mar 2020 07:13:00 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202003020713.0227D0ig080336@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 2 Mar 2020 07:13:00 +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: r358528 - stable/12/etc/mtree X-SVN-Group: stable-12 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: stable/12/etc/mtree X-SVN-Commit-Revision: 358528 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: Mon, 02 Mar 2020 07:13:00 -0000 Author: dim Date: Mon Mar 2 07:13:00 2020 New Revision: 358528 URL: https://svnweb.freebsd.org/changeset/base/358528 Log: MFC r357929: Remove /usr/include/ssp from BSD.include.dist after r356356 This avoids having to delete it every time with "make delete-old". PR: 242950 Modified: stable/12/etc/mtree/BSD.include.dist Directory Properties: stable/12/ (props changed) Modified: stable/12/etc/mtree/BSD.include.dist ============================================================================== --- stable/12/etc/mtree/BSD.include.dist Mon Mar 2 07:11:37 2020 (r358527) +++ stable/12/etc/mtree/BSD.include.dist Mon Mar 2 07:13:00 2020 (r358528) @@ -361,8 +361,6 @@ mac_veriexec .. .. - ssp - .. sys disk .. From owner-svn-src-stable@freebsd.org Mon Mar 2 09:09:18 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 A85FC25FAA7; Mon, 2 Mar 2020 09:09:18 +0000 (UTC) (envelope-from hselasky@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 48WDq161NBz3NRX; Mon, 2 Mar 2020 09:09:17 +0000 (UTC) (envelope-from hselasky@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 1E74D1A0A8; Mon, 2 Mar 2020 09:09:17 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02299G68048014; Mon, 2 Mar 2020 09:09:16 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02299G0S048013; Mon, 2 Mar 2020 09:09:16 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202003020909.02299G0S048013@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 2 Mar 2020 09:09:16 +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: r358534 - stable/12/sys/dev/acpica X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/dev/acpica X-SVN-Commit-Revision: 358534 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: Mon, 02 Mar 2020 09:09:18 -0000 Author: hselasky Date: Mon Mar 2 09:09:16 2020 New Revision: 358534 URL: https://svnweb.freebsd.org/changeset/base/358534 Log: MFC r358219 and r358270: Make sure the ACPI lid state is updated during boot and after resume. While at it update the sysctl(9) description for the lid state. Always check return value from acpi_GetInteger(). If a failure happens reading the lid state, assume the lid is opened. Differential Revision: https://reviews.freebsd.org/D23724 PR: 240881 Submitted by: Yuri Pankov Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/acpica/acpi_lid.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/acpica/acpi_lid.c ============================================================================== --- stable/12/sys/dev/acpica/acpi_lid.c Mon Mar 2 08:44:58 2020 (r358533) +++ stable/12/sys/dev/acpica/acpi_lid.c Mon Mar 2 09:09:16 2020 (r358534) @@ -84,6 +84,27 @@ static devclass_t acpi_lid_devclass; DRIVER_MODULE(acpi_lid, acpi, acpi_lid_driver, acpi_lid_devclass, 0, 0); MODULE_DEPEND(acpi_lid, acpi, 1, 1, 1); +static void +acpi_lid_status_update(struct acpi_lid_softc *sc) +{ + ACPI_STATUS status; + int lid_status; + + ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); + + /* + * Evaluate _LID and check the return value, update lid status. + * Zero: The lid is closed + * Non-zero: The lid is open + */ + status = acpi_GetInteger(sc->lid_handle, "_LID", &lid_status); + if (ACPI_FAILURE(status)) + lid_status = 1; /* assume lid is opened */ + + /* range check value */ + sc->lid_status = lid_status ? 1 : 0; +} + static int acpi_lid_probe(device_t dev) { @@ -122,13 +143,16 @@ acpi_lid_attach(device_t dev) if (acpi_parse_prw(sc->lid_handle, &prw) == 0) AcpiEnableGpe(prw.gpe_handle, prw.gpe_bit); + /* Get the initial lid status */ + acpi_lid_status_update(sc); + /* * Export the lid status */ SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "state", CTLFLAG_RD, &sc->lid_status, 0, - "Device set to wake the system"); + "Device state (0 = closed, 1 = open)"); return (0); } @@ -142,6 +166,13 @@ acpi_lid_suspend(device_t dev) static int acpi_lid_resume(device_t dev) { + struct acpi_lid_softc *sc; + + sc = device_get_softc(dev); + + /* Update lid status, if any */ + acpi_lid_status_update(sc); + return (0); } @@ -150,21 +181,14 @@ acpi_lid_notify_status_changed(void *arg) { struct acpi_lid_softc *sc; struct acpi_softc *acpi_sc; - ACPI_STATUS status; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); sc = (struct acpi_lid_softc *)arg; ACPI_SERIAL_BEGIN(lid); - /* - * Evaluate _LID and check the return value, update lid status. - * Zero: The lid is closed - * Non-zero: The lid is open - */ - status = acpi_GetInteger(sc->lid_handle, "_LID", &sc->lid_status); - if (ACPI_FAILURE(status)) - goto out; + /* Update lid status, if any */ + acpi_lid_status_update(sc); acpi_sc = acpi_device_get_parent_softc(sc->lid_dev); if (acpi_sc == NULL) From owner-svn-src-stable@freebsd.org Mon Mar 2 09:13:30 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 4268E25FF6E; Mon, 2 Mar 2020 09:13:30 +0000 (UTC) (envelope-from hselasky@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 48WDvr3l8nz3x0H; Mon, 2 Mar 2020 09:13:27 +0000 (UTC) (envelope-from hselasky@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 3AFDF1A26F; Mon, 2 Mar 2020 09:13:27 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0229DRCx053849; Mon, 2 Mar 2020 09:13:27 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0229DRfU053848; Mon, 2 Mar 2020 09:13:27 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202003020913.0229DRfU053848@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 2 Mar 2020 09:13:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r358535 - stable/11/sys/dev/acpica X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/dev/acpica X-SVN-Commit-Revision: 358535 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: Mon, 02 Mar 2020 09:13:30 -0000 Author: hselasky Date: Mon Mar 2 09:13:26 2020 New Revision: 358535 URL: https://svnweb.freebsd.org/changeset/base/358535 Log: MFC r315166: Export the actual LID state via sysctl. This allows more complex policies about when to suspend based on other events happening AND the lid being closed through the use of clever devd or other scripts. Modified: stable/11/sys/dev/acpica/acpi_lid.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/acpica/acpi_lid.c ============================================================================== --- stable/11/sys/dev/acpica/acpi_lid.c Mon Mar 2 09:09:16 2020 (r358534) +++ stable/11/sys/dev/acpica/acpi_lid.c Mon Mar 2 09:13:26 2020 (r358535) @@ -122,6 +122,14 @@ acpi_lid_attach(device_t dev) if (acpi_parse_prw(sc->lid_handle, &prw) == 0) AcpiEnableGpe(prw.gpe_handle, prw.gpe_bit); + /* + * Export the lid status + */ + SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, + "state", CTLFLAG_RD, &sc->lid_status, 0, + "Device set to wake the system"); + return (0); } From owner-svn-src-stable@freebsd.org Mon Mar 2 09:16: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 07CF41A814E; Mon, 2 Mar 2020 09:16:51 +0000 (UTC) (envelope-from hselasky@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 48WDzj53DWz40jk; Mon, 2 Mar 2020 09:16:49 +0000 (UTC) (envelope-from hselasky@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 2614A1A272; Mon, 2 Mar 2020 09:16:49 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0229Gmg9054519; Mon, 2 Mar 2020 09:16:48 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0229Gmka054518; Mon, 2 Mar 2020 09:16:48 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202003020916.0229Gmka054518@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 2 Mar 2020 09:16:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r358536 - stable/11/sys/dev/acpica X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/dev/acpica X-SVN-Commit-Revision: 358536 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: Mon, 02 Mar 2020 09:16:51 -0000 Author: hselasky Date: Mon Mar 2 09:16:48 2020 New Revision: 358536 URL: https://svnweb.freebsd.org/changeset/base/358536 Log: MFC r358219 and r358270: Make sure the ACPI lid state is updated during boot and after resume. While at it update the sysctl(9) description for the lid state. Always check return value from acpi_GetInteger(). If a failure happens reading the lid state, assume the lid is opened. Differential Revision: https://reviews.freebsd.org/D23724 PR: 240881 Submitted by: Yuri Pankov Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/acpica/acpi_lid.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/acpica/acpi_lid.c ============================================================================== --- stable/11/sys/dev/acpica/acpi_lid.c Mon Mar 2 09:13:26 2020 (r358535) +++ stable/11/sys/dev/acpica/acpi_lid.c Mon Mar 2 09:16:48 2020 (r358536) @@ -84,6 +84,27 @@ static devclass_t acpi_lid_devclass; DRIVER_MODULE(acpi_lid, acpi, acpi_lid_driver, acpi_lid_devclass, 0, 0); MODULE_DEPEND(acpi_lid, acpi, 1, 1, 1); +static void +acpi_lid_status_update(struct acpi_lid_softc *sc) +{ + ACPI_STATUS status; + int lid_status; + + ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); + + /* + * Evaluate _LID and check the return value, update lid status. + * Zero: The lid is closed + * Non-zero: The lid is open + */ + status = acpi_GetInteger(sc->lid_handle, "_LID", &lid_status); + if (ACPI_FAILURE(status)) + lid_status = 1; /* assume lid is opened */ + + /* range check value */ + sc->lid_status = lid_status ? 1 : 0; +} + static int acpi_lid_probe(device_t dev) { @@ -122,13 +143,16 @@ acpi_lid_attach(device_t dev) if (acpi_parse_prw(sc->lid_handle, &prw) == 0) AcpiEnableGpe(prw.gpe_handle, prw.gpe_bit); + /* Get the initial lid status */ + acpi_lid_status_update(sc); + /* * Export the lid status */ SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "state", CTLFLAG_RD, &sc->lid_status, 0, - "Device set to wake the system"); + "Device state (0 = closed, 1 = open)"); return (0); } @@ -142,6 +166,13 @@ acpi_lid_suspend(device_t dev) static int acpi_lid_resume(device_t dev) { + struct acpi_lid_softc *sc; + + sc = device_get_softc(dev); + + /* Update lid status, if any */ + acpi_lid_status_update(sc); + return (0); } @@ -150,21 +181,14 @@ acpi_lid_notify_status_changed(void *arg) { struct acpi_lid_softc *sc; struct acpi_softc *acpi_sc; - ACPI_STATUS status; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); sc = (struct acpi_lid_softc *)arg; ACPI_SERIAL_BEGIN(lid); - /* - * Evaluate _LID and check the return value, update lid status. - * Zero: The lid is closed - * Non-zero: The lid is open - */ - status = acpi_GetInteger(sc->lid_handle, "_LID", &sc->lid_status); - if (ACPI_FAILURE(status)) - goto out; + /* Update lid status, if any */ + acpi_lid_status_update(sc); acpi_sc = acpi_device_get_parent_softc(sc->lid_dev); if (acpi_sc == NULL) From owner-svn-src-stable@freebsd.org Mon Mar 2 13:12:46 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 324DD1AE578; Mon, 2 Mar 2020 13:12:46 +0000 (UTC) (envelope-from bz@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 48WLCx4ndFz4Qy8; Mon, 2 Mar 2020 13:12:45 +0000 (UTC) (envelope-from bz@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 83C311CE2F; Mon, 2 Mar 2020 13:12:45 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 022DCjtJ004084; Mon, 2 Mar 2020 13:12:45 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 022DCjhb004083; Mon, 2 Mar 2020 13:12:45 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202003021312.022DCjhb004083@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Mon, 2 Mar 2020 13:12:45 +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: r358538 - stable/12/sys/netinet6 X-SVN-Group: stable-12 X-SVN-Commit-Author: bz X-SVN-Commit-Paths: stable/12/sys/netinet6 X-SVN-Commit-Revision: 358538 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: Mon, 02 Mar 2020 13:12:46 -0000 Author: bz Date: Mon Mar 2 13:12:45 2020 New Revision: 358538 URL: https://svnweb.freebsd.org/changeset/base/358538 Log: MFC r358071: ip6_output: update comments. Clear up some comments and improve to panic messages. No functional changes. Modified: stable/12/sys/netinet6/ip6_output.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet6/ip6_output.c ============================================================================== --- stable/12/sys/netinet6/ip6_output.c Mon Mar 2 09:45:06 2020 (r358537) +++ stable/12/sys/netinet6/ip6_output.c Mon Mar 2 13:12:45 2020 (r358538) @@ -179,7 +179,9 @@ static int copypktopts(struct ip6_pktopts *, struct ip do {\ if (m) {\ if (!hdrsplit) \ - panic("assumption failed: hdr not split"); \ + panic("%s:%d: assumption failed: "\ + "hdr not split: hdrsplit %d exthdrs %p",\ + __func__, __LINE__, hdrsplit, &exthdrs);\ *mtod((m), u_char *) = *(p);\ *(p) = (i);\ p = mtod((m), u_char *);\ @@ -277,8 +279,9 @@ ip6_fragment(struct ifnet *ifp, struct mbuf *m0, int h } /* - * IP6 output. The packet in mbuf chain m contains a skeletal IP6 - * header (with pri, len, nxt, hlim, src, dst). + * IP6 output. + * The packet in mbuf chain m contains a skeletal IP6 header (with pri, len, + * nxt, hlim, src, dst). * This function may modify ver and hlim only. * The mbuf chain containing the packet will be freed. * The mbuf opt, if present, will not be freed. @@ -286,9 +289,8 @@ ip6_fragment(struct ifnet *ifp, struct mbuf *m0, int h * skipped and ro->ro_rt would be used. If ro is present but ro->ro_rt is NULL, * then result of route lookup is stored in ro->ro_rt. * - * type of "mtu": rt_mtu is u_long, ifnet.ifr_mtu is int, and - * nd_ifinfo.linkmtu is u_int32_t. so we use u_long to hold largest one, - * which is rt_mtu. + * Type of "mtu": rt_mtu is u_long, ifnet.ifr_mtu is int, and nd_ifinfo.linkmtu + * is uint32_t. So we use u_long to hold largest one, which is rt_mtu. * * ifpp - XXX: just for statistics */ @@ -329,7 +331,7 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, INP_LOCK_ASSERT(inp); M_SETFIB(m, inp->inp_inc.inc_fibnum); if ((flags & IP_NODEFAULTFLOWID) == 0) { - /* unconditionally set flowid */ + /* Unconditionally set flowid. */ m->m_pkthdr.flowid = inp->inp_flowid; M_HASHTYPE_SET(m, inp->inp_flowtype); } @@ -352,12 +354,12 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, bzero(&exthdrs, sizeof(exthdrs)); if (opt) { - /* Hop-by-Hop options header */ + /* Hop-by-Hop options header. */ MAKE_EXTHDR(opt->ip6po_hbh, &exthdrs.ip6e_hbh); - /* Destination options header(1st part) */ + /* Destination options header (1st part). */ if (opt->ip6po_rthdr) { /* - * Destination options header(1st part) + * Destination options header (1st part). * This only makes sense with a routing header. * See Section 9.2 of RFC 3542. * Disabling this part just for MIP6 convenience is @@ -368,9 +370,9 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, */ MAKE_EXTHDR(opt->ip6po_dest1, &exthdrs.ip6e_dest1); } - /* Routing header */ + /* Routing header. */ MAKE_EXTHDR(opt->ip6po_rthdr, &exthdrs.ip6e_rthdr); - /* Destination options header(2nd part) */ + /* Destination options header (2nd part). */ MAKE_EXTHDR(opt->ip6po_dest2, &exthdrs.ip6e_dest2); } @@ -387,7 +389,7 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, optlen += exthdrs.ip6e_rthdr->m_len; unfragpartlen = optlen + sizeof(struct ip6_hdr); - /* NOTE: we don't add AH/ESP length here (done in ip6_ipsec_output) */ + /* NOTE: we don't add AH/ESP length here (done in ip6_ipsec_output). */ if (exthdrs.ip6e_dest2) optlen += exthdrs.ip6e_dest2->m_len; @@ -406,7 +408,7 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, ip6 = mtod(m, struct ip6_hdr *); - /* adjust mbuf packet header length */ + /* Adjust mbuf packet header length. */ m->m_pkthdr.len += optlen; plen = m->m_pkthdr.len - sizeof(*ip6); @@ -420,7 +422,7 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, m = exthdrs.ip6e_ip6; hdrsplit++; } - /* adjust pointer */ + /* Adjust pointer. */ ip6 = mtod(m, struct ip6_hdr *); if ((error = ip6_insert_jumboopt(&exthdrs, plen)) != 0) goto freehdrs; @@ -432,26 +434,29 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, * Concatenate headers and fill in next header fields. * Here we have, on "m" * IPv6 payload - * and we insert headers accordingly. Finally, we should be getting: - * IPv6 hbh dest1 rthdr ah* [esp* dest2 payload] + * and we insert headers accordingly. + * Finally, we should be getting: + * IPv6 hbh dest1 rthdr ah* [esp* dest2 payload]. * - * during the header composing process, "m" points to IPv6 header. - * "mprev" points to an extension header prior to esp. + * During the header composing process "m" points to IPv6 + * header. "mprev" points to an extension header prior to esp. */ u_char *nexthdrp = &ip6->ip6_nxt; mprev = m; /* - * we treat dest2 specially. this makes IPsec processing - * much easier. the goal here is to make mprev point the + * We treat dest2 specially. This makes IPsec processing + * much easier. The goal here is to make mprev point the * mbuf prior to dest2. * - * result: IPv6 dest2 payload + * Result: IPv6 dest2 payload. * m and mprev will point to IPv6 header. */ if (exthdrs.ip6e_dest2) { if (!hdrsplit) - panic("assumption failed: hdr not split"); + panic("%s:%d: assumption failed: " + "hdr not split: hdrsplit %d exthdrs %p", + __func__, __LINE__, hdrsplit, &exthdrs); exthdrs.ip6e_dest2->m_next = m->m_next; m->m_next = exthdrs.ip6e_dest2; *mtod(exthdrs.ip6e_dest2, u_char *) = ip6->ip6_nxt; @@ -459,7 +464,7 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, } /* - * result: IPv6 hbh dest1 rthdr dest2 payload + * Result: IPv6 hbh dest1 rthdr dest2 payload. * m will point to IPv6 header. mprev will point to the * extension header prior to dest2 (rthdr in the above case). */ @@ -469,15 +474,13 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, MAKE_CHAIN(exthdrs.ip6e_rthdr, mprev, nexthdrp, IPPROTO_ROUTING); - /* - * If there is a routing header, discard the packet. - */ + /* If there is a routing header, discard the packet. */ if (exthdrs.ip6e_rthdr) { error = EINVAL; goto bad; } - /* Source address validation */ + /* Source address validation. */ if (IN6_IS_ADDR_UNSPECIFIED(&ip6->ip6_src) && (flags & IPV6_UNSPECSRC) == 0) { error = EOPNOTSUPP; @@ -492,9 +495,7 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, IP6STAT_INC(ip6s_localout); - /* - * Route packet. - */ + /* Route packet. */ if (ro == NULL) { ro = &ip6route; bzero((caddr_t)ro, sizeof(*ro)); @@ -506,9 +507,9 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, fibnum = (inp != NULL) ? inp->inp_inc.inc_fibnum : M_GETFIB(m); again: /* - * if specified, try to fill in the traffic class field. - * do not override if a non-zero value is already set. - * we check the diffserv field and the ecn field separately. + * If specified, try to fill in the traffic class field. + * Do not override if a non-zero value is already set. + * We check the diffserv field and the ECN field separately. */ if (opt && opt->ip6po_tclass >= 0) { int mask = 0; @@ -521,7 +522,7 @@ again: ip6->ip6_flow |= htonl((opt->ip6po_tclass & mask) << 20); } - /* fill in or override the hop limit field, if necessary. */ + /* Fill in or override the hop limit field, if necessary. */ if (opt && opt->ip6po_hlim != -1) ip6->ip6_hlim = opt->ip6po_hlim & 0xff; else if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) { @@ -533,7 +534,7 @@ again: /* * Validate route against routing table additions; * a better/more specific route might have been added. - * Make sure address family is set in route. + * Make sure that the address family is set in route. */ if (inp) { ro->ro_dst.sin6_family = AF_INET6; @@ -564,15 +565,13 @@ again: } if (rt == NULL) { /* - * If in6_selectroute() does not return a route entry, + * If in6_selectroute() does not return a route entry * dst may not have been updated. */ *dst = dst_sa; /* XXX */ } - /* - * then rt (for unicast) and ifp must be non-NULL valid values. - */ + /* Then rt (for unicast) and ifp must be non-NULL valid values. */ if ((flags & IPV6_FORWARDING) == 0) { /* XXX: the FORWARDING flag can be set for mrouting. */ in6_ifstat_inc(ifp, ifs6_out_request); @@ -590,7 +589,7 @@ again: src_sa.sin6_addr = ip6->ip6_src; dst0 = ip6->ip6_dst; - /* re-initialize to be sure */ + /* Re-initialize to be sure. */ bzero(&dst_sa, sizeof(dst_sa)); dst_sa.sin6_family = AF_INET6; dst_sa.sin6_len = sizeof(dst_sa); @@ -607,7 +606,7 @@ again: * * Because the loopback interface cannot receive * packets with a different scope ID than its own, - * there is a trick is to pretend the outgoing packet + * there is a trick to pretend the outgoing packet * was received by the real network interface, by * setting "origifp" different from "ifp". This is * only allowed when "ifp" is a loopback network @@ -645,7 +644,6 @@ again: error = EHOSTUNREACH; /* XXX */ goto bad; } - /* All scope ID checks are successful. */ if (rt && !IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) { @@ -662,13 +660,12 @@ again: } if (!IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) { - m->m_flags &= ~(M_BCAST | M_MCAST); /* just in case */ + m->m_flags &= ~(M_BCAST | M_MCAST); /* Just in case. */ } else { m->m_flags = (m->m_flags & ~M_BCAST) | M_MCAST; in6_ifstat_inc(ifp, ifs6_out_mcast); - /* - * Confirm that the outgoing interface supports multicast. - */ + + /* Confirm that the outgoing interface supports multicast. */ if (!(ifp->if_flags & IFF_MULTICAST)) { IP6STAT_INC(ip6s_noroute); in6_ifstat_inc(ifp, ifs6_out_discard); @@ -763,8 +760,8 @@ again: } /* - * clear embedded scope identifiers if necessary. - * in6_clearscope will touch the addresses only when necessary. + * Clear embedded scope identifiers if necessary. + * in6_clearscope() will touch the addresses only when necessary. */ in6_clearscope(&ip6->ip6_src); in6_clearscope(&ip6->ip6_dst); @@ -794,7 +791,7 @@ again: if (ip6_process_hopopts(m, (u_int8_t *)(hbh + 1), ((hbh->ip6h_len + 1) << 3) - sizeof(struct ip6_hbh), &dummy, &plen) < 0) { - /* m was already freed at this point */ + /* m was already freed at this point. */ error = EINVAL;/* better error? */ goto done; } @@ -881,7 +878,7 @@ passout: * Send the packet to the outgoing interface. * If necessary, do IPv6 fragmentation before sending. * - * the logic here is rather complex: + * The logic here is rather complex: * 1: normal case (dontfrag == 0, alwaysfrag == 0) * 1-a: send as is if tlen <= path mtu * 1-b: fragment if tlen > path mtu @@ -894,7 +891,7 @@ passout: * always fragment * * 4: if dontfrag == 1 && alwaysfrag == 1 - * error, as we cannot handle this conflicting request + * error, as we cannot handle this conflicting request. */ sw_csum = m->m_pkthdr.csum_flags; if (!hdrsplit) { @@ -925,12 +922,12 @@ passout: dontfrag = 1; else dontfrag = 0; - if (dontfrag && alwaysfrag) { /* case 4 */ - /* conflicting request - can't transmit */ + if (dontfrag && alwaysfrag) { /* Case 4. */ + /* Conflicting request - can't transmit. */ error = EMSGSIZE; goto bad; } - if (dontfrag && tlen > IN6_LINKMTU(ifp) && !tso) { /* case 2-b */ + if (dontfrag && tlen > IN6_LINKMTU(ifp) && !tso) { /* Case 2-b. */ /* * Even if the DONTFRAG option is specified, we cannot send the * packet when the data length is larger than the MTU of the @@ -945,10 +942,8 @@ passout: goto bad; } - /* - * transmit packet without fragmentation - */ - if (dontfrag || (!alwaysfrag && tlen <= mtu)) { /* case 1-a and 2-a */ + /* Transmit packet without fragmentation. */ + if (dontfrag || (!alwaysfrag && tlen <= mtu)) { /* Cases 1-a and 2-a. */ struct in6_ifaddr *ia6; ip6 = mtod(m, struct ip6_hdr *); @@ -981,16 +976,14 @@ passout: goto done; } - /* - * try to fragment the packet. case 1-b and 3 - */ + /* Try to fragment the packet. Cases 1-b and 3. */ if (mtu < IPV6_MMTU) { - /* path MTU cannot be less than IPV6_MMTU */ + /* Path MTU cannot be less than IPV6_MMTU. */ error = EMSGSIZE; in6_ifstat_inc(ifp, ifs6_out_fragfail); goto bad; } else if (ip6->ip6_plen == 0) { - /* jumbo payload cannot be fragmented */ + /* Jumbo payload cannot be fragmented. */ error = EMSGSIZE; in6_ifstat_inc(ifp, ifs6_out_fragfail); goto bad; @@ -1059,9 +1052,7 @@ passout: in6_ifstat_inc(ifp, ifs6_out_fragok); } - /* - * Remove leading garbages. - */ + /* Remove leading garbage. */ sendorfree: m = m0->m_nextpkt; m0->m_nextpkt = 0; @@ -1107,7 +1098,7 @@ done: return (error); freehdrs: - m_freem(exthdrs.ip6e_hbh); /* m_freem will check if mbuf is 0 */ + m_freem(exthdrs.ip6e_hbh); /* m_freem() checks if mbuf is NULL. */ m_freem(exthdrs.ip6e_dest1); m_freem(exthdrs.ip6e_rthdr); m_freem(exthdrs.ip6e_dest2); From owner-svn-src-stable@freebsd.org Mon Mar 2 13:13:43 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 3D6D61AE627; Mon, 2 Mar 2020 13:13:43 +0000 (UTC) (envelope-from bz@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 48WLF26bPgz4SlD; Mon, 2 Mar 2020 13:13:42 +0000 (UTC) (envelope-from bz@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 97A0F1CE30; Mon, 2 Mar 2020 13:13:42 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 022DDgbY004262; Mon, 2 Mar 2020 13:13:42 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 022DDgfS004261; Mon, 2 Mar 2020 13:13:42 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202003021313.022DDgfS004261@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Mon, 2 Mar 2020 13:13:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r358539 - stable/11/sys/netinet6 X-SVN-Group: stable-11 X-SVN-Commit-Author: bz X-SVN-Commit-Paths: stable/11/sys/netinet6 X-SVN-Commit-Revision: 358539 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: Mon, 02 Mar 2020 13:13:43 -0000 Author: bz Date: Mon Mar 2 13:13:42 2020 New Revision: 358539 URL: https://svnweb.freebsd.org/changeset/base/358539 Log: MFC r358071: ip6_output: update comments. Clear up some comments and improve to panic messages. No functional changes. Modified: stable/11/sys/netinet6/ip6_output.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet6/ip6_output.c ============================================================================== --- stable/11/sys/netinet6/ip6_output.c Mon Mar 2 13:12:45 2020 (r358538) +++ stable/11/sys/netinet6/ip6_output.c Mon Mar 2 13:13:42 2020 (r358539) @@ -180,7 +180,9 @@ static int copypktopts(struct ip6_pktopts *, struct ip do {\ if (m) {\ if (!hdrsplit) \ - panic("assumption failed: hdr not split"); \ + panic("%s:%d: assumption failed: "\ + "hdr not split: hdrsplit %d exthdrs %p",\ + __func__, __LINE__, hdrsplit, &exthdrs);\ *mtod((m), u_char *) = *(p);\ *(p) = (i);\ p = mtod((m), u_char *);\ @@ -278,8 +280,9 @@ ip6_fragment(struct ifnet *ifp, struct mbuf *m0, int h } /* - * IP6 output. The packet in mbuf chain m contains a skeletal IP6 - * header (with pri, len, nxt, hlim, src, dst). + * IP6 output. + * The packet in mbuf chain m contains a skeletal IP6 header (with pri, len, + * nxt, hlim, src, dst). * This function may modify ver and hlim only. * The mbuf chain containing the packet will be freed. * The mbuf opt, if present, will not be freed. @@ -287,9 +290,8 @@ ip6_fragment(struct ifnet *ifp, struct mbuf *m0, int h * skipped and ro->ro_rt would be used. If ro is present but ro->ro_rt is NULL, * then result of route lookup is stored in ro->ro_rt. * - * type of "mtu": rt_mtu is u_long, ifnet.ifr_mtu is int, and - * nd_ifinfo.linkmtu is u_int32_t. so we use u_long to hold largest one, - * which is rt_mtu. + * Type of "mtu": rt_mtu is u_long, ifnet.ifr_mtu is int, and nd_ifinfo.linkmtu + * is uint32_t. So we use u_long to hold largest one, which is rt_mtu. * * ifpp - XXX: just for statistics */ @@ -330,7 +332,7 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, INP_LOCK_ASSERT(inp); M_SETFIB(m, inp->inp_inc.inc_fibnum); if ((flags & IP_NODEFAULTFLOWID) == 0) { - /* unconditionally set flowid */ + /* Unconditionally set flowid. */ m->m_pkthdr.flowid = inp->inp_flowid; M_HASHTYPE_SET(m, inp->inp_flowtype); } @@ -353,12 +355,12 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, bzero(&exthdrs, sizeof(exthdrs)); if (opt) { - /* Hop-by-Hop options header */ + /* Hop-by-Hop options header. */ MAKE_EXTHDR(opt->ip6po_hbh, &exthdrs.ip6e_hbh); - /* Destination options header(1st part) */ + /* Destination options header (1st part). */ if (opt->ip6po_rthdr) { /* - * Destination options header(1st part) + * Destination options header (1st part). * This only makes sense with a routing header. * See Section 9.2 of RFC 3542. * Disabling this part just for MIP6 convenience is @@ -369,9 +371,9 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, */ MAKE_EXTHDR(opt->ip6po_dest1, &exthdrs.ip6e_dest1); } - /* Routing header */ + /* Routing header. */ MAKE_EXTHDR(opt->ip6po_rthdr, &exthdrs.ip6e_rthdr); - /* Destination options header(2nd part) */ + /* Destination options header (2nd part). */ MAKE_EXTHDR(opt->ip6po_dest2, &exthdrs.ip6e_dest2); } @@ -388,7 +390,7 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, optlen += exthdrs.ip6e_rthdr->m_len; unfragpartlen = optlen + sizeof(struct ip6_hdr); - /* NOTE: we don't add AH/ESP length here (done in ip6_ipsec_output) */ + /* NOTE: we don't add AH/ESP length here (done in ip6_ipsec_output). */ if (exthdrs.ip6e_dest2) optlen += exthdrs.ip6e_dest2->m_len; @@ -407,7 +409,7 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, ip6 = mtod(m, struct ip6_hdr *); - /* adjust mbuf packet header length */ + /* Adjust mbuf packet header length. */ m->m_pkthdr.len += optlen; plen = m->m_pkthdr.len - sizeof(*ip6); @@ -421,7 +423,7 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, m = exthdrs.ip6e_ip6; hdrsplit++; } - /* adjust pointer */ + /* Adjust pointer. */ ip6 = mtod(m, struct ip6_hdr *); if ((error = ip6_insert_jumboopt(&exthdrs, plen)) != 0) goto freehdrs; @@ -433,26 +435,29 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, * Concatenate headers and fill in next header fields. * Here we have, on "m" * IPv6 payload - * and we insert headers accordingly. Finally, we should be getting: - * IPv6 hbh dest1 rthdr ah* [esp* dest2 payload] + * and we insert headers accordingly. + * Finally, we should be getting: + * IPv6 hbh dest1 rthdr ah* [esp* dest2 payload]. * - * during the header composing process, "m" points to IPv6 header. - * "mprev" points to an extension header prior to esp. + * During the header composing process "m" points to IPv6 + * header. "mprev" points to an extension header prior to esp. */ u_char *nexthdrp = &ip6->ip6_nxt; mprev = m; /* - * we treat dest2 specially. this makes IPsec processing - * much easier. the goal here is to make mprev point the + * We treat dest2 specially. This makes IPsec processing + * much easier. The goal here is to make mprev point the * mbuf prior to dest2. * - * result: IPv6 dest2 payload + * Result: IPv6 dest2 payload. * m and mprev will point to IPv6 header. */ if (exthdrs.ip6e_dest2) { if (!hdrsplit) - panic("assumption failed: hdr not split"); + panic("%s:%d: assumption failed: " + "hdr not split: hdrsplit %d exthdrs %p", + __func__, __LINE__, hdrsplit, &exthdrs); exthdrs.ip6e_dest2->m_next = m->m_next; m->m_next = exthdrs.ip6e_dest2; *mtod(exthdrs.ip6e_dest2, u_char *) = ip6->ip6_nxt; @@ -460,7 +465,7 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, } /* - * result: IPv6 hbh dest1 rthdr dest2 payload + * Result: IPv6 hbh dest1 rthdr dest2 payload. * m will point to IPv6 header. mprev will point to the * extension header prior to dest2 (rthdr in the above case). */ @@ -470,15 +475,13 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, MAKE_CHAIN(exthdrs.ip6e_rthdr, mprev, nexthdrp, IPPROTO_ROUTING); - /* - * If there is a routing header, discard the packet. - */ + /* If there is a routing header, discard the packet. */ if (exthdrs.ip6e_rthdr) { error = EINVAL; goto bad; } - /* Source address validation */ + /* Source address validation. */ if (IN6_IS_ADDR_UNSPECIFIED(&ip6->ip6_src) && (flags & IPV6_UNSPECSRC) == 0) { error = EOPNOTSUPP; @@ -493,9 +496,7 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, IP6STAT_INC(ip6s_localout); - /* - * Route packet. - */ + /* Route packet. */ if (ro == NULL) { ro = &ip6route; bzero((caddr_t)ro, sizeof(*ro)); @@ -511,9 +512,9 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, fibnum = (inp != NULL) ? inp->inp_inc.inc_fibnum : M_GETFIB(m); again: /* - * if specified, try to fill in the traffic class field. - * do not override if a non-zero value is already set. - * we check the diffserv field and the ecn field separately. + * If specified, try to fill in the traffic class field. + * Do not override if a non-zero value is already set. + * We check the diffserv field and the ECN field separately. */ if (opt && opt->ip6po_tclass >= 0) { int mask = 0; @@ -526,7 +527,7 @@ again: ip6->ip6_flow |= htonl((opt->ip6po_tclass & mask) << 20); } - /* fill in or override the hop limit field, if necessary. */ + /* Fill in or override the hop limit field, if necessary. */ if (opt && opt->ip6po_hlim != -1) ip6->ip6_hlim = opt->ip6po_hlim & 0xff; else if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) { @@ -538,7 +539,7 @@ again: /* * Validate route against routing table additions; * a better/more specific route might have been added. - * Make sure address family is set in route. + * Make sure that the address family is set in route. */ if (inp) { ro->ro_dst.sin6_family = AF_INET6; @@ -569,15 +570,13 @@ again: } if (rt == NULL) { /* - * If in6_selectroute() does not return a route entry, + * If in6_selectroute() does not return a route entry * dst may not have been updated. */ *dst = dst_sa; /* XXX */ } - /* - * then rt (for unicast) and ifp must be non-NULL valid values. - */ + /* Then rt (for unicast) and ifp must be non-NULL valid values. */ if ((flags & IPV6_FORWARDING) == 0) { /* XXX: the FORWARDING flag can be set for mrouting. */ in6_ifstat_inc(ifp, ifs6_out_request); @@ -595,7 +594,7 @@ again: src_sa.sin6_addr = ip6->ip6_src; dst0 = ip6->ip6_dst; - /* re-initialize to be sure */ + /* Re-initialize to be sure. */ bzero(&dst_sa, sizeof(dst_sa)); dst_sa.sin6_family = AF_INET6; dst_sa.sin6_len = sizeof(dst_sa); @@ -612,7 +611,7 @@ again: * * Because the loopback interface cannot receive * packets with a different scope ID than its own, - * there is a trick is to pretend the outgoing packet + * there is a trick to pretend the outgoing packet * was received by the real network interface, by * setting "origifp" different from "ifp". This is * only allowed when "ifp" is a loopback network @@ -650,7 +649,6 @@ again: error = EHOSTUNREACH; /* XXX */ goto bad; } - /* All scope ID checks are successful. */ if (rt && !IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) { @@ -667,13 +665,12 @@ again: } if (!IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) { - m->m_flags &= ~(M_BCAST | M_MCAST); /* just in case */ + m->m_flags &= ~(M_BCAST | M_MCAST); /* Just in case. */ } else { m->m_flags = (m->m_flags & ~M_BCAST) | M_MCAST; in6_ifstat_inc(ifp, ifs6_out_mcast); - /* - * Confirm that the outgoing interface supports multicast. - */ + + /* Confirm that the outgoing interface supports multicast. */ if (!(ifp->if_flags & IFF_MULTICAST)) { IP6STAT_INC(ip6s_noroute); in6_ifstat_inc(ifp, ifs6_out_discard); @@ -768,8 +765,8 @@ again: } /* - * clear embedded scope identifiers if necessary. - * in6_clearscope will touch the addresses only when necessary. + * Clear embedded scope identifiers if necessary. + * in6_clearscope() will touch the addresses only when necessary. */ in6_clearscope(&ip6->ip6_src); in6_clearscope(&ip6->ip6_dst); @@ -799,7 +796,7 @@ again: if (ip6_process_hopopts(m, (u_int8_t *)(hbh + 1), ((hbh->ip6h_len + 1) << 3) - sizeof(struct ip6_hbh), &dummy, &plen) < 0) { - /* m was already freed at this point */ + /* m was already freed at this point. */ error = EINVAL;/* better error? */ goto done; } @@ -892,7 +889,7 @@ passout: * Send the packet to the outgoing interface. * If necessary, do IPv6 fragmentation before sending. * - * the logic here is rather complex: + * The logic here is rather complex: * 1: normal case (dontfrag == 0, alwaysfrag == 0) * 1-a: send as is if tlen <= path mtu * 1-b: fragment if tlen > path mtu @@ -905,7 +902,7 @@ passout: * always fragment * * 4: if dontfrag == 1 && alwaysfrag == 1 - * error, as we cannot handle this conflicting request + * error, as we cannot handle this conflicting request. */ sw_csum = m->m_pkthdr.csum_flags; if (!hdrsplit) { @@ -936,12 +933,12 @@ passout: dontfrag = 1; else dontfrag = 0; - if (dontfrag && alwaysfrag) { /* case 4 */ - /* conflicting request - can't transmit */ + if (dontfrag && alwaysfrag) { /* Case 4. */ + /* Conflicting request - can't transmit. */ error = EMSGSIZE; goto bad; } - if (dontfrag && tlen > IN6_LINKMTU(ifp) && !tso) { /* case 2-b */ + if (dontfrag && tlen > IN6_LINKMTU(ifp) && !tso) { /* Case 2-b. */ /* * Even if the DONTFRAG option is specified, we cannot send the * packet when the data length is larger than the MTU of the @@ -956,10 +953,8 @@ passout: goto bad; } - /* - * transmit packet without fragmentation - */ - if (dontfrag || (!alwaysfrag && tlen <= mtu)) { /* case 1-a and 2-a */ + /* Transmit packet without fragmentation. */ + if (dontfrag || (!alwaysfrag && tlen <= mtu)) { /* Cases 1-a and 2-a. */ struct in6_ifaddr *ia6; ip6 = mtod(m, struct ip6_hdr *); @@ -976,16 +971,14 @@ passout: goto done; } - /* - * try to fragment the packet. case 1-b and 3 - */ + /* Try to fragment the packet. Cases 1-b and 3. */ if (mtu < IPV6_MMTU) { - /* path MTU cannot be less than IPV6_MMTU */ + /* Path MTU cannot be less than IPV6_MMTU. */ error = EMSGSIZE; in6_ifstat_inc(ifp, ifs6_out_fragfail); goto bad; } else if (ip6->ip6_plen == 0) { - /* jumbo payload cannot be fragmented */ + /* Jumbo payload cannot be fragmented. */ error = EMSGSIZE; in6_ifstat_inc(ifp, ifs6_out_fragfail); goto bad; @@ -1054,9 +1047,7 @@ passout: in6_ifstat_inc(ifp, ifs6_out_fragok); } - /* - * Remove leading garbages. - */ + /* Remove leading garbage. */ sendorfree: m = m0->m_nextpkt; m0->m_nextpkt = 0; @@ -1091,7 +1082,7 @@ done: return (error); freehdrs: - m_freem(exthdrs.ip6e_hbh); /* m_freem will check if mbuf is 0 */ + m_freem(exthdrs.ip6e_hbh); /* m_freem() checks if mbuf is NULL. */ m_freem(exthdrs.ip6e_dest1); m_freem(exthdrs.ip6e_rthdr); m_freem(exthdrs.ip6e_dest2); From owner-svn-src-stable@freebsd.org Mon Mar 2 13:16:19 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 387531AE6EB; Mon, 2 Mar 2020 13:16:19 +0000 (UTC) (envelope-from bz@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 48WLJ26xPWz4YWS; Mon, 2 Mar 2020 13:16:18 +0000 (UTC) (envelope-from bz@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 A24231CE32; Mon, 2 Mar 2020 13:16:18 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 022DGIlE004714; Mon, 2 Mar 2020 13:16:18 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 022DGImd004713; Mon, 2 Mar 2020 13:16:18 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202003021316.022DGImd004713@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Mon, 2 Mar 2020 13:16:18 +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: r358540 - stable/12/sys/netinet6 X-SVN-Group: stable-12 X-SVN-Commit-Author: bz X-SVN-Commit-Paths: stable/12/sys/netinet6 X-SVN-Commit-Revision: 358540 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: Mon, 02 Mar 2020 13:16:19 -0000 Author: bz Date: Mon Mar 2 13:16:18 2020 New Revision: 358540 URL: https://svnweb.freebsd.org/changeset/base/358540 Log: MFC r358167,358311: ip6_output: improve extension header handling Move IPv6 source address checks from after extension header heandling to the top of the function. If we do not pass these checks there is no reason to do a lot of work upfront. Fold extension header preparations and length calculations together into a single branch and macro rather than doing them sequentially. Likewise move extension header concatination into a single branch block only doing it if we recorded any extension header length length. Sponsored by: Netflix (partially, originally) Modified: stable/12/sys/netinet6/ip6_output.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet6/ip6_output.c ============================================================================== --- stable/12/sys/netinet6/ip6_output.c Mon Mar 2 13:13:42 2020 (r358539) +++ stable/12/sys/netinet6/ip6_output.c Mon Mar 2 13:16:18 2020 (r358540) @@ -154,10 +154,10 @@ static int copypktopts(struct ip6_pktopts *, struct ip /* - * Make an extension header from option data. hp is the source, and - * mp is the destination. + * Make an extension header from option data. hp is the source, + * mp is the destination, and _ol is the optlen. */ -#define MAKE_EXTHDR(hp, mp) \ +#define MAKE_EXTHDR(hp, mp, _ol) \ do { \ if (hp) { \ struct ip6_ext *eh = (struct ip6_ext *)(hp); \ @@ -165,6 +165,7 @@ static int copypktopts(struct ip6_pktopts *, struct ip ((eh)->ip6e_len + 1) << 3); \ if (error) \ goto freehdrs; \ + (_ol) += (*(mp))->m_len; \ } \ } while (/*CONSTCOND*/ 0) @@ -305,22 +306,23 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, struct ip6_hdr *ip6; struct ifnet *ifp, *origifp; struct mbuf *m = m0; - struct mbuf *mprev = NULL; + struct mbuf *mprev; int hlen, tlen, len; struct route_in6 ip6route; struct rtentry *rt = NULL; struct sockaddr_in6 *dst, src_sa, dst_sa; struct in6_addr odst; + u_char *nexthdrp; int error = 0; struct in6_ifaddr *ia = NULL; u_long mtu; int alwaysfrag, dontfrag; - u_int32_t optlen = 0, plen = 0, unfragpartlen = 0; + u_int32_t optlen, plen = 0, unfragpartlen; struct ip6_exthdrs exthdrs; struct in6_addr src0, dst0; u_int32_t zone; struct route_in6 *ro_pmtu = NULL; - int hdrsplit = 0; + bool hdrsplit; int sw_csum, tso; int needfiblookup; uint32_t fibnum; @@ -352,13 +354,50 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, } #endif /* IPSEC */ + /* Source address validation. */ + ip6 = mtod(m, struct ip6_hdr *); + if (IN6_IS_ADDR_UNSPECIFIED(&ip6->ip6_src) && + (flags & IPV6_UNSPECSRC) == 0) { + error = EOPNOTSUPP; + IP6STAT_INC(ip6s_badscope); + goto bad; + } + if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_src)) { + error = EOPNOTSUPP; + IP6STAT_INC(ip6s_badscope); + goto bad; + } + + /* + * If we are given packet options to add extension headers prepare them. + * Calculate the total length of the extension header chain. + * Keep the length of the unfragmentable part for fragmentation. + */ bzero(&exthdrs, sizeof(exthdrs)); + optlen = 0; + unfragpartlen = sizeof(struct ip6_hdr); if (opt) { /* Hop-by-Hop options header. */ - MAKE_EXTHDR(opt->ip6po_hbh, &exthdrs.ip6e_hbh); + MAKE_EXTHDR(opt->ip6po_hbh, &exthdrs.ip6e_hbh, optlen); + /* Destination options header (1st part). */ if (opt->ip6po_rthdr) { +#ifndef RTHDR_SUPPORT_IMPLEMENTED /* + * If there is a routing header, discard the packet + * right away here. RH0/1 are obsolete and we do not + * currently support RH2/3/4. + * People trying to use RH253/254 may want to disable + * this check. + * The moment we do support any routing header (again) + * this block should check the routing type more + * selectively. + */ + error = EINVAL; + goto bad; +#endif + + /* * Destination options header (1st part). * This only makes sense with a routing header. * See Section 9.2 of RFC 3542. @@ -368,46 +407,38 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, * options, which might automatically be inserted in * the kernel. */ - MAKE_EXTHDR(opt->ip6po_dest1, &exthdrs.ip6e_dest1); + MAKE_EXTHDR(opt->ip6po_dest1, &exthdrs.ip6e_dest1, + optlen); } /* Routing header. */ - MAKE_EXTHDR(opt->ip6po_rthdr, &exthdrs.ip6e_rthdr); + MAKE_EXTHDR(opt->ip6po_rthdr, &exthdrs.ip6e_rthdr, optlen); + + unfragpartlen += optlen; + + /* + * NOTE: we don't add AH/ESP length here (done in + * ip6_ipsec_output()). + */ + /* Destination options header (2nd part). */ - MAKE_EXTHDR(opt->ip6po_dest2, &exthdrs.ip6e_dest2); + MAKE_EXTHDR(opt->ip6po_dest2, &exthdrs.ip6e_dest2, optlen); } /* - * Calculate the total length of the extension header chain. - * Keep the length of the unfragmentable part for fragmentation. - */ - optlen = 0; - if (exthdrs.ip6e_hbh) - optlen += exthdrs.ip6e_hbh->m_len; - if (exthdrs.ip6e_dest1) - optlen += exthdrs.ip6e_dest1->m_len; - if (exthdrs.ip6e_rthdr) - optlen += exthdrs.ip6e_rthdr->m_len; - unfragpartlen = optlen + sizeof(struct ip6_hdr); - - /* NOTE: we don't add AH/ESP length here (done in ip6_ipsec_output). */ - if (exthdrs.ip6e_dest2) - optlen += exthdrs.ip6e_dest2->m_len; - - /* * If there is at least one extension header, * separate IP6 header from the payload. */ - if (optlen && !hdrsplit) { + hdrsplit = false; + if (optlen) { if ((error = ip6_splithdr(m, &exthdrs)) != 0) { m = NULL; goto freehdrs; } m = exthdrs.ip6e_ip6; - hdrsplit++; + ip6 = mtod(m, struct ip6_hdr *); + hdrsplit = true; } - ip6 = mtod(m, struct ip6_hdr *); - /* Adjust mbuf packet header length. */ m->m_pkthdr.len += optlen; plen = m->m_pkthdr.len - sizeof(*ip6); @@ -420,77 +451,59 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, goto freehdrs; } m = exthdrs.ip6e_ip6; - hdrsplit++; + ip6 = mtod(m, struct ip6_hdr *); + hdrsplit = true; } - /* Adjust pointer. */ - ip6 = mtod(m, struct ip6_hdr *); if ((error = ip6_insert_jumboopt(&exthdrs, plen)) != 0) goto freehdrs; ip6->ip6_plen = 0; } else ip6->ip6_plen = htons(plen); + nexthdrp = &ip6->ip6_nxt; - /* - * Concatenate headers and fill in next header fields. - * Here we have, on "m" - * IPv6 payload - * and we insert headers accordingly. - * Finally, we should be getting: - * IPv6 hbh dest1 rthdr ah* [esp* dest2 payload]. - * - * During the header composing process "m" points to IPv6 - * header. "mprev" points to an extension header prior to esp. - */ - u_char *nexthdrp = &ip6->ip6_nxt; - mprev = m; + if (optlen) { + /* + * Concatenate headers and fill in next header fields. + * Here we have, on "m" + * IPv6 payload + * and we insert headers accordingly. + * Finally, we should be getting: + * IPv6 hbh dest1 rthdr ah* [esp* dest2 payload]. + * + * During the header composing process "m" points to IPv6 + * header. "mprev" points to an extension header prior to esp. + */ + mprev = m; - /* - * We treat dest2 specially. This makes IPsec processing - * much easier. The goal here is to make mprev point the - * mbuf prior to dest2. - * - * Result: IPv6 dest2 payload. - * m and mprev will point to IPv6 header. - */ - if (exthdrs.ip6e_dest2) { - if (!hdrsplit) - panic("%s:%d: assumption failed: " - "hdr not split: hdrsplit %d exthdrs %p", - __func__, __LINE__, hdrsplit, &exthdrs); - exthdrs.ip6e_dest2->m_next = m->m_next; - m->m_next = exthdrs.ip6e_dest2; - *mtod(exthdrs.ip6e_dest2, u_char *) = ip6->ip6_nxt; - ip6->ip6_nxt = IPPROTO_DSTOPTS; - } + /* + * We treat dest2 specially. This makes IPsec processing + * much easier. The goal here is to make mprev point the + * mbuf prior to dest2. + * + * Result: IPv6 dest2 payload. + * m and mprev will point to IPv6 header. + */ + if (exthdrs.ip6e_dest2) { + if (!hdrsplit) + panic("%s:%d: assumption failed: " + "hdr not split: hdrsplit %d exthdrs %p", + __func__, __LINE__, hdrsplit, &exthdrs); + exthdrs.ip6e_dest2->m_next = m->m_next; + m->m_next = exthdrs.ip6e_dest2; + *mtod(exthdrs.ip6e_dest2, u_char *) = ip6->ip6_nxt; + ip6->ip6_nxt = IPPROTO_DSTOPTS; + } - /* - * Result: IPv6 hbh dest1 rthdr dest2 payload. - * m will point to IPv6 header. mprev will point to the - * extension header prior to dest2 (rthdr in the above case). - */ - MAKE_CHAIN(exthdrs.ip6e_hbh, mprev, nexthdrp, IPPROTO_HOPOPTS); - MAKE_CHAIN(exthdrs.ip6e_dest1, mprev, nexthdrp, - IPPROTO_DSTOPTS); - MAKE_CHAIN(exthdrs.ip6e_rthdr, mprev, nexthdrp, - IPPROTO_ROUTING); - - /* If there is a routing header, discard the packet. */ - if (exthdrs.ip6e_rthdr) { - error = EINVAL; - goto bad; - } - - /* Source address validation. */ - if (IN6_IS_ADDR_UNSPECIFIED(&ip6->ip6_src) && - (flags & IPV6_UNSPECSRC) == 0) { - error = EOPNOTSUPP; - IP6STAT_INC(ip6s_badscope); - goto bad; - } - if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_src)) { - error = EOPNOTSUPP; - IP6STAT_INC(ip6s_badscope); - goto bad; + /* + * Result: IPv6 hbh dest1 rthdr dest2 payload. + * m will point to IPv6 header. mprev will point to the + * extension header prior to dest2 (rthdr in the above case). + */ + MAKE_CHAIN(exthdrs.ip6e_hbh, mprev, nexthdrp, IPPROTO_HOPOPTS); + MAKE_CHAIN(exthdrs.ip6e_dest1, mprev, nexthdrp, + IPPROTO_DSTOPTS); + MAKE_CHAIN(exthdrs.ip6e_rthdr, mprev, nexthdrp, + IPPROTO_ROUTING); } IP6STAT_INC(ip6s_localout); From owner-svn-src-stable@freebsd.org Mon Mar 2 13:16:42 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 8506A1AE793; Mon, 2 Mar 2020 13:16:42 +0000 (UTC) (envelope-from bz@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 48WLJV1rlbz4ZKn; Mon, 2 Mar 2020 13:16:42 +0000 (UTC) (envelope-from bz@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 440B41CE54; Mon, 2 Mar 2020 13:16:41 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 022DGfio004810; Mon, 2 Mar 2020 13:16:41 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 022DGfxO004809; Mon, 2 Mar 2020 13:16:41 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202003021316.022DGfxO004809@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Mon, 2 Mar 2020 13:16:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r358541 - stable/11/sys/netinet6 X-SVN-Group: stable-11 X-SVN-Commit-Author: bz X-SVN-Commit-Paths: stable/11/sys/netinet6 X-SVN-Commit-Revision: 358541 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: Mon, 02 Mar 2020 13:16:42 -0000 Author: bz Date: Mon Mar 2 13:16:40 2020 New Revision: 358541 URL: https://svnweb.freebsd.org/changeset/base/358541 Log: MFC r358167,358311: ip6_output: improve extension header handling Move IPv6 source address checks from after extension header heandling to the top of the function. If we do not pass these checks there is no reason to do a lot of work upfront. Fold extension header preparations and length calculations together into a single branch and macro rather than doing them sequentially. Likewise move extension header concatination into a single branch block only doing it if we recorded any extension header length length. Sponsored by: Netflix (partially, originally) Modified: stable/11/sys/netinet6/ip6_output.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet6/ip6_output.c ============================================================================== --- stable/11/sys/netinet6/ip6_output.c Mon Mar 2 13:16:18 2020 (r358540) +++ stable/11/sys/netinet6/ip6_output.c Mon Mar 2 13:16:40 2020 (r358541) @@ -155,10 +155,10 @@ static int copypktopts(struct ip6_pktopts *, struct ip /* - * Make an extension header from option data. hp is the source, and - * mp is the destination. + * Make an extension header from option data. hp is the source, + * mp is the destination, and _ol is the optlen. */ -#define MAKE_EXTHDR(hp, mp) \ +#define MAKE_EXTHDR(hp, mp, _ol) \ do { \ if (hp) { \ struct ip6_ext *eh = (struct ip6_ext *)(hp); \ @@ -166,6 +166,7 @@ static int copypktopts(struct ip6_pktopts *, struct ip ((eh)->ip6e_len + 1) << 3); \ if (error) \ goto freehdrs; \ + (_ol) += (*(mp))->m_len; \ } \ } while (/*CONSTCOND*/ 0) @@ -306,22 +307,23 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, struct ip6_hdr *ip6; struct ifnet *ifp, *origifp; struct mbuf *m = m0; - struct mbuf *mprev = NULL; + struct mbuf *mprev; int hlen, tlen, len; struct route_in6 ip6route; struct rtentry *rt = NULL; struct sockaddr_in6 *dst, src_sa, dst_sa; struct in6_addr odst; + u_char *nexthdrp; int error = 0; struct in6_ifaddr *ia = NULL; u_long mtu; int alwaysfrag, dontfrag; - u_int32_t optlen = 0, plen = 0, unfragpartlen = 0; + u_int32_t optlen, plen = 0, unfragpartlen; struct ip6_exthdrs exthdrs; struct in6_addr src0, dst0; u_int32_t zone; struct route_in6 *ro_pmtu = NULL; - int hdrsplit = 0; + bool hdrsplit; int sw_csum, tso; int needfiblookup; uint32_t fibnum; @@ -353,13 +355,50 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, } #endif /* IPSEC */ + /* Source address validation. */ + ip6 = mtod(m, struct ip6_hdr *); + if (IN6_IS_ADDR_UNSPECIFIED(&ip6->ip6_src) && + (flags & IPV6_UNSPECSRC) == 0) { + error = EOPNOTSUPP; + IP6STAT_INC(ip6s_badscope); + goto bad; + } + if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_src)) { + error = EOPNOTSUPP; + IP6STAT_INC(ip6s_badscope); + goto bad; + } + + /* + * If we are given packet options to add extension headers prepare them. + * Calculate the total length of the extension header chain. + * Keep the length of the unfragmentable part for fragmentation. + */ bzero(&exthdrs, sizeof(exthdrs)); + optlen = 0; + unfragpartlen = sizeof(struct ip6_hdr); if (opt) { /* Hop-by-Hop options header. */ - MAKE_EXTHDR(opt->ip6po_hbh, &exthdrs.ip6e_hbh); + MAKE_EXTHDR(opt->ip6po_hbh, &exthdrs.ip6e_hbh, optlen); + /* Destination options header (1st part). */ if (opt->ip6po_rthdr) { +#ifndef RTHDR_SUPPORT_IMPLEMENTED /* + * If there is a routing header, discard the packet + * right away here. RH0/1 are obsolete and we do not + * currently support RH2/3/4. + * People trying to use RH253/254 may want to disable + * this check. + * The moment we do support any routing header (again) + * this block should check the routing type more + * selectively. + */ + error = EINVAL; + goto bad; +#endif + + /* * Destination options header (1st part). * This only makes sense with a routing header. * See Section 9.2 of RFC 3542. @@ -369,46 +408,38 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, * options, which might automatically be inserted in * the kernel. */ - MAKE_EXTHDR(opt->ip6po_dest1, &exthdrs.ip6e_dest1); + MAKE_EXTHDR(opt->ip6po_dest1, &exthdrs.ip6e_dest1, + optlen); } /* Routing header. */ - MAKE_EXTHDR(opt->ip6po_rthdr, &exthdrs.ip6e_rthdr); + MAKE_EXTHDR(opt->ip6po_rthdr, &exthdrs.ip6e_rthdr, optlen); + + unfragpartlen += optlen; + + /* + * NOTE: we don't add AH/ESP length here (done in + * ip6_ipsec_output()). + */ + /* Destination options header (2nd part). */ - MAKE_EXTHDR(opt->ip6po_dest2, &exthdrs.ip6e_dest2); + MAKE_EXTHDR(opt->ip6po_dest2, &exthdrs.ip6e_dest2, optlen); } /* - * Calculate the total length of the extension header chain. - * Keep the length of the unfragmentable part for fragmentation. - */ - optlen = 0; - if (exthdrs.ip6e_hbh) - optlen += exthdrs.ip6e_hbh->m_len; - if (exthdrs.ip6e_dest1) - optlen += exthdrs.ip6e_dest1->m_len; - if (exthdrs.ip6e_rthdr) - optlen += exthdrs.ip6e_rthdr->m_len; - unfragpartlen = optlen + sizeof(struct ip6_hdr); - - /* NOTE: we don't add AH/ESP length here (done in ip6_ipsec_output). */ - if (exthdrs.ip6e_dest2) - optlen += exthdrs.ip6e_dest2->m_len; - - /* * If there is at least one extension header, * separate IP6 header from the payload. */ - if (optlen && !hdrsplit) { + hdrsplit = false; + if (optlen) { if ((error = ip6_splithdr(m, &exthdrs)) != 0) { m = NULL; goto freehdrs; } m = exthdrs.ip6e_ip6; - hdrsplit++; + ip6 = mtod(m, struct ip6_hdr *); + hdrsplit = true; } - ip6 = mtod(m, struct ip6_hdr *); - /* Adjust mbuf packet header length. */ m->m_pkthdr.len += optlen; plen = m->m_pkthdr.len - sizeof(*ip6); @@ -421,77 +452,59 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, goto freehdrs; } m = exthdrs.ip6e_ip6; - hdrsplit++; + ip6 = mtod(m, struct ip6_hdr *); + hdrsplit = true; } - /* Adjust pointer. */ - ip6 = mtod(m, struct ip6_hdr *); if ((error = ip6_insert_jumboopt(&exthdrs, plen)) != 0) goto freehdrs; ip6->ip6_plen = 0; } else ip6->ip6_plen = htons(plen); + nexthdrp = &ip6->ip6_nxt; - /* - * Concatenate headers and fill in next header fields. - * Here we have, on "m" - * IPv6 payload - * and we insert headers accordingly. - * Finally, we should be getting: - * IPv6 hbh dest1 rthdr ah* [esp* dest2 payload]. - * - * During the header composing process "m" points to IPv6 - * header. "mprev" points to an extension header prior to esp. - */ - u_char *nexthdrp = &ip6->ip6_nxt; - mprev = m; + if (optlen) { + /* + * Concatenate headers and fill in next header fields. + * Here we have, on "m" + * IPv6 payload + * and we insert headers accordingly. + * Finally, we should be getting: + * IPv6 hbh dest1 rthdr ah* [esp* dest2 payload]. + * + * During the header composing process "m" points to IPv6 + * header. "mprev" points to an extension header prior to esp. + */ + mprev = m; - /* - * We treat dest2 specially. This makes IPsec processing - * much easier. The goal here is to make mprev point the - * mbuf prior to dest2. - * - * Result: IPv6 dest2 payload. - * m and mprev will point to IPv6 header. - */ - if (exthdrs.ip6e_dest2) { - if (!hdrsplit) - panic("%s:%d: assumption failed: " - "hdr not split: hdrsplit %d exthdrs %p", - __func__, __LINE__, hdrsplit, &exthdrs); - exthdrs.ip6e_dest2->m_next = m->m_next; - m->m_next = exthdrs.ip6e_dest2; - *mtod(exthdrs.ip6e_dest2, u_char *) = ip6->ip6_nxt; - ip6->ip6_nxt = IPPROTO_DSTOPTS; - } + /* + * We treat dest2 specially. This makes IPsec processing + * much easier. The goal here is to make mprev point the + * mbuf prior to dest2. + * + * Result: IPv6 dest2 payload. + * m and mprev will point to IPv6 header. + */ + if (exthdrs.ip6e_dest2) { + if (!hdrsplit) + panic("%s:%d: assumption failed: " + "hdr not split: hdrsplit %d exthdrs %p", + __func__, __LINE__, hdrsplit, &exthdrs); + exthdrs.ip6e_dest2->m_next = m->m_next; + m->m_next = exthdrs.ip6e_dest2; + *mtod(exthdrs.ip6e_dest2, u_char *) = ip6->ip6_nxt; + ip6->ip6_nxt = IPPROTO_DSTOPTS; + } - /* - * Result: IPv6 hbh dest1 rthdr dest2 payload. - * m will point to IPv6 header. mprev will point to the - * extension header prior to dest2 (rthdr in the above case). - */ - MAKE_CHAIN(exthdrs.ip6e_hbh, mprev, nexthdrp, IPPROTO_HOPOPTS); - MAKE_CHAIN(exthdrs.ip6e_dest1, mprev, nexthdrp, - IPPROTO_DSTOPTS); - MAKE_CHAIN(exthdrs.ip6e_rthdr, mprev, nexthdrp, - IPPROTO_ROUTING); - - /* If there is a routing header, discard the packet. */ - if (exthdrs.ip6e_rthdr) { - error = EINVAL; - goto bad; - } - - /* Source address validation. */ - if (IN6_IS_ADDR_UNSPECIFIED(&ip6->ip6_src) && - (flags & IPV6_UNSPECSRC) == 0) { - error = EOPNOTSUPP; - IP6STAT_INC(ip6s_badscope); - goto bad; - } - if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_src)) { - error = EOPNOTSUPP; - IP6STAT_INC(ip6s_badscope); - goto bad; + /* + * Result: IPv6 hbh dest1 rthdr dest2 payload. + * m will point to IPv6 header. mprev will point to the + * extension header prior to dest2 (rthdr in the above case). + */ + MAKE_CHAIN(exthdrs.ip6e_hbh, mprev, nexthdrp, IPPROTO_HOPOPTS); + MAKE_CHAIN(exthdrs.ip6e_dest1, mprev, nexthdrp, + IPPROTO_DSTOPTS); + MAKE_CHAIN(exthdrs.ip6e_rthdr, mprev, nexthdrp, + IPPROTO_ROUTING); } IP6STAT_INC(ip6s_localout); From owner-svn-src-stable@freebsd.org Mon Mar 2 13:23:29 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 B39691AEA52; Mon, 2 Mar 2020 13:23:29 +0000 (UTC) (envelope-from bz@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 48WLSK3Q6Fz3PjM; Mon, 2 Mar 2020 13:23:29 +0000 (UTC) (envelope-from bz@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 4D0091D01A; Mon, 2 Mar 2020 13:23:29 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 022DNTBO011366; Mon, 2 Mar 2020 13:23:29 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 022DNT7j011365; Mon, 2 Mar 2020 13:23:29 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202003021323.022DNT7j011365@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Mon, 2 Mar 2020 13:23:29 +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: r358542 - stable/12/sys/netinet6 X-SVN-Group: stable-12 X-SVN-Commit-Author: bz X-SVN-Commit-Paths: stable/12/sys/netinet6 X-SVN-Commit-Revision: 358542 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: Mon, 02 Mar 2020 13:23:29 -0000 Author: bz Date: Mon Mar 2 13:23:28 2020 New Revision: 358542 URL: https://svnweb.freebsd.org/changeset/base/358542 Log: MFC r358427: initialize oifp to avoid bogus results/panics in edge cases In certain cases (probably not during normal operation but observed in the lab during development) ip6_ouput() could return without error and ifpp (&oifp) not updated. Given oifp was never initialized we would take the later branch as oifp was not NULL, and when calling icmp6_ifstat_inc() we would panic dereferencing a garbage pointer. For code stability initialize oifp to NULL before first use to always have a deterministic value and not rely on a called function to behave and always and for ever do the work for us as we hope for. Sponsored by: Netflix Modified: stable/12/sys/netinet6/mld6.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet6/mld6.c ============================================================================== --- stable/12/sys/netinet6/mld6.c Mon Mar 2 13:16:40 2020 (r358541) +++ stable/12/sys/netinet6/mld6.c Mon Mar 2 13:23:28 2020 (r358542) @@ -3155,6 +3155,7 @@ mld_dispatch_packet(struct mbuf *m) mld = (struct mld_hdr *)(mtod(md, uint8_t *) + off); type = mld->mld_type; + oifp = NULL; error = ip6_output(m0, &mld_po, NULL, IPV6_UNSPECSRC, &im6o, &oifp, NULL); if (error) { From owner-svn-src-stable@freebsd.org Mon Mar 2 13:23:52 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 D463D1AEAD0; Mon, 2 Mar 2020 13:23:52 +0000 (UTC) (envelope-from bz@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 48WLSm1phmz3QWJ; Mon, 2 Mar 2020 13:23:52 +0000 (UTC) (envelope-from bz@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 E49DA1D01B; Mon, 2 Mar 2020 13:23:51 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 022DNpxp011464; Mon, 2 Mar 2020 13:23:51 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 022DNpuC011463; Mon, 2 Mar 2020 13:23:51 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202003021323.022DNpuC011463@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Mon, 2 Mar 2020 13:23:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r358543 - stable/11/sys/netinet6 X-SVN-Group: stable-11 X-SVN-Commit-Author: bz X-SVN-Commit-Paths: stable/11/sys/netinet6 X-SVN-Commit-Revision: 358543 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: Mon, 02 Mar 2020 13:23:53 -0000 Author: bz Date: Mon Mar 2 13:23:51 2020 New Revision: 358543 URL: https://svnweb.freebsd.org/changeset/base/358543 Log: MFC r358427: initialize oifp to avoid bogus results/panics in edge cases In certain cases (probably not during normal operation but observed in the lab during development) ip6_ouput() could return without error and ifpp (&oifp) not updated. Given oifp was never initialized we would take the later branch as oifp was not NULL, and when calling icmp6_ifstat_inc() we would panic dereferencing a garbage pointer. For code stability initialize oifp to NULL before first use to always have a deterministic value and not rely on a called function to behave and always and for ever do the work for us as we hope for. Sponsored by: Netflix Modified: stable/11/sys/netinet6/mld6.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet6/mld6.c ============================================================================== --- stable/11/sys/netinet6/mld6.c Mon Mar 2 13:23:28 2020 (r358542) +++ stable/11/sys/netinet6/mld6.c Mon Mar 2 13:23:51 2020 (r358543) @@ -3124,6 +3124,7 @@ mld_dispatch_packet(struct mbuf *m) mld = (struct mld_hdr *)(mtod(md, uint8_t *) + off); type = mld->mld_type; + oifp = NULL; error = ip6_output(m0, &mld_po, NULL, IPV6_UNSPECSRC, &im6o, &oifp, NULL); if (error) { From owner-svn-src-stable@freebsd.org Mon Mar 2 16:56:33 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 042CF253B0A; Mon, 2 Mar 2020 16:56:33 +0000 (UTC) (envelope-from jhibbits@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 48WRB85StNz45fy; Mon, 2 Mar 2020 16:56:32 +0000 (UTC) (envelope-from jhibbits@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 9E98B1F6F9; Mon, 2 Mar 2020 16:56:32 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 022GuWdR038946; Mon, 2 Mar 2020 16:56:32 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 022GuW1E038945; Mon, 2 Mar 2020 16:56:32 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <202003021656.022GuW1E038945@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Mon, 2 Mar 2020 16:56:32 +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: r358551 - stable/12/sys/dev/uart X-SVN-Group: stable-12 X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: stable/12/sys/dev/uart X-SVN-Commit-Revision: 358551 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: Mon, 02 Mar 2020 16:56:33 -0000 Author: jhibbits Date: Mon Mar 2 16:56:32 2020 New Revision: 358551 URL: https://svnweb.freebsd.org/changeset/base/358551 Log: MFC r358431: Add Denverton UART PCI ID Sponsored by: Juniper Networks, Inc Modified: stable/12/sys/dev/uart/uart_bus_pci.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/uart/uart_bus_pci.c ============================================================================== --- stable/12/sys/dev/uart/uart_bus_pci.c Mon Mar 2 16:11:25 2020 (r358550) +++ stable/12/sys/dev/uart/uart_bus_pci.c Mon Mar 2 16:56:32 2020 (r358551) @@ -133,6 +133,7 @@ static const struct pci_id pci_ns8250_ids[] = { { 0x8086, 0x0f0c, 0xffff, 0, "Intel ValleyView LPIO1 HSUART#2", 0x10, 24 * DEFAULT_RCLK, 2 }, { 0x8086, 0x108f, 0xffff, 0, "Intel AMT - SOL", 0x10 }, +{ 0x8086, 0x19d8, 0xffff, 0, "Intel Denverton UART", 0x10 }, { 0x8086, 0x1c3d, 0xffff, 0, "Intel AMT - KT Controller", 0x10 }, { 0x8086, 0x1d3d, 0xffff, 0, "Intel C600/X79 Series Chipset KT Controller", 0x10 }, { 0x8086, 0x1e3d, 0xffff, 0, "Intel Panther Point KT Controller", 0x10 }, From owner-svn-src-stable@freebsd.org Mon Mar 2 18:06:03 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 7141C255E60; Mon, 2 Mar 2020 18:06:03 +0000 (UTC) (envelope-from jhibbits@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 48WSkM2S06z4DQX; Mon, 2 Mar 2020 18:06:03 +0000 (UTC) (envelope-from jhibbits@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 4F02B203B9; Mon, 2 Mar 2020 18:06:03 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 022I636T080674; Mon, 2 Mar 2020 18:06:03 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 022I63nL080673; Mon, 2 Mar 2020 18:06:03 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <202003021806.022I63nL080673@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Mon, 2 Mar 2020 18:06:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r358552 - stable/11/sys/dev/uart X-SVN-Group: stable-11 X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: stable/11/sys/dev/uart X-SVN-Commit-Revision: 358552 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: Mon, 02 Mar 2020 18:06:03 -0000 Author: jhibbits Date: Mon Mar 2 18:06:02 2020 New Revision: 358552 URL: https://svnweb.freebsd.org/changeset/base/358552 Log: MFC r358431: Add Denverton UART PCI ID Sponsored by: Juniper Networks, Inc Modified: stable/11/sys/dev/uart/uart_bus_pci.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/uart/uart_bus_pci.c ============================================================================== --- stable/11/sys/dev/uart/uart_bus_pci.c Mon Mar 2 16:56:32 2020 (r358551) +++ stable/11/sys/dev/uart/uart_bus_pci.c Mon Mar 2 18:06:02 2020 (r358552) @@ -128,6 +128,7 @@ static const struct pci_id pci_ns8250_ids[] = { { 0x8086, 0x0f0c, 0xffff, 0, "Intel ValleyView LPIO1 HSUART#2", 0x10, 24 * DEFAULT_RCLK, 2 }, { 0x8086, 0x108f, 0xffff, 0, "Intel AMT - SOL", 0x10 }, +{ 0x8086, 0x19d8, 0xffff, 0, "Intel Denverton UART", 0x10 }, { 0x8086, 0x1c3d, 0xffff, 0, "Intel AMT - KT Controller", 0x10 }, { 0x8086, 0x1d3d, 0xffff, 0, "Intel C600/X79 Series Chipset KT Controller", 0x10 }, { 0x8086, 0x1e3d, 0xffff, 0, "Intel Panther Point KT Controller", 0x10 }, From owner-svn-src-stable@freebsd.org Mon Mar 2 22:54:33 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 9B82925D0B7; Mon, 2 Mar 2020 22:54:33 +0000 (UTC) (envelope-from bz@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 48Wb7F1518z41sp; Mon, 2 Mar 2020 22:54:32 +0000 (UTC) (envelope-from bz@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 B421F2391A; Mon, 2 Mar 2020 22:54:32 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 022MsWD9053903; Mon, 2 Mar 2020 22:54:32 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 022MsWea053902; Mon, 2 Mar 2020 22:54:32 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202003022254.022MsWea053902@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Mon, 2 Mar 2020 22:54:32 +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: r358557 - stable/12/sys/netinet6 X-SVN-Group: stable-12 X-SVN-Commit-Author: bz X-SVN-Commit-Paths: stable/12/sys/netinet6 X-SVN-Commit-Revision: 358557 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: Mon, 02 Mar 2020 22:54:33 -0000 Author: bz Date: Mon Mar 2 22:54:32 2020 New Revision: 358557 URL: https://svnweb.freebsd.org/changeset/base/358557 Log: MFC r358297: Fix IPv6 checksums when exthdrs are present. In two places in ip6_output we are doing (delayed) checksum calculations. The initial logic came from SCTP in r205075,205104 and later I copied and adjusted it for the TCP|UDP case in r235958. The problem was that the original SCTP offsets were already wrong for any case with extension headers present given IPv6 extension headers are not part of the pseudo checksum calculations. The later changes do not help in case there is checksum offloading as for extension headers (incl. fragments) we do currrently never offload as we have no infrastructure to know whether the NIC can handle these cases. Correct the offsets for delayed checksum calculations and properly handle mbuf flags. In addition harmonize the almost identical duplicate code. While here eliminate the now unneeded variable hlen and add an always missing mtod() call in the 1-b and 3 cases after the introduction of the mb_unmapped_to_ext() calls. [Keep code in sync with head] Reported by: Francis Dupont (fdupont isc.org) PR: 243675 Modified: stable/12/sys/netinet6/ip6_output.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet6/ip6_output.c ============================================================================== --- stable/12/sys/netinet6/ip6_output.c Mon Mar 2 22:19:30 2020 (r358556) +++ stable/12/sys/netinet6/ip6_output.c Mon Mar 2 22:54:32 2020 (r358557) @@ -208,6 +208,36 @@ in6_delayed_cksum(struct mbuf *m, uint32_t plen, u_sho *(u_short *)mtodo(m, offset) = csum; } +static int +ip6_output_delayed_csum(struct mbuf *m, struct ifnet *ifp, int csum_flags, + int plen, int optlen, bool frag __unused) +{ + + KASSERT((plen >= optlen), ("%s:%d: plen %d < optlen %d, m %p, ifp %p " + "csum_flags %#x frag %d\n", + __func__, __LINE__, plen, optlen, m, ifp, csum_flags, frag)); + + if ((csum_flags & CSUM_DELAY_DATA_IPV6) || +#ifdef SCTP + (csum_flags & CSUM_SCTP_IPV6) || +#endif + false) { + if (csum_flags & CSUM_DELAY_DATA_IPV6) { + in6_delayed_cksum(m, plen - optlen, + sizeof(struct ip6_hdr) + optlen); + m->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA_IPV6; + } +#ifdef SCTP + if (csum_flags & CSUM_SCTP_IPV6) { + sctp_delayed_cksum(m, sizeof(struct ip6_hdr) + optlen); + m->m_pkthdr.csum_flags &= ~CSUM_SCTP_IPV6; + } +#endif + } + + return (0); +} + int ip6_fragment(struct ifnet *ifp, struct mbuf *m0, int hlen, u_char nextproto, int fraglen , uint32_t id) @@ -307,7 +337,7 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, struct ifnet *ifp, *origifp; struct mbuf *m = m0; struct mbuf *mprev; - int hlen, tlen, len; + int tlen, len; struct route_in6 ip6route; struct rtentry *rt = NULL; struct sockaddr_in6 *dst, src_sa, dst_sa; @@ -918,17 +948,10 @@ passout: * XXX-BZ Need a framework to know when the NIC can handle it, even * with ext. hdrs. */ - if (sw_csum & CSUM_DELAY_DATA_IPV6) { - sw_csum &= ~CSUM_DELAY_DATA_IPV6; - in6_delayed_cksum(m, plen, sizeof(struct ip6_hdr)); - } -#ifdef SCTP - if (sw_csum & CSUM_SCTP_IPV6) { - sw_csum &= ~CSUM_SCTP_IPV6; - sctp_delayed_cksum(m, sizeof(struct ip6_hdr)); - } -#endif - m->m_pkthdr.csum_flags &= ifp->if_hwassist; + error = ip6_output_delayed_csum(m, ifp, sw_csum, plen, optlen, false); + if (error != 0) + goto bad; + /* XXX-BZ m->m_pkthdr.csum_flags &= ~ifp->if_hwassist; */ tlen = m->m_pkthdr.len; if ((opt && (opt->ip6po_flags & IP6PO_DONTFRAG)) || tso) @@ -1008,11 +1031,10 @@ passout: * fragment if possible. * Must be able to put at least 8 bytes per fragment. */ - hlen = unfragpartlen; if (mtu > IPV6_MAXPACKET) mtu = IPV6_MAXPACKET; - len = (mtu - hlen - sizeof(struct ip6_frag)) & ~7; + len = (mtu - unfragpartlen - sizeof(struct ip6_frag)) & ~7; if (len < 8) { error = EMSGSIZE; in6_ifstat_inc(ifp, ifs6_out_fragfail); @@ -1024,16 +1046,11 @@ passout: * fragmented packets, then do it here. * XXX-BZ handle the hw offloading case. Need flags. */ - if (m->m_pkthdr.csum_flags & CSUM_DELAY_DATA_IPV6) { - in6_delayed_cksum(m, plen, hlen); - m->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA_IPV6; - } -#ifdef SCTP - if (m->m_pkthdr.csum_flags & CSUM_SCTP_IPV6) { - sctp_delayed_cksum(m, hlen); - m->m_pkthdr.csum_flags &= ~CSUM_SCTP_IPV6; - } -#endif + error = ip6_output_delayed_csum(m, ifp, m->m_pkthdr.csum_flags, + plen, optlen, true); + if (error != 0) + goto bad; + /* * Change the next header field of the last header in the * unfragmentable part. @@ -1048,6 +1065,7 @@ passout: nextproto = *mtod(exthdrs.ip6e_hbh, u_char *); *mtod(exthdrs.ip6e_hbh, u_char *) = IPPROTO_FRAGMENT; } else { + ip6 = mtod(m, struct ip6_hdr *); nextproto = ip6->ip6_nxt; ip6->ip6_nxt = IPPROTO_FRAGMENT; } @@ -1059,7 +1077,8 @@ passout: */ m0 = m; id = htonl(ip6_randomid()); - if ((error = ip6_fragment(ifp, m, hlen, nextproto, len, id))) + error = ip6_fragment(ifp, m, unfragpartlen, nextproto,len, id); + if (error != 0) goto sendorfree; in6_ifstat_inc(ifp, ifs6_out_fragok); From owner-svn-src-stable@freebsd.org Tue Mar 3 08:24:09 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 D2C77268232; Tue, 3 Mar 2020 08:24:09 +0000 (UTC) (envelope-from bz@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 48WqmT4CVKz4YXj; Tue, 3 Mar 2020 08:24:09 +0000 (UTC) (envelope-from bz@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 81D9F229A; Tue, 3 Mar 2020 08:24:09 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0238O9Vo093825; Tue, 3 Mar 2020 08:24:09 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0238O917093824; Tue, 3 Mar 2020 08:24:09 GMT (envelope-from bz@FreeBSD.org) Message-Id: <202003030824.0238O917093824@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Tue, 3 Mar 2020 08:24:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r358566 - stable/11/sys/netinet6 X-SVN-Group: stable-11 X-SVN-Commit-Author: bz X-SVN-Commit-Paths: stable/11/sys/netinet6 X-SVN-Commit-Revision: 358566 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: Tue, 03 Mar 2020 08:24:09 -0000 Author: bz Date: Tue Mar 3 08:24:09 2020 New Revision: 358566 URL: https://svnweb.freebsd.org/changeset/base/358566 Log: MFC r358297: Fix IPv6 checksums when exthdrs are present. In two places in ip6_output we are doing (delayed) checksum calculations. The initial logic came from SCTP in r205075,205104 and later I copied and adjusted it for the TCP|UDP case in r235958. The problem was that the original SCTP offsets were already wrong for any case with extension headers present given IPv6 extension headers are not part of the pseudo checksum calculations. The later changes do not help in case there is checksum offloading as for extension headers (incl. fragments) we do currrently never offload as we have no infrastructure to know whether the NIC can handle these cases. Correct the offsets for delayed checksum calculations and properly handle mbuf flags. In addition harmonize the almost identical duplicate code. While here eliminate the now unneeded variable hlen and add an always missing mtod() call in the 1-b and 3 cases after the introduction of the mb_unmapped_to_ext() calls. [Keep code in sync with head] Reported by: Francis Dupont (fdupont isc.org) PR: 243675 Modified: stable/11/sys/netinet6/ip6_output.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet6/ip6_output.c ============================================================================== --- stable/11/sys/netinet6/ip6_output.c Tue Mar 3 03:22:00 2020 (r358565) +++ stable/11/sys/netinet6/ip6_output.c Tue Mar 3 08:24:09 2020 (r358566) @@ -209,6 +209,36 @@ in6_delayed_cksum(struct mbuf *m, uint32_t plen, u_sho *(u_short *)mtodo(m, offset) = csum; } +static int +ip6_output_delayed_csum(struct mbuf *m, struct ifnet *ifp, int csum_flags, + int plen, int optlen, bool frag __unused) +{ + + KASSERT((plen >= optlen), ("%s:%d: plen %d < optlen %d, m %p, ifp %p " + "csum_flags %#x frag %d\n", + __func__, __LINE__, plen, optlen, m, ifp, csum_flags, frag)); + + if ((csum_flags & CSUM_DELAY_DATA_IPV6) || +#ifdef SCTP + (csum_flags & CSUM_SCTP_IPV6) || +#endif + false) { + if (csum_flags & CSUM_DELAY_DATA_IPV6) { + in6_delayed_cksum(m, plen - optlen, + sizeof(struct ip6_hdr) + optlen); + m->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA_IPV6; + } +#ifdef SCTP + if (csum_flags & CSUM_SCTP_IPV6) { + sctp_delayed_cksum(m, sizeof(struct ip6_hdr) + optlen); + m->m_pkthdr.csum_flags &= ~CSUM_SCTP_IPV6; + } +#endif + } + + return (0); +} + int ip6_fragment(struct ifnet *ifp, struct mbuf *m0, int hlen, u_char nextproto, int mtu, uint32_t id) @@ -308,7 +338,7 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, struct ifnet *ifp, *origifp; struct mbuf *m = m0; struct mbuf *mprev; - int hlen, tlen, len; + int tlen, len; struct route_in6 ip6route; struct rtentry *rt = NULL; struct sockaddr_in6 *dst, src_sa, dst_sa; @@ -929,17 +959,10 @@ passout: * XXX-BZ Need a framework to know when the NIC can handle it, even * with ext. hdrs. */ - if (sw_csum & CSUM_DELAY_DATA_IPV6) { - sw_csum &= ~CSUM_DELAY_DATA_IPV6; - in6_delayed_cksum(m, plen, sizeof(struct ip6_hdr)); - } -#ifdef SCTP - if (sw_csum & CSUM_SCTP_IPV6) { - sw_csum &= ~CSUM_SCTP_IPV6; - sctp_delayed_cksum(m, sizeof(struct ip6_hdr)); - } -#endif - m->m_pkthdr.csum_flags &= ifp->if_hwassist; + error = ip6_output_delayed_csum(m, ifp, sw_csum, plen, optlen, false); + if (error != 0) + goto bad; + /* XXX-BZ m->m_pkthdr.csum_flags &= ~ifp->if_hwassist; */ tlen = m->m_pkthdr.len; if ((opt && (opt->ip6po_flags & IP6PO_DONTFRAG)) || tso) @@ -1003,11 +1026,10 @@ passout: * fragment if possible. * Must be able to put at least 8 bytes per fragment. */ - hlen = unfragpartlen; if (mtu > IPV6_MAXPACKET) mtu = IPV6_MAXPACKET; - len = (mtu - hlen - sizeof(struct ip6_frag)) & ~7; + len = (mtu - unfragpartlen - sizeof(struct ip6_frag)) & ~7; if (len < 8) { error = EMSGSIZE; in6_ifstat_inc(ifp, ifs6_out_fragfail); @@ -1019,16 +1041,11 @@ passout: * fragmented packets, then do it here. * XXX-BZ handle the hw offloading case. Need flags. */ - if (m->m_pkthdr.csum_flags & CSUM_DELAY_DATA_IPV6) { - in6_delayed_cksum(m, plen, hlen); - m->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA_IPV6; - } -#ifdef SCTP - if (m->m_pkthdr.csum_flags & CSUM_SCTP_IPV6) { - sctp_delayed_cksum(m, hlen); - m->m_pkthdr.csum_flags &= ~CSUM_SCTP_IPV6; - } -#endif + error = ip6_output_delayed_csum(m, ifp, m->m_pkthdr.csum_flags, + plen, optlen, true); + if (error != 0) + goto bad; + /* * Change the next header field of the last header in the * unfragmentable part. @@ -1043,6 +1060,7 @@ passout: nextproto = *mtod(exthdrs.ip6e_hbh, u_char *); *mtod(exthdrs.ip6e_hbh, u_char *) = IPPROTO_FRAGMENT; } else { + ip6 = mtod(m, struct ip6_hdr *); nextproto = ip6->ip6_nxt; ip6->ip6_nxt = IPPROTO_FRAGMENT; } @@ -1054,7 +1072,8 @@ passout: */ m0 = m; id = htonl(ip6_randomid()); - if ((error = ip6_fragment(ifp, m, hlen, nextproto, len, id))) + error = ip6_fragment(ifp, m, unfragpartlen, nextproto,len, id); + if (error != 0) goto sendorfree; in6_ifstat_inc(ifp, ifs6_out_fragok); From owner-svn-src-stable@freebsd.org Tue Mar 3 14:58:55 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 228DA2521E8; Tue, 3 Mar 2020 14:58:55 +0000 (UTC) (envelope-from fsu@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 48X0Wy65Ttz3Q0j; Tue, 3 Mar 2020 14:58:54 +0000 (UTC) (envelope-from fsu@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 78FA46DEC; Tue, 3 Mar 2020 14:58:54 +0000 (UTC) (envelope-from fsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 023EwsxS028216; Tue, 3 Mar 2020 14:58:54 GMT (envelope-from fsu@FreeBSD.org) Received: (from fsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 023Ewr6l028214; Tue, 3 Mar 2020 14:58:53 GMT (envelope-from fsu@FreeBSD.org) Message-Id: <202003031458.023Ewr6l028214@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: fsu set sender to fsu@FreeBSD.org using -f From: Fedor Uporov Date: Tue, 3 Mar 2020 14:58:53 +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: r358578 - stable/12/sys/fs/ext2fs X-SVN-Group: stable-12 X-SVN-Commit-Author: fsu X-SVN-Commit-Paths: stable/12/sys/fs/ext2fs X-SVN-Commit-Revision: 358578 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: Tue, 03 Mar 2020 14:58:55 -0000 Author: fsu Date: Tue Mar 3 14:58:53 2020 New Revision: 358578 URL: https://svnweb.freebsd.org/changeset/base/358578 Log: MFC r358073: Add a EXT2FS-specific implementation for lseek(SEEK_DATA). Reviewed by: pfg MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D23605 Modified: stable/12/sys/fs/ext2fs/ext2_bmap.c stable/12/sys/fs/ext2fs/ext2_extern.h stable/12/sys/fs/ext2fs/ext2_vnops.c Modified: stable/12/sys/fs/ext2fs/ext2_bmap.c ============================================================================== --- stable/12/sys/fs/ext2fs/ext2_bmap.c Tue Mar 3 14:15:30 2020 (r358577) +++ stable/12/sys/fs/ext2fs/ext2_bmap.c Tue Mar 3 14:58:53 2020 (r358578) @@ -139,6 +139,47 @@ ext4_bmapext(struct vnode *vp, int32_t bn, int64_t *bn return (error); } +static int +readindir(struct vnode *vp, e2fs_lbn_t lbn, e2fs_daddr_t daddr, struct buf **bpp) +{ + struct buf *bp; + struct mount *mp; + struct ext2mount *ump; + int error; + + mp = vp->v_mount; + ump = VFSTOEXT2(mp); + + bp = getblk(vp, lbn, mp->mnt_stat.f_iosize, 0, 0, 0); + if ((bp->b_flags & B_CACHE) == 0) { + KASSERT(daddr != 0, + ("readindir: indirect block not in cache")); + + bp->b_blkno = blkptrtodb(ump, daddr); + bp->b_iocmd = BIO_READ; + bp->b_flags &= ~B_INVAL; + bp->b_ioflags &= ~BIO_ERROR; + vfs_busy_pages(bp, 0); + bp->b_iooffset = dbtob(bp->b_blkno); + bstrategy(bp); +#ifdef RACCT + if (racct_enable) { + PROC_LOCK(curproc); + racct_add_buf(curproc, bp, 0); + PROC_UNLOCK(curproc); + } +#endif + curthread->td_ru.ru_inblock++; + error = bufwait(bp); + if (error != 0) { + brelse(bp); + return (error); + } + } + *bpp = bp; + return (0); +} + /* * Indirect blocks are now on the vnode for the file. They are given negative * logical block numbers. Indirect blocks are addressed by the negative @@ -228,35 +269,10 @@ ext2_bmaparray(struct vnode *vp, daddr_t bn, daddr_t * */ if (bp) bqrelse(bp); + error = readindir(vp, metalbn, daddr, &bp); + if (error != 0) + return (error); - bp = getblk(vp, metalbn, bsize, 0, 0, 0); - if ((bp->b_flags & B_CACHE) == 0) { -#ifdef INVARIANTS - if (!daddr) - panic("ext2_bmaparray: indirect block not in cache"); -#endif - bp->b_blkno = blkptrtodb(ump, daddr); - bp->b_iocmd = BIO_READ; - bp->b_flags &= ~B_INVAL; - bp->b_ioflags &= ~BIO_ERROR; - vfs_busy_pages(bp, 0); - bp->b_iooffset = dbtob(bp->b_blkno); - bstrategy(bp); -#ifdef RACCT - if (racct_enable) { - PROC_LOCK(curproc); - racct_add_buf(curproc, bp, 0); - PROC_UNLOCK(curproc); - } -#endif - curthread->td_ru.ru_inblock++; - error = bufwait(bp); - if (error) { - brelse(bp); - return (error); - } - } - daddr = ((e2fs_daddr_t *)bp->b_data)[ap->in_off]; if (num == 1 && daddr && runp) { for (bn = ap->in_off + 1; @@ -294,6 +310,107 @@ ext2_bmaparray(struct vnode *vp, daddr_t bn, daddr_t * *bnp = -1; } return (0); +} + +static e2fs_lbn_t +lbn_count(struct ext2mount *ump, int level) + +{ + e2fs_lbn_t blockcnt; + + for (blockcnt = 1; level > 0; level--) + blockcnt *= MNINDIR(ump); + return (blockcnt); +} + +int +ext2_bmap_seekdata(struct vnode *vp, off_t *offp) +{ + struct buf *bp; + struct indir a[EXT2_NIADDR + 1], *ap; + struct inode *ip; + struct mount *mp; + struct ext2mount *ump; + e2fs_daddr_t bn, daddr, nextbn; + uint64_t bsize; + off_t numblks; + int error, num, num1, off; + + bp = NULL; + error = 0; + ip = VTOI(vp); + mp = vp->v_mount; + ump = VFSTOEXT2(mp); + + if (vp->v_type != VREG || (ip->i_flags & SF_SNAPSHOT) != 0) + return (EINVAL); + if (*offp < 0 || *offp >= ip->i_size) + return (ENXIO); + + bsize = mp->mnt_stat.f_iosize; + for (bn = *offp / bsize, numblks = howmany(ip->i_size, bsize); + bn < numblks; bn = nextbn) { + if (bn < EXT2_NDADDR) { + daddr = ip->i_db[bn]; + if (daddr != 0) + break; + nextbn = bn + 1; + continue; + } + + ap = a; + error = ext2_getlbns(vp, bn, ap, &num); + if (error != 0) + break; + MPASS(num >= 2); + daddr = ip->i_ib[ap->in_off]; + ap++, num--; + for (nextbn = EXT2_NDADDR, num1 = num - 1; num1 > 0; num1--) + nextbn += lbn_count(ump, num1); + if (daddr == 0) { + nextbn += lbn_count(ump, num); + continue; + } + + for (; daddr != 0 && num > 0; ap++, num--) { + if (bp != NULL) + bqrelse(bp); + error = readindir(vp, ap->in_lbn, daddr, &bp); + if (error != 0) + return (error); + + /* + * Scan the indirect block until we find a non-zero + * pointer. + */ + off = ap->in_off; + do { + daddr = ((e2fs_daddr_t *)bp->b_data)[off]; + } while (daddr == 0 && ++off < MNINDIR(ump)); + nextbn += off * lbn_count(ump, num - 1); + + /* + * We need to recompute the LBNs of indirect + * blocks, so restart with the updated block offset. + */ + if (off != ap->in_off) + break; + } + if (num == 0) { + /* + * We found a data block. + */ + bn = nextbn; + break; + } + } + if (bp != NULL) + bqrelse(bp); + if (bn >= numblks) + error = ENXIO; + if (error == 0 && *offp < bn * bsize) + *offp = bn * bsize; + return (error); } /* Modified: stable/12/sys/fs/ext2fs/ext2_extern.h ============================================================================== --- stable/12/sys/fs/ext2fs/ext2_extern.h Tue Mar 3 14:15:30 2020 (r358577) +++ stable/12/sys/fs/ext2fs/ext2_extern.h Tue Mar 3 14:58:53 2020 (r358578) @@ -64,6 +64,7 @@ e4fs_daddr_t ext2_blkpref(struct inode *, e2fs_lbn_t, int ext2_bmap(struct vop_bmap_args *); int ext2_bmaparray(struct vnode *, daddr_t, daddr_t *, int *, int *); int ext4_bmapext(struct vnode *, int32_t, int64_t *, int *, int *); +int ext2_bmap_seekdata(struct vnode *, off_t *); void ext2_clusteracct(struct m_ext2fs *, char *, int, e4fs_daddr_t, int); void ext2_dirbad(struct inode *ip, doff_t offset, char *how); int ext2_ei2i(struct ext2fs_dinode *, struct inode *); Modified: stable/12/sys/fs/ext2fs/ext2_vnops.c ============================================================================== --- stable/12/sys/fs/ext2fs/ext2_vnops.c Tue Mar 3 14:15:30 2020 (r358577) +++ stable/12/sys/fs/ext2fs/ext2_vnops.c Tue Mar 3 14:58:53 2020 (r358578) @@ -2155,11 +2155,24 @@ ext2_read(struct vop_read_args *ap) static int ext2_ioctl(struct vop_ioctl_args *ap) { + struct vnode *vp; + int error; + vp = ap->a_vp; switch (ap->a_command) { case FIOSEEKDATA: + if (!(VTOI(vp)->i_flag & IN_E4EXTENTS)) { + error = vn_lock(vp, LK_SHARED); + if (error == 0) { + error = ext2_bmap_seekdata(vp, + (off_t *)ap->a_data); + VOP_UNLOCK(vp, 0); + } else + error = EBADF; + return (error); + } case FIOSEEKHOLE: - return (vn_bmap_seekhole(ap->a_vp, ap->a_command, + return (vn_bmap_seekhole(vp, ap->a_command, (off_t *)ap->a_data, ap->a_cred)); default: return (ENOTTY); From owner-svn-src-stable@freebsd.org Tue Mar 3 15:02:09 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 36CFD252459; Tue, 3 Mar 2020 15:02:09 +0000 (UTC) (envelope-from kib@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 48X0bj0jmfz3ylX; Tue, 3 Mar 2020 15:02:09 +0000 (UTC) (envelope-from kib@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 136536FA1; Tue, 3 Mar 2020 15:02:09 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 023F28RW033312; Tue, 3 Mar 2020 15:02:08 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 023F27tF033304; Tue, 3 Mar 2020 15:02:07 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202003031502.023F27tF033304@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 3 Mar 2020 15:02:07 +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: r358579 - in stable/12/sys: amd64/amd64 dev/cpuctl i386/i386 x86/acpica x86/include x86/x86 X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/12/sys: amd64/amd64 dev/cpuctl i386/i386 x86/acpica x86/include x86/x86 X-SVN-Commit-Revision: 358579 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: Tue, 03 Mar 2020 15:02:09 -0000 Author: kib Date: Tue Mar 3 15:02:07 2020 New Revision: 358579 URL: https://svnweb.freebsd.org/changeset/base/358579 Log: MFC r358315: Fix IBRS for machines with IBRS_ALL capability. Modified: stable/12/sys/amd64/amd64/initcpu.c stable/12/sys/amd64/amd64/support.S stable/12/sys/dev/cpuctl/cpuctl.c stable/12/sys/i386/i386/support.s stable/12/sys/x86/acpica/acpi_wakeup.c stable/12/sys/x86/include/x86_var.h stable/12/sys/x86/x86/cpu_machdep.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/amd64/amd64/initcpu.c ============================================================================== --- stable/12/sys/amd64/amd64/initcpu.c Tue Mar 3 14:58:53 2020 (r358578) +++ stable/12/sys/amd64/amd64/initcpu.c Tue Mar 3 15:02:07 2020 (r358579) @@ -255,7 +255,7 @@ initializecpu(void) wrmsr(MSR_EFER, msr); pg_nx = PG_NX; } - hw_ibrs_recalculate(); + hw_ibrs_recalculate(false); hw_ssb_recalculate(false); amd64_syscall_ret_flush_l1d_recalc(); switch (cpu_vendor_id) { Modified: stable/12/sys/amd64/amd64/support.S ============================================================================== --- stable/12/sys/amd64/amd64/support.S Tue Mar 3 14:58:53 2020 (r358578) +++ stable/12/sys/amd64/amd64/support.S Tue Mar 3 15:02:07 2020 (r358579) @@ -1547,7 +1547,7 @@ handle_ibrs_\l: /* all callers already saved %rax, %rdx, and %rcx */ ENTRY(handle_ibrs_entry) - cmpb $0,hw_ibrs_active(%rip) + cmpb $0,hw_ibrs_ibpb_active(%rip) je 1f movl $MSR_IA32_SPEC_CTRL,%ecx rdmsr Modified: stable/12/sys/dev/cpuctl/cpuctl.c ============================================================================== --- stable/12/sys/dev/cpuctl/cpuctl.c Tue Mar 3 14:58:53 2020 (r358578) +++ stable/12/sys/dev/cpuctl/cpuctl.c Tue Mar 3 15:02:07 2020 (r358579) @@ -538,8 +538,8 @@ cpuctl_do_eval_cpu_features(int cpu, struct thread *td set_cpu(cpu, td); identify_cpu1(); identify_cpu2(); - hw_ibrs_recalculate(); restore_cpu(oldcpu, is_bound, td); + hw_ibrs_recalculate(true); hw_ssb_recalculate(true); #ifdef __amd64__ amd64_syscall_ret_flush_l1d_recalc(); Modified: stable/12/sys/i386/i386/support.s ============================================================================== --- stable/12/sys/i386/i386/support.s Tue Mar 3 14:58:53 2020 (r358578) +++ stable/12/sys/i386/i386/support.s Tue Mar 3 15:02:07 2020 (r358579) @@ -446,7 +446,7 @@ msr_onfault: ret ENTRY(handle_ibrs_entry) - cmpb $0,hw_ibrs_active + cmpb $0,hw_ibrs_ibpb_active je 1f movl $MSR_IA32_SPEC_CTRL,%ecx rdmsr Modified: stable/12/sys/x86/acpica/acpi_wakeup.c ============================================================================== --- stable/12/sys/x86/acpica/acpi_wakeup.c Tue Mar 3 14:58:53 2020 (r358578) +++ stable/12/sys/x86/acpica/acpi_wakeup.c Tue Mar 3 15:02:07 2020 (r358579) @@ -245,7 +245,7 @@ acpi_sleep_machdep(struct acpi_softc *sc, int state) } #endif #ifdef __amd64__ - hw_ibrs_active = 0; + hw_ibrs_ibpb_active = 0; hw_ssb_active = 0; cpu_stdext_feature3 = 0; CPU_FOREACH(i) { Modified: stable/12/sys/x86/include/x86_var.h ============================================================================== --- stable/12/sys/x86/include/x86_var.h Tue Mar 3 14:58:53 2020 (r358578) +++ stable/12/sys/x86/include/x86_var.h Tue Mar 3 15:02:07 2020 (r358579) @@ -84,7 +84,7 @@ extern int use_xsave; extern uint64_t xsave_mask; extern u_int max_apic_id; extern int pti; -extern int hw_ibrs_active; +extern int hw_ibrs_ibpb_active; extern int hw_mds_disable; extern int hw_ssb_active; extern int x86_taa_enable; @@ -141,7 +141,7 @@ int is_physical_memory(vm_paddr_t addr); int isa_nmi(int cd); void handle_ibrs_entry(void); void handle_ibrs_exit(void); -void hw_ibrs_recalculate(void); +void hw_ibrs_recalculate(bool all_cpus); void hw_mds_recalculate(void); void hw_ssb_recalculate(bool all_cpus); void x86_taa_recalculate(void); Modified: stable/12/sys/x86/x86/cpu_machdep.c ============================================================================== --- stable/12/sys/x86/x86/cpu_machdep.c Tue Mar 3 14:58:53 2020 (r358578) +++ stable/12/sys/x86/x86/cpu_machdep.c Tue Mar 3 15:02:07 2020 (r358579) @@ -855,23 +855,27 @@ nmi_handle_intr(u_int type, struct trapframe *frame) nmi_call_kdb(PCPU_GET(cpuid), type, frame); } -int hw_ibrs_active; +static int hw_ibrs_active; +int hw_ibrs_ibpb_active; int hw_ibrs_disable = 1; SYSCTL_INT(_hw, OID_AUTO, ibrs_active, CTLFLAG_RD, &hw_ibrs_active, 0, "Indirect Branch Restricted Speculation active"); void -hw_ibrs_recalculate(void) +hw_ibrs_recalculate(bool for_all_cpus) { if ((cpu_ia32_arch_caps & IA32_ARCH_CAP_IBRS_ALL) != 0) { - x86_msr_op(MSR_IA32_SPEC_CTRL, MSR_OP_LOCAL | - (hw_ibrs_disable ? MSR_OP_ANDNOT : MSR_OP_OR), + x86_msr_op(MSR_IA32_SPEC_CTRL, (for_all_cpus ? + MSR_OP_RENDEZVOUS : MSR_OP_LOCAL) | + (hw_ibrs_disable != 0 ? MSR_OP_ANDNOT : MSR_OP_OR), IA32_SPEC_CTRL_IBRS); - return; + hw_ibrs_active = hw_ibrs_disable == 0; + hw_ibrs_ibpb_active = 0; + } else { + hw_ibrs_active = hw_ibrs_ibpb_active = (cpu_stdext_feature3 & + CPUID_STDEXT3_IBPB) != 0 && !hw_ibrs_disable; } - hw_ibrs_active = (cpu_stdext_feature3 & CPUID_STDEXT3_IBPB) != 0 && - !hw_ibrs_disable; } static int @@ -884,7 +888,7 @@ hw_ibrs_disable_handler(SYSCTL_HANDLER_ARGS) if (error != 0 || req->newptr == NULL) return (error); hw_ibrs_disable = val != 0; - hw_ibrs_recalculate(); + hw_ibrs_recalculate(true); return (0); } SYSCTL_PROC(_hw, OID_AUTO, ibrs_disable, CTLTYPE_INT | CTLFLAG_RWTUN | From owner-svn-src-stable@freebsd.org Tue Mar 3 15:07: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 7B847252769; Tue, 3 Mar 2020 15:07:51 +0000 (UTC) (envelope-from markj@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 48X0kF6m9sz43HV; Tue, 3 Mar 2020 15:07:49 +0000 (UTC) (envelope-from markj@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 9A35E6FD5; Tue, 3 Mar 2020 15:07:49 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 023F7nbG034483; Tue, 3 Mar 2020 15:07:49 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 023F7mlo034480; Tue, 3 Mar 2020 15:07:48 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202003031507.023F7mlo034480@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 3 Mar 2020 15:07:48 +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: r358581 - in stable/12: lib/libkvm sys/vm X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in stable/12: lib/libkvm sys/vm X-SVN-Commit-Revision: 358581 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: Tue, 03 Mar 2020 15:07:51 -0000 Author: markj Date: Tue Mar 3 15:07:48 2020 New Revision: 358581 URL: https://svnweb.freebsd.org/changeset/base/358581 Log: MFC r358026: Remove swblk_t. Modified: stable/12/lib/libkvm/kvm_getswapinfo.c stable/12/sys/vm/swap_pager.c stable/12/sys/vm/swap_pager.h Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libkvm/kvm_getswapinfo.c ============================================================================== --- stable/12/lib/libkvm/kvm_getswapinfo.c Tue Mar 3 15:05:13 2020 (r358580) +++ stable/12/lib/libkvm/kvm_getswapinfo.c Tue Mar 3 15:07:48 2020 (r358581) @@ -115,8 +115,7 @@ int kvm_getswapinfo_kvm(kvm_t *kd, struct kvm_swap *swap_ary, int swap_max, int flags) { - int i; - swblk_t ttl; + int i, ttl; TAILQ_HEAD(, swdevt) swtailq; struct swdevt *sp, swinfo; struct kvm_swap tot; @@ -167,8 +166,7 @@ int kvm_getswapinfo_sysctl(kvm_t *kd, struct kvm_swap *swap_ary, int swap_max, int flags) { - int ti; - swblk_t ttl; + int ti, ttl; size_t mibi, len; int soid[SWI_MAXMIB]; struct xswdev xsd; Modified: stable/12/sys/vm/swap_pager.c ============================================================================== --- stable/12/sys/vm/swap_pager.c Tue Mar 3 15:05:13 2020 (r358580) +++ stable/12/sys/vm/swap_pager.c Tue Mar 3 15:07:48 2020 (r358581) @@ -2284,7 +2284,7 @@ swaponsomething(struct vnode *vp, void *id, u_long nbl sw_strategy_t *strategy, sw_close_t *close, dev_t dev, int flags) { struct swdevt *sp, *tsp; - swblk_t dvbase; + daddr_t dvbase; u_long mblocks; /* Modified: stable/12/sys/vm/swap_pager.h ============================================================================== --- stable/12/sys/vm/swap_pager.h Tue Mar 3 15:05:13 2020 (r358580) +++ stable/12/sys/vm/swap_pager.h Tue Mar 3 15:07:48 2020 (r358581) @@ -38,14 +38,9 @@ */ #ifndef _VM_SWAP_PAGER_H_ -#define _VM_SWAP_PAGER_H_ 1 +#define _VM_SWAP_PAGER_H_ -typedef int32_t swblk_t; /* - * swap offset. This is the type used to - * address the "virtual swap device" and - * therefore the maximum swap space is - * 2^32 pages. - */ +#include struct buf; struct swdevt; @@ -62,8 +57,8 @@ struct swdevt { dev_t sw_dev; struct vnode *sw_vp; void *sw_id; - swblk_t sw_first; - swblk_t sw_end; + __daddr_t sw_first; + __daddr_t sw_end; struct blist *sw_blist; TAILQ_ENTRY(swdevt) sw_list; sw_strategy_t *sw_strategy; From owner-svn-src-stable@freebsd.org Tue Mar 3 15:12:02 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 D7F77252C8D; Tue, 3 Mar 2020 15:12:02 +0000 (UTC) (envelope-from kib@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 48X0q656vVz4BF5; Tue, 3 Mar 2020 15:12:02 +0000 (UTC) (envelope-from kib@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 9441B7196; Tue, 3 Mar 2020 15:12:02 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 023FC2Rk038972; Tue, 3 Mar 2020 15:12:02 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 023FC133038966; Tue, 3 Mar 2020 15:12:01 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202003031512.023FC133038966@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 3 Mar 2020 15:12:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r358582 - in stable/11/sys: amd64/amd64 dev/cpuctl x86/acpica x86/include x86/x86 X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/11/sys: amd64/amd64 dev/cpuctl x86/acpica x86/include x86/x86 X-SVN-Commit-Revision: 358582 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: Tue, 03 Mar 2020 15:12:03 -0000 Author: kib Date: Tue Mar 3 15:12:00 2020 New Revision: 358582 URL: https://svnweb.freebsd.org/changeset/base/358582 Log: MFC r358315: Fix IBRS for machines with IBRS_ALL capability. Modified: stable/11/sys/amd64/amd64/initcpu.c stable/11/sys/amd64/amd64/support.S stable/11/sys/dev/cpuctl/cpuctl.c stable/11/sys/x86/acpica/acpi_wakeup.c stable/11/sys/x86/include/x86_var.h stable/11/sys/x86/x86/cpu_machdep.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/amd64/initcpu.c ============================================================================== --- stable/11/sys/amd64/amd64/initcpu.c Tue Mar 3 15:07:48 2020 (r358581) +++ stable/11/sys/amd64/amd64/initcpu.c Tue Mar 3 15:12:00 2020 (r358582) @@ -245,7 +245,7 @@ initializecpu(void) wrmsr(MSR_EFER, msr); pg_nx = PG_NX; } - hw_ibrs_recalculate(); + hw_ibrs_recalculate(false); hw_ssb_recalculate(false); switch (cpu_vendor_id) { case CPU_VENDOR_AMD: Modified: stable/11/sys/amd64/amd64/support.S ============================================================================== --- stable/11/sys/amd64/amd64/support.S Tue Mar 3 15:07:48 2020 (r358581) +++ stable/11/sys/amd64/amd64/support.S Tue Mar 3 15:12:00 2020 (r358582) @@ -851,7 +851,7 @@ handle_ibrs_\l: /* all callers already saved %rax, %rdx, and %rcx */ ENTRY(handle_ibrs_entry) - cmpb $0,hw_ibrs_active(%rip) + cmpb $0,hw_ibrs_ibpb_active(%rip) je 1f movl $MSR_IA32_SPEC_CTRL,%ecx rdmsr Modified: stable/11/sys/dev/cpuctl/cpuctl.c ============================================================================== --- stable/11/sys/dev/cpuctl/cpuctl.c Tue Mar 3 15:07:48 2020 (r358581) +++ stable/11/sys/dev/cpuctl/cpuctl.c Tue Mar 3 15:12:00 2020 (r358582) @@ -536,8 +536,8 @@ cpuctl_do_eval_cpu_features(int cpu, struct thread *td set_cpu(cpu, td); identify_cpu1(); identify_cpu2(); - hw_ibrs_recalculate(); restore_cpu(oldcpu, is_bound, td); + hw_ibrs_recalculate(true); hw_ssb_recalculate(true); #ifdef __amd64__ pmap_allow_2m_x_ept_recalculate(); Modified: stable/11/sys/x86/acpica/acpi_wakeup.c ============================================================================== --- stable/11/sys/x86/acpica/acpi_wakeup.c Tue Mar 3 15:07:48 2020 (r358581) +++ stable/11/sys/x86/acpica/acpi_wakeup.c Tue Mar 3 15:12:00 2020 (r358582) @@ -227,7 +227,7 @@ acpi_sleep_machdep(struct acpi_softc *sc, int state) } #endif #ifdef __amd64__ - hw_ibrs_active = 0; + hw_ibrs_ibpb_active = 0; hw_ssb_active = 0; cpu_stdext_feature3 = 0; CPU_FOREACH(i) { Modified: stable/11/sys/x86/include/x86_var.h ============================================================================== --- stable/11/sys/x86/include/x86_var.h Tue Mar 3 15:07:48 2020 (r358581) +++ stable/11/sys/x86/include/x86_var.h Tue Mar 3 15:12:00 2020 (r358582) @@ -82,7 +82,7 @@ extern int _ugssel; extern int use_xsave; extern uint64_t xsave_mask; extern int pti; -extern int hw_ibrs_active; +extern int hw_ibrs_ibpb_active; extern int hw_mds_disable; extern int hw_ssb_active; extern int x86_taa_enable; @@ -135,7 +135,7 @@ int is_physical_memory(vm_paddr_t addr); int isa_nmi(int cd); void handle_ibrs_entry(void); void handle_ibrs_exit(void); -void hw_ibrs_recalculate(void); +void hw_ibrs_recalculate(bool all_cpus); void hw_mds_recalculate(void); void hw_ssb_recalculate(bool all_cpus); void x86_taa_recalculate(void); Modified: stable/11/sys/x86/x86/cpu_machdep.c ============================================================================== --- stable/11/sys/x86/x86/cpu_machdep.c Tue Mar 3 15:07:48 2020 (r358581) +++ stable/11/sys/x86/x86/cpu_machdep.c Tue Mar 3 15:12:00 2020 (r358582) @@ -885,23 +885,27 @@ nmi_handle_intr(u_int type, struct trapframe *frame) nmi_call_kdb(PCPU_GET(cpuid), type, frame); } -int hw_ibrs_active; +static int hw_ibrs_active; +int hw_ibrs_ibpb_active; int hw_ibrs_disable = 1; SYSCTL_INT(_hw, OID_AUTO, ibrs_active, CTLFLAG_RD, &hw_ibrs_active, 0, "Indirect Branch Restricted Speculation active"); void -hw_ibrs_recalculate(void) +hw_ibrs_recalculate(bool for_all_cpus) { if ((cpu_ia32_arch_caps & IA32_ARCH_CAP_IBRS_ALL) != 0) { - x86_msr_op(MSR_IA32_SPEC_CTRL, MSR_OP_LOCAL | - (hw_ibrs_disable ? MSR_OP_ANDNOT : MSR_OP_OR), + x86_msr_op(MSR_IA32_SPEC_CTRL, (for_all_cpus ? + MSR_OP_RENDEZVOUS : MSR_OP_LOCAL) | + (hw_ibrs_disable != 0 ? MSR_OP_ANDNOT : MSR_OP_OR), IA32_SPEC_CTRL_IBRS); - return; + hw_ibrs_active = hw_ibrs_disable == 0; + hw_ibrs_ibpb_active = 0; + } else { + hw_ibrs_active = hw_ibrs_ibpb_active = (cpu_stdext_feature3 & + CPUID_STDEXT3_IBPB) != 0 && !hw_ibrs_disable; } - hw_ibrs_active = (cpu_stdext_feature3 & CPUID_STDEXT3_IBPB) != 0 && - !hw_ibrs_disable; } static int @@ -914,7 +918,7 @@ hw_ibrs_disable_handler(SYSCTL_HANDLER_ARGS) if (error != 0 || req->newptr == NULL) return (error); hw_ibrs_disable = val != 0; - hw_ibrs_recalculate(); + hw_ibrs_recalculate(true); return (0); } SYSCTL_PROC(_hw, OID_AUTO, ibrs_disable, CTLTYPE_INT | CTLFLAG_RWTUN | From owner-svn-src-stable@freebsd.org Tue Mar 3 16:25:30 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 D0F11254F5A; Tue, 3 Mar 2020 16:25:30 +0000 (UTC) (envelope-from emaste@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 48X2Rs5jXXz3Fnn; Tue, 3 Mar 2020 16:25:29 +0000 (UTC) (envelope-from emaste@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 2D1A07F78; Tue, 3 Mar 2020 16:25:28 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 023GPS3f082616; Tue, 3 Mar 2020 16:25:28 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 023GPSW4082615; Tue, 3 Mar 2020 16:25:28 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003031625.023GPSW4082615@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 3 Mar 2020 16:25:28 +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: r358587 - stable/12/contrib/elftoolchain/addr2line X-SVN-Group: stable-12 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/12/contrib/elftoolchain/addr2line X-SVN-Commit-Revision: 358587 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: Tue, 03 Mar 2020 16:25:31 -0000 Author: emaste Date: Tue Mar 3 16:25:28 2020 New Revision: 358587 URL: https://svnweb.freebsd.org/changeset/base/358587 Log: MFC r357844: addr2line: Handle DW_AT_ranges in compile units Based on original submission by Marat Radchenko in ELF Tool Chain ticket #545, rebased and updated by Tiger Gao. Also r357862, use stdbool.h header for bool PR: 217736 Submitted by: Marat Radchenko Submitted by: Tiger Gao Sponsored by: The FreeBSD Foundation Modified: stable/12/contrib/elftoolchain/addr2line/addr2line.c Directory Properties: stable/12/ (props changed) Modified: stable/12/contrib/elftoolchain/addr2line/addr2line.c ============================================================================== --- stable/12/contrib/elftoolchain/addr2line/addr2line.c Tue Mar 3 15:49:34 2020 (r358586) +++ stable/12/contrib/elftoolchain/addr2line/addr2line.c Tue Mar 3 16:25:28 2020 (r358587) @@ -65,6 +65,7 @@ struct CU { Dwarf_Signed nsrcfiles; STAILQ_HEAD(, Func) funclist; Dwarf_Die die; + Dwarf_Debug dbg; }; static struct option longopts[] = { @@ -345,7 +346,8 @@ cont_search: collect_func(dbg, ret_die, parent, cu); /* Cleanup */ - dwarf_dealloc(dbg, die, DW_DLA_DIE); + if (die != cu->die) + dwarf_dealloc(dbg, die, DW_DLA_DIE); if (abst_die != NULL) dwarf_dealloc(dbg, abst_die, DW_DLA_DIE); @@ -411,6 +413,102 @@ culookup(Dwarf_Unsigned addr) return (NULL); } +/* + * Check whether addr falls into range(s) of current CU, and save current CU + * to lookup tree if so. + */ +static int +check_range(Dwarf_Debug dbg, Dwarf_Die die, Dwarf_Unsigned addr, + struct CU **cu) +{ + Dwarf_Error de; + Dwarf_Unsigned addr_base, lopc, hipc; + Dwarf_Off ranges_off; + Dwarf_Signed ranges_cnt; + Dwarf_Ranges *ranges; + int i, ret; + bool in_range; + + addr_base = 0; + ranges = NULL; + ranges_cnt = 0; + in_range = false; + + ret = dwarf_attrval_unsigned(die, DW_AT_ranges, &ranges_off, &de); + if (ret == DW_DLV_NO_ENTRY) { + if (dwarf_attrval_unsigned(die, DW_AT_low_pc, &lopc, &de) == + DW_DLV_OK) { + if (lopc == curlopc) + return (DW_DLV_ERROR); + if (dwarf_attrval_unsigned(die, DW_AT_high_pc, &hipc, + &de) == DW_DLV_OK) { + /* + * Check if the address falls into the PC + * range of this CU. + */ + if (handle_high_pc(die, lopc, &hipc) != + DW_DLV_OK) + return (DW_DLV_ERROR); + } else { + /* Assume ~0ULL if DW_AT_high_pc not present */ + hipc = ~0ULL; + } + + if (addr >= lopc && addr < hipc) { + in_range = true; + } + } + } else if (ret == DW_DLV_OK) { + ret = dwarf_get_ranges(dbg, ranges_off, &ranges, + &ranges_cnt, NULL, &de); + if (ret != DW_DLV_OK) + return (ret); + + if (!ranges || ranges_cnt <= 0) + return (DW_DLV_ERROR); + + for (i = 0; i < ranges_cnt; i++) { + if (ranges[i].dwr_type == DW_RANGES_END) + return (DW_DLV_NO_ENTRY); + + if (ranges[i].dwr_type == + DW_RANGES_ADDRESS_SELECTION) { + addr_base = ranges[i].dwr_addr2; + continue; + } + + /* DW_RANGES_ENTRY */ + lopc = ranges[i].dwr_addr1 + addr_base; + hipc = ranges[i].dwr_addr2 + addr_base; + + if (lopc == curlopc) + return (DW_DLV_ERROR); + + if (addr >= lopc && addr < hipc){ + in_range = true; + break; + } + } + } else { + return (DW_DLV_ERROR); + } + + if (in_range) { + if ((*cu = calloc(1, sizeof(struct CU))) == NULL) + err(EXIT_FAILURE, "calloc"); + (*cu)->lopc = lopc; + (*cu)->hipc = hipc; + (*cu)->die = die; + (*cu)->dbg = dbg; + STAILQ_INIT(&(*cu)->funclist); + RB_INSERT(cutree, &cuhead, *cu); + curlopc = lopc; + return (DW_DLV_OK); + } else { + return (DW_DLV_NO_ENTRY); + } +} + static void translate(Dwarf_Debug dbg, Elf *e, const char* addrstr) { @@ -418,10 +516,9 @@ translate(Dwarf_Debug dbg, Elf *e, const char* addrstr Dwarf_Line *lbuf; Dwarf_Error de; Dwarf_Half tag; - Dwarf_Unsigned lopc, hipc, addr, lineno, plineno; + Dwarf_Unsigned addr, lineno, plineno; Dwarf_Signed lcount; Dwarf_Addr lineaddr, plineaddr; - Dwarf_Off off; struct CU *cu; struct Func *f; const char *funcname; @@ -439,6 +536,7 @@ translate(Dwarf_Debug dbg, Elf *e, const char* addrstr cu = culookup(addr); if (cu != NULL) { die = cu->die; + dbg = cu->dbg; goto status_ok; } @@ -477,44 +575,11 @@ translate(Dwarf_Debug dbg, Elf *e, const char* addrstr warnx("could not find DW_TAG_compile_unit die"); goto next_cu; } - if (dwarf_attrval_unsigned(die, DW_AT_low_pc, &lopc, &de) == - DW_DLV_OK) { - if (lopc == curlopc) - goto out; - if (dwarf_attrval_unsigned(die, DW_AT_high_pc, &hipc, - &de) == DW_DLV_OK) { - /* - * Check if the address falls into the PC - * range of this CU. - */ - if (handle_high_pc(die, lopc, &hipc) != - DW_DLV_OK) - goto out; - } else { - /* Assume ~0ULL if DW_AT_high_pc not present */ - hipc = ~0ULL; - } - - if (dwarf_dieoffset(die, &off, &de) != DW_DLV_OK) { - warnx("dwarf_dieoffset failed: %s", - dwarf_errmsg(de)); - goto out; - } - - if (addr >= lopc && addr < hipc) { - if ((cu = calloc(1, sizeof(*cu))) == NULL) - err(EXIT_FAILURE, "calloc"); - cu->off = off; - cu->lopc = lopc; - cu->hipc = hipc; - cu->die = die; - STAILQ_INIT(&cu->funclist); - RB_INSERT(cutree, &cuhead, cu); - - curlopc = lopc; - break; - } - } + ret = check_range(dbg, die, addr, &cu); + if (ret == DW_DLV_OK) + break; + if (ret == DW_DLV_ERROR) + goto out; next_cu: if (die != NULL) { dwarf_dealloc(dbg, die, DW_DLA_DIE); From owner-svn-src-stable@freebsd.org Tue Mar 3 17:30:14 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 DDB4F256601; Tue, 3 Mar 2020 17:30:14 +0000 (UTC) (envelope-from emaste@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 48X3tZ4DfBz4CdC; Tue, 3 Mar 2020 17:30:14 +0000 (UTC) (envelope-from emaste@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 796C78A99; Tue, 3 Mar 2020 17:30:14 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 023HUE2X019176; Tue, 3 Mar 2020 17:30:14 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 023HUEoK019175; Tue, 3 Mar 2020 17:30:14 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003031730.023HUEoK019175@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 3 Mar 2020 17:30:14 +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: r358588 - stable/12/lib/libc/sys X-SVN-Group: stable-12 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/12/lib/libc/sys X-SVN-Commit-Revision: 358588 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: Tue, 03 Mar 2020 17:30:15 -0000 Author: emaste Date: Tue Mar 3 17:30:13 2020 New Revision: 358588 URL: https://svnweb.freebsd.org/changeset/base/358588 Log: MFC r358344: mprotect.2: sort errors alphabetically Modified: stable/12/lib/libc/sys/mprotect.2 Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libc/sys/mprotect.2 ============================================================================== --- stable/12/lib/libc/sys/mprotect.2 Tue Mar 3 16:25:28 2020 (r358587) +++ stable/12/lib/libc/sys/mprotect.2 Tue Mar 3 17:30:13 2020 (r358588) @@ -72,18 +72,18 @@ The .Fn mprotect system call will fail if: .Bl -tag -width Er -.It Bq Er EINVAL -The virtual address range specified by the -.Fa addr -and -.Fa len -arguments is not valid. .It Bq Er EACCES The calling process was not allowed to change the protection to the value specified by the .Fa prot argument. +.It Bq Er EINVAL +The virtual address range specified by the +.Fa addr +and +.Fa len +arguments is not valid. .El .Sh SEE ALSO .Xr madvise 2 , From owner-svn-src-stable@freebsd.org Tue Mar 3 18:01:03 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 E1C5B2578F8; Tue, 3 Mar 2020 18:01:03 +0000 (UTC) (envelope-from dim@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 48X4Z75kFCz4HM7; Tue, 3 Mar 2020 18:01:03 +0000 (UTC) (envelope-from dim@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 BFA2D91A9; Tue, 3 Mar 2020 18:01:03 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 023I130I037709; Tue, 3 Mar 2020 18:01:03 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 023I132H037708; Tue, 3 Mar 2020 18:01:03 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202003031801.023I132H037708@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 3 Mar 2020 18:01:03 +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: r358591 - in stable: 11/sys/arm/arm 12/sys/arm/arm X-SVN-Group: stable-12 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 11/sys/arm/arm 12/sys/arm/arm X-SVN-Commit-Revision: 358591 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: Tue, 03 Mar 2020 18:01:04 -0000 Author: dim Date: Tue Mar 3 18:01:03 2020 New Revision: 358591 URL: https://svnweb.freebsd.org/changeset/base/358591 Log: MFC r358407: Merge r358406 from the clang1000-import branch: Fix the following -Werror warning from clang 10.0.0: sys/arm/arm/identcpu-v6.c:227:5: error: misleading indentation; statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation] if (val & CPUV7_CT_CTYPE_RA) ^ sys/arm/arm/identcpu-v6.c:225:4: note: previous statement is here if (val & CPUV7_CT_CTYPE_WB) ^ This was due to an accidentally inserted tab before the if statement. Modified: stable/12/sys/arm/arm/identcpu-v6.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/arm/arm/identcpu-v6.c Directory Properties: stable/11/ (props changed) Modified: stable/12/sys/arm/arm/identcpu-v6.c ============================================================================== --- stable/12/sys/arm/arm/identcpu-v6.c Tue Mar 3 17:40:29 2020 (r358590) +++ stable/12/sys/arm/arm/identcpu-v6.c Tue Mar 3 18:01:03 2020 (r358591) @@ -224,7 +224,7 @@ print_v7_cache(void ) printf(" WT"); if (val & CPUV7_CT_CTYPE_WB) printf(" WB"); - if (val & CPUV7_CT_CTYPE_RA) + if (val & CPUV7_CT_CTYPE_RA) printf(" Read-Alloc"); if (val & CPUV7_CT_CTYPE_WA) printf(" Write-Alloc"); From owner-svn-src-stable@freebsd.org Tue Mar 3 18:01:04 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 2B15A2578FE; Tue, 3 Mar 2020 18:01:04 +0000 (UTC) (envelope-from dim@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 48X4Z80Pswz4HMJ; Tue, 3 Mar 2020 18:01:04 +0000 (UTC) (envelope-from dim@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 071F091AC; Tue, 3 Mar 2020 18:01:04 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 023I139h037715; Tue, 3 Mar 2020 18:01:03 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 023I132m037714; Tue, 3 Mar 2020 18:01:03 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202003031801.023I132m037714@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 3 Mar 2020 18:01:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r358591 - in stable: 11/sys/arm/arm 12/sys/arm/arm X-SVN-Group: stable-11 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 11/sys/arm/arm 12/sys/arm/arm X-SVN-Commit-Revision: 358591 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: Tue, 03 Mar 2020 18:01:04 -0000 Author: dim Date: Tue Mar 3 18:01:03 2020 New Revision: 358591 URL: https://svnweb.freebsd.org/changeset/base/358591 Log: MFC r358407: Merge r358406 from the clang1000-import branch: Fix the following -Werror warning from clang 10.0.0: sys/arm/arm/identcpu-v6.c:227:5: error: misleading indentation; statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation] if (val & CPUV7_CT_CTYPE_RA) ^ sys/arm/arm/identcpu-v6.c:225:4: note: previous statement is here if (val & CPUV7_CT_CTYPE_WB) ^ This was due to an accidentally inserted tab before the if statement. Modified: stable/11/sys/arm/arm/identcpu-v6.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/sys/arm/arm/identcpu-v6.c Directory Properties: stable/12/ (props changed) Modified: stable/11/sys/arm/arm/identcpu-v6.c ============================================================================== --- stable/11/sys/arm/arm/identcpu-v6.c Tue Mar 3 17:40:29 2020 (r358590) +++ stable/11/sys/arm/arm/identcpu-v6.c Tue Mar 3 18:01:03 2020 (r358591) @@ -206,7 +206,7 @@ print_v7_cache(void ) printf(" WT"); if (val & CPUV7_CT_CTYPE_WB) printf(" WB"); - if (val & CPUV7_CT_CTYPE_RA) + if (val & CPUV7_CT_CTYPE_RA) printf(" Read-Alloc"); if (val & CPUV7_CT_CTYPE_WA) printf(" Write-Alloc"); From owner-svn-src-stable@freebsd.org Wed Mar 4 04:36: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 9C34026496F; Wed, 4 Mar 2020 04:36: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 48XLgl0hCdz4tyc; Wed, 4 Mar 2020 04:36:51 +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 CB02A188C6; Wed, 4 Mar 2020 04:36: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 0244aora024355; Wed, 4 Mar 2020 04:36:50 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0244aoo1024354; Wed, 4 Mar 2020 04:36:50 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202003040436.0244aoo1024354@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 4 Mar 2020 04:36: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: r358598 - stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 358598 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: Wed, 04 Mar 2020 04:36:51 -0000 Author: mav Date: Wed Mar 4 04:36:50 2020 New Revision: 358598 URL: https://svnweb.freebsd.org/changeset/base/358598 Log: MFC r358336: MFZoL: Fix txg_sync_thread hang in scan_exec_io() When scn->scn_maxinflight_bytes has not been initialized it's possible to hang on the condition variable in scan_exec_io(). This issue was uncovered by ztest and is only possible when deduplication is enabled through the following call path. txg_sync_thread() spa_sync() ddt_sync_table() ddt_sync_entry() dsl_scan_ddt_entry() dsl_scan_scrub_cb() dsl_scan_enqueuei() scan_exec_io() cv_wait() Resolve the issue by always initializing scn_maxinflight_bytes to a reasonable minimum value. This value will be recalculated in dsl_scan_sync() to pick up changes to zfs_scan_vdev_limit and the addition/removal of vdevs. Reviewed-by: Tom Caputi Reviewed by: George Melikov Signed-off-by: Brian Behlendorf Closes #7098 zfsonlinux/zfs@f90a30ad1b32a971f62a540f8944e42f99b254ce Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Wed Mar 4 00:22:50 2020 (r358597) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Wed Mar 4 04:36:50 2020 (r358598) @@ -125,6 +125,7 @@ static boolean_t scan_ds_queue_contains(dsl_scan_t *sc static void scan_ds_queue_insert(dsl_scan_t *scn, uint64_t dsobj, uint64_t txg); static void scan_ds_queue_remove(dsl_scan_t *scn, uint64_t dsobj); static void scan_ds_queue_sync(dsl_scan_t *scn, dmu_tx_t *tx); +static uint64_t dsl_scan_count_leaves(vdev_t *vd); extern int zfs_vdev_async_write_active_min_dirty_percent; @@ -439,6 +440,14 @@ dsl_scan_init(dsl_pool_t *dp, uint64_t txg) scn->scn_async_destroying = spa_feature_is_active(dp->dp_spa, SPA_FEATURE_ASYNC_DESTROY); + /* + * Calculate the max number of in-flight bytes for pool-wide + * scanning operations (minimum 1MB). Limits for the issuing + * phase are done per top-level vdev and are handled separately. + */ + scn->scn_maxinflight_bytes = MAX(zfs_scan_vdev_limit * + dsl_scan_count_leaves(spa->spa_root_vdev), 1ULL << 20); + bcopy(&scn->scn_phys, &scn->scn_phys_cached, sizeof (scn->scn_phys)); avl_create(&scn->scn_queue, scan_ds_queue_compare, sizeof (scan_ds_t), offsetof(scan_ds_t, sds_node)); @@ -2350,7 +2359,7 @@ dsl_scan_ddt_entry(dsl_scan_t *scn, enum zio_checksum zbookmark_phys_t zb = { 0 }; int p; - if (scn->scn_phys.scn_state != DSS_SCANNING) + if (!dsl_scan_is_running(scn)) return; for (p = 0; p < DDT_PHYS_TYPES; p++, ddp++) { @@ -3333,7 +3342,7 @@ dsl_scan_sync(dsl_pool_t *dp, dmu_tx_t *tx) uint64_t nr_leaves = dsl_scan_count_leaves(spa->spa_root_vdev); /* - * Calculate the max number of in-flight bytes for pool-wide + * Recalculate the max number of in-flight bytes for pool-wide * scanning operations (minimum 1MB). Limits for the issuing * phase are done per top-level vdev and are handled separately. */ @@ -3652,6 +3661,8 @@ dsl_scan_scrub_done(zio_t *zio) dsl_scan_io_queue_t *queue = zio->io_private; abd_free(zio->io_abd); + + ASSERT3U(scn->scn_maxinflight_bytes, >, 0); if (queue == NULL) { mutex_enter(&spa->spa_scrub_lock); From owner-svn-src-stable@freebsd.org Wed Mar 4 04:38:33 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 3E8F4264B89; Wed, 4 Mar 2020 04:38:33 +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 48XLjg67PNz3D7R; Wed, 4 Mar 2020 04:38:31 +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 D81EB188CC; Wed, 4 Mar 2020 04:38:30 +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 0244cUI5024496; Wed, 4 Mar 2020 04:38:30 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0244cUZP024495; Wed, 4 Mar 2020 04:38:30 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202003040438.0244cUZP024495@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 4 Mar 2020 04:38:30 +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: r358599 - stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 358599 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: Wed, 04 Mar 2020 04:38:33 -0000 Author: mav Date: Wed Mar 4 04:38:30 2020 New Revision: 358599 URL: https://svnweb.freebsd.org/changeset/base/358599 Log: MFC r358340: Fix patch mismerge in r358336. Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Wed Mar 4 04:36:50 2020 (r358598) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Wed Mar 4 04:38:30 2020 (r358599) @@ -3662,8 +3662,6 @@ dsl_scan_scrub_done(zio_t *zio) abd_free(zio->io_abd); - ASSERT3U(scn->scn_maxinflight_bytes, >, 0); - if (queue == NULL) { mutex_enter(&spa->spa_scrub_lock); ASSERT3U(spa->spa_scrub_inflight, >=, BP_GET_PSIZE(bp)); @@ -3700,6 +3698,8 @@ scan_exec_io(dsl_pool_t *dp, const blkptr_t *bp, int z size_t size = BP_GET_PSIZE(bp); abd_t *data = abd_alloc_for_io(size, B_FALSE); unsigned int scan_delay = 0; + + ASSERT3U(scn->scn_maxinflight_bytes, >, 0); if (queue == NULL) { mutex_enter(&spa->spa_scrub_lock); From owner-svn-src-stable@freebsd.org Wed Mar 4 04:39:35 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 CA1FF264C7B; Wed, 4 Mar 2020 04:39:35 +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 48XLkv24Ppz3Gbw; Wed, 4 Mar 2020 04:39:35 +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 E98DC188D2; Wed, 4 Mar 2020 04:39:34 +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 0244dYiA024598; Wed, 4 Mar 2020 04:39:34 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0244dYWT024597; Wed, 4 Mar 2020 04:39:34 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202003040439.0244dYWT024597@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 4 Mar 2020 04:39:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r358600 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 358600 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: Wed, 04 Mar 2020 04:39:35 -0000 Author: mav Date: Wed Mar 4 04:39:34 2020 New Revision: 358600 URL: https://svnweb.freebsd.org/changeset/base/358600 Log: MFC r358336, r358340: MFZoL: Fix txg_sync_thread hang in scan_exec_io() When scn->scn_maxinflight_bytes has not been initialized it's possible to hang on the condition variable in scan_exec_io(). This issue was uncovered by ztest and is only possible when deduplication is enabled through the following call path. txg_sync_thread() spa_sync() ddt_sync_table() ddt_sync_entry() dsl_scan_ddt_entry() dsl_scan_scrub_cb() dsl_scan_enqueuei() scan_exec_io() cv_wait() Resolve the issue by always initializing scn_maxinflight_bytes to a reasonable minimum value. This value will be recalculated in dsl_scan_sync() to pick up changes to zfs_scan_vdev_limit and the addition/removal of vdevs. Reviewed-by: Tom Caputi Reviewed by: George Melikov Signed-off-by: Brian Behlendorf Closes #7098 zfsonlinux/zfs@f90a30ad1b32a971f62a540f8944e42f99b254ce Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Wed Mar 4 04:38:30 2020 (r358599) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Wed Mar 4 04:39:34 2020 (r358600) @@ -125,6 +125,7 @@ static boolean_t scan_ds_queue_contains(dsl_scan_t *sc static void scan_ds_queue_insert(dsl_scan_t *scn, uint64_t dsobj, uint64_t txg); static void scan_ds_queue_remove(dsl_scan_t *scn, uint64_t dsobj); static void scan_ds_queue_sync(dsl_scan_t *scn, dmu_tx_t *tx); +static uint64_t dsl_scan_count_leaves(vdev_t *vd); extern int zfs_vdev_async_write_active_min_dirty_percent; @@ -439,6 +440,14 @@ dsl_scan_init(dsl_pool_t *dp, uint64_t txg) scn->scn_async_destroying = spa_feature_is_active(dp->dp_spa, SPA_FEATURE_ASYNC_DESTROY); + /* + * Calculate the max number of in-flight bytes for pool-wide + * scanning operations (minimum 1MB). Limits for the issuing + * phase are done per top-level vdev and are handled separately. + */ + scn->scn_maxinflight_bytes = MAX(zfs_scan_vdev_limit * + dsl_scan_count_leaves(spa->spa_root_vdev), 1ULL << 20); + bcopy(&scn->scn_phys, &scn->scn_phys_cached, sizeof (scn->scn_phys)); avl_create(&scn->scn_queue, scan_ds_queue_compare, sizeof (scan_ds_t), offsetof(scan_ds_t, sds_node)); @@ -2346,7 +2355,7 @@ dsl_scan_ddt_entry(dsl_scan_t *scn, enum zio_checksum zbookmark_phys_t zb = { 0 }; int p; - if (scn->scn_phys.scn_state != DSS_SCANNING) + if (!dsl_scan_is_running(scn)) return; for (p = 0; p < DDT_PHYS_TYPES; p++, ddp++) { @@ -3329,7 +3338,7 @@ dsl_scan_sync(dsl_pool_t *dp, dmu_tx_t *tx) uint64_t nr_leaves = dsl_scan_count_leaves(spa->spa_root_vdev); /* - * Calculate the max number of in-flight bytes for pool-wide + * Recalculate the max number of in-flight bytes for pool-wide * scanning operations (minimum 1MB). Limits for the issuing * phase are done per top-level vdev and are handled separately. */ @@ -3685,6 +3694,8 @@ scan_exec_io(dsl_pool_t *dp, const blkptr_t *bp, int z size_t size = BP_GET_PSIZE(bp); abd_t *data = abd_alloc_for_io(size, B_FALSE); unsigned int scan_delay = 0; + + ASSERT3U(scn->scn_maxinflight_bytes, >, 0); if (queue == NULL) { mutex_enter(&spa->spa_scrub_lock); From owner-svn-src-stable@freebsd.org Wed Mar 4 04:40:36 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 EE03E264D33; Wed, 4 Mar 2020 04:40:36 +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 48XLm41RHFz3JnZ; Wed, 4 Mar 2020 04:40:36 +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 EBE37188EF; Wed, 4 Mar 2020 04:40:35 +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 0244eZak025381; Wed, 4 Mar 2020 04:40:35 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0244eZtv025380; Wed, 4 Mar 2020 04:40:35 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202003040440.0244eZtv025380@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 4 Mar 2020 04:40:35 +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: r358601 - stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 358601 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: Wed, 04 Mar 2020 04:40:37 -0000 Author: mav Date: Wed Mar 4 04:40:35 2020 New Revision: 358601 URL: https://svnweb.freebsd.org/changeset/base/358601 Log: MFC r358337: MFZoL: Fix 2 small bugs with cached dsl_scan_phys_t This patch corrects 2 small bugs where scn->scn_phys_cached was not properly updated to match the primary copy when it needed to be. The first resulted in the pause state not being properly updated and the second resulted in the cached version being completely zeroed even if the primary was not. Reviewed-by: Brian Behlendorf Reviewed-by: Serapheim Dimitropoulos Reviewed-by: Matthew Ahrens Signed-off-by: Tom Caputi Closes #8010 zfsonlinux/zfs@8cb119e3dc0ac6c90b1517fbadc021b7e9741fc6 Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Wed Mar 4 04:39:34 2020 (r358600) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Wed Mar 4 04:40:35 2020 (r358601) @@ -448,7 +448,6 @@ dsl_scan_init(dsl_pool_t *dp, uint64_t txg) scn->scn_maxinflight_bytes = MAX(zfs_scan_vdev_limit * dsl_scan_count_leaves(spa->spa_root_vdev), 1ULL << 20); - bcopy(&scn->scn_phys, &scn->scn_phys_cached, sizeof (scn->scn_phys)); avl_create(&scn->scn_queue, scan_ds_queue_compare, sizeof (scan_ds_t), offsetof(scan_ds_t, sds_node)); avl_create(&scn->scn_prefetch_queue, scan_prefetch_queue_compare, @@ -506,6 +505,8 @@ dsl_scan_init(dsl_pool_t *dp, uint64_t txg) } } + bcopy(&scn->scn_phys, &scn->scn_phys_cached, sizeof (scn->scn_phys)); + /* reload the queue into the in-core state */ if (scn->scn_phys.scn_queue_obj != 0) { zap_cursor_t zc; @@ -928,6 +929,7 @@ dsl_scrub_pause_resume_sync(void *arg, dmu_tx_t *tx) /* can't pause a scrub when there is no in-progress scrub */ spa->spa_scan_pass_scrub_pause = gethrestime_sec(); scn->scn_phys.scn_flags |= DSF_SCRUB_PAUSED; + scn->scn_phys_cached.scn_flags |= DSF_SCRUB_PAUSED; dsl_scan_sync_state(scn, tx, SYNC_CACHED); spa_event_notify(spa, NULL, NULL, ESC_ZFS_SCRUB_PAUSED); } else { @@ -942,6 +944,7 @@ dsl_scrub_pause_resume_sync(void *arg, dmu_tx_t *tx) gethrestime_sec() - spa->spa_scan_pass_scrub_pause; spa->spa_scan_pass_scrub_pause = 0; scn->scn_phys.scn_flags &= ~DSF_SCRUB_PAUSED; + scn->scn_phys_cached.scn_flags &= ~DSF_SCRUB_PAUSED; dsl_scan_sync_state(scn, tx, SYNC_CACHED); } } From owner-svn-src-stable@freebsd.org Wed Mar 4 04:40:55 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 29632264D94; Wed, 4 Mar 2020 04:40:55 +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 48XLmQ6x3Qz3KTG; Wed, 4 Mar 2020 04:40:54 +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 BBC1418A01; Wed, 4 Mar 2020 04:40:54 +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 0244esPB025451; Wed, 4 Mar 2020 04:40:54 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0244esOD025450; Wed, 4 Mar 2020 04:40:54 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202003040440.0244esOD025450@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 4 Mar 2020 04:40:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r358602 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 358602 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: Wed, 04 Mar 2020 04:40:55 -0000 Author: mav Date: Wed Mar 4 04:40:54 2020 New Revision: 358602 URL: https://svnweb.freebsd.org/changeset/base/358602 Log: MFC r358337: MFZoL: Fix 2 small bugs with cached dsl_scan_phys_t This patch corrects 2 small bugs where scn->scn_phys_cached was not properly updated to match the primary copy when it needed to be. The first resulted in the pause state not being properly updated and the second resulted in the cached version being completely zeroed even if the primary was not. Reviewed-by: Brian Behlendorf Reviewed-by: Serapheim Dimitropoulos Reviewed-by: Matthew Ahrens Signed-off-by: Tom Caputi Closes #8010 zfsonlinux/zfs@8cb119e3dc0ac6c90b1517fbadc021b7e9741fc6 Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Wed Mar 4 04:40:35 2020 (r358601) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Wed Mar 4 04:40:54 2020 (r358602) @@ -448,7 +448,6 @@ dsl_scan_init(dsl_pool_t *dp, uint64_t txg) scn->scn_maxinflight_bytes = MAX(zfs_scan_vdev_limit * dsl_scan_count_leaves(spa->spa_root_vdev), 1ULL << 20); - bcopy(&scn->scn_phys, &scn->scn_phys_cached, sizeof (scn->scn_phys)); avl_create(&scn->scn_queue, scan_ds_queue_compare, sizeof (scan_ds_t), offsetof(scan_ds_t, sds_node)); avl_create(&scn->scn_prefetch_queue, scan_prefetch_queue_compare, @@ -506,6 +505,8 @@ dsl_scan_init(dsl_pool_t *dp, uint64_t txg) } } + bcopy(&scn->scn_phys, &scn->scn_phys_cached, sizeof (scn->scn_phys)); + /* reload the queue into the in-core state */ if (scn->scn_phys.scn_queue_obj != 0) { zap_cursor_t zc; @@ -928,6 +929,7 @@ dsl_scrub_pause_resume_sync(void *arg, dmu_tx_t *tx) /* can't pause a scrub when there is no in-progress scrub */ spa->spa_scan_pass_scrub_pause = gethrestime_sec(); scn->scn_phys.scn_flags |= DSF_SCRUB_PAUSED; + scn->scn_phys_cached.scn_flags |= DSF_SCRUB_PAUSED; dsl_scan_sync_state(scn, tx, SYNC_CACHED); spa_event_notify(spa, NULL, NULL, ESC_ZFS_SCRUB_PAUSED); } else { @@ -942,6 +944,7 @@ dsl_scrub_pause_resume_sync(void *arg, dmu_tx_t *tx) gethrestime_sec() - spa->spa_scan_pass_scrub_pause; spa->spa_scan_pass_scrub_pause = 0; scn->scn_phys.scn_flags &= ~DSF_SCRUB_PAUSED; + scn->scn_phys_cached.scn_flags &= ~DSF_SCRUB_PAUSED; dsl_scan_sync_state(scn, tx, SYNC_CACHED); } } From owner-svn-src-stable@freebsd.org Wed Mar 4 04:41:50 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 CB048264E2A; Wed, 4 Mar 2020 04:41:50 +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 48XLnV0tHnz3MVs; Wed, 4 Mar 2020 04:41: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 BD20B18A66; Wed, 4 Mar 2020 04:41:49 +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 0244fns3025546; Wed, 4 Mar 2020 04:41:49 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0244fnfO025545; Wed, 4 Mar 2020 04:41:49 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202003040441.0244fnfO025545@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 4 Mar 2020 04:41:49 +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: r358603 - stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 358603 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: Wed, 04 Mar 2020 04:41:50 -0000 Author: mav Date: Wed Mar 4 04:41:49 2020 New Revision: 358603 URL: https://svnweb.freebsd.org/changeset/base/358603 Log: MFC r358339: MFZoL: Fix issue with scanning dedup blocks as scan ends This patch fixes an issue discovered by ztest where dsl_scan_ddt_entry() could add I/Os to the dsl scan queues between when the scan had finished all required work and when the scan was marked as complete. This caused the scan to spin indefinitely without ending. Reviewed-by: Brian Behlendorf Reviewed-by: Serapheim Dimitropoulos Reviewed-by: Matthew Ahrens Signed-off-by: Tom Caputi Closes #8010 zfsonlinux/zfs@5e0bd0ae056e26de36dee3c199c6fcff8f14ee15 Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Wed Mar 4 04:40:54 2020 (r358602) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Wed Mar 4 04:41:49 2020 (r358603) @@ -2365,6 +2365,20 @@ dsl_scan_ddt_entry(dsl_scan_t *scn, enum zio_checksum if (!dsl_scan_is_running(scn)) return; + /* + * This function is special because it is the only thing + * that can add scan_io_t's to the vdev scan queues from + * outside dsl_scan_sync(). For the most part this is ok + * as long as it is called from within syncing context. + * However, dsl_scan_sync() expects that no new sio's will + * be added between when all the work for a scan is done + * and the next txg when the scan is actually marked as + * completed. This check ensures we do not issue new sio's + * during this period. + */ + if (scn->scn_done_txg != 0) + return; + for (p = 0; p < DDT_PHYS_TYPES; p++, ddp++) { if (ddp->ddp_phys_birth == 0 || ddp->ddp_phys_birth > scn->scn_phys.scn_max_txg) @@ -3416,6 +3430,8 @@ dsl_scan_sync(dsl_pool_t *dp, dmu_tx_t *tx) (longlong_t)tx->tx_txg); } } else if (scn->scn_is_sorted && scn->scn_bytes_pending != 0) { + ASSERT(scn->scn_clearing); + /* need to issue scrubbing IOs from per-vdev queues */ scn->scn_zio_root = zio_root(dp->dp_spa, NULL, NULL, ZIO_FLAG_CANFAIL); From owner-svn-src-stable@freebsd.org Wed Mar 4 04:42:11 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 03734264FA2; Wed, 4 Mar 2020 04:42:11 +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 48XLnt0Bgjz3NJ1; Wed, 4 Mar 2020 04:42:10 +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 E6B9A18A83; Wed, 4 Mar 2020 04:42:09 +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 0244g9LG028595; Wed, 4 Mar 2020 04:42:09 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0244g9ca028594; Wed, 4 Mar 2020 04:42:09 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202003040442.0244g9ca028594@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 4 Mar 2020 04:42:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r358604 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 358604 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: Wed, 04 Mar 2020 04:42:11 -0000 Author: mav Date: Wed Mar 4 04:42:09 2020 New Revision: 358604 URL: https://svnweb.freebsd.org/changeset/base/358604 Log: MFC r358339: MFZoL: Fix issue with scanning dedup blocks as scan ends This patch fixes an issue discovered by ztest where dsl_scan_ddt_entry() could add I/Os to the dsl scan queues between when the scan had finished all required work and when the scan was marked as complete. This caused the scan to spin indefinitely without ending. Reviewed-by: Brian Behlendorf Reviewed-by: Serapheim Dimitropoulos Reviewed-by: Matthew Ahrens Signed-off-by: Tom Caputi Closes #8010 zfsonlinux/zfs@5e0bd0ae056e26de36dee3c199c6fcff8f14ee15 Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Wed Mar 4 04:41:49 2020 (r358603) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Wed Mar 4 04:42:09 2020 (r358604) @@ -2361,6 +2361,20 @@ dsl_scan_ddt_entry(dsl_scan_t *scn, enum zio_checksum if (!dsl_scan_is_running(scn)) return; + /* + * This function is special because it is the only thing + * that can add scan_io_t's to the vdev scan queues from + * outside dsl_scan_sync(). For the most part this is ok + * as long as it is called from within syncing context. + * However, dsl_scan_sync() expects that no new sio's will + * be added between when all the work for a scan is done + * and the next txg when the scan is actually marked as + * completed. This check ensures we do not issue new sio's + * during this period. + */ + if (scn->scn_done_txg != 0) + return; + for (p = 0; p < DDT_PHYS_TYPES; p++, ddp++) { if (ddp->ddp_phys_birth == 0 || ddp->ddp_phys_birth > scn->scn_phys.scn_max_txg) @@ -3412,6 +3426,8 @@ dsl_scan_sync(dsl_pool_t *dp, dmu_tx_t *tx) (longlong_t)tx->tx_txg); } } else if (scn->scn_is_sorted && scn->scn_bytes_pending != 0) { + ASSERT(scn->scn_clearing); + /* need to issue scrubbing IOs from per-vdev queues */ scn->scn_zio_root = zio_root(dp->dp_spa, NULL, NULL, ZIO_FLAG_CANFAIL); From owner-svn-src-stable@freebsd.org Wed Mar 4 04:42:57 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 7E115265034; Wed, 4 Mar 2020 04:42:57 +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 48XLpn1yVjz3Q40; Wed, 4 Mar 2020 04:42:57 +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 2687418AA8; Wed, 4 Mar 2020 04:42:57 +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 0244guUZ030454; Wed, 4 Mar 2020 04:42:56 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0244gu3H030453; Wed, 4 Mar 2020 04:42:56 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202003040442.0244gu3H030453@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 4 Mar 2020 04:42:56 +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: r358605 - stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 358605 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: Wed, 04 Mar 2020 04:42:57 -0000 Author: mav Date: Wed Mar 4 04:42:56 2020 New Revision: 358605 URL: https://svnweb.freebsd.org/changeset/base/358605 Log: MFC r358342: MFZoL: Fix resilver writes in vdev_indirect_io_start This patch addresses an issue found in ztest where resilver write zios that were passed to an indirect vdev would end up being handled as though they were resilver read zios. This caused issues where the zio->io_abd would be both read to and written from at the same time, causing asserts to fail. Reviewed-by: Brian Behlendorf Reviewed by: Matt Ahrens Reviewed-by: Serapheim Dimitropoulos Signed-off-by: Tom Caputi Closes #8193 zfsonlinux/zfs@5aa95ba0d3502779695341b5f55fa5ba1d3330ff Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_indirect.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_indirect.c ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_indirect.c Wed Mar 4 04:42:09 2020 (r358604) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_indirect.c Wed Mar 4 04:42:56 2020 (r358605) @@ -1246,6 +1246,8 @@ vdev_indirect_read_all(zio_t *zio) { indirect_vsd_t *iv = zio->io_vsd; + ASSERT3U(zio->io_type, ==, ZIO_TYPE_READ); + for (indirect_split_t *is = list_head(&iv->iv_splits); is != NULL; is = list_next(&iv->iv_splits, is)) { for (int i = 0; i < is->is_children; i++) { @@ -1335,7 +1337,8 @@ vdev_indirect_io_start(zio_t *zio) vdev_indirect_child_io_done, zio)); } else { iv->iv_split_block = B_TRUE; - if (zio->io_flags & (ZIO_FLAG_SCRUB | ZIO_FLAG_RESILVER)) { + if (zio->io_type == ZIO_TYPE_READ && + zio->io_flags & (ZIO_FLAG_SCRUB | ZIO_FLAG_RESILVER)) { /* * Read all copies. Note that for simplicity, * we don't bother consulting the DTL in the @@ -1344,13 +1347,17 @@ vdev_indirect_io_start(zio_t *zio) vdev_indirect_read_all(zio); } else { /* - * Read one copy of each split segment, from the - * top-level vdev. Since we don't know the - * checksum of each split individually, the child - * zio can't ensure that we get the right data. - * E.g. if it's a mirror, it will just read from a - * random (healthy) leaf vdev. We have to verify - * the checksum in vdev_indirect_io_done(). + * If this is a read zio, we read one copy of each + * split segment, from the top-level vdev. Since + * we don't know the checksum of each split + * individually, the child zio can't ensure that + * we get the right data. E.g. if it's a mirror, + * it will just read from a random (healthy) leaf + * vdev. We have to verify the checksum in + * vdev_indirect_io_done(). + * + * For write zios, the vdev code will ensure we write + * to all children. */ for (indirect_split_t *is = list_head(&iv->iv_splits); is != NULL; is = list_next(&iv->iv_splits, is)) { From owner-svn-src-stable@freebsd.org Wed Mar 4 04:43:25 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 061DF2650A4; Wed, 4 Mar 2020 04:43:25 +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 48XLqJ0LdLz3R2x; Wed, 4 Mar 2020 04:43:23 +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 865CA18AAA; Wed, 4 Mar 2020 04:43:23 +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 0244hNZ6030532; Wed, 4 Mar 2020 04:43:23 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0244hNlc030531; Wed, 4 Mar 2020 04:43:23 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202003040443.0244hNlc030531@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 4 Mar 2020 04:43:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r358606 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 358606 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: Wed, 04 Mar 2020 04:43:25 -0000 Author: mav Date: Wed Mar 4 04:43:23 2020 New Revision: 358606 URL: https://svnweb.freebsd.org/changeset/base/358606 Log: MFC r358342: MFZoL: Fix resilver writes in vdev_indirect_io_start This patch addresses an issue found in ztest where resilver write zios that were passed to an indirect vdev would end up being handled as though they were resilver read zios. This caused issues where the zio->io_abd would be both read to and written from at the same time, causing asserts to fail. Reviewed-by: Brian Behlendorf Reviewed by: Matt Ahrens Reviewed-by: Serapheim Dimitropoulos Signed-off-by: Tom Caputi Closes #8193 zfsonlinux/zfs@5aa95ba0d3502779695341b5f55fa5ba1d3330ff Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_indirect.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_indirect.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_indirect.c Wed Mar 4 04:42:56 2020 (r358605) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_indirect.c Wed Mar 4 04:43:23 2020 (r358606) @@ -1222,6 +1222,8 @@ vdev_indirect_read_all(zio_t *zio) { indirect_vsd_t *iv = zio->io_vsd; + ASSERT3U(zio->io_type, ==, ZIO_TYPE_READ); + for (indirect_split_t *is = list_head(&iv->iv_splits); is != NULL; is = list_next(&iv->iv_splits, is)) { for (int i = 0; i < is->is_children; i++) { @@ -1310,7 +1312,8 @@ vdev_indirect_io_start(zio_t *zio) vdev_indirect_child_io_done, zio)); } else { iv->iv_split_block = B_TRUE; - if (zio->io_flags & (ZIO_FLAG_SCRUB | ZIO_FLAG_RESILVER)) { + if (zio->io_type == ZIO_TYPE_READ && + zio->io_flags & (ZIO_FLAG_SCRUB | ZIO_FLAG_RESILVER)) { /* * Read all copies. Note that for simplicity, * we don't bother consulting the DTL in the @@ -1319,13 +1322,17 @@ vdev_indirect_io_start(zio_t *zio) vdev_indirect_read_all(zio); } else { /* - * Read one copy of each split segment, from the - * top-level vdev. Since we don't know the - * checksum of each split individually, the child - * zio can't ensure that we get the right data. - * E.g. if it's a mirror, it will just read from a - * random (healthy) leaf vdev. We have to verify - * the checksum in vdev_indirect_io_done(). + * If this is a read zio, we read one copy of each + * split segment, from the top-level vdev. Since + * we don't know the checksum of each split + * individually, the child zio can't ensure that + * we get the right data. E.g. if it's a mirror, + * it will just read from a random (healthy) leaf + * vdev. We have to verify the checksum in + * vdev_indirect_io_done(). + * + * For write zios, the vdev code will ensure we write + * to all children. */ for (indirect_split_t *is = list_head(&iv->iv_splits); is != NULL; is = list_next(&iv->iv_splits, is)) { From owner-svn-src-stable@freebsd.org Wed Mar 4 04:44:09 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 E2158265124; Wed, 4 Mar 2020 04:44:09 +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 48XLr93MPQz3y1h; Wed, 4 Mar 2020 04:44:09 +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 1253618AAD; Wed, 4 Mar 2020 04:44:09 +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 0244i8CH030645; Wed, 4 Mar 2020 04:44:08 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0244i8os030644; Wed, 4 Mar 2020 04:44:08 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202003040444.0244i8os030644@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 4 Mar 2020 04:44:08 +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: r358607 - stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 358607 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: Wed, 04 Mar 2020 04:44:10 -0000 Author: mav Date: Wed Mar 4 04:44:08 2020 New Revision: 358607 URL: https://svnweb.freebsd.org/changeset/base/358607 Log: MFC r358357: MFZoL: Relax restriction on zfs_ioc_next_obj() iteration Per the documentation for dnode_next_offset in dnode.c, the "txg" parameter specifies a lower bound on which transaction the dnode can be found in. We are interested in all dnodes that are removed between the first and last transaction in the snapshot. It doesn't need to be created in that snapshot to correspond to a removed file. In fact, the behavior of zfs diff in the test case exactly matches this: the transaction that created the data that was deleted in snapshot "2" was produced before, in snapshot "1", definitely predating the first transaction in snapshot "2". Signed-off-by: Brian Behlendorf Signed-off-by: Tim Chase Closes #2081 zfsonlinux/zfs@7290cd3c4ed19fb3f75b8133db2e36afcdd24beb Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Wed Mar 4 04:43:23 2020 (r358606) +++ stable/12/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Wed Mar 4 04:44:08 2020 (r358607) @@ -5537,8 +5537,7 @@ zfs_ioc_next_obj(zfs_cmd_t *zc) if (error != 0) return (error); - error = dmu_object_next(os, &zc->zc_obj, B_FALSE, - dsl_dataset_phys(os->os_dsl_dataset)->ds_prev_snap_txg); + error = dmu_object_next(os, &zc->zc_obj, B_FALSE, 0); dmu_objset_rele(os, FTAG); return (error); From owner-svn-src-stable@freebsd.org Wed Mar 4 04:44:34 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 3C476265194; Wed, 4 Mar 2020 04:44:34 +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 48XLrf0Kw9z3yym; Wed, 4 Mar 2020 04:44:34 +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 BC05A18AAF; Wed, 4 Mar 2020 04:44:33 +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 0244iX2U030719; Wed, 4 Mar 2020 04:44:33 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0244iXhJ030718; Wed, 4 Mar 2020 04:44:33 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202003040444.0244iXhJ030718@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 4 Mar 2020 04:44:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r358608 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-11 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 358608 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: Wed, 04 Mar 2020 04:44:34 -0000 Author: mav Date: Wed Mar 4 04:44:33 2020 New Revision: 358608 URL: https://svnweb.freebsd.org/changeset/base/358608 Log: MFC r358357: MFZoL: Relax restriction on zfs_ioc_next_obj() iteration Per the documentation for dnode_next_offset in dnode.c, the "txg" parameter specifies a lower bound on which transaction the dnode can be found in. We are interested in all dnodes that are removed between the first and last transaction in the snapshot. It doesn't need to be created in that snapshot to correspond to a removed file. In fact, the behavior of zfs diff in the test case exactly matches this: the transaction that created the data that was deleted in snapshot "2" was produced before, in snapshot "1", definitely predating the first transaction in snapshot "2". Signed-off-by: Brian Behlendorf Signed-off-by: Tim Chase Closes #2081 zfsonlinux/zfs@7290cd3c4ed19fb3f75b8133db2e36afcdd24beb Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Wed Mar 4 04:44:08 2020 (r358607) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Wed Mar 4 04:44:33 2020 (r358608) @@ -5481,8 +5481,7 @@ zfs_ioc_next_obj(zfs_cmd_t *zc) if (error != 0) return (error); - error = dmu_object_next(os, &zc->zc_obj, B_FALSE, - dsl_dataset_phys(os->os_dsl_dataset)->ds_prev_snap_txg); + error = dmu_object_next(os, &zc->zc_obj, B_FALSE, 0); dmu_objset_rele(os, FTAG); return (error); From owner-svn-src-stable@freebsd.org Wed Mar 4 11:28:52 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 3A1AC26C25C; Wed, 4 Mar 2020 11:28:52 +0000 (UTC) (envelope-from bapt@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 48XWq80vPsz3Pxj; Wed, 4 Mar 2020 11:28:51 +0000 (UTC) (envelope-from bapt@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 AB20D1D3E5; Wed, 4 Mar 2020 11:28:50 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 024BSoVV069885; Wed, 4 Mar 2020 11:28:50 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024BSnVe069881; Wed, 4 Mar 2020 11:28:49 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <202003041128.024BSnVe069881@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 4 Mar 2020 11:28:49 +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: r358610 - in stable/12/usr.bin/diff: . tests X-SVN-Group: stable-12 X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: in stable/12/usr.bin/diff: . tests X-SVN-Commit-Revision: 358610 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: Wed, 04 Mar 2020 11:28:52 -0000 Author: bapt Date: Wed Mar 4 11:28:49 2020 New Revision: 358610 URL: https://svnweb.freebsd.org/changeset/base/358610 Log: MFC r357648: diff: implement -y (--side-by-side) along with -W and --suppress-common-lines PR: 219933 Submitted by: fehmi noyan isi Modified: stable/12/usr.bin/diff/diff.1 stable/12/usr.bin/diff/diff.c stable/12/usr.bin/diff/diff.h stable/12/usr.bin/diff/diffreg.c stable/12/usr.bin/diff/tests/diff_test.sh Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.bin/diff/diff.1 ============================================================================== --- stable/12/usr.bin/diff/diff.1 Wed Mar 4 09:46:42 2020 (r358609) +++ stable/12/usr.bin/diff/diff.1 Wed Mar 4 11:28:49 2020 (r358610) @@ -30,7 +30,7 @@ .\" @(#)diff.1 8.1 (Berkeley) 6/30/93 .\" $FreeBSD$ .\" -.Dd August 18, 2018 +.Dd February 07, 2020 .Dt DIFF 1 .Os .Sh NAME @@ -41,7 +41,7 @@ .Op Fl aBbdipTtw .Oo .Fl c | e | f | -.Fl n | q | u +.Fl n | q | u | y .Oc .Op Fl -brief .Op Fl -changed-group-format Ar GFMT @@ -182,6 +182,21 @@ .Op Fl x Ar pattern | Fl -exclude Ar pattern .Ek .Ar dir1 dir2 +.Nm diff +.Op Fl aBbditwW +.Op --expand-tabs +.Op --ignore-all-blanks +.Op --ignore-blank-lines +.Op --ignore-case +.Op --minimal +.Op --no-ignore-file-name-case +.Op --strip-trailing-cr +.Op --suppress-common-lines +.Op --tabsize +.Op --text +.Op --width +.Fl y | Fl -side-by-side +.Ar file1 file2 .Sh DESCRIPTION The .Nm @@ -284,7 +299,21 @@ However, unlike with .Fl c , all lines to be changed (added and/or removed) are present in a single section. +.It Fl y Fl -side-by-side +Output in two columns with a marker between them. The marker can be one +of the following: +.Pp +.Bl -tag -width Ds -offset indent -compact +.It space +Corresponding lines are identical. +.It '|' +Corresponding lines are different. +.It '<' +Files differ and only the first file contains the line. +.It '>' +Files differ and only the second file contains the line. .El +.El .Pp Comparison options: .Bl -tag -width Ds @@ -362,6 +391,10 @@ E.g., .Dq if (\ \&a == b \&) will compare equal to .Dq if(a==b) . +.It Fl W Ar number Fl -width Ar number +Output at most +.Ar number +columns when using side by side format. The default value is 130. .It Fl -changed-group-format Ar GFMT Format input groups in the provided .Pp @@ -382,7 +415,9 @@ default diff output stub option for compatibility with GNU diff .It Fl -strip-trailing-cr strip carriage return on input files -.It Fl tabsize Ar number +.It Fl -suppress-common-lines +Do not output common lines when using the side by side format +.It Fl -tabsize Ar number Number of spaces representing a tab (default 8) .El .Pp Modified: stable/12/usr.bin/diff/diff.c ============================================================================== --- stable/12/usr.bin/diff/diff.c Wed Mar 4 09:46:42 2020 (r358609) +++ stable/12/usr.bin/diff/diff.c Wed Mar 4 11:28:49 2020 (r358610) @@ -37,16 +37,16 @@ __FBSDID("$FreeBSD$"); #include "diff.h" #include "xmalloc.h" -int lflag, Nflag, Pflag, rflag, sflag, Tflag, cflag; -int diff_format, diff_context, status, ignore_file_case; -int tabsize = 8; +int lflag, Nflag, Pflag, rflag, sflag, Tflag, cflag, Wflag; +int diff_format, diff_context, status, ignore_file_case, suppress_common; +int tabsize = 8, width = 130; char *start, *ifdefname, *diffargs, *label[2], *ignore_pats; char *group_format = NULL; struct stat stb1, stb2; struct excludes *excludes_list; regex_t ignore_re; -#define OPTIONS "0123456789aBbC:cdD:efHhI:iL:lnNPpqrS:sTtU:uwX:x:" +#define OPTIONS "0123456789aBbC:cdD:efHhI:iL:lnNPpqrS:sTtU:uwW:X:x:y" enum { OPT_TSIZE = CHAR_MAX + 1, OPT_STRIPCR, @@ -55,6 +55,7 @@ enum { OPT_NORMAL, OPT_HORIZON_LINES, OPT_CHANGED_GROUP_FORMAT, + OPT_SUPPRESS_COMMON, }; static struct option longopts[] = { @@ -83,8 +84,10 @@ static struct option longopts[] = { { "initial-tab", no_argument, 0, 'T' }, { "unified", optional_argument, 0, 'U' }, { "ignore-all-space", no_argument, 0, 'w' }, + { "width", required_argument, 0, 'W' }, { "exclude", required_argument, 0, 'x' }, { "exclude-from", required_argument, 0, 'X' }, + { "side-by-side", no_argument, NULL, 'y' }, { "ignore-file-name-case", no_argument, NULL, OPT_IGN_FN_CASE }, { "horizon-lines", required_argument, NULL, OPT_HORIZON_LINES }, { "no-ignore-file-name-case", no_argument, NULL, OPT_NO_IGN_FN_CASE }, @@ -92,6 +95,7 @@ static struct option longopts[] = { { "strip-trailing-cr", no_argument, NULL, OPT_STRIPCR }, { "tabsize", optional_argument, NULL, OPT_TSIZE }, { "changed-group-format", required_argument, NULL, OPT_CHANGED_GROUP_FORMAT}, + { "suppress-common-lines", no_argument, NULL, OPT_SUPPRESS_COMMON }, { NULL, 0, 0, '\0'} }; @@ -230,12 +234,23 @@ main(int argc, char **argv) case 'w': dflags |= D_IGNOREBLANKS; break; + case 'W': + Wflag = 1; + width = (int) strtonum(optarg, 1, INT_MAX, &errstr); + if (errstr) { + warnx("Invalid argument for width"); + usage(); + } + break; case 'X': read_excludes_file(optarg); break; case 'x': push_excludes(optarg); break; + case 'y': + diff_format = D_SIDEBYSIDE; + break; case OPT_CHANGED_GROUP_FORMAT: diff_format = D_GFORMAT; group_format = optarg; @@ -261,6 +276,9 @@ main(int argc, char **argv) case OPT_STRIPCR: dflags |= D_STRIPCR; break; + case OPT_SUPPRESS_COMMON: + suppress_common = 1; + break; default: usage(); break; @@ -464,7 +482,12 @@ usage(void) " -U number file1 file2\n" " diff [-aBbdilNPprsTtw] [-c | -e | -f | -n | -q | -u] [--ignore-case]\n" " [--no-ignore-case] [--normal] [--tabsize] [-I pattern] [-L label]\n" - " [-S name] [-X file] [-x pattern] dir1 dir2\n"); + " [-S name] [-X file] [-x pattern] dir1 dir2\n" + " diff [-aBbditwW] [--expand-tabs] [--ignore-all-blanks]\n" + " [--ignore-blank-lines] [--ignore-case] [--minimal]\n" + " [--no-ignore-file-name-case] [--strip-trailing-cr]\n" + " [--suppress-common-lines] [--tabsize] [--text] [--width]\n" + " -y | --side-by-side file1 file2\n"); exit(2); } Modified: stable/12/usr.bin/diff/diff.h ============================================================================== --- stable/12/usr.bin/diff/diff.h Wed Mar 4 09:46:42 2020 (r358609) +++ stable/12/usr.bin/diff/diff.h Wed Mar 4 11:28:49 2020 (r358610) @@ -48,6 +48,7 @@ lines and no trailing . */ #define D_BRIEF 6 /* Say if the files differ */ #define D_GFORMAT 7 /* Diff with defined changed group format */ +#define D_SIDEBYSIDE 8 /* Side by side */ /* * Output flags @@ -85,9 +86,10 @@ struct excludes { struct excludes *next; }; -extern int lflag, Nflag, Pflag, rflag, sflag, Tflag, cflag; +extern int lflag, Nflag, Pflag, rflag, sflag, Tflag, cflag, Wflag; extern int diff_format, diff_context, status, ignore_file_case; -extern int tabsize; +extern int suppress_common; +extern int tabsize, width; extern char *start, *ifdefname, *diffargs, *label[2], *ignore_pats; extern char *group_format; extern struct stat stb1, stb2; Modified: stable/12/usr.bin/diff/diffreg.c ============================================================================== --- stable/12/usr.bin/diff/diffreg.c Wed Mar 4 09:46:42 2020 (r358609) +++ stable/12/usr.bin/diff/diffreg.c Wed Mar 4 11:28:49 2020 (r358610) @@ -181,6 +181,7 @@ struct context_vec { }; #define diff_output printf +#define MIN_PAD 1 static FILE *opentemp(const char *); static void output(char *, FILE *, char *, FILE *, int); static void check(FILE *, FILE *, int); @@ -196,6 +197,7 @@ static void unsort(struct line *, int, int *); static void change(char *, FILE *, char *, FILE *, int, int, int, int, int *); static void sort(struct line *, int); static void print_header(const char *, const char *); +static void print_space(int, int, int); static bool ignoreline_pattern(char *); static bool ignoreline(char *, bool); static int asciifile(FILE *); @@ -220,6 +222,8 @@ static int len[2]; static int pref, suff; /* length of prefix and suffix */ static int slen[2]; static int anychange; +static int hw, padding; /* half width and padding */ +static int edoffset; static long *ixnew; /* will be overlaid on file[1] */ static long *ixold; /* will be overlaid on klist */ static struct cand *clist; /* merely a free storage pot for candidates */ @@ -263,6 +267,22 @@ diffreg(char *file1, char *file2, int flags, int capsi lastline = 0; lastmatchline = 0; context_vec_ptr = context_vec_start - 1; + + /* + * hw excludes padding and make sure when -t is not used, + * the second column always starts from the closest tab stop + */ + if (diff_format == D_SIDEBYSIDE) { + hw = width >> 1; + padding = tabsize - (hw % tabsize); + if ((flags & D_EXPANDTABS) != 0 || (padding % tabsize == 0)) + padding = MIN_PAD; + + hw = (width >> 1) - + ((padding == MIN_PAD) ? (padding << 1) : padding) - 1; + } + + if (flags & D_IGNORECASE) chrtran = cup2low; else @@ -865,7 +885,7 @@ skipline(FILE *f) static void output(char *file1, FILE *f1, char *file2, FILE *f2, int flags) { - int m, i0, i1, j0, j1; + int i, j, m, i0, i1, j0, j1, nc; rewind(f1); rewind(f2); @@ -874,15 +894,55 @@ output(char *file1, FILE *f1, char *file2, FILE *f2, i J[m + 1] = len[1] + 1; if (diff_format != D_EDIT) { for (i0 = 1; i0 <= m; i0 = i1 + 1) { - while (i0 <= m && J[i0] == J[i0 - 1] + 1) + while (i0 <= m && J[i0] == J[i0 - 1] + 1){ + if (diff_format == D_SIDEBYSIDE && + suppress_common != 1) { + nc = fetch(ixold, i0, i0, f1, '\0', + 1, flags); + print_space(nc, + (hw - nc) + (padding << 1) + 1, + flags); + fetch(ixnew, J[i0], J[i0], f2, '\0', + 0, flags); + diff_output("\n"); + } i0++; + } j0 = J[i0 - 1] + 1; i1 = i0 - 1; while (i1 < m && J[i1 + 1] == 0) i1++; j1 = J[i1 + 1] - 1; J[i1] = j1; - change(file1, f1, file2, f2, i0, i1, j0, j1, &flags); + + /* + * When using side-by-side, lines from both of the + * files are printed. The algorithm used by diff(1) + * identifies the ranges in which two files differ. + * See the change() function below. + * The for loop below consumes the shorter range, + * whereas one of the while loops deals with the + * longer one. + */ + if (diff_format == D_SIDEBYSIDE) { + for (i=i0, j=j0; i<=i1 && j<=j1; i++, j++) + change(file1, f1, file2, f2, i, i, + j, j, &flags); + + while (i <= i1) { + change(file1, f1, file2, f2, + i, i, j+1, j, &flags); + i++; + } + + while (j <= j1) { + change(file1, f1, file2, f2, + i+1, i, j, j, &flags); + j++; + } + } else + change(file1, f1, file2, f2, i0, i1, j0, + j1, &flags); } } else { for (i0 = m; i0 >= 1; i0 = i1 - 1) { @@ -987,7 +1047,7 @@ change(char *file1, FILE *f1, char *file2, FILE *f2, i { static size_t max_context = 64; long curpos; - int i, nc, f; + int i, nc; const char *walk; bool skip_blanks; @@ -1116,27 +1176,38 @@ proceed: diff_output("%c", *walk); } } + if (diff_format == D_SIDEBYSIDE) { + if (a > b) { + print_space(0, hw + padding , *pflags); + } else { + nc = fetch(ixold, a, b, f1, '\0', 1, *pflags); + print_space(nc, hw - nc + padding, *pflags); + } + diff_output("%c", (a>b)? '>' : ((c>d)? '<' : '|')); + print_space(hw + padding + 1 , padding, *pflags); + fetch(ixnew, c, d, f2, '\0', 0, *pflags); + diff_output("\n"); + } if (diff_format == D_NORMAL || diff_format == D_IFDEF) { fetch(ixold, a, b, f1, '<', 1, *pflags); if (a <= b && c <= d && diff_format == D_NORMAL) diff_output("---\n"); } - f = 0; - if (diff_format != D_GFORMAT) - f = fetch(ixnew, c, d, f2, diff_format == D_NORMAL ? '>' : '\0', 0, *pflags); - if (f != 0 && diff_format == D_EDIT) { + if (diff_format != D_GFORMAT && diff_format != D_SIDEBYSIDE) + fetch(ixnew, c, d, f2, diff_format == D_NORMAL ? '>' : '\0', 0, *pflags); + if (edoffset != 0 && diff_format == D_EDIT) { /* - * A non-zero return value for D_EDIT indicates that the + * A non-zero edoffset value for D_EDIT indicates that the * last line printed was a bare dot (".") that has been * escaped as ".." to prevent ed(1) from misinterpreting * it. We have to add a substitute command to change this * back and restart where we left off. */ diff_output(".\n"); - diff_output("%ds/.//\n", a + f - 1); - b = a + f - 1; + diff_output("%ds/.//\n", a + edoffset - 1); + b = a + edoffset - 1; a = b + 1; - c += f; + c += edoffset; goto restart; } if ((diff_format == D_EDIT || diff_format == D_REVERSE) && c <= d) @@ -1150,9 +1221,10 @@ proceed: static int fetch(long *f, int a, int b, FILE *lb, int ch, int oldfile, int flags) { - int i, j, c, lastc, col, nc; - int newcol; + int i, j, c, lastc, col, nc, newcol; + edoffset = 0; + nc = 0; /* * When doing #ifdef's, copy down to current line * if this is the first file, so that stuff makes it to output. @@ -1180,12 +1252,15 @@ fetch(long *f, int a, int b, FILE *lb, int ch, int old } for (i = a; i <= b; i++) { fseek(lb, f[i - 1], SEEK_SET); - nc = f[i] - f[i - 1]; - if ((diff_format != D_IFDEF && diff_format != D_GFORMAT) && + nc = (f[i] - f[i - 1]); + if (diff_format == D_SIDEBYSIDE && hw < nc) + nc = hw; + if ((diff_format != D_IFDEF && diff_format != D_GFORMAT) && ch != '\0') { diff_output("%c", ch); - if (Tflag && (diff_format == D_NORMAL || diff_format == D_CONTEXT - || diff_format == D_UNIFIED)) + if (Tflag && (diff_format == D_NORMAL || + diff_format == D_CONTEXT || + diff_format == D_UNIFIED)) diff_output("\t"); else if (diff_format != D_UNIFIED) diff_output(" "); @@ -1193,38 +1268,68 @@ fetch(long *f, int a, int b, FILE *lb, int ch, int old col = 0; for (j = 0, lastc = '\0'; j < nc; j++, lastc = c) { if ((c = getc(lb)) == EOF) { - if (diff_format == D_EDIT || diff_format == D_REVERSE || + if (diff_format == D_EDIT || + diff_format == D_REVERSE || diff_format == D_NREVERSE) warnx("No newline at end of file"); else diff_output("\n\\ No newline at end of " "file\n"); - return (0); + return col; } - if (c == '\t' && (flags & D_EXPANDTABS)) { - newcol = ((col/tabsize)+1)*tabsize; - do { - diff_output(" "); - } while (++col < newcol); + /* + * when using --side-by-side, col needs to be increased + * in any case to keep the columns aligned + */ + if (c == '\t') { + if (flags & D_EXPANDTABS) { + newcol = ((col/tabsize)+1)*tabsize; + do { + if (diff_format == D_SIDEBYSIDE) + j++; + diff_output(" "); + } while (++col < newcol && j < nc); + } else { + if (diff_format == D_SIDEBYSIDE) { + if ((j + tabsize) > nc) { + diff_output("%*s", + nc - j,""); + j = col = nc; + } else { + diff_output("\t"); + col += tabsize - 1; + j += tabsize - 1; + } + } else { + diff_output("\t"); + col++; + } + } } else { if (diff_format == D_EDIT && j == 1 && c == '\n' && lastc == '.') { /* * Don't print a bare "." line * since that will confuse ed(1). - * Print ".." instead and return, - * giving the caller an offset - * from which to restart. + * Print ".." instead and set the, + * global variable edoffset to an + * offset from which to restart. + * The caller must check the value + * of edoffset */ diff_output(".\n"); - return (i - a + 1); + edoffset = i - a + 1; + return edoffset; } - diff_output("%c", c); - col++; + /* when side-by-side, do not print a newline */ + if (diff_format != D_SIDEBYSIDE || c != '\n') { + diff_output("%c", c); + col++; + } } } } - return (0); + return col; } /* @@ -1577,4 +1682,26 @@ print_header(const char *file1, const char *file2) else diff_output("%s %s\t%s\n", diff_format == D_CONTEXT ? "---" : "+++", file2, buf2); -} +} + +/* + * Prints n number of space characters either by using tab + * or single space characters. + * nc is the preceding number of characters + */ +static void +print_space(int nc, int n, int flags) { + int i, col; + + col = n; + if ((flags & D_EXPANDTABS) == 0) { + /* first tabstop may be closer than tabsize */ + i = tabsize - (nc % tabsize); + while (col >= tabsize) { + diff_output("\t"); + col -= i; + i = tabsize; + } + } + diff_output("%*s", col, ""); +} \ No newline at end of file Modified: stable/12/usr.bin/diff/tests/diff_test.sh ============================================================================== --- stable/12/usr.bin/diff/tests/diff_test.sh Wed Mar 4 09:46:42 2020 (r358609) +++ stable/12/usr.bin/diff/tests/diff_test.sh Wed Mar 4 11:28:49 2020 (r358610) @@ -103,8 +103,6 @@ group_format_body() side_by_side_body() { - atf_expect_fail "--side-by-side not currently implemented (bug # 219933)" - atf_check -o save:A printf "A\nB\nC\n" atf_check -o save:B printf "D\nB\nE\n" From owner-svn-src-stable@freebsd.org Wed Mar 4 11:30:10 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 9623026C2E8; Wed, 4 Mar 2020 11:30:10 +0000 (UTC) (envelope-from bapt@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 48XWrf1Tg6z3R8M; Wed, 4 Mar 2020 11:30:10 +0000 (UTC) (envelope-from bapt@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 0A3921D421; Wed, 4 Mar 2020 11:30:08 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 024BU8cv070035; Wed, 4 Mar 2020 11:30:08 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024BU8cq070034; Wed, 4 Mar 2020 11:30:08 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <202003041130.024BU8cq070034@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 4 Mar 2020 11:30:08 +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: r358611 - stable/12/share/misc X-SVN-Group: stable-12 X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: stable/12/share/misc X-SVN-Commit-Revision: 358611 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: Wed, 04 Mar 2020 11:30:10 -0000 Author: bapt Date: Wed Mar 4 11:30:08 2020 New Revision: 358611 URL: https://svnweb.freebsd.org/changeset/base/358611 Log: MFC r358378: Update pci_vendors to 2020.02.22 Modified: stable/12/share/misc/pci_vendors Directory Properties: stable/12/ (props changed) Modified: stable/12/share/misc/pci_vendors ============================================================================== --- stable/12/share/misc/pci_vendors Wed Mar 4 11:28:49 2020 (r358610) +++ stable/12/share/misc/pci_vendors Wed Mar 4 11:30:08 2020 (r358611) @@ -2,8 +2,8 @@ # List of PCI ID's # -# Version: 2019.01.29 -# Date: 2019-01-29 03:15:01 +# Version: 2020.02.22 +# Date: 2020-02-22 03:15:04 # # Maintained by Albert Pool, Martin Mares, and other volunteers from # the PCI ID Project at https://pci-ids.ucw.cz/. @@ -14,6 +14,10 @@ # This file can be distributed under either the GNU General Public License # (version 2 or higher) or the 3-clause BSD License. # +# The database is a compilation of factual data, and as such the copyright +# only covers the aggregation and formatting. The copyright is held by +# Martin Mares and Albert Pool. +# # Vendors, devices and subsystems. Please keep sorted. @@ -64,6 +68,7 @@ # 018a is not LevelOne but there is a board misprogrammed 018a LevelOne 0106 FPC-0106TX misprogrammed [RTL81xx] +01de Oxide Computer Company # 021b is not Compaq but there is a board misprogrammed 021b Compaq Computer Corporation 8139 HNE-300 (RealTek RTL8139c) [iPaq Networking] @@ -92,6 +97,7 @@ 6663 Butane II (MPEG2 encoder board) 6666 MediaPress (MPEG2 encoder board) 07d1 D-Link System Inc +0824 T1042 [Freescale] 0925 VIA Technologies, Inc. (Wrong ID) 0a89 BREA Technologies Inc 0b0b Rhino Equipment Corp. @@ -220,8 +226,7 @@ 0eac SHF Communication Technologies AG 0008 Ethernet Powerlink Managing Node 01 0f62 Acrox Technologies Co., Ltd. -# Formerly NCR -1000 LSI Logic / Symbios Logic +1000 Broadcom / LSI 0001 53c810 1000 1000 LSI53C810AE PCI to SCSI I/O Processor 0002 53c820 @@ -266,7 +271,10 @@ 0013 53c875a 1000 1000 LSI53C875A PCI to Ultra SCSI Controller 0014 MegaRAID Tri-Mode SAS3516 + 1028 1f3a PERC H745 Adapter + 1028 1f3b PERC H745 Front 1028 1fd4 PERC H745P MX + 1137 020e UCSC-RAID-M5 12G Modular RAID Controller 1d49 0602 ThinkSystem RAID 930-16i 4GB Flash PCIe 12Gb Adapter 1d49 0604 ThinkSystem RAID 930-8e 4GB Flash PCIe 12Gb Adapter 1d49 0607 ThinkSystem RAID 930-16i 8GB Flash PCIe 12Gb Adapter @@ -274,6 +282,8 @@ 8086 9460 RAID Controller RSP3TD160F 8086 9480 RAID Controller RSP3MD088F 0015 MegaRAID Tri-Mode SAS3416 + 1028 1f3c PERC H345 Adapter + 1028 1f3d PERC H345 Front 1d49 0503 ThinkSystem RAID 530-16i PCIe 12Gb Adapter 0016 MegaRAID Tri-Mode SAS3508 1028 1fc9 PERC H840 Adapter @@ -401,7 +411,7 @@ 8086 3510 RMS25PB080 RAID Controller 8086 3511 RMS25PB040 RAID Controller 8086 3512 RMT3PB080 RAID Controller - 8086 3513 RMS25CB080 RAID Controller + 8086 3513 Integrated RAID Module RMS25CB080 8086 3514 RMS25CB040 RAID Controller 8086 351c RMS25PB080N RAID Controller 8086 351d RMS25CB080N RAID Controller @@ -428,6 +438,8 @@ 1028 1fd1 PERC H730P MX 17aa 1052 ThinkServer RAID 720i 17aa 1053 ThinkServer RAID 720ix + 1bd4 0014 6G SAS3108 2G + 1bd4 0015 6G SAS3108 4G 1d49 0600 ThinkSystem RAID 730-8i 1GB Cache PCIe 12Gb Adapter 1d49 0608 ThinkSystem RAID 730-8i 2GB Flash PCIe 12Gb Adapter 1d49 0609 ThinkSystem RAID 730-8i 4GB Flash PCIe 12Gb Adapter @@ -480,14 +492,18 @@ 0062 SAS1078 PCI-Express Fusion-MPT SAS 1000 0062 SAS1078 PCI-Express Fusion-MPT SAS 0064 SAS2116 PCI-Express Fusion-MPT SAS-2 [Meteor] + 1000 3030 9200-16e 6Gb/s SAS/SATA PCIe x8 External HBA 1000 30c0 SAS 9201-16i + 1000 30d0 9201-16e 6Gb/s SAS/SATA PCIe x8 External HBA 0065 SAS2116 PCI-Express Fusion-MPT SAS-2 [Meteor] 006e SAS2308 PCI-Express Fusion-MPT SAS-2 0070 SAS2004 PCI-Express Fusion-MPT SAS-2 [Spitfire] 1000 3010 SAS9211-4i + 1014 040e ServeRAID H1110 0071 MR SAS HBA 2004 0072 SAS2008 PCI-Express Fusion-MPT SAS-2 [Falcon] 1000 3040 9210-8i + 1000 3080 9200-8e [LSI SAS 6Gb/s SAS/SATA PCIe x8 External HBA] 1000 30b0 9200-8e [LSI SAS 6Gb/s SAS/SATA PCIe x8 External HBA] 1028 1f1c 6Gbps SAS HBA Adapter 1028 1f1d PERC H200 Adapter @@ -495,6 +511,12 @@ 1028 1f1f PERC H200 Modular 1028 1f20 PERC H200 Embedded 1028 1f22 PERC H200 Internal Tape Adapter +# Fujitsu D2607 SAS2008 HBA controller + 1734 1177 HBA Ctrl SAS 6G 0/1 [D2607] + 1bd4 000d 6G SAS2008IT + 1bd4 000e 6G SAS2008IR + 1bd4 000f 6G SAS2008IT SA5248 + 1bd4 0010 6G SAS2008IR SA5248 8086 350f RMS2LL040 RAID Controller 8086 3700 SSD 910 Series 0073 MegaRAID SAS 2008 [Falcon] @@ -502,6 +524,7 @@ 1000 9241 MegaRAID SAS 9240-4i 1000 92a0 MegaRAID SAS 9220-8i 1014 03b1 ServeRAID M1015 SAS/SATA Controller + 1014 040d ServeRAID M1115 SAS/SATA Controller 1028 1f4e PERC H310 Adapter 1028 1f4f PERC H310 Integrated 1028 1f50 PERC H310 Mini Blades @@ -594,10 +617,16 @@ 15d9 0691 Onboard SAS2308 PCI-Express Fusion-MPT SAS-2 0087 SAS2308 PCI-Express Fusion-MPT SAS-2 1000 3020 9207-8i SAS2.1 HBA + 1000 3030 SAS9207-4i4e 1000 3040 9207-8e SAS2.1 HBA 1000 3050 SAS9217-8i + 1000 3060 SAS9217-4i4e 1014 0472 N2125 External Host Bus Adapter + 1590 0041 H220i + 1590 0042 H221 / 9207-8e 1590 0044 H220i + 1bd4 0009 6G SAS2308IR + 1bd4 000a 6G SAS2308IT 8086 3000 RS25GB008 RAID Controller 8086 3060 RS25FB044 RAID Controller 8086 3516 RMS25JB080 RAID Controller @@ -624,10 +653,26 @@ 1028 1f53 HBA330 Mini 1028 1fd2 HBA330 MX 1028 1fd3 HBA330 MMZ +# Supermicro AOC-S3008L-L8e uses 0808 for their SAS3008 SAS controller + 15d9 0808 AOC-S3008L-L8e + 1bd4 000b 12G SAS3008IR + 1bd4 000c 12G SAS3008IT 1bd4 0011 Inspur 12Gb 8i-3008 IT SAS HBA + 1bd4 0012 12Gb SAS3008IR UDM + 1bd4 0026 12G SAS3008IT RACK + 1bd4 0027 12G SAS3008IMR RACK + 1bd4 0028 12G SAS3008IR RACK 00ab SAS3516 Fusion-MPT Tri-Mode RAID On Chip (ROC) +# 8 Internal and 8 External port channel 9400 HBA + 1000 3040 HBA 9400-8i8e 8086 3530 Integrated RAID Module RMSP3JD160J 00ac SAS3416 Fusion-MPT Tri-Mode I/O Controller Chip (IOC) +# Channel 16 internal port HBA + 1000 3000 HBA 9400-16i +# Channel 16 external port HBA + 1000 3020 HBA 9400-16e + 1028 1fe3 HBA345 Adapter + 1028 1fe4 HBA345 Front 1d49 0201 ThinkSystem 430-16i SAS/SATA 12Gb HBA 1d49 0203 ThinkSystem 430-16e SAS/SATA 12Gb HBA 8086 3000 RAID Controller RSP3QD160J @@ -635,6 +680,8 @@ 00ae SAS3508 Fusion-MPT Tri-Mode RAID On Chip (ROC) 00af SAS3408 Fusion-MPT Tri-Mode I/O Controller Chip (IOC) 1000 3010 HBA 9400-8i +# 9400 Channel 8 external port HBA + 1000 3030 HBA 9400-8e 1d49 0200 ThinkSystem 430-8i SAS/SATA 12Gb HBA 1d49 0202 ThinkSystem 430-8e SAS/SATA 12Gb HBA 1d49 0204 ThinkSystem 430-8i SAS/SATA 12Gb Dense HBA @@ -656,16 +703,57 @@ 00cf MegaRAID SAS-3 3324 [Intruder] 1000 9370 MegaRAID SAS 9361-24i 00d0 SAS3716 Fusion-MPT Tri-Mode RAID Controller Chip (ROC) +# 9405W 16 internal port channel HBA + 1000 3050 HBA 9405W-16i +# 9405W 8 internal and 8 external port channel HBA + 1000 3070 HBA 9405W-8i8e 00d1 SAS3616 Fusion-MPT Tri-Mode I/O Controller Chip (IOC) +# 9405W 16 external port Channel HBA + 1000 3080 HBA 9405W-16e +# 9405W 16 internal port Channel HBA + 1000 3090 HBA 9405W-16i 00d3 MegaRAID Tri-Mode SAS3716W 00e0 Fusion-MPT 12GSAS/PCIe Unsupported SAS39xx 00e1 Fusion-MPT 12GSAS/PCIe SAS39xx 00e2 Fusion-MPT 12GSAS/PCIe Secure SAS39xx 00e3 Fusion-MPT 12GSAS/PCIe Unsupported SAS39xx 00e4 Fusion-MPT 12GSAS/PCIe Unsupported SAS38xx +# Invalid part + 1028 200b HBA355i Adapter Invalid +# Invalid part + 1028 200c HBA355i Front Invalid +# Invalid part + 1028 200d HBA355e Adapter Invalid +# Invalid part + 1028 200e HBA350i MX Invalid +# Soft Secure 00e5 Fusion-MPT 12GSAS/PCIe SAS38xx +# Soft Secure + 1028 200b HBA355i Adapter +# Soft Secure + 1028 200c HBA355i Front +# Soft Secure + 1028 200d HBA355e Adapter +# Soft Secure + 1028 200e HBA350i MX + 1d49 0205 ThinkSystem 440-16i SAS/SATA PCIe Gen4 12Gb Internal HBA + 1d49 0206 ThinkSystem 440-16e SAS/SATA PCIe Gen4 12Gb HBA 00e6 Fusion-MPT 12GSAS/PCIe Secure SAS38xx + 1028 200b HBA355i Adapter + 1028 200c HBA355i Front + 1028 200d HBA355e Adapter + 1028 200e HBA355i MX + 1d49 0205 ThinkSystem 440-16i SAS/SATA PCIe Gen4 12Gb Internal HBA + 1d49 0206 ThinkSystem 440-16e SAS/SATA PCIe Gen4 12Gb HBA 00e7 Fusion-MPT 12GSAS/PCIe Unsupported SAS38xx +# Tampered part + 1028 200b HBA355i Adapter Tampered +# Tampered part + 1028 200c HBA355i Front Tampered +# Tampered part + 1028 200d HBA355e Adapter Tampered +# Tampered part + 1028 200e HBA350i MX Tampered 02b0 Virtual Endpoint on PCIe Switch 1d49 0001 ThinkSystem 1610-4P NVMe Switch Adapter 1d49 0002 ThinkSystem 810-4P NVMe Switch Adapter @@ -742,9 +830,37 @@ 0901 61C102 1000 63C815 10e0 MegaRAID 12GSAS/PCIe Unsupported SAS39xx + 1028 1ae0 PERC H755 Adapter - Invalid Device + 1028 1ae1 PERC H755 Front - Invalid Device + 1028 1ae2 PERC H755N Front - Invalid Device + 1028 1ae3 PERC H755 MX - Invalid Device 10e1 MegaRAID 12GSAS/PCIe SAS39xx + 1028 1ae0 PERC H755 Adapter + 1028 1ae1 PERC H755 Front + 1028 1ae2 PERC H755N Front + 1028 1ae3 PERC H755 MX + 1d49 060a ThinkSystem RAID 940-8i 4GB Flash PCIe Gen4 12Gb Adapter + 1d49 060b ThinkSystem RAID 940-8i 8GB Flash PCIe Gen4 12Gb Adapter + 1d49 060c ThinkSystem RAID 940-16i 8GB Flash PCIe Gen4 12Gb Adapter + 1d49 060d ThinkSystem RAID 940-16i 8GB Flash PCIe Gen4 12Gb Internal Adapter + 1d49 060e ThinkSystem RAID 940-32i 8GB Flash PCIe Gen4 12Gb Adapter + 1d49 060f ThinkSystem RAID 940-8e 4GB Flash PCIe Gen4 12Gb Adapter 10e2 MegaRAID 12GSAS/PCIe Secure SAS39xx + 1028 1ae0 PERC H755 Adapter + 1028 1ae1 PERC H755 Front + 1028 1ae2 PERC H755N Front + 1028 1ae3 PERC H755 MX + 1d49 060a ThinkSystem RAID 940-8i 4GB Flash PCIe Gen4 12Gb Adapter + 1d49 060b ThinkSystem RAID 940-8i 8GB Flash PCIe Gen4 12Gb Adapter + 1d49 060c ThinkSystem RAID 940-16i 8GB Flash PCIe Gen4 12Gb Adapter + 1d49 060d ThinkSystem RAID 940-16i 8GB Flash PCIe Gen4 12Gb Internal Adapter + 1d49 060e ThinkSystem RAID 940-32i 8GB Flash PCIe Gen4 12Gb Adapter + 1d49 060f ThinkSystem RAID 940-8e 4GB Flash PCIe Gen4 12Gb Adapter 10e3 MegaRAID 12GSAS/PCIe Unsupported SAS39xx + 1028 1ae0 PERC H755 Adapter - Tampered Device + 1028 1ae1 PERC H755 Front - Tampered Device + 1028 1ae2 PERC H755N Front - Tampered Device + 1028 1ae3 PERC H755 MX - Tampered Device 10e4 MegaRAID 12GSAS/PCIe Unsupported SAS38xx 10e5 MegaRAID 12GSAS/PCIe SAS38xx 10e6 MegaRAID 12GSAS/PCIe Secure SAS38xx @@ -781,7 +897,9 @@ 1306 Kaveri 1307 Kaveri 1308 Kaveri HDMI/DP Audio Controller + 17aa 3988 Z50-75 1309 Kaveri [Radeon R6/R7 Graphics] + 17aa 3830 Z50-75 130a Kaveri [Radeon R6 Graphics] 130b Kaveri [Radeon R4 Graphics] 130c Kaveri [Radeon R7 Graphics] @@ -802,16 +920,22 @@ 131c Kaveri [Radeon R7 Graphics] 131d Kaveri [Radeon R6 Graphics] 13e9 Ariel + 1478 Navi 10 XL Upstream Port of PCI Express Switch + 1479 Navi 10 XL Downstream Port of PCI Express Switch 154c Kryptos 154e Garfield 1551 Arlene 1552 Pooky 1561 Anubis 15d8 Picasso + 103c 8615 Pavilion Laptop 15-cw1xxx 15dd Raven Ridge [Radeon Vega Series / Radeon Vega Mobile Series] 103c 83c6 Radeon Vega 8 Mobile 1458 d000 Radeon RX Vega 11 - 15de Raven Ridge HDMI/DP Audio Controller + 15de Raven/Raven2/Fenghuang HDMI/DP Audio Controller + 103c 8615 Pavilion Laptop 15-cw1xxx + 15df Raven/Raven2/Fenghuang/Renoir Cryptographic Coprocessor + 103c 8615 Pavilion Laptop 15-cw1xxx 15ff Fenghuang [Zhongshan Subor Z+] 1607 Arden 1636 Renoir @@ -986,7 +1110,7 @@ 4382 SB600 AC97 Audio 4383 SBx00 Azalia (Intel HDA) 1019 2120 A785GM-M - 103c 1611 Pavilion DM1Z-3000 + 103c 1611 Pavilion dm1z-3000 103c 280a DC5750 Microtower 1043 8230 M3A78-EH Motherboard 1043 836c M4A785TD Motherboard @@ -1060,6 +1184,7 @@ 1458 b002 GA-MA770-DS3rev2.0 Motherboard 1849 4390 Motherboard (one of many) 4391 SB7x0/SB8x0/SB9x0 SATA Controller [AHCI mode] + 103c 1609 ProLiant MicroServer N36L 103c 1611 Pavilion DM1Z-3000 1043 82ef M3A78-EH Motherboard 1043 8443 M5A88-V EVO @@ -1073,6 +1198,7 @@ 4395 SB8x0/SB9x0 SATA Controller [Storage mode] 4396 SB7x0/SB8x0/SB9x0 USB EHCI Controller 1019 2120 A785GM-M + 103c 1609 ProLiant MicroServer N36L 103c 1611 Pavilion DM1Z-3000 1043 82ef M3A78-EH Motherboard 1043 8443 M5A88-V EVO @@ -1081,6 +1207,7 @@ 174b 1001 PURE Fusion Mini 4397 SB7x0/SB8x0/SB9x0 USB OHCI0 Controller 1019 2120 A785GM-M + 103c 1609 ProLiant MicroServer N36L 103c 1611 Pavilion DM1Z-3000 1043 82ef M3A78-EH Motherboard 1043 8443 M5A88-V EVO @@ -1101,10 +1228,12 @@ 439c SB7x0/SB8x0/SB9x0 IDE Controller 1002 4392 MSI MS-7713 motherboard 1019 2120 A785GM-M + 103c 1609 ProLiant MicroServer N36L 1043 82ef M3A78-EH Motherboard 105b 0e13 N15235/A74MX mainboard / AMD SB700 439d SB7x0/SB8x0/SB9x0 LPC host controller 1019 2120 A785GM-M + 103c 1609 ProLiant MicroServer N36L 103c 1611 Pavilion DM1Z-3000 1043 82ef M3A78-EH Motherboard 1043 8443 M5A88-V EVO @@ -1214,6 +1343,44 @@ 4857 Xilleon 225 USB for X225 4858 Xilleon 225 DAIO-0 for X225 4859 Xilleon 225 DAIO-1 for X225 + 4860 Xilleon 210 HBIU for X210 + 4861 Xilleon 210 IDE for X210 + 4862 Xilleon 210 USB for X210 + 4863 Xilleon 210 DAIO-0 for X210 + 4864 Xilleon 210 DAIO-1 for X210 + 4865 Xilleon 226 HBIU for X226 + 4866 Xilleon 226 IDE for X226 + 4867 Xilleon 226 USB for X226 + 4868 Xilleon 226 DAIO-0 for X226 + 4869 Xilleon 226 DAIO-1 for X226 + 486a Xilleon 240S HBIU for X240S + 486b Xilleon 240H HBIU for X240H + 486c Xilleon 240S USB for X240S + 486d Xilleon 240H USB for X240H + 486e Xilleon 250 USB 1.1 for X250 + 486f Xilleon 260 USB 1.1 for X260 + 4870 Xilleon 250 HBIU for X250 + 4871 Xilleon 250 IDE for X250 + 4872 Xilleon 234/235 HBIU for X234/X235 + 4873 Xilleon 244/245 HBIU for X244/X245 + 4874 Xilleon 234/235 USB 1.1 for X234/X235 + 4875 Xilleon 260 HBIU for X260 + 4876 Xilleon 260 IDE for X260 + 4877 Xilleon 244/245 USB 1.1 for X244/X245 + 4878 Xilleon 270 HBIU for X270 + 487b Xilleon 242 HBIU for X242 + 487d Xilleon 242 USB 1.1 for X242 + 4880 Xilleon 254 HBIU for X254 + 4881 Xilleon 254 USB 1.1 for X254 + 4882 Xilleon 255 HBIU for X255 + 4883 Xilleon 255 USB 1.1 for X255 + 4884 Xilleon 243 HBIU for X243 + 4885 Xilleon 243 USB 1.1 for X243 + 4886 Xilleon 233 HBIU for X233 + 4887 Xilleon 233 USB 1.1 for X233 + 4888 Xilleon 143 HBIU for X143 + 4889 Xilleon 143 HBIU for X143L + 488a Xilleon 143 HBIU for X143S 4966 RV250 [Radeon 9000 Series] 10f1 0002 RV250 If [Tachyon G9000 PRO] 148c 2039 RV250 If [Radeon 9000 Pro "Evil Commando"] @@ -1443,9 +1610,9 @@ 1002 0028 Rage 128 AIW 1002 0029 Rage 128 AIW 1002 0068 Rage 128 AIW - 5246 Rage 4 [Rage Fury/Xpert 128/Xpert 2000 AGP] + 5246 Rage 128 (Rage 4) series 1002 0004 Magnum/Xpert 128/Xpert 99 - 1002 0008 Magnum/Xpert128/X99/Xpert2000 + 1002 0008 Rage 128 AGP 2x 1002 0028 Rage 128 AIW AGP 1002 0044 Rage Fury/Xpert 128/Xpert 2000 1002 0068 Rage 128 AIW AGP @@ -1688,8 +1855,6 @@ 103c 1952 ProBook 455 G1 6601 Mars [Radeon HD 8730M] 103c 2100 FirePro M4100 - 6602 Mars - 6603 Mars 6604 Opal XT [Radeon R7 M265/M365X/M465] 1025 0776 Aspire V5 Radeon R7 M265 103c 8006 FirePro M4170 @@ -1715,6 +1880,7 @@ 1642 3f09 Radeon R7 350 6611 Oland [Radeon HD 8570 / R7 240/340 OEM] 1028 210b Radeon R5 240 OEM + 1642 1869 AMD Radeon 520 174b 4248 Radeon R7 240 OEM 174b a240 Radeon R7 240 OEM 174b d340 Radeon R7 340 OEM @@ -1722,9 +1888,6 @@ 6613 Oland PRO [Radeon R7 240/340] 148c 7340 Radeon R7 340 1682 7240 R7 240 2048 MB - 6620 Mars - 6621 Mars PRO - 6623 Mars 6631 Oland 6640 Saturn XT [FirePro M6100] 106b 014b Tropo XT [Radeon R9 M380 Mac Edition] @@ -1783,7 +1946,7 @@ 17aa 3805 Radeon HD 8570M 6664 Jet XT [Radeon R5 M240] 6665 Jet PRO [Radeon R5 M230 / R7 M260DX / Radeon 520 Mobile] - 17aa 1309 Radeon R7 M260DX + 17aa 1309 Z50-75 Radeon R7 M260DX 17aa 368f Radeon R5 A230 6667 Jet ULT [Radeon R5 M230] 666f Sun LE [Radeon HD 8550M / R5 M230] @@ -2412,18 +2575,22 @@ 1462 3413 Radeon RX 480 Gaming X 8GB 1462 3416 Radeon RX 570 1462 3418 Radeon RX 580 Armor 4G OC - 148c 2372 Radeon RX 480 + 1462 341e Radeon RX 570 Armor 4G OC + 1462 8a92 Radeon RX 580 + 148c 2372 Radeon RX 480 [Red Dragon] 148c 2373 Radeon RX 470 1682 9470 Radeon RX 470 1682 9480 Radeon RX 480 1682 9588 Radeon RX 580 XTR + 1682 c570 Radeon RX 570 174b e347 Radeon RX 470/480 174b e349 Radeon RX 470 1787 a470 Radeon RX 470 1787 a480 Radeon RX 480 1849 5001 Phantom Gaming X RX 580 OC + 1849 5030 Phantom Gaming D Radeon RX580 8G OC 1da2 e353 Radeon RX 570 Pulse 4GB - 1da2 e366 Nitro+ Radeon RX 570/580 + 1da2 e366 Nitro+ Radeon RX 570/580/590 67e0 Baffin [Radeon Pro WX 4170] 103c 8270 Radeon Pro WX 4170 103c 8272 Radeon Pro WX 4170 @@ -2441,6 +2608,8 @@ 67e9 Baffin [Polaris11] 67eb Baffin [Radeon Pro V5300X] 67ef Baffin [Radeon RX 460/560D / Pro 450/455/460/555/555X/560/560X] + 1028 1703 RX 560D OEM OC 2 GB + 103c 3421 Radeon RX 460 106b 0160 Radeon Pro 460 106b 0166 Radeon Pro 455 106b 0167 Radeon Pro 450 @@ -2456,6 +2625,7 @@ 1028 1726 Radeon RX 560DX 103c 8479 Radeon RX 560X Mobile 1043 04bc Radeon RX 560 + 1043 052f Radeon RX 560 1458 22ed Radeon RX 560 148c 2381 Radeon RX 560 1682 9560 Radeon RX 560 @@ -2679,6 +2849,8 @@ 6868 Vega 10 [Radeon PRO WX 8100/8200] 686c Vega 10 [Radeon Instinct MI25 MxGPU] 687f Vega 10 XL/XT [Radeon RX Vega 56/64] + 1002 0b36 RX Vega64 + 1002 6b76 RX Vega56 6880 Lexington [Radeon HD 6550M] 103c 163c Pavilion dv6 Radeon HD 6550M 6888 Cypress XT [FirePro V8800] @@ -3146,12 +3318,13 @@ 174b e180 Radeon HD 7350 17af 3015 Radeon HD 7350 68fe Cedar LE - 6900 Topaz XT [Radeon R7 M260/M265 / M340/M360 / M440/M445] + 6900 Topaz XT [Radeon R7 M260/M265 / M340/M360 / M440/M445 / 530/535 / 620/625 Mobile] 1025 1056 Radeon R7 M360 / R8 M365DX 1028 0640 Radeon R7 M260/M265 1028 0643 Radeon R7 M260/M265 1028 067f Radeon R7 M260 1028 0767 Radeon R7 M445 + 1028 0810 Radeon 530 1028 130a Radeon R7 M260 103c 2263 Radeon R7 M260 103c 2269 Radeon R7 M260 @@ -3198,12 +3371,12 @@ 694e Polaris 22 XL [Radeon RX Vega M GL] 694f Polaris 22 MGL XL [Radeon Pro WX Vega M GL] 6980 Polaris12 - 6981 Polaris12 + 6981 Lexa XT [Radeon PRO WX 3200] 6985 Lexa XT [Radeon PRO WX 3100] 6986 Polaris12 - 6987 Lexa [Radeon E9171 MCM] + 6987 Lexa [Radeon 540X/550X/630 / RX 640 / E9171 MCM] 6995 Lexa XT [Radeon PRO WX 2100] - 699f Lexa PRO [Radeon RX 550/550X] + 699f Lexa PRO [Radeon 540/540X/550/550X / RX 540X/550/550X] 1028 1720 Radeon RX 550X 148c 2380 Lexa XL [Radeon RX 550] 1da2 e367 Lexa PRO [Radeon RX 550] @@ -3356,7 +3529,12 @@ 1043 04a0 Radeon R9 FURY X 174b e329 Radeon R9 FURY 7310 Navi 10 - 731f Navi 10 + 7312 Navi 10 [Radeon Pro W5700] + 731f Navi 10 [Radeon RX 5600 OEM/5600 XT / 5700/5700 XT] + 7340 Navi 14 [Radeon RX 5500/5500M / Pro 5500M] + 7341 Navi 14 [Radeon Pro W5500] + 7347 Navi 14 [Radeon Pro W5500M] + 734f Navi 14 [Radeon Pro W5300M] 7833 RS350 Host Bridge 7834 RS350 [Radeon 9100 PRO/XT IGP] 7835 RS350M [Mobility Radeon 9000 IGP] @@ -3570,16 +3748,16 @@ 9613 RS780MC [Mobility Radeon HD 3100] 9614 RS780D [Radeon HD 3300] 9616 RS780L [Radeon 3000] - 9640 BeaverCreek [Radeon HD 6550D] - 9641 BeaverCreek [Radeon HD 6620G] - 9642 Sumo [Radeon HD 6370D] - 9643 Sumo [Radeon HD 6380G] - 9644 Sumo [Radeon HD 6410D] - 9645 Sumo [Radeon HD 6410D] - 9647 BeaverCreek [Radeon HD 6520G] + 9640 Sumo [Radeon HD 6550D] + 9641 Sumo [Radeon HD 6620G] + 9642 SuperSumo [Radeon HD 6370D] + 9643 SuperSumo [Radeon HD 6380G] + 9644 SuperSumo [Radeon HD 6410D] + 9645 SuperSumo [Radeon HD 6410D] + 9647 Sumo [Radeon HD 6520G] 9648 Sumo [Radeon HD 6480G] - 9649 Sumo [Radeon HD 6480G] - 964a BeaverCreek [Radeon HD 6530D] + 9649 SuperSumo [Radeon HD 6480G] + 964a Sumo [Radeon HD 6530D] 964b Sumo 964c Sumo 964e Sumo @@ -3592,6 +3770,7 @@ 1019 2120 A785GM-M 1043 83a2 M4A785TD Motherboard 9712 RS880M [Mobility Radeon HD 4225/4250] + 103c 1609 ProLiant MicroServer N36L 9713 RS880M [Mobility Radeon HD 4100] 9714 RS880 [Radeon HD 4290] 9715 RS880 [Radeon HD 4250] @@ -3610,6 +3789,7 @@ 9830 Kabini [Radeon HD 8400 / R3 Series] 9831 Kabini [Radeon HD 8400E] 9832 Kabini [Radeon HD 8330] + 1849 9832 QC5000-ITX/PH 9833 Kabini [Radeon HD 8330E] 9834 Kabini [Radeon HD 8210] 9835 Kabini [Radeon HD 8310E] @@ -3619,6 +3799,7 @@ 9839 Kabini [Radeon HD 8180] 983d Temash [Radeon HD 8250/8280G] 9840 Kabini HDMI/DP Audio + 1849 9840 QC5000-ITX/PH 9850 Mullins [Radeon R3 Graphics] 9851 Mullins [Radeon R4/R5 Graphics] 1179 f928 Beema [Radeon R5 Graphics] @@ -3682,9 +3863,10 @@ 991e Bishop 9920 Liverpool [Playstation 4 APU] 9921 Liverpool HDMI/DP Audio Controller - 9922 Starship + 9922 Starshp 9923 Starsha2 [Kingston/Clayton] 9924 Gladius + 9925 Kingston/Clayton/Jupiter/Gladius/Montego HDMI Controller 9926 Jupiter 9990 Trinity 2 [Radeon HD 7520G] 9991 Trinity 2 [Radeon HD 7540D] @@ -3698,7 +3880,7 @@ 9999 Richland [Radeon HD 8510G] 999a Richland [Radeon HD 8410G] 999b Richland [Radeon HD 8310G] - 999c Richland + 999c Richland [Radeon HD 8650D] # AMD Quad-Core A8-Series APU A8-6500T with Radeon HD 8550D 999d Richland [Radeon HD 8550D] 99a0 Trinity 2 [Radeon HD 7520G] @@ -3732,7 +3914,8 @@ aa98 Caicos HDMI Audio [Radeon HD 6450 / 7450/8450/8490 OEM / R5 230/235/235X OEM] 174b aa98 Radeon HD 6450 1GB DDR3 aaa0 Tahiti HDMI Audio [Radeon HD 7870 XT / 7950/7970] - aab0 Cape Verde/Pitcairn HDMI Audio [Radeon HD 7700/7800 Series] + aab0 Oland/Hainan/Cape Verde/Pitcairn HDMI Audio [Radeon HD 7000 Series] + aab8 Tiran HDMI Audio aac0 Tobago HDMI Audio [Radeon R7 360 / R9 360 OEM] aac8 Hawaii HDMI Audio [Radeon R9 290/290X / 390/390X] aad8 Tonga HDMI Audio [Radeon R9 285/380] @@ -4274,6 +4457,35 @@ 1302 Family 11h Processor DRAM Controller 1303 Family 11h Processor Miscellaneous Control 1304 Family 11h Processor Link Control + 1305 Griffin Function 5 + 1306 Griffin Function 6 + 1307 Griffin Function 7 + 1308 Kaveri Audio Controller + 1314 Wrestler/Bheem/Ontario/Krishna Audio Controller + 13e0 Ariel Root Complex + 13e1 Ariel IOMMU + 13e2 Ariel PCIe Dummy Host Bridge + 13e3 Ariel PCIe GPP Bridge + 13e4 Ariel PCIe Dummy Host Bridge + 13e5 Ariel Internal PCIe GPP Bridge 0 to Bus A + 13e6 Ariel Internal PCIe GPP Bridge 0 to Bus B + 13e7 Ariel SMBus Controller + 13e8 Ariel LPC Bridge + 13e9 Ariel Internal GPU + 13ea Ariel HD Audio Controller + 13eb Ariel HD Audio Coprocessor + 13ec Ariel Cryptographic Coprocessor + 13ed Ariel USB 3.1 Type C: Gen2 x 1port + DP Alt Mode + 13ee Ariel USB 3.1 Type A: Gen2 x 2 ports + 13ef Ariel ZCN/MP4 + 13f0 Ariel Device 24: Function 0 + 13f1 Ariel Device 24: Function 1 + 13f2 Ariel Device 24: Function 2 + 13f3 Ariel Device 24: Function 3 + 13f4 Ariel Device 24: Function 4 + 13f5 Ariel Device 24: Function 5 + 13f6 Ariel Device 24: Function 6 + 13f7 Ariel Device 24: Function 7 1400 Family 15h (Models 10h-1fh) Processor Function 0 1401 Family 15h (Models 10h-1fh) Processor Function 1 1402 Family 15h (Models 10h-1fh) Processor Function 2 @@ -4301,26 +4513,51 @@ 1422 Family 15h (Models 30h-3fh) Processor Root Complex 1423 Family 15h (Models 30h-3fh) I/O Memory Management Unit 1424 Family 15h (Models 30h-3fh) Processor Root Port + 1425 Kaveri P2P Bridge for GFX PCIe Port [1:0] 1426 Family 15h (Models 30h-3fh) Processor Root Port - 142e Liverpool Processor Function 0 - 142f Liverpool Processor Function 1 - 1430 Liverpool Processor Function 2 - 1431 Liverpool Processor Function 3 - 1432 Liverpool Processor Function 4 + 142e Liverpool Processor HT configuration + 142f Liverpool Processor Address Maps + 1430 Liverpool Processor DRAM configuration + 1431 Liverpool Processor Misc configuration + 1432 Liverpool Processor PM configuration + 1433 Liverpool Processor NB Performance Monitor + 1434 Liverpool Processor SPLL Configuration 1436 Liverpool Processor Root Complex 1437 Liverpool I/O Memory Management Unit - 1438 Liverpool Processor Root Port + 1438 Liverpool UMI PCIe Dummy Host Bridge 1439 Family 16h Processor Functions 5:1 + 143a Kingston/Clayton/Gladius/Montego Root Complex + 143b Kingston/Clayton/Gladius/Montego P2P Bridge for UMI Link + 1440 Matisse Device 24: Function 0 + 1441 Matisse Device 24: Function 1 + 1442 Matisse Device 24: Function 2 + 1443 Matisse Device 24: Function 3 + 1444 Matisse Device 24: Function 4 + 1445 Matisse Device 24: Function 5 + 1446 Matisse Device 24: Function 6 + 1447 Matisse Device 24: Function 7 + 1448 Renoir Device 24: Function 0 + 1449 Renoir Device 24: Function 1 + 144a Renoir Device 24: Function 2 + 144b Renoir Device 24: Function 3 + 144c Renoir Device 24: Function 4 + 144d Renoir Device 24: Function 5 + 144e Renoir Device 24: Function 6 + 144f Renoir Device 24: Function 7 1450 Family 17h (Models 00h-0fh) Root Complex 1451 Family 17h (Models 00h-0fh) I/O Memory Management Unit 1452 Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge 1453 Family 17h (Models 00h-0fh) PCIe GPP Bridge 1454 Family 17h (Models 00h-0fh) Internal PCIe GPP Bridge 0 to Bus B + 1455 Zeppelin/Renoir PCIe Dummy Function 1456 Family 17h (Models 00h-0fh) Platform Security Processor 1457 Family 17h (Models 00h-0fh) HD Audio Controller + 145a Zeppelin/Raven/Raven2 PCIe Dummy Function 145b Zeppelin Non-Transparent Bridge 145c Family 17h (Models 00h-0fh) USB 3.0 Host Controller - 145f USB 3.0 Host controller + 145d Zeppelin Switch Upstream (PCIE SW.US) + 145e Zeppelin Switch Downstream (PCIE SW.DS) + 145f Zeppelin USB 3.0 Host controller 1460 Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 0 1461 Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 1 1462 Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 2 @@ -4329,6 +4566,39 @@ 1465 Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 5 1466 Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 6 1467 Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 7 + 1468 Zeppelin Cryptographic Coprocessor NTBCCP + 1480 Starship/Matisse Root Complex + 1462 7c37 X570-A PRO motherboard + 1481 Starship/Matisse IOMMU + 1482 Starship/Matisse PCIe Dummy Host Bridge + 1483 Starship/Matisse GPP Bridge + 1484 Starship/Matisse Internal PCIe GPP Bridge 0 to bus[E:B] + 1485 Starship/Matisse Reserved SPP + 1486 Starship/Matisse Cryptographic Coprocessor PSPCPP + 1487 Starship/Matisse HD Audio Controller + 1462 9c37 X570-A PRO motherboard + 1488 Starship Reserved SSP + 1489 Starship Reserved SSP + 148a Starship/Matisse PCIe Dummy Function + 148b Starship/Matisse Non-Transparent Bridge + 148c Starship USB 3.0 Host Controller + 148d Starship/Matisse Switch Upstream (PCIE SW.US) + 148e Starship/Matisse Switch Downstream (PCIE SW.DS) + 148f Starship Reserved SSP + 1490 Starship Device 24; Function 0 + 1491 Starship Device 24; Function 1 + 1492 Starship Device 24; Function 2 + 1493 Starship Device 24; Function 3 + 1494 Starship Device 24; Function 4 + 1495 Starship Device 24; Function 5 + 1496 Starship Device 24; Function 6 + 1497 Starship Device 24; Function 7 + 1498 Starship/Matisse PTDMA + 1499 Starship/Matisse NVMe + 149a Starship PCIe GPP Bridge [1:0] + 149b Starship Reserved SSP + 149c Matisse USB 3.0 Host Controller + 1462 7c37 X570-A PRO motherboard 1510 Family 14h Processor Root Complex 174b 1001 PURE Fusion Mini 1512 Family 14h Processor Root Port @@ -4343,8 +4613,33 @@ 1534 Family 16h Processor Function 4 1535 Family 16h Processor Function 5 1536 Family 16h Processor Root Complex + 1849 1536 QC5000-ITX/PH + 1537 Kabini/Mullins PSP-Platform Security Processor 1538 Family 16h Processor Function 0 + 1539 Kabini P2P Bridge for PCIe Ports[4:0] + 1540 Kryptos/Cato/Garfield/Garfield+/Arlene/Pooky HT Configuration + 1541 Kryptos/Cato/Garfield/Garfield+/Arlene/Pooky Address Maps + 1542 Kryptos/Cato/Garfield/Garfield+/Arlene/Pooky DRAM Configuration + 1543 Kryptos/Cato/Garfield/Garfield+/Arlene/Pooky Miscellaneous Configuration + 1544 Kryptos/Cato/Garfield/Garfield+/Arlene/Pooky PM Configuration + 1545 Kryptos/Cato/Garfield/Garfield+/Arlene/Pooky NB Performance Monitor + 1546 Kryptos/Cato/Garfield/Garfield+/Arlene/Pooky Root Complex + 1547 Kryptos/Cato/Garfield/Garfield+/Arlene/Pooky IOMMU + 1548 Kryptos/Cato/Garfield/Garfield+/Arlene/Pooky UMI PCIe Dummy Host Bridge + 1549 Kryptos/Cato/Garfield/Garfield+ P2P Bridge for PCIe Port [3:0] + 154a Kryptos/Cato/Garfield/Garfield+/Arlene/Pooky Audio Processor + 154b Kryptos/Cato/Garfield/Garfield+/Arlene/Pooky Security Processor + 154d Kryptos/Cato/Garfield/Garfield+/Arlene/Pooky/Anubis HDMI Controller + 154f Anubis Audio Processor + 1550 Garfield+/Arlene/Pooky/Anubis SPLL Configuration + 1553 Arlene/Pooky P2P Bridge for PCIE (3:0) + 155b Anubis Root Complex + 155c Anubis IOMMU + 155d Anubis UMI PCIe Dummy Bridge + 155e Anubis P2P Bridge for PCIe Ports [4:0] + 1560 Anubis Security Processor 1566 Family 16h (Models 30h-3fh) Processor Root Complex + 1567 Mullins IOMMU 156b Family 16h (Models 30h-3fh) Host Bridge 1570 Family 15h (Models 60h-6fh) Processor Function 0 1571 Family 15h (Models 60h-6fh) Processor Function 1 @@ -4354,29 +4649,132 @@ 1575 Family 15h (Models 60h-6fh) Processor Function 5 1576 Family 15h (Models 60h-6fh) Processor Root Complex 1577 Family 15h (Models 60h-6fh) I/O Memory Management Unit + 1578 Carrizo Platform Security Processor + 1579 Carrizo Audio Processor 157a Family 15h (Models 60h-6fh) Audio Controller 157b Family 15h (Models 60h-6fh) Host Bridge 157c Family 15h (Models 60h-6fh) Processor Root Port + 157d Carrizo Audio Dummy Host Bridge + 157e Carrizo Audio Controller 1580 Family 16h (Models 30h-3fh) Processor Function 0 1581 Family 16h (Models 30h-3fh) Processor Function 1 1582 Family 16h (Models 30h-3fh) Processor Function 2 1583 Family 16h (Models 30h-3fh) Processor Function 3 1584 Family 16h (Models 30h-3fh) Processor Function 4 1585 Family 16h (Models 30h-3fh) Processor Function 5 + 1590 Amur/Nolan HT Configuration + 1591 Amur/Nolan Address Maps + 1592 Amur/Nolan DRAM Configuration + 1593 Amur/Nolan Miscellaneous Configuration + 1594 Amur/Nolan PM Configuration + 1595 Amur/Nolan NB Performance Monitor + 1596 Amur/Nolan Root Complex + 1597 Amur/Nolan IOMMU + 1598 Amur/Nolan Platform Security Processor + 1599 Amur/Nolan PCIe Dummy Host Bridge + 159d Amur Function 6: Gasket + 15b0 Stoney HT Configuration + 15b1 Stoney Address Maps + 15b2 Stoney DRAM Configuration + 15b3 Stoney Miscellaneous Configuration + 15b4 Stoney PM Configuration + 15b5 Stoney NB Performance Monitor + 15bc Stoney PCIe [GFX,GPP] Bridge [4:0] + 15be Stoney Audio Processor + 15d0 Raven/Raven2 Root Complex + 103c 8615 Pavilion Laptop 15-cw1xxx + 15d1 Raven/Raven2 IOMMU + 103c 8615 Pavilion Laptop 15-cw1xxx + 15d2 Raven/Raven2 PCIe Dummy Host Bridge + 15d3 Raven/Raven2 PCIe GPP Bridge [6:0] + 15d4 FireFlight USB 3.1 + 15d5 FireFlight USB 3.1 + 15da Raven/Raven2 PCIe Dummy Host Bridge + 15db Raven/Raven2 Internal PCIe GPP Bridge 0 to Bus A + 15dc Raven/Raven2 Internal PCIe GPP Bridge 0 to Bus B + 15de Raven/Raven2/FireFlight HD Audio Controller 15df Family 17h (Models 10h-1fh) Platform Security Processor + 15e0 Raven USB 3.1 + 103c 8615 Pavilion Laptop 15-cw1xxx + 15e1 Raven USB 3.1 + 103c 8615 Pavilion Laptop 15-cw1xxx + 15e2 Raven/Raven2/FireFlight/Renoir Audio Processor 15e3 Family 17h (Models 10h-1fh) HD Audio Controller + 103c 8615 Pavilion Laptop 15-cw1xxx + 15e4 Raven/Raven2/Renoir Sensor Fusion Hub + 15e5 Raven2 USB 3.1 + 15e6 Raven/Raven2/Renoir Non-Sensor Fusion Hub KMDF driver + 1022 15e4 Raven/Raven2/Renoir Sensor Fusion Hub + 15e8 Raven/Raven2 Device 24: Function 0 + 15e9 Raven/Raven2 Device 24: Function 1 + 15ea Raven/Raven2 Device 24: Function 2 + 15eb Raven/Raven2 Device 24: Function 3 + 15ec Raven/Raven2 Device 24: Function 4 + 15ed Raven/Raven2 Device 24: Function 5 + 15ee Raven/Raven2 Device 24: Function 6 + 15ef Raven/Raven2 Device 24: Function 7 + 15f0 FireFlight Device 24: Function 0 + 15f1 FireFlight Device 24: Function 1 + 15f2 FireFlight Device 24: Function 2 + 15f3 FireFlight Device 24: Function 3 + 15f4 FireFlight Device 24: Function 4 + 15f5 FireFlight Device 24: Function 5 + 15f6 FireFlight Device 24: Function 6 + 15f7 FireFlight Device 24: Function 7 + 15f8 FireFlight Root Complex + 15f9 FireFlight IOMMU + 15fa FireFlight PCIe Dummy Host Bridge + 15fb FireFlight PCIe GPP Bride 3:0 + 15fc FireFlight PCIe Dummy Host Bridge + 15fd FireFlight Internal PCIe GPP Bridge 0 to Bus A + 15fe FireFlight Internal PCIe GPP Bridge 0 to Bus B + 15ff FireFlight Bus A; Device 0: Function 0: Internal GPU 1600 Family 15h Processor Function 0 1601 Family 15h Processor Function 1 1602 Family 15h Processor Function 2 1603 Family 15h Processor Function 3 1604 Family 15h Processor Function 4 1605 Family 15h Processor Function 5 + 1606 Arden Security Processor + 1608 Arden Device 18h: Function 0 + 1609 Arden Device 18h: Function 1 + 160a Arden Device 18h: Function 2 + 160b Arden Device 18h: Function 3 + 160c Arden Device 18h: Function 4 + 160d Arden Device 18h: Function 5 + 160e Arden Device 18h: Function 6 + 160f Arden Device 18h: Function 7 + 1620 Anubis HT Configuration + 1621 Anubis Address Maps + 1622 Anubis DRAM Configuration + 1623 Anubis Miscellaneous Configuration + 1624 Anubis PM Configuration + 1625 Anubis NB Performance Monitor + 1626 Arden Root Complex + 1627 Arden IOMMU + 1628 Arden PCIe Dummy Host Bridge + 1629 Arden PCIe GPP Bridge + 162a Arden Internal PCIe GPP Bridge 0 to bus X + 162b Arden PCIe Non-Transparent Bridge + 1630 Renoir Root Complex + 1631 Renoir IOMMU + 1632 Renoir PCIe Dummy Host Bridge + 1633 Renoir PCIe GPP Bridge + 1634 Renoir PCIe GPP Bridge + 1635 Renoir Internal PCIe GPP Bridge to Bus + 1637 Renoir HD Audio Controller + 1639 Renoir USB 3.1 + 1641 Renoir 10GbE Controller Port 0 (XGBE0/1) + 1642 Renoir WLAN + 1643 Renoir BT + 1644 Renoir I2S 1700 Family 12h/14h Processor Function 0 1701 Family 12h/14h Processor Function 1 1702 Family 12h/14h Processor Function 2 1703 Family 12h/14h Processor Function 3 1704 Family 12h/14h Processor Function 4 1705 Family 12h Processor Root Complex + 1706 Llano P2P Bridge to external GPU 1707 Family 12h Processor Root Port 1708 Family 12h Processor Root Port 1709 Family 12h Processor Root Port @@ -4450,6 +4848,9 @@ 43c7 400 Series Chipset PCIe Port 43c8 400 Series Chipset SATA Controller 43d5 400 Series Chipset USB 3.1 XHCI Controller + 57a3 Matisse PCIe GPP Bridge + 57a4 Matisse PCIe GPP Bridge + 57ad Matisse Switch Upstream 7006 AMD-751 [Irongate] System Controller 7007 AMD-751 [Irongate] AGP Bridge 700a AMD-IGR4 AGP Host to PCI Bridge @@ -4508,6 +4909,8 @@ 7801 FCH SATA Controller [AHCI mode] 103c 168b ProBook 4535s Notebook 103c 194e ProBook 455 G1 Notebook + 17aa 3988 Z50-75 + 1849 7801 QC5000-ITX/PH 7802 FCH SATA Controller [RAID mode] 7803 FCH SATA Controller [RAID mode] 7804 FCH SATA Controller [AHCI mode] @@ -4517,37 +4920,57 @@ 7807 FCH USB OHCI Controller 103c 194e ProBook 455 G1 Notebook 103c 1985 Pavilion 17-e163sg Notebook PC + 17aa 3988 Z50-75 + 1849 7807 QC5000-ITX/PH 7808 FCH USB EHCI Controller 103c 194e ProBook 455 G1 Notebook 103c 1985 Pavilion 17-e163sg Notebook PC + 17aa 3988 Z50-75 + 1849 7808 QC5000-ITX/PH 7809 FCH USB OHCI Controller 103c 194e ProBook 455 G1 Notebook + 17aa 3988 Z50-75 + 780a Kabini/Mullins SATA Raid/AHCI Mode (DotHill driver) 780b FCH SMBus Controller 103c 194e ProBook 455 G1 Notebook 103c 1985 Pavilion 17-e163sg Notebook PC + 17aa 3988 Z50-75 + 1849 780b QC5000-ITX/PH 780c FCH IDE Controller 780d FCH Azalia Controller 103c 194e ProBook 455 G1 Notebook 103c 1985 Pavilion 17-e163sg Notebook PC 1043 8444 F2A85-M Series + 17aa 3988 Z50-75 + 1849 8892 QC5000-ITX/PH 780e FCH LPC Bridge 103c 194e ProBook 455 G1 Notebook 103c 1985 Pavilion 17-e163sg Notebook PC + 17aa 3988 Z50-75 + 1849 780e QC5000-ITX/PH 780f FCH PCI Bridge 7812 FCH USB XHCI Controller 7813 FCH SD Flash Controller 7814 FCH USB XHCI Controller 103c 194e ProBook 455 G1 Notebook 103c 1985 Pavilion 17-e163sg Notebook PC + 17aa 3988 Z50-75 + 1849 7814 QC5000-ITX/PH 7900 FCH SATA Controller [IDE mode] 7901 FCH SATA Controller [AHCI mode] + 103c 8615 Pavilion Laptop 15-cw1xxx + 1462 7c37 X570-A PRO motherboard 7902 FCH SATA Controller [RAID mode] 7903 FCH SATA Controller [RAID mode] 7904 FCH SATA Controller [AHCI mode] 7906 FCH SD Flash Controller 7908 FCH USB EHCI Controller 790b FCH SMBus Controller + 103c 8615 Pavilion Laptop 15-cw1xxx + 1462 7c37 X570-A PRO motherboard *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@freebsd.org Wed Mar 4 11:32:33 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 4178626C4B8; Wed, 4 Mar 2020 11:32:33 +0000 (UTC) (envelope-from bapt@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 48XWvN2l3dz3ygx; Wed, 4 Mar 2020 11:32:32 +0000 (UTC) (envelope-from bapt@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 E5DB01D5DF; Wed, 4 Mar 2020 11:32:31 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 024BWVax075344; Wed, 4 Mar 2020 11:32:31 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024BWVTJ075343; Wed, 4 Mar 2020 11:32:31 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <202003041132.024BWVTJ075343@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 4 Mar 2020 11:32:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r358612 - stable/11/share/misc X-SVN-Group: stable-11 X-SVN-Commit-Author: bapt X-SVN-Commit-Paths: stable/11/share/misc X-SVN-Commit-Revision: 358612 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: Wed, 04 Mar 2020 11:32:33 -0000 Author: bapt Date: Wed Mar 4 11:32:31 2020 New Revision: 358612 URL: https://svnweb.freebsd.org/changeset/base/358612 Log: MFC r358378: Update pci_vendors to 2020.02.22 Modified: stable/11/share/misc/pci_vendors Directory Properties: stable/11/ (props changed) Modified: stable/11/share/misc/pci_vendors ============================================================================== --- stable/11/share/misc/pci_vendors Wed Mar 4 11:30:08 2020 (r358611) +++ stable/11/share/misc/pci_vendors Wed Mar 4 11:32:31 2020 (r358612) @@ -2,8 +2,8 @@ # List of PCI ID's # -# Version: 2019.01.29 -# Date: 2019-01-29 03:15:01 +# Version: 2020.02.22 +# Date: 2020-02-22 03:15:04 # # Maintained by Albert Pool, Martin Mares, and other volunteers from # the PCI ID Project at https://pci-ids.ucw.cz/. @@ -14,6 +14,10 @@ # This file can be distributed under either the GNU General Public License # (version 2 or higher) or the 3-clause BSD License. # +# The database is a compilation of factual data, and as such the copyright +# only covers the aggregation and formatting. The copyright is held by +# Martin Mares and Albert Pool. +# # Vendors, devices and subsystems. Please keep sorted. @@ -64,6 +68,7 @@ # 018a is not LevelOne but there is a board misprogrammed 018a LevelOne 0106 FPC-0106TX misprogrammed [RTL81xx] +01de Oxide Computer Company # 021b is not Compaq but there is a board misprogrammed 021b Compaq Computer Corporation 8139 HNE-300 (RealTek RTL8139c) [iPaq Networking] @@ -92,6 +97,7 @@ 6663 Butane II (MPEG2 encoder board) 6666 MediaPress (MPEG2 encoder board) 07d1 D-Link System Inc +0824 T1042 [Freescale] 0925 VIA Technologies, Inc. (Wrong ID) 0a89 BREA Technologies Inc 0b0b Rhino Equipment Corp. @@ -220,8 +226,7 @@ 0eac SHF Communication Technologies AG 0008 Ethernet Powerlink Managing Node 01 0f62 Acrox Technologies Co., Ltd. -# Formerly NCR -1000 LSI Logic / Symbios Logic +1000 Broadcom / LSI 0001 53c810 1000 1000 LSI53C810AE PCI to SCSI I/O Processor 0002 53c820 @@ -266,7 +271,10 @@ 0013 53c875a 1000 1000 LSI53C875A PCI to Ultra SCSI Controller 0014 MegaRAID Tri-Mode SAS3516 + 1028 1f3a PERC H745 Adapter + 1028 1f3b PERC H745 Front 1028 1fd4 PERC H745P MX + 1137 020e UCSC-RAID-M5 12G Modular RAID Controller 1d49 0602 ThinkSystem RAID 930-16i 4GB Flash PCIe 12Gb Adapter 1d49 0604 ThinkSystem RAID 930-8e 4GB Flash PCIe 12Gb Adapter 1d49 0607 ThinkSystem RAID 930-16i 8GB Flash PCIe 12Gb Adapter @@ -274,6 +282,8 @@ 8086 9460 RAID Controller RSP3TD160F 8086 9480 RAID Controller RSP3MD088F 0015 MegaRAID Tri-Mode SAS3416 + 1028 1f3c PERC H345 Adapter + 1028 1f3d PERC H345 Front 1d49 0503 ThinkSystem RAID 530-16i PCIe 12Gb Adapter 0016 MegaRAID Tri-Mode SAS3508 1028 1fc9 PERC H840 Adapter @@ -401,7 +411,7 @@ 8086 3510 RMS25PB080 RAID Controller 8086 3511 RMS25PB040 RAID Controller 8086 3512 RMT3PB080 RAID Controller - 8086 3513 RMS25CB080 RAID Controller + 8086 3513 Integrated RAID Module RMS25CB080 8086 3514 RMS25CB040 RAID Controller 8086 351c RMS25PB080N RAID Controller 8086 351d RMS25CB080N RAID Controller @@ -428,6 +438,8 @@ 1028 1fd1 PERC H730P MX 17aa 1052 ThinkServer RAID 720i 17aa 1053 ThinkServer RAID 720ix + 1bd4 0014 6G SAS3108 2G + 1bd4 0015 6G SAS3108 4G 1d49 0600 ThinkSystem RAID 730-8i 1GB Cache PCIe 12Gb Adapter 1d49 0608 ThinkSystem RAID 730-8i 2GB Flash PCIe 12Gb Adapter 1d49 0609 ThinkSystem RAID 730-8i 4GB Flash PCIe 12Gb Adapter @@ -480,14 +492,18 @@ 0062 SAS1078 PCI-Express Fusion-MPT SAS 1000 0062 SAS1078 PCI-Express Fusion-MPT SAS 0064 SAS2116 PCI-Express Fusion-MPT SAS-2 [Meteor] + 1000 3030 9200-16e 6Gb/s SAS/SATA PCIe x8 External HBA 1000 30c0 SAS 9201-16i + 1000 30d0 9201-16e 6Gb/s SAS/SATA PCIe x8 External HBA 0065 SAS2116 PCI-Express Fusion-MPT SAS-2 [Meteor] 006e SAS2308 PCI-Express Fusion-MPT SAS-2 0070 SAS2004 PCI-Express Fusion-MPT SAS-2 [Spitfire] 1000 3010 SAS9211-4i + 1014 040e ServeRAID H1110 0071 MR SAS HBA 2004 0072 SAS2008 PCI-Express Fusion-MPT SAS-2 [Falcon] 1000 3040 9210-8i + 1000 3080 9200-8e [LSI SAS 6Gb/s SAS/SATA PCIe x8 External HBA] 1000 30b0 9200-8e [LSI SAS 6Gb/s SAS/SATA PCIe x8 External HBA] 1028 1f1c 6Gbps SAS HBA Adapter 1028 1f1d PERC H200 Adapter @@ -495,6 +511,12 @@ 1028 1f1f PERC H200 Modular 1028 1f20 PERC H200 Embedded 1028 1f22 PERC H200 Internal Tape Adapter +# Fujitsu D2607 SAS2008 HBA controller + 1734 1177 HBA Ctrl SAS 6G 0/1 [D2607] + 1bd4 000d 6G SAS2008IT + 1bd4 000e 6G SAS2008IR + 1bd4 000f 6G SAS2008IT SA5248 + 1bd4 0010 6G SAS2008IR SA5248 8086 350f RMS2LL040 RAID Controller 8086 3700 SSD 910 Series 0073 MegaRAID SAS 2008 [Falcon] @@ -502,6 +524,7 @@ 1000 9241 MegaRAID SAS 9240-4i 1000 92a0 MegaRAID SAS 9220-8i 1014 03b1 ServeRAID M1015 SAS/SATA Controller + 1014 040d ServeRAID M1115 SAS/SATA Controller 1028 1f4e PERC H310 Adapter 1028 1f4f PERC H310 Integrated 1028 1f50 PERC H310 Mini Blades @@ -594,10 +617,16 @@ 15d9 0691 Onboard SAS2308 PCI-Express Fusion-MPT SAS-2 0087 SAS2308 PCI-Express Fusion-MPT SAS-2 1000 3020 9207-8i SAS2.1 HBA + 1000 3030 SAS9207-4i4e 1000 3040 9207-8e SAS2.1 HBA 1000 3050 SAS9217-8i + 1000 3060 SAS9217-4i4e 1014 0472 N2125 External Host Bus Adapter + 1590 0041 H220i + 1590 0042 H221 / 9207-8e 1590 0044 H220i + 1bd4 0009 6G SAS2308IR + 1bd4 000a 6G SAS2308IT 8086 3000 RS25GB008 RAID Controller 8086 3060 RS25FB044 RAID Controller 8086 3516 RMS25JB080 RAID Controller @@ -624,10 +653,26 @@ 1028 1f53 HBA330 Mini 1028 1fd2 HBA330 MX 1028 1fd3 HBA330 MMZ +# Supermicro AOC-S3008L-L8e uses 0808 for their SAS3008 SAS controller + 15d9 0808 AOC-S3008L-L8e + 1bd4 000b 12G SAS3008IR + 1bd4 000c 12G SAS3008IT 1bd4 0011 Inspur 12Gb 8i-3008 IT SAS HBA + 1bd4 0012 12Gb SAS3008IR UDM + 1bd4 0026 12G SAS3008IT RACK + 1bd4 0027 12G SAS3008IMR RACK + 1bd4 0028 12G SAS3008IR RACK 00ab SAS3516 Fusion-MPT Tri-Mode RAID On Chip (ROC) +# 8 Internal and 8 External port channel 9400 HBA + 1000 3040 HBA 9400-8i8e 8086 3530 Integrated RAID Module RMSP3JD160J 00ac SAS3416 Fusion-MPT Tri-Mode I/O Controller Chip (IOC) +# Channel 16 internal port HBA + 1000 3000 HBA 9400-16i +# Channel 16 external port HBA + 1000 3020 HBA 9400-16e + 1028 1fe3 HBA345 Adapter + 1028 1fe4 HBA345 Front 1d49 0201 ThinkSystem 430-16i SAS/SATA 12Gb HBA 1d49 0203 ThinkSystem 430-16e SAS/SATA 12Gb HBA 8086 3000 RAID Controller RSP3QD160J @@ -635,6 +680,8 @@ 00ae SAS3508 Fusion-MPT Tri-Mode RAID On Chip (ROC) 00af SAS3408 Fusion-MPT Tri-Mode I/O Controller Chip (IOC) 1000 3010 HBA 9400-8i +# 9400 Channel 8 external port HBA + 1000 3030 HBA 9400-8e 1d49 0200 ThinkSystem 430-8i SAS/SATA 12Gb HBA 1d49 0202 ThinkSystem 430-8e SAS/SATA 12Gb HBA 1d49 0204 ThinkSystem 430-8i SAS/SATA 12Gb Dense HBA @@ -656,16 +703,57 @@ 00cf MegaRAID SAS-3 3324 [Intruder] 1000 9370 MegaRAID SAS 9361-24i 00d0 SAS3716 Fusion-MPT Tri-Mode RAID Controller Chip (ROC) +# 9405W 16 internal port channel HBA + 1000 3050 HBA 9405W-16i +# 9405W 8 internal and 8 external port channel HBA + 1000 3070 HBA 9405W-8i8e 00d1 SAS3616 Fusion-MPT Tri-Mode I/O Controller Chip (IOC) +# 9405W 16 external port Channel HBA + 1000 3080 HBA 9405W-16e +# 9405W 16 internal port Channel HBA + 1000 3090 HBA 9405W-16i 00d3 MegaRAID Tri-Mode SAS3716W 00e0 Fusion-MPT 12GSAS/PCIe Unsupported SAS39xx 00e1 Fusion-MPT 12GSAS/PCIe SAS39xx 00e2 Fusion-MPT 12GSAS/PCIe Secure SAS39xx 00e3 Fusion-MPT 12GSAS/PCIe Unsupported SAS39xx 00e4 Fusion-MPT 12GSAS/PCIe Unsupported SAS38xx +# Invalid part + 1028 200b HBA355i Adapter Invalid +# Invalid part + 1028 200c HBA355i Front Invalid +# Invalid part + 1028 200d HBA355e Adapter Invalid +# Invalid part + 1028 200e HBA350i MX Invalid +# Soft Secure 00e5 Fusion-MPT 12GSAS/PCIe SAS38xx +# Soft Secure + 1028 200b HBA355i Adapter +# Soft Secure + 1028 200c HBA355i Front +# Soft Secure + 1028 200d HBA355e Adapter +# Soft Secure + 1028 200e HBA350i MX + 1d49 0205 ThinkSystem 440-16i SAS/SATA PCIe Gen4 12Gb Internal HBA + 1d49 0206 ThinkSystem 440-16e SAS/SATA PCIe Gen4 12Gb HBA 00e6 Fusion-MPT 12GSAS/PCIe Secure SAS38xx + 1028 200b HBA355i Adapter + 1028 200c HBA355i Front + 1028 200d HBA355e Adapter + 1028 200e HBA355i MX + 1d49 0205 ThinkSystem 440-16i SAS/SATA PCIe Gen4 12Gb Internal HBA + 1d49 0206 ThinkSystem 440-16e SAS/SATA PCIe Gen4 12Gb HBA 00e7 Fusion-MPT 12GSAS/PCIe Unsupported SAS38xx +# Tampered part + 1028 200b HBA355i Adapter Tampered +# Tampered part + 1028 200c HBA355i Front Tampered +# Tampered part + 1028 200d HBA355e Adapter Tampered +# Tampered part + 1028 200e HBA350i MX Tampered 02b0 Virtual Endpoint on PCIe Switch 1d49 0001 ThinkSystem 1610-4P NVMe Switch Adapter 1d49 0002 ThinkSystem 810-4P NVMe Switch Adapter @@ -742,9 +830,37 @@ 0901 61C102 1000 63C815 10e0 MegaRAID 12GSAS/PCIe Unsupported SAS39xx + 1028 1ae0 PERC H755 Adapter - Invalid Device + 1028 1ae1 PERC H755 Front - Invalid Device + 1028 1ae2 PERC H755N Front - Invalid Device + 1028 1ae3 PERC H755 MX - Invalid Device 10e1 MegaRAID 12GSAS/PCIe SAS39xx + 1028 1ae0 PERC H755 Adapter + 1028 1ae1 PERC H755 Front + 1028 1ae2 PERC H755N Front + 1028 1ae3 PERC H755 MX + 1d49 060a ThinkSystem RAID 940-8i 4GB Flash PCIe Gen4 12Gb Adapter + 1d49 060b ThinkSystem RAID 940-8i 8GB Flash PCIe Gen4 12Gb Adapter + 1d49 060c ThinkSystem RAID 940-16i 8GB Flash PCIe Gen4 12Gb Adapter + 1d49 060d ThinkSystem RAID 940-16i 8GB Flash PCIe Gen4 12Gb Internal Adapter + 1d49 060e ThinkSystem RAID 940-32i 8GB Flash PCIe Gen4 12Gb Adapter + 1d49 060f ThinkSystem RAID 940-8e 4GB Flash PCIe Gen4 12Gb Adapter 10e2 MegaRAID 12GSAS/PCIe Secure SAS39xx + 1028 1ae0 PERC H755 Adapter + 1028 1ae1 PERC H755 Front + 1028 1ae2 PERC H755N Front + 1028 1ae3 PERC H755 MX + 1d49 060a ThinkSystem RAID 940-8i 4GB Flash PCIe Gen4 12Gb Adapter + 1d49 060b ThinkSystem RAID 940-8i 8GB Flash PCIe Gen4 12Gb Adapter + 1d49 060c ThinkSystem RAID 940-16i 8GB Flash PCIe Gen4 12Gb Adapter + 1d49 060d ThinkSystem RAID 940-16i 8GB Flash PCIe Gen4 12Gb Internal Adapter + 1d49 060e ThinkSystem RAID 940-32i 8GB Flash PCIe Gen4 12Gb Adapter + 1d49 060f ThinkSystem RAID 940-8e 4GB Flash PCIe Gen4 12Gb Adapter 10e3 MegaRAID 12GSAS/PCIe Unsupported SAS39xx + 1028 1ae0 PERC H755 Adapter - Tampered Device + 1028 1ae1 PERC H755 Front - Tampered Device + 1028 1ae2 PERC H755N Front - Tampered Device + 1028 1ae3 PERC H755 MX - Tampered Device 10e4 MegaRAID 12GSAS/PCIe Unsupported SAS38xx 10e5 MegaRAID 12GSAS/PCIe SAS38xx 10e6 MegaRAID 12GSAS/PCIe Secure SAS38xx @@ -781,7 +897,9 @@ 1306 Kaveri 1307 Kaveri 1308 Kaveri HDMI/DP Audio Controller + 17aa 3988 Z50-75 1309 Kaveri [Radeon R6/R7 Graphics] + 17aa 3830 Z50-75 130a Kaveri [Radeon R6 Graphics] 130b Kaveri [Radeon R4 Graphics] 130c Kaveri [Radeon R7 Graphics] @@ -802,16 +920,22 @@ 131c Kaveri [Radeon R7 Graphics] 131d Kaveri [Radeon R6 Graphics] 13e9 Ariel + 1478 Navi 10 XL Upstream Port of PCI Express Switch + 1479 Navi 10 XL Downstream Port of PCI Express Switch 154c Kryptos 154e Garfield 1551 Arlene 1552 Pooky 1561 Anubis 15d8 Picasso + 103c 8615 Pavilion Laptop 15-cw1xxx 15dd Raven Ridge [Radeon Vega Series / Radeon Vega Mobile Series] 103c 83c6 Radeon Vega 8 Mobile 1458 d000 Radeon RX Vega 11 - 15de Raven Ridge HDMI/DP Audio Controller + 15de Raven/Raven2/Fenghuang HDMI/DP Audio Controller + 103c 8615 Pavilion Laptop 15-cw1xxx + 15df Raven/Raven2/Fenghuang/Renoir Cryptographic Coprocessor + 103c 8615 Pavilion Laptop 15-cw1xxx 15ff Fenghuang [Zhongshan Subor Z+] 1607 Arden 1636 Renoir @@ -986,7 +1110,7 @@ 4382 SB600 AC97 Audio 4383 SBx00 Azalia (Intel HDA) 1019 2120 A785GM-M - 103c 1611 Pavilion DM1Z-3000 + 103c 1611 Pavilion dm1z-3000 103c 280a DC5750 Microtower 1043 8230 M3A78-EH Motherboard 1043 836c M4A785TD Motherboard @@ -1060,6 +1184,7 @@ 1458 b002 GA-MA770-DS3rev2.0 Motherboard 1849 4390 Motherboard (one of many) 4391 SB7x0/SB8x0/SB9x0 SATA Controller [AHCI mode] + 103c 1609 ProLiant MicroServer N36L 103c 1611 Pavilion DM1Z-3000 1043 82ef M3A78-EH Motherboard 1043 8443 M5A88-V EVO @@ -1073,6 +1198,7 @@ 4395 SB8x0/SB9x0 SATA Controller [Storage mode] 4396 SB7x0/SB8x0/SB9x0 USB EHCI Controller 1019 2120 A785GM-M + 103c 1609 ProLiant MicroServer N36L 103c 1611 Pavilion DM1Z-3000 1043 82ef M3A78-EH Motherboard 1043 8443 M5A88-V EVO @@ -1081,6 +1207,7 @@ 174b 1001 PURE Fusion Mini 4397 SB7x0/SB8x0/SB9x0 USB OHCI0 Controller 1019 2120 A785GM-M + 103c 1609 ProLiant MicroServer N36L 103c 1611 Pavilion DM1Z-3000 1043 82ef M3A78-EH Motherboard 1043 8443 M5A88-V EVO @@ -1101,10 +1228,12 @@ 439c SB7x0/SB8x0/SB9x0 IDE Controller 1002 4392 MSI MS-7713 motherboard 1019 2120 A785GM-M + 103c 1609 ProLiant MicroServer N36L 1043 82ef M3A78-EH Motherboard 105b 0e13 N15235/A74MX mainboard / AMD SB700 439d SB7x0/SB8x0/SB9x0 LPC host controller 1019 2120 A785GM-M + 103c 1609 ProLiant MicroServer N36L 103c 1611 Pavilion DM1Z-3000 1043 82ef M3A78-EH Motherboard 1043 8443 M5A88-V EVO @@ -1214,6 +1343,44 @@ 4857 Xilleon 225 USB for X225 4858 Xilleon 225 DAIO-0 for X225 4859 Xilleon 225 DAIO-1 for X225 + 4860 Xilleon 210 HBIU for X210 + 4861 Xilleon 210 IDE for X210 + 4862 Xilleon 210 USB for X210 + 4863 Xilleon 210 DAIO-0 for X210 + 4864 Xilleon 210 DAIO-1 for X210 + 4865 Xilleon 226 HBIU for X226 + 4866 Xilleon 226 IDE for X226 + 4867 Xilleon 226 USB for X226 + 4868 Xilleon 226 DAIO-0 for X226 + 4869 Xilleon 226 DAIO-1 for X226 + 486a Xilleon 240S HBIU for X240S + 486b Xilleon 240H HBIU for X240H + 486c Xilleon 240S USB for X240S + 486d Xilleon 240H USB for X240H + 486e Xilleon 250 USB 1.1 for X250 + 486f Xilleon 260 USB 1.1 for X260 + 4870 Xilleon 250 HBIU for X250 + 4871 Xilleon 250 IDE for X250 + 4872 Xilleon 234/235 HBIU for X234/X235 + 4873 Xilleon 244/245 HBIU for X244/X245 + 4874 Xilleon 234/235 USB 1.1 for X234/X235 + 4875 Xilleon 260 HBIU for X260 + 4876 Xilleon 260 IDE for X260 + 4877 Xilleon 244/245 USB 1.1 for X244/X245 + 4878 Xilleon 270 HBIU for X270 + 487b Xilleon 242 HBIU for X242 + 487d Xilleon 242 USB 1.1 for X242 + 4880 Xilleon 254 HBIU for X254 + 4881 Xilleon 254 USB 1.1 for X254 + 4882 Xilleon 255 HBIU for X255 + 4883 Xilleon 255 USB 1.1 for X255 + 4884 Xilleon 243 HBIU for X243 + 4885 Xilleon 243 USB 1.1 for X243 + 4886 Xilleon 233 HBIU for X233 + 4887 Xilleon 233 USB 1.1 for X233 + 4888 Xilleon 143 HBIU for X143 + 4889 Xilleon 143 HBIU for X143L + 488a Xilleon 143 HBIU for X143S 4966 RV250 [Radeon 9000 Series] 10f1 0002 RV250 If [Tachyon G9000 PRO] 148c 2039 RV250 If [Radeon 9000 Pro "Evil Commando"] @@ -1443,9 +1610,9 @@ 1002 0028 Rage 128 AIW 1002 0029 Rage 128 AIW 1002 0068 Rage 128 AIW - 5246 Rage 4 [Rage Fury/Xpert 128/Xpert 2000 AGP] + 5246 Rage 128 (Rage 4) series 1002 0004 Magnum/Xpert 128/Xpert 99 - 1002 0008 Magnum/Xpert128/X99/Xpert2000 + 1002 0008 Rage 128 AGP 2x 1002 0028 Rage 128 AIW AGP 1002 0044 Rage Fury/Xpert 128/Xpert 2000 1002 0068 Rage 128 AIW AGP @@ -1688,8 +1855,6 @@ 103c 1952 ProBook 455 G1 6601 Mars [Radeon HD 8730M] 103c 2100 FirePro M4100 - 6602 Mars - 6603 Mars 6604 Opal XT [Radeon R7 M265/M365X/M465] 1025 0776 Aspire V5 Radeon R7 M265 103c 8006 FirePro M4170 @@ -1715,6 +1880,7 @@ 1642 3f09 Radeon R7 350 6611 Oland [Radeon HD 8570 / R7 240/340 OEM] 1028 210b Radeon R5 240 OEM + 1642 1869 AMD Radeon 520 174b 4248 Radeon R7 240 OEM 174b a240 Radeon R7 240 OEM 174b d340 Radeon R7 340 OEM @@ -1722,9 +1888,6 @@ 6613 Oland PRO [Radeon R7 240/340] 148c 7340 Radeon R7 340 1682 7240 R7 240 2048 MB - 6620 Mars - 6621 Mars PRO - 6623 Mars 6631 Oland 6640 Saturn XT [FirePro M6100] 106b 014b Tropo XT [Radeon R9 M380 Mac Edition] @@ -1783,7 +1946,7 @@ 17aa 3805 Radeon HD 8570M 6664 Jet XT [Radeon R5 M240] 6665 Jet PRO [Radeon R5 M230 / R7 M260DX / Radeon 520 Mobile] - 17aa 1309 Radeon R7 M260DX + 17aa 1309 Z50-75 Radeon R7 M260DX 17aa 368f Radeon R5 A230 6667 Jet ULT [Radeon R5 M230] 666f Sun LE [Radeon HD 8550M / R5 M230] @@ -2412,18 +2575,22 @@ 1462 3413 Radeon RX 480 Gaming X 8GB 1462 3416 Radeon RX 570 1462 3418 Radeon RX 580 Armor 4G OC - 148c 2372 Radeon RX 480 + 1462 341e Radeon RX 570 Armor 4G OC + 1462 8a92 Radeon RX 580 + 148c 2372 Radeon RX 480 [Red Dragon] 148c 2373 Radeon RX 470 1682 9470 Radeon RX 470 1682 9480 Radeon RX 480 1682 9588 Radeon RX 580 XTR + 1682 c570 Radeon RX 570 174b e347 Radeon RX 470/480 174b e349 Radeon RX 470 1787 a470 Radeon RX 470 1787 a480 Radeon RX 480 1849 5001 Phantom Gaming X RX 580 OC + 1849 5030 Phantom Gaming D Radeon RX580 8G OC 1da2 e353 Radeon RX 570 Pulse 4GB - 1da2 e366 Nitro+ Radeon RX 570/580 + 1da2 e366 Nitro+ Radeon RX 570/580/590 67e0 Baffin [Radeon Pro WX 4170] 103c 8270 Radeon Pro WX 4170 103c 8272 Radeon Pro WX 4170 @@ -2441,6 +2608,8 @@ 67e9 Baffin [Polaris11] 67eb Baffin [Radeon Pro V5300X] 67ef Baffin [Radeon RX 460/560D / Pro 450/455/460/555/555X/560/560X] + 1028 1703 RX 560D OEM OC 2 GB + 103c 3421 Radeon RX 460 106b 0160 Radeon Pro 460 106b 0166 Radeon Pro 455 106b 0167 Radeon Pro 450 @@ -2456,6 +2625,7 @@ 1028 1726 Radeon RX 560DX 103c 8479 Radeon RX 560X Mobile 1043 04bc Radeon RX 560 + 1043 052f Radeon RX 560 1458 22ed Radeon RX 560 148c 2381 Radeon RX 560 1682 9560 Radeon RX 560 @@ -2679,6 +2849,8 @@ 6868 Vega 10 [Radeon PRO WX 8100/8200] 686c Vega 10 [Radeon Instinct MI25 MxGPU] 687f Vega 10 XL/XT [Radeon RX Vega 56/64] + 1002 0b36 RX Vega64 + 1002 6b76 RX Vega56 6880 Lexington [Radeon HD 6550M] 103c 163c Pavilion dv6 Radeon HD 6550M 6888 Cypress XT [FirePro V8800] @@ -3146,12 +3318,13 @@ 174b e180 Radeon HD 7350 17af 3015 Radeon HD 7350 68fe Cedar LE - 6900 Topaz XT [Radeon R7 M260/M265 / M340/M360 / M440/M445] + 6900 Topaz XT [Radeon R7 M260/M265 / M340/M360 / M440/M445 / 530/535 / 620/625 Mobile] 1025 1056 Radeon R7 M360 / R8 M365DX 1028 0640 Radeon R7 M260/M265 1028 0643 Radeon R7 M260/M265 1028 067f Radeon R7 M260 1028 0767 Radeon R7 M445 + 1028 0810 Radeon 530 1028 130a Radeon R7 M260 103c 2263 Radeon R7 M260 103c 2269 Radeon R7 M260 @@ -3198,12 +3371,12 @@ 694e Polaris 22 XL [Radeon RX Vega M GL] 694f Polaris 22 MGL XL [Radeon Pro WX Vega M GL] 6980 Polaris12 - 6981 Polaris12 + 6981 Lexa XT [Radeon PRO WX 3200] 6985 Lexa XT [Radeon PRO WX 3100] 6986 Polaris12 - 6987 Lexa [Radeon E9171 MCM] + 6987 Lexa [Radeon 540X/550X/630 / RX 640 / E9171 MCM] 6995 Lexa XT [Radeon PRO WX 2100] - 699f Lexa PRO [Radeon RX 550/550X] + 699f Lexa PRO [Radeon 540/540X/550/550X / RX 540X/550/550X] 1028 1720 Radeon RX 550X 148c 2380 Lexa XL [Radeon RX 550] 1da2 e367 Lexa PRO [Radeon RX 550] @@ -3356,7 +3529,12 @@ 1043 04a0 Radeon R9 FURY X 174b e329 Radeon R9 FURY 7310 Navi 10 - 731f Navi 10 + 7312 Navi 10 [Radeon Pro W5700] + 731f Navi 10 [Radeon RX 5600 OEM/5600 XT / 5700/5700 XT] + 7340 Navi 14 [Radeon RX 5500/5500M / Pro 5500M] + 7341 Navi 14 [Radeon Pro W5500] + 7347 Navi 14 [Radeon Pro W5500M] + 734f Navi 14 [Radeon Pro W5300M] 7833 RS350 Host Bridge 7834 RS350 [Radeon 9100 PRO/XT IGP] 7835 RS350M [Mobility Radeon 9000 IGP] @@ -3570,16 +3748,16 @@ 9613 RS780MC [Mobility Radeon HD 3100] 9614 RS780D [Radeon HD 3300] 9616 RS780L [Radeon 3000] - 9640 BeaverCreek [Radeon HD 6550D] - 9641 BeaverCreek [Radeon HD 6620G] - 9642 Sumo [Radeon HD 6370D] - 9643 Sumo [Radeon HD 6380G] - 9644 Sumo [Radeon HD 6410D] - 9645 Sumo [Radeon HD 6410D] - 9647 BeaverCreek [Radeon HD 6520G] + 9640 Sumo [Radeon HD 6550D] + 9641 Sumo [Radeon HD 6620G] + 9642 SuperSumo [Radeon HD 6370D] + 9643 SuperSumo [Radeon HD 6380G] + 9644 SuperSumo [Radeon HD 6410D] + 9645 SuperSumo [Radeon HD 6410D] + 9647 Sumo [Radeon HD 6520G] 9648 Sumo [Radeon HD 6480G] - 9649 Sumo [Radeon HD 6480G] - 964a BeaverCreek [Radeon HD 6530D] + 9649 SuperSumo [Radeon HD 6480G] + 964a Sumo [Radeon HD 6530D] 964b Sumo 964c Sumo 964e Sumo @@ -3592,6 +3770,7 @@ 1019 2120 A785GM-M 1043 83a2 M4A785TD Motherboard 9712 RS880M [Mobility Radeon HD 4225/4250] + 103c 1609 ProLiant MicroServer N36L 9713 RS880M [Mobility Radeon HD 4100] 9714 RS880 [Radeon HD 4290] 9715 RS880 [Radeon HD 4250] @@ -3610,6 +3789,7 @@ 9830 Kabini [Radeon HD 8400 / R3 Series] 9831 Kabini [Radeon HD 8400E] 9832 Kabini [Radeon HD 8330] + 1849 9832 QC5000-ITX/PH 9833 Kabini [Radeon HD 8330E] 9834 Kabini [Radeon HD 8210] 9835 Kabini [Radeon HD 8310E] @@ -3619,6 +3799,7 @@ 9839 Kabini [Radeon HD 8180] 983d Temash [Radeon HD 8250/8280G] 9840 Kabini HDMI/DP Audio + 1849 9840 QC5000-ITX/PH 9850 Mullins [Radeon R3 Graphics] 9851 Mullins [Radeon R4/R5 Graphics] 1179 f928 Beema [Radeon R5 Graphics] @@ -3682,9 +3863,10 @@ 991e Bishop 9920 Liverpool [Playstation 4 APU] 9921 Liverpool HDMI/DP Audio Controller - 9922 Starship + 9922 Starshp 9923 Starsha2 [Kingston/Clayton] 9924 Gladius + 9925 Kingston/Clayton/Jupiter/Gladius/Montego HDMI Controller 9926 Jupiter 9990 Trinity 2 [Radeon HD 7520G] 9991 Trinity 2 [Radeon HD 7540D] @@ -3698,7 +3880,7 @@ 9999 Richland [Radeon HD 8510G] 999a Richland [Radeon HD 8410G] 999b Richland [Radeon HD 8310G] - 999c Richland + 999c Richland [Radeon HD 8650D] # AMD Quad-Core A8-Series APU A8-6500T with Radeon HD 8550D 999d Richland [Radeon HD 8550D] 99a0 Trinity 2 [Radeon HD 7520G] @@ -3732,7 +3914,8 @@ aa98 Caicos HDMI Audio [Radeon HD 6450 / 7450/8450/8490 OEM / R5 230/235/235X OEM] 174b aa98 Radeon HD 6450 1GB DDR3 aaa0 Tahiti HDMI Audio [Radeon HD 7870 XT / 7950/7970] - aab0 Cape Verde/Pitcairn HDMI Audio [Radeon HD 7700/7800 Series] + aab0 Oland/Hainan/Cape Verde/Pitcairn HDMI Audio [Radeon HD 7000 Series] + aab8 Tiran HDMI Audio aac0 Tobago HDMI Audio [Radeon R7 360 / R9 360 OEM] aac8 Hawaii HDMI Audio [Radeon R9 290/290X / 390/390X] aad8 Tonga HDMI Audio [Radeon R9 285/380] @@ -4274,6 +4457,35 @@ 1302 Family 11h Processor DRAM Controller 1303 Family 11h Processor Miscellaneous Control 1304 Family 11h Processor Link Control + 1305 Griffin Function 5 + 1306 Griffin Function 6 + 1307 Griffin Function 7 + 1308 Kaveri Audio Controller + 1314 Wrestler/Bheem/Ontario/Krishna Audio Controller + 13e0 Ariel Root Complex + 13e1 Ariel IOMMU + 13e2 Ariel PCIe Dummy Host Bridge + 13e3 Ariel PCIe GPP Bridge + 13e4 Ariel PCIe Dummy Host Bridge + 13e5 Ariel Internal PCIe GPP Bridge 0 to Bus A + 13e6 Ariel Internal PCIe GPP Bridge 0 to Bus B + 13e7 Ariel SMBus Controller + 13e8 Ariel LPC Bridge + 13e9 Ariel Internal GPU + 13ea Ariel HD Audio Controller + 13eb Ariel HD Audio Coprocessor + 13ec Ariel Cryptographic Coprocessor + 13ed Ariel USB 3.1 Type C: Gen2 x 1port + DP Alt Mode + 13ee Ariel USB 3.1 Type A: Gen2 x 2 ports + 13ef Ariel ZCN/MP4 + 13f0 Ariel Device 24: Function 0 + 13f1 Ariel Device 24: Function 1 + 13f2 Ariel Device 24: Function 2 + 13f3 Ariel Device 24: Function 3 + 13f4 Ariel Device 24: Function 4 + 13f5 Ariel Device 24: Function 5 + 13f6 Ariel Device 24: Function 6 + 13f7 Ariel Device 24: Function 7 1400 Family 15h (Models 10h-1fh) Processor Function 0 1401 Family 15h (Models 10h-1fh) Processor Function 1 1402 Family 15h (Models 10h-1fh) Processor Function 2 @@ -4301,26 +4513,51 @@ 1422 Family 15h (Models 30h-3fh) Processor Root Complex 1423 Family 15h (Models 30h-3fh) I/O Memory Management Unit 1424 Family 15h (Models 30h-3fh) Processor Root Port + 1425 Kaveri P2P Bridge for GFX PCIe Port [1:0] 1426 Family 15h (Models 30h-3fh) Processor Root Port - 142e Liverpool Processor Function 0 - 142f Liverpool Processor Function 1 - 1430 Liverpool Processor Function 2 - 1431 Liverpool Processor Function 3 - 1432 Liverpool Processor Function 4 + 142e Liverpool Processor HT configuration + 142f Liverpool Processor Address Maps + 1430 Liverpool Processor DRAM configuration + 1431 Liverpool Processor Misc configuration + 1432 Liverpool Processor PM configuration + 1433 Liverpool Processor NB Performance Monitor + 1434 Liverpool Processor SPLL Configuration 1436 Liverpool Processor Root Complex 1437 Liverpool I/O Memory Management Unit - 1438 Liverpool Processor Root Port + 1438 Liverpool UMI PCIe Dummy Host Bridge 1439 Family 16h Processor Functions 5:1 + 143a Kingston/Clayton/Gladius/Montego Root Complex + 143b Kingston/Clayton/Gladius/Montego P2P Bridge for UMI Link + 1440 Matisse Device 24: Function 0 + 1441 Matisse Device 24: Function 1 + 1442 Matisse Device 24: Function 2 + 1443 Matisse Device 24: Function 3 + 1444 Matisse Device 24: Function 4 + 1445 Matisse Device 24: Function 5 + 1446 Matisse Device 24: Function 6 + 1447 Matisse Device 24: Function 7 + 1448 Renoir Device 24: Function 0 + 1449 Renoir Device 24: Function 1 + 144a Renoir Device 24: Function 2 + 144b Renoir Device 24: Function 3 + 144c Renoir Device 24: Function 4 + 144d Renoir Device 24: Function 5 + 144e Renoir Device 24: Function 6 + 144f Renoir Device 24: Function 7 1450 Family 17h (Models 00h-0fh) Root Complex 1451 Family 17h (Models 00h-0fh) I/O Memory Management Unit 1452 Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge 1453 Family 17h (Models 00h-0fh) PCIe GPP Bridge 1454 Family 17h (Models 00h-0fh) Internal PCIe GPP Bridge 0 to Bus B + 1455 Zeppelin/Renoir PCIe Dummy Function 1456 Family 17h (Models 00h-0fh) Platform Security Processor 1457 Family 17h (Models 00h-0fh) HD Audio Controller + 145a Zeppelin/Raven/Raven2 PCIe Dummy Function 145b Zeppelin Non-Transparent Bridge 145c Family 17h (Models 00h-0fh) USB 3.0 Host Controller - 145f USB 3.0 Host controller + 145d Zeppelin Switch Upstream (PCIE SW.US) + 145e Zeppelin Switch Downstream (PCIE SW.DS) + 145f Zeppelin USB 3.0 Host controller 1460 Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 0 1461 Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 1 1462 Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 2 @@ -4329,6 +4566,39 @@ 1465 Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 5 1466 Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 6 1467 Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 7 + 1468 Zeppelin Cryptographic Coprocessor NTBCCP + 1480 Starship/Matisse Root Complex + 1462 7c37 X570-A PRO motherboard + 1481 Starship/Matisse IOMMU + 1482 Starship/Matisse PCIe Dummy Host Bridge + 1483 Starship/Matisse GPP Bridge + 1484 Starship/Matisse Internal PCIe GPP Bridge 0 to bus[E:B] + 1485 Starship/Matisse Reserved SPP + 1486 Starship/Matisse Cryptographic Coprocessor PSPCPP + 1487 Starship/Matisse HD Audio Controller + 1462 9c37 X570-A PRO motherboard + 1488 Starship Reserved SSP + 1489 Starship Reserved SSP + 148a Starship/Matisse PCIe Dummy Function + 148b Starship/Matisse Non-Transparent Bridge + 148c Starship USB 3.0 Host Controller + 148d Starship/Matisse Switch Upstream (PCIE SW.US) + 148e Starship/Matisse Switch Downstream (PCIE SW.DS) + 148f Starship Reserved SSP + 1490 Starship Device 24; Function 0 + 1491 Starship Device 24; Function 1 + 1492 Starship Device 24; Function 2 + 1493 Starship Device 24; Function 3 + 1494 Starship Device 24; Function 4 + 1495 Starship Device 24; Function 5 + 1496 Starship Device 24; Function 6 + 1497 Starship Device 24; Function 7 + 1498 Starship/Matisse PTDMA + 1499 Starship/Matisse NVMe + 149a Starship PCIe GPP Bridge [1:0] + 149b Starship Reserved SSP + 149c Matisse USB 3.0 Host Controller + 1462 7c37 X570-A PRO motherboard 1510 Family 14h Processor Root Complex 174b 1001 PURE Fusion Mini 1512 Family 14h Processor Root Port @@ -4343,8 +4613,33 @@ 1534 Family 16h Processor Function 4 1535 Family 16h Processor Function 5 1536 Family 16h Processor Root Complex + 1849 1536 QC5000-ITX/PH + 1537 Kabini/Mullins PSP-Platform Security Processor 1538 Family 16h Processor Function 0 + 1539 Kabini P2P Bridge for PCIe Ports[4:0] + 1540 Kryptos/Cato/Garfield/Garfield+/Arlene/Pooky HT Configuration + 1541 Kryptos/Cato/Garfield/Garfield+/Arlene/Pooky Address Maps + 1542 Kryptos/Cato/Garfield/Garfield+/Arlene/Pooky DRAM Configuration + 1543 Kryptos/Cato/Garfield/Garfield+/Arlene/Pooky Miscellaneous Configuration + 1544 Kryptos/Cato/Garfield/Garfield+/Arlene/Pooky PM Configuration + 1545 Kryptos/Cato/Garfield/Garfield+/Arlene/Pooky NB Performance Monitor + 1546 Kryptos/Cato/Garfield/Garfield+/Arlene/Pooky Root Complex + 1547 Kryptos/Cato/Garfield/Garfield+/Arlene/Pooky IOMMU + 1548 Kryptos/Cato/Garfield/Garfield+/Arlene/Pooky UMI PCIe Dummy Host Bridge + 1549 Kryptos/Cato/Garfield/Garfield+ P2P Bridge for PCIe Port [3:0] + 154a Kryptos/Cato/Garfield/Garfield+/Arlene/Pooky Audio Processor + 154b Kryptos/Cato/Garfield/Garfield+/Arlene/Pooky Security Processor + 154d Kryptos/Cato/Garfield/Garfield+/Arlene/Pooky/Anubis HDMI Controller + 154f Anubis Audio Processor + 1550 Garfield+/Arlene/Pooky/Anubis SPLL Configuration + 1553 Arlene/Pooky P2P Bridge for PCIE (3:0) + 155b Anubis Root Complex + 155c Anubis IOMMU + 155d Anubis UMI PCIe Dummy Bridge + 155e Anubis P2P Bridge for PCIe Ports [4:0] + 1560 Anubis Security Processor 1566 Family 16h (Models 30h-3fh) Processor Root Complex + 1567 Mullins IOMMU 156b Family 16h (Models 30h-3fh) Host Bridge 1570 Family 15h (Models 60h-6fh) Processor Function 0 1571 Family 15h (Models 60h-6fh) Processor Function 1 @@ -4354,29 +4649,132 @@ 1575 Family 15h (Models 60h-6fh) Processor Function 5 1576 Family 15h (Models 60h-6fh) Processor Root Complex 1577 Family 15h (Models 60h-6fh) I/O Memory Management Unit + 1578 Carrizo Platform Security Processor + 1579 Carrizo Audio Processor 157a Family 15h (Models 60h-6fh) Audio Controller 157b Family 15h (Models 60h-6fh) Host Bridge 157c Family 15h (Models 60h-6fh) Processor Root Port + 157d Carrizo Audio Dummy Host Bridge + 157e Carrizo Audio Controller 1580 Family 16h (Models 30h-3fh) Processor Function 0 1581 Family 16h (Models 30h-3fh) Processor Function 1 1582 Family 16h (Models 30h-3fh) Processor Function 2 1583 Family 16h (Models 30h-3fh) Processor Function 3 1584 Family 16h (Models 30h-3fh) Processor Function 4 1585 Family 16h (Models 30h-3fh) Processor Function 5 + 1590 Amur/Nolan HT Configuration + 1591 Amur/Nolan Address Maps + 1592 Amur/Nolan DRAM Configuration + 1593 Amur/Nolan Miscellaneous Configuration + 1594 Amur/Nolan PM Configuration + 1595 Amur/Nolan NB Performance Monitor + 1596 Amur/Nolan Root Complex + 1597 Amur/Nolan IOMMU + 1598 Amur/Nolan Platform Security Processor + 1599 Amur/Nolan PCIe Dummy Host Bridge + 159d Amur Function 6: Gasket + 15b0 Stoney HT Configuration + 15b1 Stoney Address Maps + 15b2 Stoney DRAM Configuration + 15b3 Stoney Miscellaneous Configuration + 15b4 Stoney PM Configuration + 15b5 Stoney NB Performance Monitor + 15bc Stoney PCIe [GFX,GPP] Bridge [4:0] + 15be Stoney Audio Processor + 15d0 Raven/Raven2 Root Complex + 103c 8615 Pavilion Laptop 15-cw1xxx + 15d1 Raven/Raven2 IOMMU + 103c 8615 Pavilion Laptop 15-cw1xxx + 15d2 Raven/Raven2 PCIe Dummy Host Bridge + 15d3 Raven/Raven2 PCIe GPP Bridge [6:0] + 15d4 FireFlight USB 3.1 + 15d5 FireFlight USB 3.1 + 15da Raven/Raven2 PCIe Dummy Host Bridge + 15db Raven/Raven2 Internal PCIe GPP Bridge 0 to Bus A + 15dc Raven/Raven2 Internal PCIe GPP Bridge 0 to Bus B + 15de Raven/Raven2/FireFlight HD Audio Controller 15df Family 17h (Models 10h-1fh) Platform Security Processor + 15e0 Raven USB 3.1 + 103c 8615 Pavilion Laptop 15-cw1xxx + 15e1 Raven USB 3.1 + 103c 8615 Pavilion Laptop 15-cw1xxx + 15e2 Raven/Raven2/FireFlight/Renoir Audio Processor 15e3 Family 17h (Models 10h-1fh) HD Audio Controller + 103c 8615 Pavilion Laptop 15-cw1xxx + 15e4 Raven/Raven2/Renoir Sensor Fusion Hub + 15e5 Raven2 USB 3.1 + 15e6 Raven/Raven2/Renoir Non-Sensor Fusion Hub KMDF driver + 1022 15e4 Raven/Raven2/Renoir Sensor Fusion Hub + 15e8 Raven/Raven2 Device 24: Function 0 + 15e9 Raven/Raven2 Device 24: Function 1 + 15ea Raven/Raven2 Device 24: Function 2 + 15eb Raven/Raven2 Device 24: Function 3 + 15ec Raven/Raven2 Device 24: Function 4 + 15ed Raven/Raven2 Device 24: Function 5 + 15ee Raven/Raven2 Device 24: Function 6 + 15ef Raven/Raven2 Device 24: Function 7 + 15f0 FireFlight Device 24: Function 0 + 15f1 FireFlight Device 24: Function 1 + 15f2 FireFlight Device 24: Function 2 + 15f3 FireFlight Device 24: Function 3 + 15f4 FireFlight Device 24: Function 4 + 15f5 FireFlight Device 24: Function 5 + 15f6 FireFlight Device 24: Function 6 + 15f7 FireFlight Device 24: Function 7 + 15f8 FireFlight Root Complex + 15f9 FireFlight IOMMU + 15fa FireFlight PCIe Dummy Host Bridge + 15fb FireFlight PCIe GPP Bride 3:0 + 15fc FireFlight PCIe Dummy Host Bridge + 15fd FireFlight Internal PCIe GPP Bridge 0 to Bus A + 15fe FireFlight Internal PCIe GPP Bridge 0 to Bus B + 15ff FireFlight Bus A; Device 0: Function 0: Internal GPU 1600 Family 15h Processor Function 0 1601 Family 15h Processor Function 1 1602 Family 15h Processor Function 2 1603 Family 15h Processor Function 3 1604 Family 15h Processor Function 4 1605 Family 15h Processor Function 5 + 1606 Arden Security Processor + 1608 Arden Device 18h: Function 0 + 1609 Arden Device 18h: Function 1 + 160a Arden Device 18h: Function 2 + 160b Arden Device 18h: Function 3 + 160c Arden Device 18h: Function 4 + 160d Arden Device 18h: Function 5 + 160e Arden Device 18h: Function 6 + 160f Arden Device 18h: Function 7 + 1620 Anubis HT Configuration + 1621 Anubis Address Maps + 1622 Anubis DRAM Configuration + 1623 Anubis Miscellaneous Configuration + 1624 Anubis PM Configuration + 1625 Anubis NB Performance Monitor + 1626 Arden Root Complex + 1627 Arden IOMMU + 1628 Arden PCIe Dummy Host Bridge + 1629 Arden PCIe GPP Bridge + 162a Arden Internal PCIe GPP Bridge 0 to bus X + 162b Arden PCIe Non-Transparent Bridge + 1630 Renoir Root Complex + 1631 Renoir IOMMU + 1632 Renoir PCIe Dummy Host Bridge + 1633 Renoir PCIe GPP Bridge + 1634 Renoir PCIe GPP Bridge + 1635 Renoir Internal PCIe GPP Bridge to Bus + 1637 Renoir HD Audio Controller + 1639 Renoir USB 3.1 + 1641 Renoir 10GbE Controller Port 0 (XGBE0/1) + 1642 Renoir WLAN + 1643 Renoir BT + 1644 Renoir I2S 1700 Family 12h/14h Processor Function 0 1701 Family 12h/14h Processor Function 1 1702 Family 12h/14h Processor Function 2 1703 Family 12h/14h Processor Function 3 1704 Family 12h/14h Processor Function 4 1705 Family 12h Processor Root Complex + 1706 Llano P2P Bridge to external GPU 1707 Family 12h Processor Root Port 1708 Family 12h Processor Root Port 1709 Family 12h Processor Root Port @@ -4450,6 +4848,9 @@ 43c7 400 Series Chipset PCIe Port 43c8 400 Series Chipset SATA Controller 43d5 400 Series Chipset USB 3.1 XHCI Controller + 57a3 Matisse PCIe GPP Bridge + 57a4 Matisse PCIe GPP Bridge + 57ad Matisse Switch Upstream 7006 AMD-751 [Irongate] System Controller 7007 AMD-751 [Irongate] AGP Bridge 700a AMD-IGR4 AGP Host to PCI Bridge @@ -4508,6 +4909,8 @@ 7801 FCH SATA Controller [AHCI mode] 103c 168b ProBook 4535s Notebook 103c 194e ProBook 455 G1 Notebook + 17aa 3988 Z50-75 + 1849 7801 QC5000-ITX/PH 7802 FCH SATA Controller [RAID mode] 7803 FCH SATA Controller [RAID mode] 7804 FCH SATA Controller [AHCI mode] @@ -4517,37 +4920,57 @@ 7807 FCH USB OHCI Controller 103c 194e ProBook 455 G1 Notebook 103c 1985 Pavilion 17-e163sg Notebook PC + 17aa 3988 Z50-75 + 1849 7807 QC5000-ITX/PH 7808 FCH USB EHCI Controller 103c 194e ProBook 455 G1 Notebook 103c 1985 Pavilion 17-e163sg Notebook PC + 17aa 3988 Z50-75 + 1849 7808 QC5000-ITX/PH 7809 FCH USB OHCI Controller 103c 194e ProBook 455 G1 Notebook + 17aa 3988 Z50-75 + 780a Kabini/Mullins SATA Raid/AHCI Mode (DotHill driver) 780b FCH SMBus Controller 103c 194e ProBook 455 G1 Notebook 103c 1985 Pavilion 17-e163sg Notebook PC + 17aa 3988 Z50-75 + 1849 780b QC5000-ITX/PH 780c FCH IDE Controller 780d FCH Azalia Controller 103c 194e ProBook 455 G1 Notebook 103c 1985 Pavilion 17-e163sg Notebook PC 1043 8444 F2A85-M Series + 17aa 3988 Z50-75 + 1849 8892 QC5000-ITX/PH 780e FCH LPC Bridge 103c 194e ProBook 455 G1 Notebook 103c 1985 Pavilion 17-e163sg Notebook PC + 17aa 3988 Z50-75 + 1849 780e QC5000-ITX/PH 780f FCH PCI Bridge 7812 FCH USB XHCI Controller 7813 FCH SD Flash Controller 7814 FCH USB XHCI Controller 103c 194e ProBook 455 G1 Notebook 103c 1985 Pavilion 17-e163sg Notebook PC + 17aa 3988 Z50-75 + 1849 7814 QC5000-ITX/PH 7900 FCH SATA Controller [IDE mode] 7901 FCH SATA Controller [AHCI mode] + 103c 8615 Pavilion Laptop 15-cw1xxx + 1462 7c37 X570-A PRO motherboard 7902 FCH SATA Controller [RAID mode] 7903 FCH SATA Controller [RAID mode] 7904 FCH SATA Controller [AHCI mode] 7906 FCH SD Flash Controller 7908 FCH USB EHCI Controller 790b FCH SMBus Controller + 103c 8615 Pavilion Laptop 15-cw1xxx + 1462 7c37 X570-A PRO motherboard *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@freebsd.org Wed Mar 4 17:17:39 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 306B8273FBA; Wed, 4 Mar 2020 17:17:39 +0000 (UTC) (envelope-from kib@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 48XgYZ3TsXz4Cm2; Wed, 4 Mar 2020 17:17:38 +0000 (UTC) (envelope-from kib@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 1B4D6215FA; Wed, 4 Mar 2020 17:17:38 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 024HHbrV081882; Wed, 4 Mar 2020 17:17:37 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024HHbj8081881; Wed, 4 Mar 2020 17:17:37 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202003041717.024HHbj8081881@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 4 Mar 2020 17:17:37 +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: r358626 - stable/12/sys/net X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/sys/net X-SVN-Commit-Revision: 358626 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: Wed, 04 Mar 2020 17:17:39 -0000 Author: kib Date: Wed Mar 4 17:17:37 2020 New Revision: 358626 URL: https://svnweb.freebsd.org/changeset/base/358626 Log: MFC r357763: if_media.c: use __FBSDID(). Sponsored by: Mellanox Technologies Modified: stable/12/sys/net/if_media.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/net/if_media.c ============================================================================== --- stable/12/sys/net/if_media.c Wed Mar 4 17:17:02 2020 (r358625) +++ stable/12/sys/net/if_media.c Wed Mar 4 17:17:37 2020 (r358626) @@ -1,5 +1,4 @@ /* $NetBSD: if_media.c,v 1.1 1997/03/17 02:55:15 thorpej Exp $ */ -/* $FreeBSD$ */ /*- * SPDX-License-Identifier: BSD-4-Clause @@ -47,6 +46,9 @@ * Many thanks to Matt Thomas for providing the information necessary * to implement this interface. */ + +#include +__FBSDID("$FreeBSD$"); #include "opt_ifmedia.h" From owner-svn-src-stable@freebsd.org Wed Mar 4 17:19:26 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 AC95A274074; Wed, 4 Mar 2020 17:19:26 +0000 (UTC) (envelope-from kib@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 48Xgbf28gxz4HZZ; Wed, 4 Mar 2020 17:19:26 +0000 (UTC) (envelope-from kib@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 11764215FF; Wed, 4 Mar 2020 17:19:26 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 024HJPSu082015; Wed, 4 Mar 2020 17:19:25 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024HJPn8082014; Wed, 4 Mar 2020 17:19:25 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202003041719.024HJPn8082014@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 4 Mar 2020 17:19:25 +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: r358627 - stable/12/sys/net X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/sys/net X-SVN-Commit-Revision: 358627 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: Wed, 04 Mar 2020 17:19:26 -0000 Author: kib Date: Wed Mar 4 17:19:25 2020 New Revision: 358627 URL: https://svnweb.freebsd.org/changeset/base/358627 Log: MFC r357764: if_media.c: staticize and constify ifmedia description structures used under IFMEDIA_DEBUG. Modified: stable/12/sys/net/if_media.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/net/if_media.c ============================================================================== --- stable/12/sys/net/if_media.c Wed Mar 4 17:17:37 2020 (r358626) +++ stable/12/sys/net/if_media.c Wed Mar 4 17:19:25 2020 (r358627) @@ -392,44 +392,47 @@ ifmedia_baudrate(int mword) } #ifdef IFMEDIA_DEBUG -struct ifmedia_description ifm_type_descriptions[] = +static const struct ifmedia_description ifm_type_descriptions[] = IFM_TYPE_DESCRIPTIONS; -struct ifmedia_description ifm_subtype_ethernet_descriptions[] = +static const struct ifmedia_description ifm_subtype_ethernet_descriptions[] = IFM_SUBTYPE_ETHERNET_DESCRIPTIONS; -struct ifmedia_description ifm_subtype_ethernet_option_descriptions[] = +static const struct ifmedia_description + ifm_subtype_ethernet_option_descriptions[] = IFM_SUBTYPE_ETHERNET_OPTION_DESCRIPTIONS; -struct ifmedia_description ifm_subtype_ieee80211_descriptions[] = +static const struct ifmedia_description ifm_subtype_ieee80211_descriptions[] = IFM_SUBTYPE_IEEE80211_DESCRIPTIONS; -struct ifmedia_description ifm_subtype_ieee80211_option_descriptions[] = +static const struct ifmedia_description + ifm_subtype_ieee80211_option_descriptions[] = IFM_SUBTYPE_IEEE80211_OPTION_DESCRIPTIONS; -struct ifmedia_description ifm_subtype_ieee80211_mode_descriptions[] = +static const struct ifmedia_description + ifm_subtype_ieee80211_mode_descriptions[] = IFM_SUBTYPE_IEEE80211_MODE_DESCRIPTIONS; -struct ifmedia_description ifm_subtype_atm_descriptions[] = +static const struct ifmedia_description ifm_subtype_atm_descriptions[] = IFM_SUBTYPE_ATM_DESCRIPTIONS; -struct ifmedia_description ifm_subtype_atm_option_descriptions[] = +static const struct ifmedia_description ifm_subtype_atm_option_descriptions[] = IFM_SUBTYPE_ATM_OPTION_DESCRIPTIONS; -struct ifmedia_description ifm_subtype_shared_descriptions[] = +static const struct ifmedia_description ifm_subtype_shared_descriptions[] = IFM_SUBTYPE_SHARED_DESCRIPTIONS; -struct ifmedia_description ifm_shared_option_descriptions[] = +static const struct ifmedia_description ifm_shared_option_descriptions[] = IFM_SHARED_OPTION_DESCRIPTIONS; struct ifmedia_type_to_subtype { - struct ifmedia_description *subtypes; - struct ifmedia_description *options; - struct ifmedia_description *modes; + const struct ifmedia_description *subtypes; + const struct ifmedia_description *options; + const struct ifmedia_description *modes; }; /* must be in the same order as IFM_TYPE_DESCRIPTIONS */ -struct ifmedia_type_to_subtype ifmedia_types_to_subtypes[] = { +static const struct ifmedia_type_to_subtype ifmedia_types_to_subtypes[] = { { &ifm_subtype_ethernet_descriptions[0], &ifm_subtype_ethernet_option_descriptions[0], @@ -454,8 +457,8 @@ static void ifmedia_printword(ifmw) int ifmw; { - struct ifmedia_description *desc; - struct ifmedia_type_to_subtype *ttos; + const struct ifmedia_description *desc; + const struct ifmedia_type_to_subtype *ttos; int seen_option = 0; /* Find the top-level interface type. */ From owner-svn-src-stable@freebsd.org Wed Mar 4 17:21:50 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 2FDD5274132; Wed, 4 Mar 2020 17:21:50 +0000 (UTC) (envelope-from kib@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 48XgfP6rWcz4P1P; Wed, 4 Mar 2020 17:21:49 +0000 (UTC) (envelope-from kib@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 CF35D21783; Wed, 4 Mar 2020 17:21:49 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 024HLnmJ087310; Wed, 4 Mar 2020 17:21:49 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024HLnKc087308; Wed, 4 Mar 2020 17:21:49 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202003041721.024HLnKc087308@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 4 Mar 2020 17:21:49 +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: r358628 - stable/12/sys/net X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/sys/net X-SVN-Commit-Revision: 358628 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: Wed, 04 Mar 2020 17:21:50 -0000 Author: kib Date: Wed Mar 4 17:21:49 2020 New Revision: 358628 URL: https://svnweb.freebsd.org/changeset/base/358628 Log: MFC r357765: if_media.h: Add 50G KR4 ethernet media type. Modified: stable/12/sys/net/ieee8023ad_lacp.c stable/12/sys/net/if_media.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/net/ieee8023ad_lacp.c ============================================================================== --- stable/12/sys/net/ieee8023ad_lacp.c Wed Mar 4 17:19:25 2020 (r358627) +++ stable/12/sys/net/ieee8023ad_lacp.c Wed Mar 4 17:21:49 2020 (r358628) @@ -1153,6 +1153,7 @@ lacp_compose_key(struct lacp_port *lp) case IFM_50G_PCIE: case IFM_50G_CR2: case IFM_50G_KR2: + case IFM_50G_KR4: case IFM_50G_SR2: case IFM_50G_LR2: case IFM_50G_LAUI2_AC: Modified: stable/12/sys/net/if_media.h ============================================================================== --- stable/12/sys/net/if_media.h Wed Mar 4 17:19:25 2020 (r358627) +++ stable/12/sys/net/if_media.h Wed Mar 4 17:21:49 2020 (r358628) @@ -258,6 +258,7 @@ uint64_t ifmedia_baudrate(int); #define IFM_400G_DR4 IFM_X(115) /* 400GBase-DR4 */ #define IFM_400G_AUI8_AC IFM_X(116) /* 400G-AUI8 active copper/optical */ #define IFM_400G_AUI8 IFM_X(117) /* 400G-AUI8 */ +#define IFM_50G_KR4 IFM_X(118) /* 50GBase-KR4 */ /* * Please update ieee8023ad_lacp.c:lacp_compose_key() @@ -484,6 +485,7 @@ struct ifmedia_description { { IFM_25G_SR, "25GBase-SR" }, \ { IFM_50G_CR2, "50GBase-CR2" }, \ { IFM_50G_KR2, "50GBase-KR2" }, \ + { IFM_50G_KR4, "50GBase-KR4" }, \ { IFM_25G_LR, "25GBase-LR" }, \ { IFM_10G_AOC, "10GBase-AOC" }, \ { IFM_25G_ACC, "25GBase-ACC" }, \ @@ -827,6 +829,7 @@ struct ifmedia_baudrate { { IFM_ETHER | IFM_25G_SR, IF_Gbps(25ULL) }, \ { IFM_ETHER | IFM_50G_CR2, IF_Gbps(50ULL) }, \ { IFM_ETHER | IFM_50G_KR2, IF_Gbps(50ULL) }, \ + { IFM_ETHER | IFM_50G_KR4, IF_Gbps(50ULL) }, \ { IFM_ETHER | IFM_25G_LR, IF_Gbps(25ULL) }, \ { IFM_ETHER | IFM_10G_AOC, IF_Gbps(10ULL) }, \ { IFM_ETHER | IFM_25G_ACC, IF_Gbps(25ULL) }, \ From owner-svn-src-stable@freebsd.org Wed Mar 4 20:22:07 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 3EC46277D80; Wed, 4 Mar 2020 20:22:07 +0000 (UTC) (envelope-from manu@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 48XlfQ2X4Mz4Ydp; Wed, 4 Mar 2020 20:22:06 +0000 (UTC) (envelope-from manu@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 C9D1A23A3A; Wed, 4 Mar 2020 20:22:05 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 024KM5cV098659; Wed, 4 Mar 2020 20:22:05 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024KM3vL098644; Wed, 4 Mar 2020 20:22:03 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202003042022.024KM3vL098644@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 4 Mar 2020 20:22:03 +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: r358636 - in stable/12/sys/gnu/dts: arm arm64/allwinner arm64/altera arm64/amlogic arm64/arm arm64/bitmain arm64/broadcom/stingray arm64/freescale arm64/intel arm64/marvell arm64/mediat... X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in stable/12/sys/gnu/dts: arm arm64/allwinner arm64/altera arm64/amlogic arm64/arm arm64/bitmain arm64/broadcom/stingray arm64/freescale arm64/intel arm64/marvell arm64/mediatek arm64/nvidia arm64/qco... X-SVN-Commit-Revision: 358636 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: Wed, 04 Mar 2020 20:22:07 -0000 Author: manu Date: Wed Mar 4 20:22:02 2020 New Revision: 358636 URL: https://svnweb.freebsd.org/changeset/base/358636 Log: MFC r355187: Import DTS files from Linux 5.4 Added: stable/12/sys/gnu/dts/arm/aspeed-ast2600-evb.dts - copied unchanged from r355187, head/sys/gnu/dts/arm/aspeed-ast2600-evb.dts stable/12/sys/gnu/dts/arm/aspeed-bmc-facebook-minipack.dts - copied unchanged from r355187, head/sys/gnu/dts/arm/aspeed-bmc-facebook-minipack.dts stable/12/sys/gnu/dts/arm/aspeed-bmc-facebook-wedge100.dts - copied unchanged from r355187, head/sys/gnu/dts/arm/aspeed-bmc-facebook-wedge100.dts stable/12/sys/gnu/dts/arm/aspeed-bmc-facebook-wedge40.dts - copied unchanged from r355187, head/sys/gnu/dts/arm/aspeed-bmc-facebook-wedge40.dts stable/12/sys/gnu/dts/arm/aspeed-bmc-lenovo-hr855xg2.dts - copied unchanged from r355187, head/sys/gnu/dts/arm/aspeed-bmc-lenovo-hr855xg2.dts stable/12/sys/gnu/dts/arm/aspeed-bmc-opp-mihawk.dts - copied unchanged from r355187, head/sys/gnu/dts/arm/aspeed-bmc-opp-mihawk.dts stable/12/sys/gnu/dts/arm/aspeed-g6-pinctrl.dtsi - copied unchanged from r355187, head/sys/gnu/dts/arm/aspeed-g6-pinctrl.dtsi stable/12/sys/gnu/dts/arm/aspeed-g6.dtsi - copied unchanged from r355187, head/sys/gnu/dts/arm/aspeed-g6.dtsi stable/12/sys/gnu/dts/arm/imx6ul-kontron-n6310-s-43.dts - copied unchanged from r355187, head/sys/gnu/dts/arm/imx6ul-kontron-n6310-s-43.dts stable/12/sys/gnu/dts/arm/imx6ul-kontron-n6310-s.dts - copied unchanged from r355187, head/sys/gnu/dts/arm/imx6ul-kontron-n6310-s.dts stable/12/sys/gnu/dts/arm/imx6ul-kontron-n6310-som.dtsi - copied unchanged from r355187, head/sys/gnu/dts/arm/imx6ul-kontron-n6310-som.dtsi stable/12/sys/gnu/dts/arm/imx6ul-phytec-phycore-som.dtsi - copied unchanged from r355187, head/sys/gnu/dts/arm/imx6ul-phytec-phycore-som.dtsi stable/12/sys/gnu/dts/arm/imx6ul-phytec-segin-ff-rdk-nand.dts - copied unchanged from r355187, head/sys/gnu/dts/arm/imx6ul-phytec-segin-ff-rdk-nand.dts stable/12/sys/gnu/dts/arm/imx6ul-phytec-segin-peb-eval-01.dtsi - copied unchanged from r355187, head/sys/gnu/dts/arm/imx6ul-phytec-segin-peb-eval-01.dtsi stable/12/sys/gnu/dts/arm/imx6ul-phytec-segin.dtsi - copied unchanged from r355187, head/sys/gnu/dts/arm/imx6ul-phytec-segin.dtsi stable/12/sys/gnu/dts/arm/imx6ull-phytec-phycore-som.dtsi - copied unchanged from r355187, head/sys/gnu/dts/arm/imx6ull-phytec-phycore-som.dtsi stable/12/sys/gnu/dts/arm/imx6ull-phytec-segin-ff-rdk-emmc.dts - copied unchanged from r355187, head/sys/gnu/dts/arm/imx6ull-phytec-segin-ff-rdk-emmc.dts stable/12/sys/gnu/dts/arm/imx6ull-phytec-segin-ff-rdk-nand.dts - copied unchanged from r355187, head/sys/gnu/dts/arm/imx6ull-phytec-segin-ff-rdk-nand.dts stable/12/sys/gnu/dts/arm/imx6ull-phytec-segin-lc-rdk-nand.dts - copied unchanged from r355187, head/sys/gnu/dts/arm/imx6ull-phytec-segin-lc-rdk-nand.dts stable/12/sys/gnu/dts/arm/imx6ull-phytec-segin-peb-eval-01.dtsi - copied unchanged from r355187, head/sys/gnu/dts/arm/imx6ull-phytec-segin-peb-eval-01.dtsi stable/12/sys/gnu/dts/arm/imx6ull-phytec-segin.dtsi - copied unchanged from r355187, head/sys/gnu/dts/arm/imx6ull-phytec-segin.dtsi stable/12/sys/gnu/dts/arm/imx7d-zii-rmu2.dts - copied unchanged from r355187, head/sys/gnu/dts/arm/imx7d-zii-rmu2.dts stable/12/sys/gnu/dts/arm/mmp2-olpc-xo-1-75.dts - copied unchanged from r355187, head/sys/gnu/dts/arm/mmp2-olpc-xo-1-75.dts stable/12/sys/gnu/dts/arm/mt7629-rfb.dts - copied unchanged from r355187, head/sys/gnu/dts/arm/mt7629-rfb.dts stable/12/sys/gnu/dts/arm/mt7629.dtsi - copied unchanged from r355187, head/sys/gnu/dts/arm/mt7629.dtsi stable/12/sys/gnu/dts/arm/rk3229-xms6.dts - copied unchanged from r355187, head/sys/gnu/dts/arm/rk3229-xms6.dts stable/12/sys/gnu/dts/arm/rk3288-veyron-edp.dtsi - copied unchanged from r355187, head/sys/gnu/dts/arm/rk3288-veyron-edp.dtsi stable/12/sys/gnu/dts/arm/rk3288-veyron-fievel.dts - copied unchanged from r355187, head/sys/gnu/dts/arm/rk3288-veyron-fievel.dts stable/12/sys/gnu/dts/arm/rk3288-veyron-tiger.dts - copied unchanged from r355187, head/sys/gnu/dts/arm/rk3288-veyron-tiger.dts stable/12/sys/gnu/dts/arm/ste-ab8500.dtsi - copied unchanged from r355187, head/sys/gnu/dts/arm/ste-ab8500.dtsi stable/12/sys/gnu/dts/arm/sun8i-s3-lichee-zero-plus.dts - copied unchanged from r355187, head/sys/gnu/dts/arm/sun8i-s3-lichee-zero-plus.dts stable/12/sys/gnu/dts/arm/sun8i-v3.dtsi - copied unchanged from r355187, head/sys/gnu/dts/arm/sun8i-v3.dtsi stable/12/sys/gnu/dts/arm64/allwinner/sun50i-a64-olinuxino-emmc.dts - copied unchanged from r355187, head/sys/gnu/dts/arm64/allwinner/sun50i-a64-olinuxino-emmc.dts stable/12/sys/gnu/dts/arm64/allwinner/sun50i-h6-tanix-tx6.dts - copied unchanged from r355187, head/sys/gnu/dts/arm64/allwinner/sun50i-h6-tanix-tx6.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-g12-common.dtsi - copied unchanged from r355187, head/sys/gnu/dts/arm64/amlogic/meson-g12-common.dtsi stable/12/sys/gnu/dts/arm64/amlogic/meson-g12b-a311d-khadas-vim3.dts - copied unchanged from r355187, head/sys/gnu/dts/arm64/amlogic/meson-g12b-a311d-khadas-vim3.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-g12b-a311d.dtsi - copied unchanged from r355187, head/sys/gnu/dts/arm64/amlogic/meson-g12b-a311d.dtsi stable/12/sys/gnu/dts/arm64/amlogic/meson-g12b-khadas-vim3.dtsi - copied unchanged from r355187, head/sys/gnu/dts/arm64/amlogic/meson-g12b-khadas-vim3.dtsi stable/12/sys/gnu/dts/arm64/amlogic/meson-g12b-s922x-khadas-vim3.dts - copied unchanged from r355187, head/sys/gnu/dts/arm64/amlogic/meson-g12b-s922x-khadas-vim3.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-g12b-s922x.dtsi - copied unchanged from r355187, head/sys/gnu/dts/arm64/amlogic/meson-g12b-s922x.dtsi stable/12/sys/gnu/dts/arm64/amlogic/meson-khadas-vim3.dtsi - copied unchanged from r355187, head/sys/gnu/dts/arm64/amlogic/meson-khadas-vim3.dtsi stable/12/sys/gnu/dts/arm64/amlogic/meson-sm1-khadas-vim3l.dts - copied unchanged from r355187, head/sys/gnu/dts/arm64/amlogic/meson-sm1-khadas-vim3l.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-sm1-sei610.dts - copied unchanged from r355187, head/sys/gnu/dts/arm64/amlogic/meson-sm1-sei610.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-sm1.dtsi - copied unchanged from r355187, head/sys/gnu/dts/arm64/amlogic/meson-sm1.dtsi stable/12/sys/gnu/dts/arm64/freescale/fsl-ls1046a-frwy.dts - copied unchanged from r355187, head/sys/gnu/dts/arm64/freescale/fsl-ls1046a-frwy.dts stable/12/sys/gnu/dts/arm64/freescale/imx8mn-ddr4-evk.dts - copied unchanged from r355187, head/sys/gnu/dts/arm64/freescale/imx8mn-ddr4-evk.dts stable/12/sys/gnu/dts/arm64/freescale/imx8mn.dtsi - copied unchanged from r355187, head/sys/gnu/dts/arm64/freescale/imx8mn.dtsi stable/12/sys/gnu/dts/arm64/freescale/imx8mq-hummingboard-pulse.dts - copied unchanged from r355187, head/sys/gnu/dts/arm64/freescale/imx8mq-hummingboard-pulse.dts stable/12/sys/gnu/dts/arm64/freescale/imx8mq-nitrogen.dts - copied unchanged from r355187, head/sys/gnu/dts/arm64/freescale/imx8mq-nitrogen.dts stable/12/sys/gnu/dts/arm64/freescale/imx8mq-pico-pi.dts - copied unchanged from r355187, head/sys/gnu/dts/arm64/freescale/imx8mq-pico-pi.dts stable/12/sys/gnu/dts/arm64/freescale/imx8mq-sr-som.dtsi - copied unchanged from r355187, head/sys/gnu/dts/arm64/freescale/imx8mq-sr-som.dtsi stable/12/sys/gnu/dts/arm64/freescale/imx8qxp-ai_ml.dts - copied unchanged from r355187, head/sys/gnu/dts/arm64/freescale/imx8qxp-ai_ml.dts stable/12/sys/gnu/dts/arm64/marvell/armada-3720-turris-mox.dts - copied unchanged from r355187, head/sys/gnu/dts/arm64/marvell/armada-3720-turris-mox.dts stable/12/sys/gnu/dts/arm64/qcom/msm8916-longcheer-l8150.dts - copied unchanged from r355187, head/sys/gnu/dts/arm64/qcom/msm8916-longcheer-l8150.dts stable/12/sys/gnu/dts/arm64/qcom/msm8916-samsung-a2015-common.dtsi - copied unchanged from r355187, head/sys/gnu/dts/arm64/qcom/msm8916-samsung-a2015-common.dtsi stable/12/sys/gnu/dts/arm64/qcom/msm8916-samsung-a3u-eur.dts - copied unchanged from r355187, head/sys/gnu/dts/arm64/qcom/msm8916-samsung-a3u-eur.dts stable/12/sys/gnu/dts/arm64/qcom/msm8916-samsung-a5u-eur.dts - copied unchanged from r355187, head/sys/gnu/dts/arm64/qcom/msm8916-samsung-a5u-eur.dts stable/12/sys/gnu/dts/arm64/qcom/msm8998-asus-novago-tp370ql.dts - copied unchanged from r355187, head/sys/gnu/dts/arm64/qcom/msm8998-asus-novago-tp370ql.dts stable/12/sys/gnu/dts/arm64/qcom/msm8998-clamshell.dtsi - copied unchanged from r355187, head/sys/gnu/dts/arm64/qcom/msm8998-clamshell.dtsi stable/12/sys/gnu/dts/arm64/qcom/msm8998-hp-envy-x2.dts - copied unchanged from r355187, head/sys/gnu/dts/arm64/qcom/msm8998-hp-envy-x2.dts stable/12/sys/gnu/dts/arm64/qcom/msm8998-lenovo-miix-630.dts - copied unchanged from r355187, head/sys/gnu/dts/arm64/qcom/msm8998-lenovo-miix-630.dts stable/12/sys/gnu/dts/arm64/qcom/pm8150.dtsi - copied unchanged from r355187, head/sys/gnu/dts/arm64/qcom/pm8150.dtsi stable/12/sys/gnu/dts/arm64/qcom/pm8150b.dtsi - copied unchanged from r355187, head/sys/gnu/dts/arm64/qcom/pm8150b.dtsi stable/12/sys/gnu/dts/arm64/qcom/pm8150l.dtsi - copied unchanged from r355187, head/sys/gnu/dts/arm64/qcom/pm8150l.dtsi stable/12/sys/gnu/dts/arm64/qcom/sdm850-lenovo-yoga-c630.dts - copied unchanged from r355187, head/sys/gnu/dts/arm64/qcom/sdm850-lenovo-yoga-c630.dts stable/12/sys/gnu/dts/arm64/qcom/sm8150-mtp.dts - copied unchanged from r355187, head/sys/gnu/dts/arm64/qcom/sm8150-mtp.dts stable/12/sys/gnu/dts/arm64/qcom/sm8150.dtsi - copied unchanged from r355187, head/sys/gnu/dts/arm64/qcom/sm8150.dtsi stable/12/sys/gnu/dts/arm64/rockchip/rk3399-leez-p710.dts - copied unchanged from r355187, head/sys/gnu/dts/arm64/rockchip/rk3399-leez-p710.dts stable/12/sys/gnu/dts/include/dt-bindings/bus/moxtet.h - copied unchanged from r355187, head/sys/gnu/dts/include/dt-bindings/bus/moxtet.h stable/12/sys/gnu/dts/include/dt-bindings/clock/ast2600-clock.h - copied unchanged from r355187, head/sys/gnu/dts/include/dt-bindings/clock/ast2600-clock.h stable/12/sys/gnu/dts/include/dt-bindings/clock/imx8mn-clock.h - copied unchanged from r355187, head/sys/gnu/dts/include/dt-bindings/clock/imx8mn-clock.h stable/12/sys/gnu/dts/include/dt-bindings/clock/ingenic,tcu.h - copied unchanged from r355187, head/sys/gnu/dts/include/dt-bindings/clock/ingenic,tcu.h stable/12/sys/gnu/dts/include/dt-bindings/clock/mt6779-clk.h - copied unchanged from r355187, head/sys/gnu/dts/include/dt-bindings/clock/mt6779-clk.h stable/12/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-sm8150.h - copied unchanged from r355187, head/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-sm8150.h stable/12/sys/gnu/dts/include/dt-bindings/clock/rk3308-cru.h - copied unchanged from r355187, head/sys/gnu/dts/include/dt-bindings/clock/rk3308-cru.h stable/12/sys/gnu/dts/include/dt-bindings/gce/mt8183-gce.h - copied unchanged from r355187, head/sys/gnu/dts/include/dt-bindings/gce/mt8183-gce.h stable/12/sys/gnu/dts/include/dt-bindings/interconnect/qcom,qcs404.h - copied unchanged from r355187, head/sys/gnu/dts/include/dt-bindings/interconnect/qcom,qcs404.h stable/12/sys/gnu/dts/include/dt-bindings/memory/mt8183-larb-port.h - copied unchanged from r355187, head/sys/gnu/dts/include/dt-bindings/memory/mt8183-larb-port.h stable/12/sys/gnu/dts/include/dt-bindings/phy/phy-lantiq-vrx200-pcie.h - copied unchanged from r355187, head/sys/gnu/dts/include/dt-bindings/phy/phy-lantiq-vrx200-pcie.h stable/12/sys/gnu/dts/include/dt-bindings/power/meson-g12a-power.h - copied unchanged from r355187, head/sys/gnu/dts/include/dt-bindings/power/meson-g12a-power.h stable/12/sys/gnu/dts/include/dt-bindings/power/meson-sm1-power.h - copied unchanged from r355187, head/sys/gnu/dts/include/dt-bindings/power/meson-sm1-power.h stable/12/sys/gnu/dts/include/dt-bindings/regulator/active-semi,8865-regulator.h - copied unchanged from r355187, head/sys/gnu/dts/include/dt-bindings/regulator/active-semi,8865-regulator.h stable/12/sys/gnu/dts/include/dt-bindings/reset-controller/ - copied from r355187, head/sys/gnu/dts/include/dt-bindings/reset-controller/ stable/12/sys/gnu/dts/include/dt-bindings/reset/amlogic,meson-g12a-audio-reset.h - copied unchanged from r355187, head/sys/gnu/dts/include/dt-bindings/reset/amlogic,meson-g12a-audio-reset.h stable/12/sys/gnu/dts/include/dt-bindings/reset/mt7629-resets.h - copied unchanged from r355187, head/sys/gnu/dts/include/dt-bindings/reset/mt7629-resets.h stable/12/sys/gnu/dts/include/dt-bindings/soc/ti,sci_pm_domain.h - copied unchanged from r355187, head/sys/gnu/dts/include/dt-bindings/soc/ti,sci_pm_domain.h Deleted: stable/12/sys/gnu/dts/arm/imx6ul-phytec-pcl063.dtsi stable/12/sys/gnu/dts/arm/imx6ul-phytec-peb-eval-01.dtsi stable/12/sys/gnu/dts/arm/imx6ul-phytec-phyboard-segin-full.dts stable/12/sys/gnu/dts/arm/imx6ul-phytec-phyboard-segin.dtsi stable/12/sys/gnu/dts/arm/rk3288-fennec.dts Modified: stable/12/sys/gnu/dts/arm/am335x-boneblue.dts stable/12/sys/gnu/dts/arm/am335x-cm-t335.dts stable/12/sys/gnu/dts/arm/am335x-icev2.dts stable/12/sys/gnu/dts/arm/am33xx-l4.dtsi stable/12/sys/gnu/dts/arm/am3517-evm.dts stable/12/sys/gnu/dts/arm/am3517.dtsi stable/12/sys/gnu/dts/arm/am3874-iceboard.dts stable/12/sys/gnu/dts/arm/am4372.dtsi stable/12/sys/gnu/dts/arm/am437x-l4.dtsi stable/12/sys/gnu/dts/arm/aspeed-ast2500-evb.dts stable/12/sys/gnu/dts/arm/aspeed-bmc-facebook-tiogapass.dts stable/12/sys/gnu/dts/arm/aspeed-bmc-inspur-fp5280g2.dts stable/12/sys/gnu/dts/arm/aspeed-bmc-opp-swift.dts stable/12/sys/gnu/dts/arm/aspeed-bmc-opp-vesnin.dts stable/12/sys/gnu/dts/arm/aspeed-g4.dtsi stable/12/sys/gnu/dts/arm/aspeed-g5.dtsi stable/12/sys/gnu/dts/arm/at91-ariag25.dts stable/12/sys/gnu/dts/arm/at91-ariettag25.dts stable/12/sys/gnu/dts/arm/at91-cosino.dtsi stable/12/sys/gnu/dts/arm/at91-cosino_mega2560.dts stable/12/sys/gnu/dts/arm/at91-kizboxmini.dts stable/12/sys/gnu/dts/arm/at91sam9261ek.dts stable/12/sys/gnu/dts/arm/at91sam9263ek.dts stable/12/sys/gnu/dts/arm/at91sam9g15.dtsi stable/12/sys/gnu/dts/arm/at91sam9g15ek.dts stable/12/sys/gnu/dts/arm/at91sam9g25ek.dts stable/12/sys/gnu/dts/arm/at91sam9g35ek.dts stable/12/sys/gnu/dts/arm/at91sam9m10g45ek.dts stable/12/sys/gnu/dts/arm/at91sam9rlek.dts stable/12/sys/gnu/dts/arm/at91sam9x25ek.dts stable/12/sys/gnu/dts/arm/at91sam9x35ek.dts stable/12/sys/gnu/dts/arm/at91sam9x5.dtsi stable/12/sys/gnu/dts/arm/at91sam9x5_lcd.dtsi stable/12/sys/gnu/dts/arm/at91sam9x5dm.dtsi stable/12/sys/gnu/dts/arm/at91sam9x5ek.dtsi stable/12/sys/gnu/dts/arm/bcm2835-rpi-a-plus.dts stable/12/sys/gnu/dts/arm/bcm2835-rpi-a.dts stable/12/sys/gnu/dts/arm/bcm2835-rpi-b-plus.dts stable/12/sys/gnu/dts/arm/bcm2835-rpi-b-rev2.dts stable/12/sys/gnu/dts/arm/bcm2835-rpi-b.dts stable/12/sys/gnu/dts/arm/bcm2835-rpi-cm1-io1.dts stable/12/sys/gnu/dts/arm/bcm2835-rpi-cm1.dtsi stable/12/sys/gnu/dts/arm/bcm2835-rpi-zero-w.dts stable/12/sys/gnu/dts/arm/bcm2835-rpi-zero.dts stable/12/sys/gnu/dts/arm/bcm2835-rpi.dtsi stable/12/sys/gnu/dts/arm/bcm2836-rpi-2-b.dts stable/12/sys/gnu/dts/arm/bcm2837-rpi-3-a-plus.dts stable/12/sys/gnu/dts/arm/bcm2837-rpi-3-b-plus.dts stable/12/sys/gnu/dts/arm/bcm2837-rpi-3-b.dts stable/12/sys/gnu/dts/arm/bcm2837-rpi-cm3-io3.dts stable/12/sys/gnu/dts/arm/bcm2837-rpi-cm3.dtsi stable/12/sys/gnu/dts/arm/bcm283x.dtsi stable/12/sys/gnu/dts/arm/da850-evm.dts stable/12/sys/gnu/dts/arm/dra7-l4.dtsi stable/12/sys/gnu/dts/arm/ep7211-edb7211.dts stable/12/sys/gnu/dts/arm/exynos3250.dtsi stable/12/sys/gnu/dts/arm/exynos4.dtsi stable/12/sys/gnu/dts/arm/exynos4210-universal_c210.dts stable/12/sys/gnu/dts/arm/exynos4412-itop-elite.dts stable/12/sys/gnu/dts/arm/exynos4412-itop-scp-core.dtsi stable/12/sys/gnu/dts/arm/exynos4412-odroidu3.dts stable/12/sys/gnu/dts/arm/exynos4412-odroidx.dts stable/12/sys/gnu/dts/arm/exynos4412-origen.dts stable/12/sys/gnu/dts/arm/exynos5250-arndale.dts stable/12/sys/gnu/dts/arm/exynos5250-snow-common.dtsi stable/12/sys/gnu/dts/arm/exynos5250.dtsi stable/12/sys/gnu/dts/arm/exynos5420-peach-pit.dts stable/12/sys/gnu/dts/arm/exynos5420.dtsi stable/12/sys/gnu/dts/arm/exynos54xx.dtsi stable/12/sys/gnu/dts/arm/exynos5800-peach-pi.dts stable/12/sys/gnu/dts/arm/exynos5800.dtsi stable/12/sys/gnu/dts/arm/gemini-dlink-dir-685.dts stable/12/sys/gnu/dts/arm/gemini-nas4220b.dts stable/12/sys/gnu/dts/arm/gemini-sl93512r.dts stable/12/sys/gnu/dts/arm/imx25-eukrea-mbimxsd25-baseboard-cmo-qvga.dts stable/12/sys/gnu/dts/arm/imx25-eukrea-mbimxsd25-baseboard-dvi-svga.dts stable/12/sys/gnu/dts/arm/imx25-eukrea-mbimxsd25-baseboard-dvi-vga.dts stable/12/sys/gnu/dts/arm/imx25-pdk.dts stable/12/sys/gnu/dts/arm/imx27-apf27dev.dts stable/12/sys/gnu/dts/arm/imx27-eukrea-mbimxsd27-baseboard.dts stable/12/sys/gnu/dts/arm/imx27-phytec-phycard-s-rdk.dts stable/12/sys/gnu/dts/arm/imx27-phytec-phycore-rdk.dts stable/12/sys/gnu/dts/arm/imx53-m53menlo.dts stable/12/sys/gnu/dts/arm/imx6-logicpd-baseboard.dtsi stable/12/sys/gnu/dts/arm/imx6-logicpd-som.dtsi stable/12/sys/gnu/dts/arm/imx6qdl-colibri.dtsi stable/12/sys/gnu/dts/arm/imx6qdl-nit6xlite.dtsi stable/12/sys/gnu/dts/arm/imx6qdl-phytec-pbab01.dtsi stable/12/sys/gnu/dts/arm/imx6qdl-sabreauto.dtsi stable/12/sys/gnu/dts/arm/imx6qdl-wandboard.dtsi stable/12/sys/gnu/dts/arm/imx6qdl.dtsi stable/12/sys/gnu/dts/arm/imx6sl.dtsi stable/12/sys/gnu/dts/arm/imx6sll.dtsi stable/12/sys/gnu/dts/arm/imx6sx.dtsi stable/12/sys/gnu/dts/arm/imx6ul-opos6uldev.dts stable/12/sys/gnu/dts/arm/imx6ul.dtsi stable/12/sys/gnu/dts/arm/imx7-colibri.dtsi stable/12/sys/gnu/dts/arm/imx7d-cl-som-imx7.dts stable/12/sys/gnu/dts/arm/imx7d-zii-rpu2.dts stable/12/sys/gnu/dts/arm/imx7d.dtsi stable/12/sys/gnu/dts/arm/imx7s.dtsi stable/12/sys/gnu/dts/arm/imx7ulp.dtsi stable/12/sys/gnu/dts/arm/kirkwood-ts219.dtsi stable/12/sys/gnu/dts/arm/logicpd-som-lv.dtsi stable/12/sys/gnu/dts/arm/logicpd-torpedo-baseboard.dtsi stable/12/sys/gnu/dts/arm/logicpd-torpedo-som.dtsi stable/12/sys/gnu/dts/arm/ls1021a.dtsi stable/12/sys/gnu/dts/arm/meson8b-ec100.dts stable/12/sys/gnu/dts/arm/meson8b-mxq.dts stable/12/sys/gnu/dts/arm/meson8b-odroidc1.dts stable/12/sys/gnu/dts/arm/meson8b.dtsi stable/12/sys/gnu/dts/arm/mmp2.dtsi stable/12/sys/gnu/dts/arm/nspire-classic.dtsi stable/12/sys/gnu/dts/arm/nspire-cx.dts stable/12/sys/gnu/dts/arm/nspire.dtsi stable/12/sys/gnu/dts/arm/omap3-gta04.dtsi stable/12/sys/gnu/dts/arm/omap3-n950-n9.dtsi stable/12/sys/gnu/dts/arm/omap34xx.dtsi stable/12/sys/gnu/dts/arm/omap36xx.dtsi stable/12/sys/gnu/dts/arm/omap4-droid4-xt894.dts stable/12/sys/gnu/dts/arm/omap4-l4-abe.dtsi stable/12/sys/gnu/dts/arm/omap4-l4.dtsi stable/12/sys/gnu/dts/arm/omap4-panda-common.dtsi stable/12/sys/gnu/dts/arm/omap4-sdp.dts stable/12/sys/gnu/dts/arm/omap4-var-som-om44-wlan.dtsi stable/12/sys/gnu/dts/arm/omap4.dtsi stable/12/sys/gnu/dts/arm/omap5-board-common.dtsi stable/12/sys/gnu/dts/arm/omap5.dtsi stable/12/sys/gnu/dts/arm/omap54xx-clocks.dtsi stable/12/sys/gnu/dts/arm/r8a77470.dtsi stable/12/sys/gnu/dts/arm/r8a7779.dtsi stable/12/sys/gnu/dts/arm/rk3036.dtsi stable/12/sys/gnu/dts/arm/rk3288-evb.dtsi stable/12/sys/gnu/dts/arm/rk3288-tinker.dtsi stable/12/sys/gnu/dts/arm/rk3288-veyron-chromebook.dtsi stable/12/sys/gnu/dts/arm/rk3288-veyron-jaq.dts stable/12/sys/gnu/dts/arm/rk3288-veyron-jerry.dts stable/12/sys/gnu/dts/arm/rk3288-veyron-minnie.dts stable/12/sys/gnu/dts/arm/rk3288-veyron-pinky.dts stable/12/sys/gnu/dts/arm/rk3288-veyron-speedy.dts stable/12/sys/gnu/dts/arm/rk3288-veyron.dtsi stable/12/sys/gnu/dts/arm/socfpga.dtsi stable/12/sys/gnu/dts/arm/socfpga_arria10.dtsi stable/12/sys/gnu/dts/arm/socfpga_arria10_socdk_nand.dts stable/12/sys/gnu/dts/arm/socfpga_cyclone5_vining_fpga.dts stable/12/sys/gnu/dts/arm/ste-dbx5x0.dtsi stable/12/sys/gnu/dts/arm/ste-href-ab8500.dtsi stable/12/sys/gnu/dts/arm/ste-href-family-pinctrl.dtsi stable/12/sys/gnu/dts/arm/ste-href-stuib.dtsi stable/12/sys/gnu/dts/arm/ste-href.dtsi stable/12/sys/gnu/dts/arm/ste-hrefprev60-stuib.dts stable/12/sys/gnu/dts/arm/ste-hrefv60plus-stuib.dts stable/12/sys/gnu/dts/arm/ste-nomadik-nhk15.dts stable/12/sys/gnu/dts/arm/ste-snowball.dts stable/12/sys/gnu/dts/arm/stm32429i-eval.dts stable/12/sys/gnu/dts/arm/stm32f429.dtsi stable/12/sys/gnu/dts/arm/stm32f746.dtsi stable/12/sys/gnu/dts/arm/stm32h743i-eval.dts stable/12/sys/gnu/dts/arm/stm32mp157-pinctrl.dtsi stable/12/sys/gnu/dts/arm/stm32mp157a-dk1.dts stable/12/sys/gnu/dts/arm/stm32mp157c-ed1.dts stable/12/sys/gnu/dts/arm/stm32mp157c-ev1.dts stable/12/sys/gnu/dts/arm/stm32mp157c.dtsi stable/12/sys/gnu/dts/arm/sun4i-a10-a1000.dts stable/12/sys/gnu/dts/arm/sun4i-a10-ba10-tvbox.dts stable/12/sys/gnu/dts/arm/sun4i-a10-cubieboard.dts stable/12/sys/gnu/dts/arm/sun4i-a10-hackberry.dts stable/12/sys/gnu/dts/arm/sun4i-a10-itead-iteaduino-plus.dts stable/12/sys/gnu/dts/arm/sun4i-a10-jesurun-q5.dts stable/12/sys/gnu/dts/arm/sun4i-a10-marsboard.dts stable/12/sys/gnu/dts/arm/sun4i-a10-olinuxino-lime.dts stable/12/sys/gnu/dts/arm/sun4i-a10-pcduino.dts stable/12/sys/gnu/dts/arm/sun4i-a10.dtsi stable/12/sys/gnu/dts/arm/sun5i-a10s-olinuxino-micro.dts stable/12/sys/gnu/dts/arm/sun5i-a10s-wobo-i5.dts stable/12/sys/gnu/dts/arm/sun5i-a13-q8-tablet.dts stable/12/sys/gnu/dts/arm/sun5i.dtsi stable/12/sys/gnu/dts/arm/sun6i-a31-colombus.dts stable/12/sys/gnu/dts/arm/sun6i-a31-hummingbird.dts stable/12/sys/gnu/dts/arm/sun6i-a31-i7.dts stable/12/sys/gnu/dts/arm/sun6i-a31-m9.dts stable/12/sys/gnu/dts/arm/sun6i-a31-mele-a1000g-quad.dts stable/12/sys/gnu/dts/arm/sun6i-a31.dtsi stable/12/sys/gnu/dts/arm/sun6i-a31s-cs908.dts stable/12/sys/gnu/dts/arm/sun6i-a31s-sina31s.dts stable/12/sys/gnu/dts/arm/sun6i-a31s-sinovoip-bpi-m2.dts stable/12/sys/gnu/dts/arm/sun7i-a20-bananapi-m1-plus.dts stable/12/sys/gnu/dts/arm/sun7i-a20-bananapi.dts stable/12/sys/gnu/dts/arm/sun7i-a20-bananapro.dts stable/12/sys/gnu/dts/arm/sun7i-a20-cubieboard2.dts stable/12/sys/gnu/dts/arm/sun7i-a20-cubietruck.dts stable/12/sys/gnu/dts/arm/sun7i-a20-hummingbird.dts stable/12/sys/gnu/dts/arm/sun7i-a20-i12-tvbox.dts stable/12/sys/gnu/dts/arm/sun7i-a20-icnova-swac.dts stable/12/sys/gnu/dts/arm/sun7i-a20-itead-ibox.dts stable/12/sys/gnu/dts/arm/sun7i-a20-lamobo-r1.dts stable/12/sys/gnu/dts/arm/sun7i-a20-m3.dts stable/12/sys/gnu/dts/arm/sun7i-a20-olimex-som-evb.dts stable/12/sys/gnu/dts/arm/sun7i-a20-olimex-som204-evb.dts stable/12/sys/gnu/dts/arm/sun7i-a20-olinuxino-lime.dts stable/12/sys/gnu/dts/arm/sun7i-a20-olinuxino-lime2.dts stable/12/sys/gnu/dts/arm/sun7i-a20-olinuxino-micro.dts stable/12/sys/gnu/dts/arm/sun7i-a20-orangepi-mini.dts stable/12/sys/gnu/dts/arm/sun7i-a20-orangepi.dts stable/12/sys/gnu/dts/arm/sun7i-a20-pcduino3-nano.dts stable/12/sys/gnu/dts/arm/sun7i-a20-pcduino3.dts stable/12/sys/gnu/dts/arm/sun7i-a20-wits-pro-a20-dkt.dts stable/12/sys/gnu/dts/arm/sun7i-a20.dtsi stable/12/sys/gnu/dts/arm/sun8i-a23-a33.dtsi stable/12/sys/gnu/dts/arm/sun8i-a23-ippo-q8h-v1.2.dts stable/12/sys/gnu/dts/arm/sun8i-a23-ippo-q8h-v5.dts stable/12/sys/gnu/dts/arm/sun8i-a23-q8-tablet.dts stable/12/sys/gnu/dts/arm/sun8i-a83t-cubietruck-plus.dts stable/12/sys/gnu/dts/arm/sun8i-a83t-tbs-a711.dts stable/12/sys/gnu/dts/arm/sun8i-a83t.dtsi stable/12/sys/gnu/dts/arm/sun8i-r40.dtsi stable/12/sys/gnu/dts/arm/sun8i-v3s.dtsi stable/12/sys/gnu/dts/arm/sun9i-a80-cubieboard4.dts stable/12/sys/gnu/dts/arm/sun9i-a80-optimus.dts stable/12/sys/gnu/dts/arm/sun9i-a80.dtsi stable/12/sys/gnu/dts/arm/sunxi-h3-h5.dtsi stable/12/sys/gnu/dts/arm/vexpress-v2m-rs1.dtsi stable/12/sys/gnu/dts/arm/vexpress-v2m.dtsi stable/12/sys/gnu/dts/arm/vf610-zii-cfu1.dts stable/12/sys/gnu/dts/arm/vf610-zii-scu4-aib.dts stable/12/sys/gnu/dts/arm/vf610-zii-spb4.dts stable/12/sys/gnu/dts/arm64/allwinner/sun50i-a64-orangepi-win.dts stable/12/sys/gnu/dts/arm64/allwinner/sun50i-a64-pine64-plus.dts stable/12/sys/gnu/dts/arm64/allwinner/sun50i-a64-pinebook.dts stable/12/sys/gnu/dts/arm64/allwinner/sun50i-a64-sopine-baseboard.dts stable/12/sys/gnu/dts/arm64/allwinner/sun50i-a64.dtsi stable/12/sys/gnu/dts/arm64/allwinner/sun50i-h6-beelink-gs1.dts stable/12/sys/gnu/dts/arm64/allwinner/sun50i-h6-orangepi-3.dts stable/12/sys/gnu/dts/arm64/allwinner/sun50i-h6-orangepi.dtsi stable/12/sys/gnu/dts/arm64/allwinner/sun50i-h6-pine-h64.dts stable/12/sys/gnu/dts/arm64/allwinner/sun50i-h6.dtsi stable/12/sys/gnu/dts/arm64/altera/socfpga_stratix10.dtsi stable/12/sys/gnu/dts/arm64/amlogic/meson-axg.dtsi stable/12/sys/gnu/dts/arm64/amlogic/meson-g12a-sei510.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-g12a-u200.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-g12a-x96-max.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-g12a.dtsi stable/12/sys/gnu/dts/arm64/amlogic/meson-g12b-odroid-n2.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-g12b.dtsi stable/12/sys/gnu/dts/arm64/amlogic/meson-gx.dtsi stable/12/sys/gnu/dts/arm64/amlogic/meson-gxbb-nanopi-k2.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-gxbb-nexbox-a95x.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-gxbb-odroidc2.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-gxbb-p201.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-gxbb-p20x.dtsi stable/12/sys/gnu/dts/arm64/amlogic/meson-gxbb-wetek-hub.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-gxbb-wetek-play2.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-gxbb.dtsi stable/12/sys/gnu/dts/arm64/amlogic/meson-gxl-s905w-tx3-mini.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-gxl-s905x-hwacom-amazetv.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-gxl-s905x-khadas-vim.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-gxl-s905x-nexbox-a95x.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-gxl.dtsi stable/12/sys/gnu/dts/arm64/amlogic/meson-gxm-khadas-vim2.dts stable/12/sys/gnu/dts/arm64/amlogic/meson-gxm.dtsi stable/12/sys/gnu/dts/arm64/arm/fvp-base-revc.dts stable/12/sys/gnu/dts/arm64/arm/rtsm_ve-motherboard.dtsi stable/12/sys/gnu/dts/arm64/arm/vexpress-v2m-rs1.dtsi stable/12/sys/gnu/dts/arm64/bitmain/bm1880.dtsi stable/12/sys/gnu/dts/arm64/broadcom/stingray/stingray-pinctrl.dtsi stable/12/sys/gnu/dts/arm64/broadcom/stingray/stingray.dtsi stable/12/sys/gnu/dts/arm64/freescale/fsl-ls1012a.dtsi stable/12/sys/gnu/dts/arm64/freescale/fsl-ls1028a-qds.dts stable/12/sys/gnu/dts/arm64/freescale/fsl-ls1028a-rdb.dts stable/12/sys/gnu/dts/arm64/freescale/fsl-ls1028a.dtsi stable/12/sys/gnu/dts/arm64/freescale/fsl-ls1043a.dtsi stable/12/sys/gnu/dts/arm64/freescale/fsl-ls1046a.dtsi stable/12/sys/gnu/dts/arm64/freescale/fsl-ls1088a-qds.dts stable/12/sys/gnu/dts/arm64/freescale/fsl-ls1088a.dtsi stable/12/sys/gnu/dts/arm64/freescale/fsl-ls208xa.dtsi stable/12/sys/gnu/dts/arm64/freescale/fsl-lx2160a.dtsi stable/12/sys/gnu/dts/arm64/freescale/imx8mm-evk.dts stable/12/sys/gnu/dts/arm64/freescale/imx8mm.dtsi stable/12/sys/gnu/dts/arm64/freescale/imx8mq-evk.dts stable/12/sys/gnu/dts/arm64/freescale/imx8mq-librem5-devkit.dts stable/12/sys/gnu/dts/arm64/freescale/imx8mq-zii-ultra.dtsi stable/12/sys/gnu/dts/arm64/freescale/imx8mq.dtsi stable/12/sys/gnu/dts/arm64/freescale/imx8qxp-mek.dts stable/12/sys/gnu/dts/arm64/freescale/imx8qxp.dtsi stable/12/sys/gnu/dts/arm64/intel/socfpga_agilex.dtsi stable/12/sys/gnu/dts/arm64/marvell/armada-37xx.dtsi stable/12/sys/gnu/dts/arm64/marvell/armada-7040-db.dts stable/12/sys/gnu/dts/arm64/marvell/armada-8040-clearfog-gt-8k.dts stable/12/sys/gnu/dts/arm64/marvell/armada-8040-db.dts stable/12/sys/gnu/dts/arm64/marvell/armada-8040-mcbin.dtsi stable/12/sys/gnu/dts/arm64/marvell/armada-ap806-quad.dtsi stable/12/sys/gnu/dts/arm64/marvell/armada-ap806.dtsi stable/12/sys/gnu/dts/arm64/marvell/armada-cp110.dtsi stable/12/sys/gnu/dts/arm64/mediatek/mt7622-bananapi-bpi-r64.dts stable/12/sys/gnu/dts/arm64/mediatek/mt7622.dtsi stable/12/sys/gnu/dts/arm64/mediatek/mt8183-evb.dts stable/12/sys/gnu/dts/arm64/mediatek/mt8183.dtsi stable/12/sys/gnu/dts/arm64/nvidia/tegra194-p2888.dtsi stable/12/sys/gnu/dts/arm64/nvidia/tegra194-p2972-0000.dts stable/12/sys/gnu/dts/arm64/nvidia/tegra194.dtsi stable/12/sys/gnu/dts/arm64/qcom/msm8996.dtsi stable/12/sys/gnu/dts/arm64/qcom/msm8998.dtsi stable/12/sys/gnu/dts/arm64/qcom/pm8998.dtsi stable/12/sys/gnu/dts/arm64/qcom/pms405.dtsi stable/12/sys/gnu/dts/arm64/qcom/qcs404-evb.dtsi stable/12/sys/gnu/dts/arm64/qcom/qcs404.dtsi stable/12/sys/gnu/dts/arm64/qcom/sdm845-cheza.dtsi stable/12/sys/gnu/dts/arm64/qcom/sdm845-db845c.dts stable/12/sys/gnu/dts/arm64/qcom/sdm845-mtp.dts stable/12/sys/gnu/dts/arm64/qcom/sdm845.dtsi stable/12/sys/gnu/dts/arm64/renesas/hihope-common.dtsi stable/12/sys/gnu/dts/arm64/renesas/hihope-rzg2-ex.dtsi stable/12/sys/gnu/dts/arm64/renesas/r8a774a1.dtsi stable/12/sys/gnu/dts/arm64/renesas/r8a774c0-cat874.dts stable/12/sys/gnu/dts/arm64/renesas/r8a774c0.dtsi stable/12/sys/gnu/dts/arm64/renesas/r8a7795-es1-salvator-x.dts stable/12/sys/gnu/dts/arm64/renesas/r8a7795-es1.dtsi stable/12/sys/gnu/dts/arm64/renesas/r8a7795-salvator-x.dts stable/12/sys/gnu/dts/arm64/renesas/r8a7795-salvator-xs.dts stable/12/sys/gnu/dts/arm64/renesas/r8a7795.dtsi stable/12/sys/gnu/dts/arm64/renesas/r8a7796-salvator-x.dts stable/12/sys/gnu/dts/arm64/renesas/r8a7796-salvator-xs.dts stable/12/sys/gnu/dts/arm64/renesas/r8a7796.dtsi stable/12/sys/gnu/dts/arm64/renesas/r8a77965-salvator-x.dts stable/12/sys/gnu/dts/arm64/renesas/r8a77965-salvator-xs.dts stable/12/sys/gnu/dts/arm64/renesas/r8a77965.dtsi stable/12/sys/gnu/dts/arm64/renesas/r8a77970-eagle.dts stable/12/sys/gnu/dts/arm64/renesas/r8a77970-v3msk.dts stable/12/sys/gnu/dts/arm64/renesas/r8a77970.dtsi stable/12/sys/gnu/dts/arm64/renesas/r8a77980-condor.dts stable/12/sys/gnu/dts/arm64/renesas/r8a77980-v3hsk.dts stable/12/sys/gnu/dts/arm64/renesas/r8a77980.dtsi stable/12/sys/gnu/dts/arm64/renesas/r8a77990-ebisu.dts stable/12/sys/gnu/dts/arm64/renesas/r8a77990.dtsi stable/12/sys/gnu/dts/arm64/renesas/r8a77995-draak.dts stable/12/sys/gnu/dts/arm64/renesas/r8a77995.dtsi stable/12/sys/gnu/dts/arm64/renesas/salvator-common.dtsi stable/12/sys/gnu/dts/arm64/renesas/ulcb-kf.dtsi stable/12/sys/gnu/dts/arm64/renesas/ulcb.dtsi stable/12/sys/gnu/dts/arm64/rockchip/rk3328-rock64.dts stable/12/sys/gnu/dts/arm64/rockchip/rk3328.dtsi stable/12/sys/gnu/dts/arm64/rockchip/rk3399-gru-kevin.dts stable/12/sys/gnu/dts/arm64/rockchip/rk3399-hugsun-x99.dts stable/12/sys/gnu/dts/arm64/rockchip/rk3399-rockpro64.dts stable/12/sys/gnu/dts/arm64/ti/k3-am65-main.dtsi stable/12/sys/gnu/dts/arm64/ti/k3-am65-mcu.dtsi stable/12/sys/gnu/dts/arm64/ti/k3-am65-wakeup.dtsi stable/12/sys/gnu/dts/arm64/ti/k3-am65.dtsi stable/12/sys/gnu/dts/arm64/ti/k3-am654-base-board.dts stable/12/sys/gnu/dts/arm64/ti/k3-j721e-common-proc-board.dts stable/12/sys/gnu/dts/arm64/ti/k3-j721e-main.dtsi stable/12/sys/gnu/dts/arm64/ti/k3-j721e-mcu-wakeup.dtsi stable/12/sys/gnu/dts/arm64/ti/k3-j721e.dtsi stable/12/sys/gnu/dts/include/dt-bindings/bus/ti-sysc.h stable/12/sys/gnu/dts/include/dt-bindings/clock/bcm2835.h stable/12/sys/gnu/dts/include/dt-bindings/clock/g12a-clkc.h stable/12/sys/gnu/dts/include/dt-bindings/clock/imx8-clock.h stable/12/sys/gnu/dts/include/dt-bindings/clock/jz4740-cgu.h stable/12/sys/gnu/dts/include/dt-bindings/clock/mt8183-clk.h stable/12/sys/gnu/dts/include/dt-bindings/clock/omap5.h stable/12/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-qcs404.h stable/12/sys/gnu/dts/include/dt-bindings/clock/sun8i-v3s-ccu.h stable/12/sys/gnu/dts/include/dt-bindings/leds/common.h stable/12/sys/gnu/dts/include/dt-bindings/pinctrl/k3.h stable/12/sys/gnu/dts/include/dt-bindings/reset/amlogic,meson-gxbb-reset.h stable/12/sys/gnu/dts/include/dt-bindings/reset/amlogic,meson8b-reset.h stable/12/sys/gnu/dts/include/dt-bindings/reset/hisi,hi6220-resets.h stable/12/sys/gnu/dts/include/dt-bindings/reset/imx8mq-reset.h stable/12/sys/gnu/dts/include/dt-bindings/reset/sun8i-v3s-ccu.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/gnu/dts/arm/am335x-boneblue.dts ============================================================================== --- stable/12/sys/gnu/dts/arm/am335x-boneblue.dts Wed Mar 4 20:01:03 2020 (r358635) +++ stable/12/sys/gnu/dts/arm/am335x-boneblue.dts Wed Mar 4 20:22:02 2020 (r358636) @@ -5,23 +5,13 @@ /dts-v1/; #include "am33xx.dtsi" +#include "am335x-osd335x-common.dtsi" #include / { model = "TI AM335x BeagleBone Blue"; compatible = "ti,am335x-bone-blue", "ti,am33xx"; - cpus { - cpu@0 { - cpu0-supply = <&dcdc2_reg>; - }; - }; - - memory@80000000 { - device_type = "memory"; - reg = <0x80000000 0x20000000>; /* 512 MB */ - }; - chosen { stdout-path = &uart0; }; @@ -142,13 +132,6 @@ >; }; - i2c0_pins: pinmux_i2c0_pins { - pinctrl-single,pins = < - AM33XX_PADCONF(AM335X_PIN_I2C0_SDA, PIN_INPUT_PULLUP, MUX_MODE0) /* (C17) I2C0_SDA.I2C0_SDA */ - AM33XX_PADCONF(AM335X_PIN_I2C0_SCL, PIN_INPUT_PULLUP, MUX_MODE0) /* (C16) I2C0_SCL.I2C0_SCL */ - >; - }; - i2c2_pins: pinmux_i2c2_pins { pinctrl-single,pins = < AM33XX_PADCONF(AM335X_PIN_UART1_CTSN, PIN_INPUT_PULLUP, MUX_MODE3) /* (D18) uart1_ctsn.I2C2_SDA */ @@ -328,16 +311,6 @@ }; &i2c0 { - pinctrl-names = "default"; - pinctrl-0 = <&i2c0_pins>; - - status = "okay"; - clock-frequency = <400000>; - - tps: tps@24 { - reg = <0x24>; - }; - baseboard_eeprom: baseboard_eeprom@50 { compatible = "atmel,24c256"; reg = <0x50>; @@ -381,66 +354,13 @@ /include/ "tps65217.dtsi" &tps { - interrupts = <7>; /* NMI */ - interrupt-parent = <&intc>; + /delete-property/ ti,pmic-shutdown-controller; charger { interrupts = <0>, <1>; interrupt-names = "USB", "AC"; status = "okay"; }; - - pwrbutton { - interrupts = <2>; - status = "okay"; - }; - - regulators { - dcdc1_reg: regulator@0 { - regulator-name = "vdds_dpr"; - regulator-always-on; - }; - - dcdc2_reg: regulator@1 { - /* VDD_MPU voltage limits 0.95V - 1.26V with +/-4% tolerance */ - regulator-name = "vdd_mpu"; - regulator-min-microvolt = <925000>; - regulator-max-microvolt = <1351500>; - regulator-boot-on; - regulator-always-on; - }; - - dcdc3_reg: regulator@2 { - /* VDD_CORE voltage limits 0.95V - 1.1V with +/-4% tolerance */ - regulator-name = "vdd_core"; - regulator-min-microvolt = <925000>; - regulator-max-microvolt = <1150000>; - regulator-boot-on; - regulator-always-on; - }; - - ldo1_reg: regulator@3 { - regulator-name = "vio,vrtc,vdds"; - regulator-always-on; - }; - - ldo2_reg: regulator@4 { - regulator-name = "vdd_3v3aux"; - regulator-always-on; - }; - - ldo3_reg: regulator@5 { - regulator-name = "vdd_1v8"; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - regulator-always-on; - }; - - ldo4_reg: regulator@6 { - regulator-name = "vdd_3v3a"; - regulator-always-on; - }; - }; }; &mmc1 { @@ -500,14 +420,6 @@ compatible = "ti,wl1835-st"; enable-gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>; }; -}; - -&aes { - status = "okay"; -}; - -&sham { - status = "okay"; }; &rtc { Modified: stable/12/sys/gnu/dts/arm/am335x-cm-t335.dts ============================================================================== --- stable/12/sys/gnu/dts/arm/am335x-cm-t335.dts Wed Mar 4 20:01:03 2020 (r358635) +++ stable/12/sys/gnu/dts/arm/am335x-cm-t335.dts Wed Mar 4 20:22:02 2020 (r358636) @@ -44,7 +44,6 @@ regulator-name = "vwlan_fixed"; gpio = <&gpio0 20 GPIO_ACTIVE_HIGH>; /* gpio0_20 */ enable-active-high; - regulator-boot-off; }; backlight { Modified: stable/12/sys/gnu/dts/arm/am335x-icev2.dts ============================================================================== --- stable/12/sys/gnu/dts/arm/am335x-icev2.dts Wed Mar 4 20:01:03 2020 (r358635) +++ stable/12/sys/gnu/dts/arm/am335x-icev2.dts Wed Mar 4 20:22:02 2020 (r358636) @@ -432,7 +432,7 @@ pinctrl-0 = <&mmc0_pins_default>; }; -&gpio0 { +&gpio0_target { /* Do not idle the GPIO used for holding the VTT regulator */ ti,no-reset-on-init; ti,no-idle-on-init; Modified: stable/12/sys/gnu/dts/arm/am33xx-l4.dtsi ============================================================================== --- stable/12/sys/gnu/dts/arm/am33xx-l4.dtsi Wed Mar 4 20:01:03 2020 (r358635) +++ stable/12/sys/gnu/dts/arm/am33xx-l4.dtsi Wed Mar 4 20:22:02 2020 (r358636) @@ -127,7 +127,7 @@ ranges = <0x0 0x5000 0x1000>; }; - target-module@7000 { /* 0x44e07000, ap 14 20.0 */ + gpio0_target: target-module@7000 { /* 0x44e07000, ap 14 20.0 */ compatible = "ti,sysc-omap2", "ti,sysc"; ti,hwmods = "gpio1"; reg = <0x7000 0x4>, @@ -673,7 +673,6 @@ target-module@100000 { /* 0x4a100000, ap 3 08.0 */ compatible = "ti,sysc-omap4-simple", "ti,sysc"; - ti,hwmods = "cpgmac0"; reg = <0x101200 0x4>, <0x101208 0x4>, <0x101204 0x4>; @@ -719,9 +718,10 @@ davinci_mdio: mdio@1000 { compatible = "ti,cpsw-mdio","ti,davinci_mdio"; + clocks = <&cpsw_125mhz_clkctrl AM3_CPSW_125MHZ_CPGMAC0_CLKCTRL 0>; + clock-names = "fck"; #address-cells = <1>; #size-cells = <0>; - ti,hwmods = "davinci_mdio"; bus_freq = <1000000>; reg = <0x1000 0x100>; status = "disabled"; @@ -2038,7 +2038,9 @@ reg = <0xe000 0x4>, <0xe054 0x4>; reg-names = "rev", "sysc"; - ti,sysc-midle ; + ti,sysc-midle = , + , + ; ti,sysc-sidle = , , ; Modified: stable/12/sys/gnu/dts/arm/am3517-evm.dts ============================================================================== --- stable/12/sys/gnu/dts/arm/am3517-evm.dts Wed Mar 4 20:01:03 2020 (r358635) +++ stable/12/sys/gnu/dts/arm/am3517-evm.dts Wed Mar 4 20:22:02 2020 (r358636) @@ -124,10 +124,11 @@ }; lcd0: display@0 { - compatible = "panel-dpi"; + /* This isn't the exact LCD, but the timings meet spec */ + /* To make it work, set CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK=4 */ + compatible = "newhaven,nhd-4.3-480272ef-atxl"; label = "15"; - status = "okay"; - pinctrl-names = "default"; + backlight = <&bl>; enable-gpios = <&gpio6 16 GPIO_ACTIVE_HIGH>; /* gpio176, lcd INI */ vcc-supply = <&vdd_io_reg>; @@ -135,22 +136,6 @@ lcd_in: endpoint { remote-endpoint = <&dpi_out>; }; - }; - - panel-timing { - clock-frequency = <9000000>; - hactive = <480>; - vactive = <272>; - hfront-porch = <3>; - hback-porch = <2>; - hsync-len = <42>; - vback-porch = <3>; - vfront-porch = <4>; - vsync-len = <11>; - hsync-active = <0>; - vsync-active = <0>; - de-active = <1>; - pixelclk-active = <1>; }; }; Modified: stable/12/sys/gnu/dts/arm/am3517.dtsi ============================================================================== --- stable/12/sys/gnu/dts/arm/am3517.dtsi Wed Mar 4 20:01:03 2020 (r358635) +++ stable/12/sys/gnu/dts/arm/am3517.dtsi Wed Mar 4 20:22:02 2020 (r358636) @@ -88,6 +88,30 @@ interrupts = <24>; clocks = <&hecc_ck>; }; + + /* + * On am3517 the OCP registers do not seem to be accessible + * similar to the omap34xx. Maybe SGX is permanently set to + * "OCP bypass mode", or maybe there is OCP_SYSCONFIG that is + * write-only at 0x50000e10. We detect SGX based on the SGX + * revision register instead of the unreadable OCP revision + * register. + */ + sgx_module: target-module@50000000 { + compatible = "ti,sysc-omap2", "ti,sysc"; + reg = <0x50000014 0x4>; + reg-names = "rev"; + clocks = <&sgx_fck>, <&sgx_ick>; + clock-names = "fck", "ick"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0x50000000 0x4000>; + + /* + * Closed source PowerVR driver, no child device + * binding or driver in mainline + */ + }; }; }; Modified: stable/12/sys/gnu/dts/arm/am3874-iceboard.dts ============================================================================== --- stable/12/sys/gnu/dts/arm/am3874-iceboard.dts Wed Mar 4 20:01:03 2020 (r358635) +++ stable/12/sys/gnu/dts/arm/am3874-iceboard.dts Wed Mar 4 20:22:02 2020 (r358636) @@ -111,13 +111,13 @@ reg = <0x70>; #address-cells = <1>; #size-cells = <0>; + i2c-mux-idle-disconnect; i2c@0 { /* FMC A */ #address-cells = <1>; #size-cells = <0>; reg = <0>; - i2c-mux-idle-disconnect; }; i2c@1 { @@ -125,7 +125,6 @@ #address-cells = <1>; #size-cells = <0>; reg = <1>; - i2c-mux-idle-disconnect; }; i2c@2 { @@ -133,7 +132,6 @@ #address-cells = <1>; #size-cells = <0>; reg = <2>; - i2c-mux-idle-disconnect; }; i2c@3 { @@ -141,7 +139,6 @@ #address-cells = <1>; #size-cells = <0>; reg = <3>; - i2c-mux-idle-disconnect; }; i2c@4 { @@ -149,14 +146,12 @@ #address-cells = <1>; #size-cells = <0>; reg = <4>; - i2c-mux-idle-disconnect; }; i2c@5 { #address-cells = <1>; #size-cells = <0>; reg = <5>; - i2c-mux-idle-disconnect; ina230@40 { compatible = "ti,ina230"; reg = <0x40>; shunt-resistor = <5000>; }; ina230@41 { compatible = "ti,ina230"; reg = <0x41>; shunt-resistor = <5000>; }; @@ -182,14 +177,12 @@ #address-cells = <1>; #size-cells = <0>; reg = <6>; - i2c-mux-idle-disconnect; }; i2c@7 { #address-cells = <1>; #size-cells = <0>; reg = <7>; - i2c-mux-idle-disconnect; u41: pca9575@20 { compatible = "nxp,pca9575"; Modified: stable/12/sys/gnu/dts/arm/am4372.dtsi ============================================================================== --- stable/12/sys/gnu/dts/arm/am4372.dtsi Wed Mar 4 20:01:03 2020 (r358635) +++ stable/12/sys/gnu/dts/arm/am4372.dtsi Wed Mar 4 20:22:02 2020 (r358636) @@ -337,6 +337,8 @@ ti,hwmods = "dss_dispc"; clocks = <&disp_clk>; clock-names = "fck"; + + max-memory-bandwidth = <230000000>; }; rfbi: rfbi@4832a800 { Modified: stable/12/sys/gnu/dts/arm/am437x-l4.dtsi ============================================================================== --- stable/12/sys/gnu/dts/arm/am437x-l4.dtsi Wed Mar 4 20:01:03 2020 (r358635) +++ stable/12/sys/gnu/dts/arm/am437x-l4.dtsi Wed Mar 4 20:22:02 2020 (r358636) @@ -512,7 +512,6 @@ target-module@100000 { /* 0x4a100000, ap 3 04.0 */ compatible = "ti,sysc-omap4-simple", "ti,sysc"; - ti,hwmods = "cpgmac0"; reg = <0x101200 0x4>, <0x101208 0x4>, <0x101204 0x4>; @@ -559,11 +558,10 @@ davinci_mdio: mdio@1000 { compatible = "ti,am4372-mdio","ti,cpsw-mdio","ti,davinci_mdio"; reg = <0x1000 0x100>; + clocks = <&cpsw_125mhz_clkctrl AM4_CPSW_125MHZ_CPGMAC0_CLKCTRL 0>; + clock-names = "fck"; #address-cells = <1>; #size-cells = <0>; - clocks = <&cpsw_125mhz_gclk>; - clock-names = "fck"; - ti,hwmods = "davinci_mdio"; bus_freq = <1000000>; status = "disabled"; }; Modified: stable/12/sys/gnu/dts/arm/aspeed-ast2500-evb.dts ============================================================================== --- stable/12/sys/gnu/dts/arm/aspeed-ast2500-evb.dts Wed Mar 4 20:01:03 2020 (r358635) +++ stable/12/sys/gnu/dts/arm/aspeed-ast2500-evb.dts Wed Mar 4 20:22:02 2020 (r358636) @@ -94,6 +94,17 @@ }; }; +&sdmmc { + status = "okay"; +}; + +&sdhci0 { + status = "okay"; + + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_sd1_default>; +}; + /* * Enable port A as device (via the virtual hub) and port B as * host by default on the eval board. This can be easily changed Copied: stable/12/sys/gnu/dts/arm/aspeed-ast2600-evb.dts (from r355187, head/sys/gnu/dts/arm/aspeed-ast2600-evb.dts) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/gnu/dts/arm/aspeed-ast2600-evb.dts Wed Mar 4 20:22:02 2020 (r358636, copy of r355187, head/sys/gnu/dts/arm/aspeed-ast2600-evb.dts) @@ -0,0 +1,80 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +// Copyright 2019 IBM Corp. + +/dts-v1/; + +#include "aspeed-g6.dtsi" + +/ { + model = "AST2600 EVB"; + compatible = "aspeed,ast2600"; + + aliases { + serial4 = &uart5; + }; + + chosen { + bootargs = "console=ttyS4,115200n8"; + }; + + memory@80000000 { + device_type = "memory"; + reg = <0x80000000 0x80000000>; + }; +}; + +&mdio1 { + status = "okay"; + + ethphy1: ethernet-phy@0 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <0>; + }; +}; + +&mdio2 { + status = "okay"; + + ethphy2: ethernet-phy@0 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <0>; + }; +}; + +&mdio3 { + status = "okay"; + + ethphy3: ethernet-phy@0 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <0>; + }; +}; + +&mac1 { + status = "okay"; + + phy-mode = "rgmii"; + phy-handle = <ðphy1>; +}; + +&mac2 { + status = "okay"; + + phy-mode = "rgmii"; + phy-handle = <ðphy2>; +}; + +&mac3 { + status = "okay"; + + phy-mode = "rgmii"; + phy-handle = <ðphy3>; +}; + +&emmc { + status = "okay"; +}; + +&rtc { + status = "okay"; +}; Copied: stable/12/sys/gnu/dts/arm/aspeed-bmc-facebook-minipack.dts (from r355187, head/sys/gnu/dts/arm/aspeed-bmc-facebook-minipack.dts) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/gnu/dts/arm/aspeed-bmc-facebook-minipack.dts Wed Mar 4 20:22:02 2020 (r358636, copy of r355187, head/sys/gnu/dts/arm/aspeed-bmc-facebook-minipack.dts) @@ -0,0 +1,429 @@ +// SPDX-License-Identifier: GPL-2.0+ +// Copyright (c) 2018 Facebook Inc. +/dts-v1/; + +#include "aspeed-g5.dtsi" + +/ { + model = "Facebook Minipack 100 BMC"; + compatible = "facebook,minipack-bmc", "aspeed,ast2500"; + + aliases { + /* + * Override the default serial aliases to avoid breaking + * the legacy applications. + */ + serial0 = &uart5; + serial1 = &uart1; + serial2 = &uart2; + serial3 = &uart3; + serial4 = &uart4; + + /* + * i2c switch 2-0070, pca9548, 8 child channels assigned + * with bus number 16-23. + */ + i2c16 = &imux16; + i2c17 = &imux17; + i2c18 = &imux18; + i2c19 = &imux19; + i2c20 = &imux20; + i2c21 = &imux21; + i2c22 = &imux22; + i2c23 = &imux23; + + /* + * i2c switch 8-0070, pca9548, 8 child channels assigned + * with bus number 24-31. + */ + i2c24 = &imux24; + i2c25 = &imux25; + i2c26 = &imux26; + i2c27 = &imux27; + i2c28 = &imux28; + i2c29 = &imux29; + i2c30 = &imux30; + i2c31 = &imux31; + + /* + * i2c switch 9-0070, pca9548, 8 child channels assigned + * with bus number 32-39. + */ + i2c32 = &imux32; + i2c33 = &imux33; + i2c34 = &imux34; + i2c35 = &imux35; + i2c36 = &imux36; + i2c37 = &imux37; + i2c38 = &imux38; + i2c39 = &imux39; + + /* + * i2c switch 11-0070, pca9548, 8 child channels assigned + * with bus number 40-47. + */ + i2c40 = &imux40; + i2c41 = &imux41; + i2c42 = &imux42; + i2c43 = &imux43; + i2c44 = &imux44; + i2c45 = &imux45; + i2c46 = &imux46; + i2c47 = &imux47; + }; + + chosen { + stdout-path = &uart1; + bootargs = "debug console=ttyS1,9600n8 root=/dev/ram rw"; + }; + + memory@80000000 { + reg = <0x80000000 0x20000000>; + }; +}; + +&wdt1 { + status = "okay"; + aspeed,reset-type = "system"; +}; + +&wdt2 { + status = "okay"; + aspeed,reset-type = "system"; +}; + +&fmc { + status = "okay"; + flash@0 { + status = "okay"; + m25p,fast-read; + label = "bmc"; +#include "facebook-bmc-flash-layout.dtsi" + }; +}; + +&uart1 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_txd1_default + &pinctrl_rxd1_default + &pinctrl_ncts1_default + &pinctrl_ndsr1_default + &pinctrl_ndtr1_default + &pinctrl_nrts1_default>; +}; + +&uart2 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_txd2_default + &pinctrl_rxd2_default>; +}; + +&uart3 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_txd3_default + &pinctrl_rxd3_default>; +}; + +&uart4 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_txd4_default + &pinctrl_rxd4_default>; +}; + +&uart5 { + status = "okay"; +}; + +&mac1 { + status = "okay"; + no-hw-checksum; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_rgmii2_default &pinctrl_mdio2_default>; +}; + +&i2c0 { + status = "okay"; + bus-frequency = <400000>; + multi-master; +}; + +&i2c1 { + status = "okay"; +}; + +&i2c2 { + status = "okay"; + + i2c-switch@70 { + compatible = "nxp,pca9548"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x70>; + + imux16: i2c@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + }; + + imux17: i2c@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + }; + + imux18: i2c@2 { + #address-cells = <1>; + #size-cells = <0>; + reg = <2>; + }; + + imux19: i2c@3 { + #address-cells = <1>; + #size-cells = <0>; + reg = <3>; + }; + + imux20: i2c@4 { + #address-cells = <1>; + #size-cells = <0>; + reg = <4>; + }; + + imux21: i2c@5 { + #address-cells = <1>; + #size-cells = <0>; + reg = <5>; + }; + + imux22: i2c@6 { + #address-cells = <1>; + #size-cells = <0>; + reg = <6>; + }; + + imux23: i2c@7 { + #address-cells = <1>; + #size-cells = <0>; + reg = <7>; + }; + }; +}; + +&i2c3 { + status = "okay"; +}; + +&i2c4 { + status = "okay"; + multi-master; +}; + +&i2c5 { + status = "okay"; +}; + +&i2c6 { + status = "okay"; +}; + +&i2c7 { + status = "okay"; +}; + +&i2c8 { + status = "okay"; + + i2c-switch@70 { + compatible = "nxp,pca9548"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x70>; + + imux24: i2c@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + }; + + imux25: i2c@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + }; + + imux26: i2c@2 { + #address-cells = <1>; + #size-cells = <0>; + reg = <2>; + }; + + imux27: i2c@3 { + #address-cells = <1>; + #size-cells = <0>; + reg = <3>; + }; + + imux28: i2c@4 { + #address-cells = <1>; + #size-cells = <0>; + reg = <4>; + }; + + imux29: i2c@5 { + #address-cells = <1>; + #size-cells = <0>; + reg = <5>; + }; + + imux30: i2c@6 { + #address-cells = <1>; + #size-cells = <0>; + reg = <6>; + }; + + imux31: i2c@7 { + #address-cells = <1>; + #size-cells = <0>; + reg = <7>; + }; + }; +}; + +&i2c9 { + status = "okay"; + + i2c-switch@70 { + compatible = "nxp,pca9548"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x70>; + + imux32: i2c@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + }; + + imux33: i2c@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + }; + + imux34: i2c@2 { + #address-cells = <1>; + #size-cells = <0>; + reg = <2>; + }; + + imux35: i2c@3 { + #address-cells = <1>; + #size-cells = <0>; + reg = <3>; + }; + + imux36: i2c@4 { + #address-cells = <1>; + #size-cells = <0>; + reg = <4>; + }; + + imux37: i2c@5 { + #address-cells = <1>; + #size-cells = <0>; + reg = <5>; + }; + + imux38: i2c@6 { + #address-cells = <1>; + #size-cells = <0>; + reg = <6>; + }; + + imux39: i2c@7 { + #address-cells = <1>; + #size-cells = <0>; + reg = <7>; + }; + }; +}; + +&i2c10 { + status = "okay"; +}; + +&i2c11 { + status = "okay"; + + i2c-switch@70 { + compatible = "nxp,pca9548"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x70>; + + imux40: i2c@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + }; + + imux41: i2c@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + }; + + imux42: i2c@2 { + #address-cells = <1>; + #size-cells = <0>; + reg = <2>; + }; + + imux43: i2c@3 { + #address-cells = <1>; + #size-cells = <0>; + reg = <3>; + }; + + imux44: i2c@4 { + #address-cells = <1>; + #size-cells = <0>; + reg = <4>; + }; + + imux45: i2c@5 { + #address-cells = <1>; + #size-cells = <0>; + reg = <5>; + }; + + imux46: i2c@6 { + #address-cells = <1>; + #size-cells = <0>; + reg = <6>; + }; + + imux47: i2c@7 { + #address-cells = <1>; + #size-cells = <0>; + reg = <7>; + }; + }; +}; + +&i2c12 { + status = "okay"; +}; + +&i2c13 { + status = "okay"; +}; + +&vhub { + status = "okay"; +}; Modified: stable/12/sys/gnu/dts/arm/aspeed-bmc-facebook-tiogapass.dts ============================================================================== --- stable/12/sys/gnu/dts/arm/aspeed-bmc-facebook-tiogapass.dts Wed Mar 4 20:01:03 2020 (r358635) +++ stable/12/sys/gnu/dts/arm/aspeed-bmc-facebook-tiogapass.dts Wed Mar 4 20:22:02 2020 (r358636) @@ -12,6 +12,27 @@ aliases { serial0 = &uart1; serial4 = &uart5; + + /* + * Hardcode the bus number of i2c switches' channels to + * avoid breaking the legacy applications. + */ + i2c16 = &imux16; + i2c17 = &imux17; + i2c18 = &imux18; + i2c19 = &imux19; + i2c20 = &imux20; + i2c21 = &imux21; + i2c22 = &imux22; + i2c23 = &imux23; + i2c24 = &imux24; + i2c25 = &imux25; + i2c26 = &imux26; + i2c27 = &imux27; + i2c28 = &imux28; + i2c29 = &imux29; + i2c30 = &imux30; + i2c31 = &imux31; }; chosen { stdout-path = &uart5; @@ -25,13 +46,9 @@ iio-hwmon { compatible = "iio-hwmon"; io-channels = <&adc 0>, <&adc 1>, <&adc 2>, <&adc 3>, - <&adc 4>, <&adc 5>, <&adc 6>; + <&adc 4>, <&adc 5>, <&adc 6>, <&adc 7>; }; - iio-hwmon-battery { - compatible = "iio-hwmon"; - io-channels = <&adc 7>; - }; }; &fmc { @@ -124,6 +141,215 @@ &i2c1 { status = "okay"; //X24 Riser + i2c-switch@71 { + compatible = "nxp,pca9544"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x71>; + + imux16: i2c@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + + ina230@45 { + compatible = "ti,ina230"; + reg = <0x45>; + }; + + tmp75@48 { + compatible = "ti,tmp75"; + reg = <0x48>; + }; + + tmp421@49 { + compatible = "ti,tmp75"; + reg = <0x49>; + }; + + eeprom@50 { + compatible = "atmel,24c64"; + reg = <0x50>; + pagesize = <32>; + }; + + i2c-switch@73 { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@freebsd.org Wed Mar 4 20:30:12 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 45D55277FCD; Wed, 4 Mar 2020 20:30:12 +0000 (UTC) (envelope-from manu@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 48Xlql3s5zz3PqW; Wed, 4 Mar 2020 20:30:11 +0000 (UTC) (envelope-from manu@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 7F31923A87; Wed, 4 Mar 2020 20:30:11 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 024KUBEI099865; Wed, 4 Mar 2020 20:30:11 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024KUBBK099864; Wed, 4 Mar 2020 20:30:11 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202003042030.024KUBBK099864@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 4 Mar 2020 20:30:11 +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: r358638 - stable/12/sys/dev/cpufreq X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: stable/12/sys/dev/cpufreq X-SVN-Commit-Revision: 358638 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: Wed, 04 Mar 2020 20:30:12 -0000 Author: manu Date: Wed Mar 4 20:30:11 2020 New Revision: 358638 URL: https://svnweb.freebsd.org/changeset/base/358638 Log: MFC r355360-r355361 r355360: cpufreq_dt: Do not attach the device if the cpu isn't present If we boot with hw.ncpu=X (available on arm and arm64 at least) we shouldn't attach the cpufreq driver as cf_set_method will try to get the cpuid and it doesn't exists. This solves cpufreq panicing on RockChip RK3399 when booting with hw.ncpu=4 r355361: cpufreq_dt: Do not fetch again hw.ncpu MD code already set the global variable mp_ncpus according to the tunable hw.ncpu so use the global variable directly. Reported by: ian Modified: stable/12/sys/dev/cpufreq/cpufreq_dt.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cpufreq/cpufreq_dt.c ============================================================================== --- stable/12/sys/dev/cpufreq/cpufreq_dt.c Wed Mar 4 20:29:49 2020 (r358637) +++ stable/12/sys/dev/cpufreq/cpufreq_dt.c Wed Mar 4 20:30:11 2020 (r358638) @@ -455,7 +455,13 @@ cpufreq_dt_attach(device_t dev) sc = device_get_softc(dev); sc->dev = dev; node = ofw_bus_get_node(device_get_parent(dev)); + cpu = device_get_unit(device_get_parent(dev)); + if (cpu >= mp_ncpus) { + device_printf(dev, "Not attaching as cpu is not present\n"); + return (ENXIO); + } + if (regulator_get_by_ofw_property(dev, node, "cpu-supply", &sc->reg) != 0) { if (regulator_get_by_ofw_property(dev, node, @@ -497,7 +503,6 @@ cpufreq_dt_attach(device_t dev) * Find all CPUs that share the same opp table */ CPU_ZERO(&sc->cpus); - cpu = device_get_unit(device_get_parent(dev)); for (cnode = node; cnode > 0; cnode = OF_peer(cnode), cpu++) { copp = -1; if (version == OPP_V1) From owner-svn-src-stable@freebsd.org Wed Mar 4 20:43:32 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 0B335250A65; Wed, 4 Mar 2020 20:43:32 +0000 (UTC) (envelope-from manu@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 48Xm775lskz4LXK; Wed, 4 Mar 2020 20:43:31 +0000 (UTC) (envelope-from manu@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 0B07423E88; Wed, 4 Mar 2020 20:43:31 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 024KhUt5011651; Wed, 4 Mar 2020 20:43:30 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024KhU6l011646; Wed, 4 Mar 2020 20:43:30 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202003042043.024KhU6l011646@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 4 Mar 2020 20:43:30 +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: r358640 - in stable/12/sys: arm64/conf arm64/rockchip conf X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in stable/12/sys: arm64/conf arm64/rockchip conf X-SVN-Commit-Revision: 358640 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: Wed, 04 Mar 2020 20:43:32 -0000 Author: manu Date: Wed Mar 4 20:43:29 2020 New Revision: 358640 URL: https://svnweb.freebsd.org/changeset/base/358640 Log: MFC r349638, r350161, r351186 r349638 by ganbold: Subclass Rockchip's General Register Files driver from Simple MFD driver. r350161 by ganbold: Add driver for Rockchip RK3399 eMMC PHY. Tested on NanoPC-T4 board. Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D20840 r351186 by mmel: Improve rk_i2c driver: - Properly handle IIC_M_NOSTOP and IIC_M_NOSTART flags. - add polling mode, so driver can be used even if interrupts are not enabled (this is necessary for proper support of PMICs). - add support for RK3288 Added: stable/12/sys/arm64/rockchip/rk3399_emmcphy.c - copied unchanged from r350161, head/sys/arm64/rockchip/rk3399_emmcphy.c Modified: stable/12/sys/arm64/conf/GENERIC stable/12/sys/arm64/rockchip/rk_grf.c stable/12/sys/arm64/rockchip/rk_i2c.c stable/12/sys/conf/files.arm64 Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm64/conf/GENERIC ============================================================================== --- stable/12/sys/arm64/conf/GENERIC Wed Mar 4 20:41:45 2020 (r358639) +++ stable/12/sys/arm64/conf/GENERIC Wed Mar 4 20:43:29 2020 (r358640) @@ -166,6 +166,7 @@ device aw_mmc # Allwinner SD/MMC controller device mmc # mmc/sd bus device mmcsd # mmc/sd flash cards device dwmmc +device rk_emmcphy # Serial (COM) ports device uart # Generic UART driver Copied: stable/12/sys/arm64/rockchip/rk3399_emmcphy.c (from r350161, head/sys/arm64/rockchip/rk3399_emmcphy.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/arm64/rockchip/rk3399_emmcphy.c Wed Mar 4 20:43:29 2020 (r358640, copy of r350161, head/sys/arm64/rockchip/rk3399_emmcphy.c) @@ -0,0 +1,341 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2019 Ganbold Tsagaankhuu + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * Rockchip RK3399 eMMC PHY + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include + +#include "syscon_if.h" + +#define GRF_EMMCPHY_BASE 0xf780 +#define GRF_EMMCPHY_CON0 (GRF_EMMCPHY_BASE + 0x00) +#define PHYCTRL_FRQSEL (1 << 13) | (1 << 12) +#define PHYCTRL_FRQSEL_200M 0 +#define PHYCTRL_FRQSEL_50M 1 +#define PHYCTRL_FRQSEL_100M 2 +#define PHYCTRL_FRQSEL_150M 3 +#define PHYCTRL_OTAPDLYENA (1 << 11) +#define PHYCTRL_OTAPDLYSEL (1 << 10) | (1 << 9) | (1 << 8) | (1 << 7) +#define PHYCTRL_ITAPCHGWIN (1 << 6) +#define PHYCTRL_ITAPDLYSEL (1 << 5) | (1 << 4) | (1 << 3) | (1 << 2) | \ + (1 << 1) +#define PHYCTRL_ITAPDLYENA (1 << 0) +#define GRF_EMMCPHY_CON1 (GRF_EMMCPHY_BASE + 0x04) +#define PHYCTRL_CLKBUFSEL (1 << 8) | (1 << 7) | (1 << 6) +#define PHYCTRL_SELDLYTXCLK (1 << 5) +#define PHYCTRL_SELDLYRXCLK (1 << 4) +#define PHYCTRL_STRBSEL 0xf +#define GRF_EMMCPHY_CON2 (GRF_EMMCPHY_BASE + 0x08) +#define PHYCTRL_REN_STRB (1 << 9) +#define PHYCTRL_REN_CMD (1 << 8) +#define PHYCTRL_REN_DAT 0xff +#define GRF_EMMCPHY_CON3 (GRF_EMMCPHY_BASE + 0x0c) +#define PHYCTRL_PU_STRB (1 << 9) +#define PHYCTRL_PU_CMD (1 << 8) +#define PHYCTRL_PU_DAT 0xff +#define GRF_EMMCPHY_CON4 (GRF_EMMCPHY_BASE + 0x10) +#define PHYCTRL_OD_RELEASE_CMD (1 << 9) +#define PHYCTRL_OD_RELEASE_STRB (1 << 8) +#define PHYCTRL_OD_RELEASE_DAT 0xff +#define GRF_EMMCPHY_CON5 (GRF_EMMCPHY_BASE + 0x14) +#define PHYCTRL_ODEN_STRB (1 << 9) +#define PHYCTRL_ODEN_CMD (1 << 8) +#define PHYCTRL_ODEN_DAT 0xff +#define GRF_EMMCPHY_CON6 (GRF_EMMCPHY_BASE + 0x18) +#define PHYCTRL_DLL_TRM_ICP (1 << 12) | (1 << 11) | (1 << 10) | (1 << 9) +#define PHYCTRL_EN_RTRIM (1 << 8) +#define PHYCTRL_RETRIM (1 << 7) +#define PHYCTRL_DR_TY (1 << 6) | (1 << 5) | (1 << 4) +#define PHYCTRL_RETENB (1 << 3) +#define PHYCTRL_RETEN (1 << 2) +#define PHYCTRL_ENDLL (1 << 1) +#define PHYCTRL_PDB (1 << 0) +#define GRF_EMMCPHY_STATUS (GRF_EMMCPHY_BASE + 0x20) +#define PHYCTRL_CALDONE (1 << 6) +#define PHYCTRL_DLLRDY (1 << 5) +#define PHYCTRL_RTRIM (1 << 4) | (1 << 3) | (1 << 2) | (1 << 1) +#define PHYCTRL_EXR_NINST (1 << 0) + +static struct ofw_compat_data compat_data[] = { + { "rockchip,rk3399-emmc-phy", 1 }, + { NULL, 0 } +}; + +struct rk_emmcphy_softc { + struct syscon *syscon; + struct rk_emmcphy_conf *phy_conf; + clk_t clk; +}; + +#define LOWEST_SET_BIT(mask) ((((mask) - 1) & (mask)) ^ (mask)) +#define SHIFTIN(x, mask) ((x) * LOWEST_SET_BIT(mask)) + +/* Phy class and methods. */ +static int rk_emmcphy_enable(struct phynode *phynode, bool enable); +static phynode_method_t rk_emmcphy_phynode_methods[] = { + PHYNODEMETHOD(phynode_enable, rk_emmcphy_enable), + PHYNODEMETHOD_END +}; + +DEFINE_CLASS_1(rk_emmcphy_phynode, rk_emmcphy_phynode_class, + rk_emmcphy_phynode_methods, 0, phynode_class); + +static int +rk_emmcphy_enable(struct phynode *phynode, bool enable) +{ + struct rk_emmcphy_softc *sc; + device_t dev; + intptr_t phy; + uint64_t rate, frqsel; + uint32_t mask, val; + int error; + + dev = phynode_get_device(phynode); + phy = phynode_get_id(phynode); + sc = device_get_softc(dev); + + if (bootverbose) + device_printf(dev, "Phy id: %ld\n", phy); + + if (phy != 0) { + device_printf(dev, "Unknown phy: %ld\n", phy); + return (ERANGE); + } + if (enable) { + /* Drive strength */ + mask = PHYCTRL_DR_TY; + val = SHIFTIN(0, PHYCTRL_DR_TY); + SYSCON_WRITE_4(sc->syscon, GRF_EMMCPHY_CON6, + (mask << 16) | val); + + /* Enable output tap delay */ + mask = PHYCTRL_OTAPDLYENA | PHYCTRL_OTAPDLYSEL; + val = PHYCTRL_OTAPDLYENA | SHIFTIN(4, PHYCTRL_OTAPDLYSEL); + SYSCON_WRITE_4(sc->syscon, GRF_EMMCPHY_CON0, + (mask << 16) | val); + } + + /* Power down PHY and disable DLL before making changes */ + mask = PHYCTRL_ENDLL | PHYCTRL_PDB; + val = 0; + SYSCON_WRITE_4(sc->syscon, GRF_EMMCPHY_CON6, (mask << 16) | val); + + if (enable == false) + return (0); + + sc->phy_conf = (struct rk_emmcphy_conf *)ofw_bus_search_compatible(dev, + compat_data)->ocd_data; + + /* Get clock */ + error = clk_get_by_ofw_name(dev, 0, "emmcclk", &sc->clk); + if (error != 0) { + device_printf(dev, "cannot get emmcclk clock, continue\n"); + sc->clk = NULL; + } else + device_printf(dev, "got emmcclk clock\n"); + + if (sc->clk) { + error = clk_get_freq(sc->clk, &rate); + if (error != 0) { + device_printf(dev, "cannot get clock frequency\n"); + return (ENXIO); + } + } else + rate = 0; + + if (rate != 0) { + if (rate < 75000000) + frqsel = PHYCTRL_FRQSEL_50M; + else if (rate < 125000000) + frqsel = PHYCTRL_FRQSEL_100M; + else if (rate < 175000000) + frqsel = PHYCTRL_FRQSEL_150M; + else + frqsel = PHYCTRL_FRQSEL_200M; + } else + frqsel = PHYCTRL_FRQSEL_200M; + + DELAY(3); + + /* Power up PHY */ + mask = PHYCTRL_PDB; + val = PHYCTRL_PDB; + SYSCON_WRITE_4(sc->syscon, GRF_EMMCPHY_CON6, (mask << 16) | val); + + /* Wait for calibration */ + DELAY(10); + val = SYSCON_READ_4(sc->syscon, GRF_EMMCPHY_STATUS); + if ((val & PHYCTRL_CALDONE) == 0) { + device_printf(dev, "PHY calibration did not complete\n"); + return (ENXIO); + } + + /* Set DLL frequency */ + mask = PHYCTRL_FRQSEL; + val = SHIFTIN(frqsel, PHYCTRL_FRQSEL); + SYSCON_WRITE_4(sc->syscon, GRF_EMMCPHY_CON0, (mask << 16) | val); + + /* Enable DLL */ + mask = PHYCTRL_ENDLL; + val = PHYCTRL_ENDLL; + SYSCON_WRITE_4(sc->syscon, GRF_EMMCPHY_CON6, (mask << 16) | val); + + if (rate != 0) { + /* + * Rockchip RK3399 TRM V1.3 Part2.pdf says in page 698: + * After the DLL control loop reaches steady state a DLL + * ready signal is generated by the DLL circuits + * 'phyctrl_dllrdy'. + * The time from 'phyctrl_endll' to DLL ready signal + * 'phyctrl_dllrdy' varies with the clock frequency. + * At 200MHz clock frequency the DLL ready delay is 2.56us, + * at 100MHz clock frequency the DLL ready delay is 5.112us and + * at 50 MHz clock frequency the DLL ready delay is 10.231us. + * We could use safe values for wait, 12us, 8us, 6us and 4us + * respectively. + * However due to some unknown reason it is not working and + * DLL seems to take extra long time to lock. + * So we will use more safe value 50ms here. + */ + + /* Wait for DLL ready */ + DELAY(50000); + val = SYSCON_READ_4(sc->syscon, GRF_EMMCPHY_STATUS); + if ((val & PHYCTRL_DLLRDY) == 0) { + device_printf(dev, "DLL loop failed to lock\n"); + return (ENXIO); + } + } + + return (0); +} + +static int +rk_emmcphy_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) + return (ENXIO); + + device_set_desc(dev, "Rockchip RK3399 eMMC PHY"); + return (BUS_PROBE_DEFAULT); +} + +static int +rk_emmcphy_attach(device_t dev) +{ + struct phynode_init_def phy_init; + struct phynode *phynode; + struct rk_emmcphy_softc *sc; + phandle_t node; + phandle_t xnode; + pcell_t handle; + intptr_t phy; + + sc = device_get_softc(dev); + node = ofw_bus_get_node(dev); + + if (OF_getencprop(node, "clocks", (void *)&handle, + sizeof(handle)) <= 0) { + device_printf(dev, "cannot get clocks handle\n"); + return (ENXIO); + } + xnode = OF_node_from_xref(handle); + if (OF_hasprop(xnode, "arasan,soc-ctl-syscon") && + syscon_get_by_ofw_property(dev, xnode, + "arasan,soc-ctl-syscon", &sc->syscon) != 0) { + device_printf(dev, "cannot get grf driver handle\n"); + return (ENXIO); + } + + if (sc->syscon == NULL) { + device_printf(dev, "failed to get syscon\n"); + return (ENXIO); + } + + /* Create and register phy */ + bzero(&phy_init, sizeof(phy_init)); + phy_init.id = 0; + phy_init.ofw_node = ofw_bus_get_node(dev); + phynode = phynode_create(dev, &rk_emmcphy_phynode_class, &phy_init); + if (phynode == NULL) { + device_printf(dev, "failed to create eMMC PHY\n"); + return (ENXIO); + } + if (phynode_register(phynode) == NULL) { + device_printf(dev, "failed to register eMMC PHY\n"); + return (ENXIO); + } + if (bootverbose) { + phy = phynode_get_id(phynode); + device_printf(dev, "Attached phy id: %ld\n", phy); + } + return (0); +} + +static device_method_t rk_emmcphy_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, rk_emmcphy_probe), + DEVMETHOD(device_attach, rk_emmcphy_attach), + + DEVMETHOD_END +}; + +static driver_t rk_emmcphy_driver = { + "rk_emmcphy", + rk_emmcphy_methods, + sizeof(struct rk_emmcphy_softc) +}; + +static devclass_t rk_emmcphy_devclass; +EARLY_DRIVER_MODULE(rk_emmcphy, simplebus, rk_emmcphy_driver, + rk_emmcphy_devclass, 0, 0, BUS_PASS_SUPPORTDEV + BUS_PASS_ORDER_MIDDLE); +MODULE_VERSION(rk_emmcphy, 1); Modified: stable/12/sys/arm64/rockchip/rk_grf.c ============================================================================== --- stable/12/sys/arm64/rockchip/rk_grf.c Wed Mar 4 20:41:45 2020 (r358639) +++ stable/12/sys/arm64/rockchip/rk_grf.c Wed Mar 4 20:43:29 2020 (r358640) @@ -42,7 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include #include "opt_soc.h" @@ -77,7 +77,7 @@ static device_method_t rk_grf_methods[] = { }; DEFINE_CLASS_1(rk_grf, rk_grf_driver, rk_grf_methods, - sizeof(struct syscon_generic_softc), syscon_generic_driver); + sizeof(struct simple_mfd_softc), simple_mfd_driver); static devclass_t rk_grf_devclass; EARLY_DRIVER_MODULE(rk_grf, simplebus, rk_grf_driver, rk_grf_devclass, Modified: stable/12/sys/arm64/rockchip/rk_i2c.c ============================================================================== --- stable/12/sys/arm64/rockchip/rk_i2c.c Wed Mar 4 20:41:45 2020 (r358639) +++ stable/12/sys/arm64/rockchip/rk_i2c.c Wed Mar 4 20:43:29 2020 (r358640) @@ -46,9 +46,7 @@ __FBSDID("$FreeBSD$"); #include "iicbus_if.h" -#include "opt_soc.h" - #define RK_I2C_CON 0x00 #define RK_I2C_CON_EN (1 << 0) #define RK_I2C_CON_MODE_SHIFT 1 @@ -61,6 +59,7 @@ __FBSDID("$FreeBSD$"); #define RK_I2C_CON_STOP (1 << 4) #define RK_I2C_CON_LASTACK (1 << 5) #define RK_I2C_CON_NAKSTOP (1 << 6) +#define RK_I2C_CON_CTRL_MASK 0xFF #define RK_I2C_CLKDIV 0x04 #define RK_I2C_CLKDIVL_MASK 0xFFFF @@ -91,8 +90,7 @@ __FBSDID("$FreeBSD$"); #define RK_I2C_IEN_STARTIEN (1 << 4) #define RK_I2C_IEN_STOPIEN (1 << 5) #define RK_I2C_IEN_NAKRCVIEN (1 << 6) -#define RK_I2C_IEN_ALL (RK_I2C_IEN_BTFIEN | \ - RK_I2C_IEN_BRFIEN | RK_I2C_IEN_MBTFIEN | RK_I2C_IEN_MBRFIEN | \ +#define RK_I2C_IEN_ALL (RK_I2C_IEN_MBTFIEN | RK_I2C_IEN_MBRFIEN | \ RK_I2C_IEN_STARTIEN | RK_I2C_IEN_STOPIEN | RK_I2C_IEN_NAKRCVIEN) #define RK_I2C_IPD 0x1C @@ -103,8 +101,7 @@ __FBSDID("$FreeBSD$"); #define RK_I2C_IPD_STARTIPD (1 << 4) #define RK_I2C_IPD_STOPIPD (1 << 5) #define RK_I2C_IPD_NAKRCVIPD (1 << 6) -#define RK_I2C_IPD_ALL (RK_I2C_IPD_BTFIPD | \ - RK_I2C_IPD_BRFIPD | RK_I2C_IPD_MBTFIPD | RK_I2C_IPD_MBRFIPD | \ +#define RK_I2C_IPD_ALL (RK_I2C_IPD_MBTFIPD | RK_I2C_IPD_MBRFIPD | \ RK_I2C_IPD_STARTIPD | RK_I2C_IPD_STOPIPD | RK_I2C_IPD_NAKRCVIPD) #define RK_I2C_FNCT 0x20 @@ -134,8 +131,10 @@ struct rk_i2c_softc { uint32_t ipd; struct iic_msg *msg; size_t cnt; - int transfer_done; - int nak_recv; + int msg_len; + bool transfer_done; + bool nak_recv; + bool tx_slave_addr; uint8_t mode; uint8_t state; @@ -143,12 +142,9 @@ struct rk_i2c_softc { }; static struct ofw_compat_data compat_data[] = { -#ifdef SOC_ROCKCHIP_RK3328 + {"rockchip,rk3288-i2c", 1}, {"rockchip,rk3328-i2c", 1}, -#endif -#ifdef SOC_ROCKCHIP_RK3399 {"rockchip,rk3399-i2c", 1}, -#endif {NULL, 0} }; @@ -169,7 +165,7 @@ static int rk_i2c_detach(device_t dev); #define RK_I2C_WRITE(sc, reg, val) bus_write_4((sc)->res[0], (reg), (val)) static uint32_t -rk_i2c_get_clkdiv(struct rk_i2c_softc *sc, uint64_t speed) +rk_i2c_get_clkdiv(struct rk_i2c_softc *sc, uint32_t speed) { uint64_t sclk_freq; uint32_t clkdiv; @@ -213,7 +209,7 @@ rk_i2c_reset(device_t dev, u_char speed, u_char addr, return (0); } -static void +static uint8_t rk_i2c_fill_tx(struct rk_i2c_softc *sc) { uint32_t buf32; @@ -221,7 +217,7 @@ rk_i2c_fill_tx(struct rk_i2c_softc *sc) int i, j, len; if (sc->msg == NULL || sc->msg->len == sc->cnt) - return; + return (0); len = sc->msg->len - sc->cnt; if (len > 8) @@ -234,22 +230,23 @@ rk_i2c_fill_tx(struct rk_i2c_softc *sc) break; /* Fill the addr if needed */ - if (sc->cnt == 0) { + if (sc->cnt == 0 && sc->tx_slave_addr) { buf = sc->msg->slave; + sc->tx_slave_addr = false; + } else { + buf = sc->msg->buf[sc->cnt]; + sc->cnt++; } - else - buf = sc->msg->buf[sc->cnt - 1]; - buf32 |= buf << (j * 8); - sc->cnt++; } - RK_I2C_WRITE(sc, RK_I2C_TXDATA_BASE + 4 * i, buf32); if (sc->cnt == sc->msg->len) break; } + + return (uint8_t)len; } static void @@ -274,29 +271,11 @@ rk_i2c_drain_rx(struct rk_i2c_softc *sc) buf32 = RK_I2C_READ(sc, RK_I2C_RXDATA_BASE + (i / 4) * 4); buf8 = (buf32 >> ((i % 4) * 8)) & 0xFF; - sc->msg->buf[sc->cnt++] = buf8; } } static void -rk_i2c_send_start(struct rk_i2c_softc *sc) -{ - uint32_t reg; - - RK_I2C_WRITE(sc, RK_I2C_IEN, RK_I2C_IEN_STARTIEN); - - sc->state = STATE_START; - - reg = RK_I2C_READ(sc, RK_I2C_CON); - reg |= RK_I2C_CON_START; - reg |= RK_I2C_CON_EN; - reg &= ~RK_I2C_CON_MODE_MASK; - reg |= sc->mode << RK_I2C_CON_MODE_SHIFT; - RK_I2C_WRITE(sc, RK_I2C_CON, reg); -} - -static void rk_i2c_send_stop(struct rk_i2c_softc *sc) { uint32_t reg; @@ -311,18 +290,29 @@ rk_i2c_send_stop(struct rk_i2c_softc *sc) } static void -rk_i2c_intr(void *arg) +rk_i2c_intr_locked(struct rk_i2c_softc *sc) { - struct rk_i2c_softc *sc; uint32_t reg; - sc = (struct rk_i2c_softc *)arg; + sc->ipd = RK_I2C_READ(sc, RK_I2C_IPD); - RK_I2C_LOCK(sc); + /* Something to handle? */ + if ((sc->ipd & RK_I2C_IPD_ALL) == 0) + return; - sc->ipd = RK_I2C_READ(sc, RK_I2C_IPD); RK_I2C_WRITE(sc, RK_I2C_IPD, sc->ipd); + sc->ipd &= RK_I2C_IPD_ALL; + if (sc->ipd & RK_I2C_IPD_NAKRCVIPD) { + /* NACK received */ + sc->ipd &= ~RK_I2C_IPD_NAKRCVIPD; + sc->nak_recv = 1; + /* XXXX last byte !!!, signal error !!! */ + sc->transfer_done = 1; + sc->state = STATE_IDLE; + goto err; + } + switch (sc->state) { case STATE_START: /* Disable start bit */ @@ -359,10 +349,12 @@ rk_i2c_intr(void *arg) break; case STATE_WRITE: - if (sc->cnt == sc->msg->len) + if (sc->cnt == sc->msg->len && + !(sc->msg->flags & IIC_M_NOSTOP)) { rk_i2c_send_stop(sc); - - break; + break; + } + /* passthru */ case STATE_STOP: /* Disable stop bit */ reg = RK_I2C_READ(sc, RK_I2C_CON); @@ -376,77 +368,177 @@ rk_i2c_intr(void *arg) break; } +err: wakeup(sc); +} + +static void +rk_i2c_intr(void *arg) +{ + struct rk_i2c_softc *sc; + + sc = (struct rk_i2c_softc *)arg; + + RK_I2C_LOCK(sc); + rk_i2c_intr_locked(sc); RK_I2C_UNLOCK(sc); } +static void +rk_i2c_start_xfer(struct rk_i2c_softc *sc, struct iic_msg *msg, boolean_t last) +{ + uint32_t reg; + uint8_t len; + + sc->transfer_done = false; + sc->nak_recv = false; + sc->tx_slave_addr = false; + sc->cnt = 0; + sc->state = STATE_IDLE; + sc->msg = msg; + sc->msg_len = sc->msg->len; + + reg = RK_I2C_READ(sc, RK_I2C_CON) & ~RK_I2C_CON_CTRL_MASK; + if (!(sc->msg->flags & IIC_M_NOSTART)) { + /* Stadard message */ + if (sc->mode == RK_I2C_CON_MODE_TX) { + sc->msg_len++; /* Take slave address in account. */ + sc->tx_slave_addr = true; + } + sc->state = STATE_START; + reg |= RK_I2C_CON_START; + + RK_I2C_WRITE(sc, RK_I2C_IEN, RK_I2C_IEN_STARTIEN); + } else { + /* Continuation message */ + if (sc->mode == RK_I2C_CON_MODE_RX) { + sc->state = STATE_READ; + if (last) + reg |= RK_I2C_CON_LASTACK; + + RK_I2C_WRITE(sc, RK_I2C_MRXCNT, sc->msg->len); + RK_I2C_WRITE(sc, RK_I2C_IEN, RK_I2C_IEN_MBRFIEN | + RK_I2C_IEN_NAKRCVIEN); + } else { + sc->state = STATE_WRITE; + len = rk_i2c_fill_tx(sc); + + RK_I2C_WRITE(sc, RK_I2C_MTXCNT, len); + + RK_I2C_WRITE(sc, RK_I2C_IEN, RK_I2C_IEN_MBTFIEN | + RK_I2C_IEN_NAKRCVIEN); + } + } + reg |= sc->mode << RK_I2C_CON_MODE_SHIFT; + reg |= RK_I2C_CON_EN; + RK_I2C_WRITE(sc, RK_I2C_CON, reg); +} + static int rk_i2c_transfer(device_t dev, struct iic_msg *msgs, uint32_t nmsgs) { struct rk_i2c_softc *sc; uint32_t reg; - int i, j, msgskip, err = 0; + bool last_msg; + int i, j, timeout, err; sc = device_get_softc(dev); + RK_I2C_LOCK(sc); + while (sc->busy) mtx_sleep(sc, &sc->mtx, 0, "i2cbuswait", 0); - sc->busy = 1; - err = clk_enable(sc->pclk); - if (err != 0) { - device_printf(dev, "cannot enable pclk clock\n"); - goto out; - } - err = clk_enable(sc->sclk); - if (err != 0) { - device_printf(dev, "cannot enable i2c clock\n"); - goto out; - } + /* Disable the module and interrupts */ + RK_I2C_WRITE(sc, RK_I2C_CON, 0); + RK_I2C_WRITE(sc, RK_I2C_IEN, 0); - RK_I2C_LOCK(sc); - /* Clean stale interrupts */ RK_I2C_WRITE(sc, RK_I2C_IPD, RK_I2C_IPD_ALL); - for (i = 0; i < nmsgs; i += msgskip) { - if (nmsgs - i >= 2 && !(msgs[i].flags & IIC_M_RD) && - msgs[i + 1].flags & IIC_M_RD && msgs[i].len <= 4) { + err = 0; + for (i = 0; i < nmsgs; i++) { + /* Validate parameters. */ + if (msgs == NULL || msgs[i].buf == NULL || + msgs[i].len == 0) { + err = EINVAL; + break; + } + /* + * If next message have NOSTART flag, then they both + * should be same type (read/write) and same address. + */ + if (i < nmsgs - 1) { + if ((msgs[i + 1].flags & IIC_M_NOSTART) && + ((msgs[i].flags & IIC_M_RD) != + (msgs[i + 1].flags & IIC_M_RD) || + (msgs[i].slave != msgs[i + 1].slave))) { + err = EINVAL; + break; + } + } + /* + * Detect simple register read case. + * The first message should be IIC_M_WR | IIC_M_NOSTOP, + * next pure IIC_M_RD (no other flags allowed). Both + * messages should have same slave address. + */ + + if (nmsgs - i >= 2 && msgs[i].len < 4 && + msgs[i].flags == (IIC_M_WR | IIC_M_NOSTOP) && + msgs[i + 1].flags == IIC_M_RD && + (msgs[i].slave & ~LSB) == (msgs[i + 1].slave & ~LSB)) { sc->mode = RK_I2C_CON_MODE_RRX; - msgskip = 2; - sc->msg = &msgs[i + 1]; /* Write slave address */ - reg = msgs[i].slave | RK_I2C_MRXADDR_VALID(0); + reg = msgs[i].slave & ~LSB; + reg |= RK_I2C_MRXADDR_VALID(0); RK_I2C_WRITE(sc, RK_I2C_MRXADDR, reg); + /* Write slave register address */ - for (j = 0, reg = 0; j < msgs[i].len; j++) { + reg = 0; + for (j = 0; j < msgs[i].len ; j++) { reg |= (msgs[i].buf[j] & 0xff) << (j * 8); reg |= RK_I2C_MRXADDR_VALID(j); } - RK_I2C_WRITE(sc, RK_I2C_MRXRADDR, reg); + + i++; } else { if (msgs[i].flags & IIC_M_RD) { - sc->mode = RK_I2C_CON_MODE_RX; - msgs[i].slave |= LSB; - } - else { + if (msgs[i].flags & IIC_M_NOSTART) { + sc->mode = RK_I2C_CON_MODE_RX; + } else { + sc->mode = RK_I2C_CON_MODE_RRX; + reg = msgs[i].slave & LSB; + reg |= RK_I2C_MRXADDR_VALID(0); + RK_I2C_WRITE(sc, RK_I2C_MRXADDR, reg); + RK_I2C_WRITE(sc, RK_I2C_MRXRADDR, 0); + } + } else { sc->mode = RK_I2C_CON_MODE_TX; - msgs[i].slave &= ~LSB; } - msgskip = 1; - sc->msg = &msgs[i]; } + /* last message ? */ + last_msg = (i > nmsgs - 1) || + !(msgs[i + 1].flags & IIC_M_NOSTART); + rk_i2c_start_xfer(sc, msgs + i, last_msg); - sc->transfer_done = 0; - sc->cnt = 0; - sc->state = STATE_IDLE; - rk_i2c_send_start(sc); - - while (err == 0 && sc->transfer_done != 1) { - err = msleep(sc, &sc->mtx, 0, "rk_i2c", 10 * hz); + if (cold) { + for(timeout = 10000; timeout > 0; timeout--) { + rk_i2c_intr_locked(sc); + if (sc->transfer_done != 0) + break; + DELAY(100); + } + if (timeout <= 0) + err = ETIMEDOUT; + } else { + while (err == 0 && sc->transfer_done != 1) { + err = msleep(sc, &sc->mtx, PZERO, "rk_i2c", + 10 * hz); + } } } @@ -457,19 +549,6 @@ rk_i2c_transfer(device_t dev, struct iic_msg *msgs, ui sc->busy = 0; RK_I2C_UNLOCK(sc); - - err = clk_disable(sc->pclk); - if (err != 0) { - device_printf(dev, "cannot enable pclk clock\n"); - goto out; - } - err = clk_disable(sc->sclk); - if (err != 0) { - device_printf(dev, "cannot enable i2c clock\n"); - goto out; - } - -out: return (err); } @@ -519,10 +598,23 @@ rk_i2c_attach(device_t dev) device_printf(dev, "cannot get i2c clock\n"); goto fail; } - error = clk_get_by_ofw_name(dev, 0, "pclk", &sc->pclk); + error = clk_enable(sc->sclk); if (error != 0) { + device_printf(dev, "cannot enable i2c clock\n"); + goto fail; + } + /* pclk clock is optional. */ + error = clk_get_by_ofw_name(dev, 0, "pclk", &sc->pclk); + if (error != 0 && error != ENOENT) { device_printf(dev, "cannot get pclk clock\n"); goto fail; + } + if (sc->sclk != NULL) { + error = clk_enable(sc->sclk); + if (error != 0) { + device_printf(dev, "cannot enable pclk clock\n"); + goto fail; + } } sc->iicbus = device_add_child(dev, "iicbus", -1); Modified: stable/12/sys/conf/files.arm64 ============================================================================== --- stable/12/sys/conf/files.arm64 Wed Mar 4 20:41:45 2020 (r358639) +++ stable/12/sys/conf/files.arm64 Wed Mar 4 20:43:29 2020 (r358640) @@ -278,6 +278,7 @@ cddl/dev/dtrace/aarch64/dtrace_subr.c optional dtrac cddl/dev/fbt/aarch64/fbt_isa.c optional dtrace_fbt | dtraceall compile-with "${FBT_C}" # RockChip Drivers +arm64/rockchip/rk3399_emmcphy.c optional fdt rk_emmcphy soc_rockchip_rk3399 arm64/rockchip/rk_i2c.c optional fdt rk_i2c soc_rockchip_rk3328 | fdt rk_i2c soc_rockchip_rk3399 arm64/rockchip/rk805.c optional fdt rk805 soc_rockchip_rk3328 | fdt rk805 soc_rockchip_rk3399 arm64/rockchip/rk_grf.c optional fdt soc_rockchip_rk3328 | fdt soc_rockchip_rk3399 From owner-svn-src-stable@freebsd.org Wed Mar 4 20:48:32 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 77F85250BE7; Wed, 4 Mar 2020 20:48:32 +0000 (UTC) (envelope-from manu@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 48XmDv6TD3z4S5R; Wed, 4 Mar 2020 20:48:31 +0000 (UTC) (envelope-from manu@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 58BFC23E9C; Wed, 4 Mar 2020 20:48:31 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 024KmVXs011993; Wed, 4 Mar 2020 20:48:31 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024KmUrT011985; Wed, 4 Mar 2020 20:48:30 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202003042048.024KmUrT011985@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 4 Mar 2020 20:48:30 +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: r358641 - in stable/12/sys: arm64/conf arm64/rockchip arm64/rockchip/clk conf X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in stable/12/sys: arm64/conf arm64/rockchip arm64/rockchip/clk conf X-SVN-Commit-Revision: 358641 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: Wed, 04 Mar 2020 20:48:32 -0000 Author: manu Date: Wed Mar 4 20:48:29 2020 New Revision: 358641 URL: https://svnweb.freebsd.org/changeset/base/358641 Log: MFC r354087, r354089, r354094, r354100, r354103, r354152 r354087: arm64: rk3399: Add clock and gate for usb3 clocks r354089: arm64: rockchip: Add RK3399 TypeC phy driver This is a driver for the USB3 PHY present in the RK3399. While the phy support DP (Display Port) the driver doesn't has we have no driver to test this with for now. All the lane and pll configuration is just magic values from rockchip. While the manual have some info on those registers it's really hard to understand how to calculate those values (if there is a way). r354094 by peterj: Fix use of uninitialised variable. The RK805 regs array was being allocated before it's required size was known, causing the driver to use memory it didn't own. That memory was subsequently allocated and used elsewhere causing later fatal data aborts in rk805_map(). Whilst I'm here, add a sanity check to catch unsupported PMICs (this shouldn't ever get hit because the probe should have failed). Reviewed by: manu Sponsored by: Google r354100 by gonzo: arm64: rk3399: Add clock and gate for SPI clocks r354103 by gonzo: arm64: rk3399: add SPI driver and include it in GENERIC config SPI driver for Rockchip's RK3399 SoC. Implements PIO mode, CS selection, SPI mode and frequency configuration. Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D22148 r354152: arm64: rockchip: typec_phy: Rename timeout to retry Declare retry in the function scope. Rename it to retry as there is a timeout function which was causing to code to compile. Reported by: jhibbits X-MFC-WITH: r354089 Added: stable/12/sys/arm64/rockchip/rk_spi.c - copied unchanged from r354103, head/sys/arm64/rockchip/rk_spi.c stable/12/sys/arm64/rockchip/rk_typec_phy.c - copied, changed from r354089, head/sys/arm64/rockchip/rk_typec_phy.c Modified: stable/12/sys/arm64/conf/GENERIC stable/12/sys/arm64/rockchip/clk/rk3399_cru.c stable/12/sys/arm64/rockchip/rk805.c stable/12/sys/conf/files.arm64 Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm64/conf/GENERIC ============================================================================== --- stable/12/sys/arm64/conf/GENERIC Wed Mar 4 20:43:29 2020 (r358640) +++ stable/12/sys/arm64/conf/GENERIC Wed Mar 4 20:48:29 2020 (r358641) @@ -180,6 +180,7 @@ device pl011 # USB support device aw_usbphy # Allwinner USB PHY device rk_usb2phy # Rockchip USB2PHY +device rk_typec_phy # Rockchip TypeC PHY device dwcotg # DWC OTG controller device ohci # OHCI USB interface device ehci # EHCI USB interface (USB 2.0) @@ -251,6 +252,7 @@ device mv_thermal # Marvell Thermal Sensor Controller # SPI device spibus device bcm2835_spi # Broadcom BCM283x SPI bus +device rk_spi # RockChip SPI controller # PWM device pwm Modified: stable/12/sys/arm64/rockchip/clk/rk3399_cru.c ============================================================================== --- stable/12/sys/arm64/rockchip/clk/rk3399_cru.c Wed Mar 4 20:43:29 2020 (r358640) +++ stable/12/sys/arm64/rockchip/clk/rk3399_cru.c Wed Mar 4 20:48:29 2020 (r358641) @@ -54,9 +54,18 @@ __FBSDID("$FreeBSD$"); #define SCLK_USB2PHY0_REF 123 #define SCLK_USB2PHY1_REF 124 +#define SCLK_USB3OTG0_REF 129 +#define SCLK_USB3OTG1_REF 130 +#define SCLK_USB3OTG0_SUSPEND 131 +#define SCLK_USB3OTG1_SUSPEND 132 #define ACLK_EMMC_CORE 241 #define ACLK_EMMC_NOC 242 #define ACLK_EMMC_GRF 243 +#define ACLK_USB3_NOC 245 +#define ACLK_USB3OTG0 246 +#define ACLK_USB3OTG1 247 +#define ACLK_USB3_RKSOC_AXI_PERF 248 +#define ACLK_USB3_GRF 249 #define PCLK_GPIO2 336 #define PCLK_GPIO3 337 #define PCLK_GPIO4 338 @@ -66,6 +75,11 @@ __FBSDID("$FreeBSD$"); #define PCLK_I2C5 344 #define PCLK_I2C6 345 #define PCLK_I2C7 346 +#define PCLK_SPI0 347 +#define PCLK_SPI1 348 +#define PCLK_SPI2 349 +#define PCLK_SPI4 350 +#define PCLK_SPI5 351 #define HCLK_HOST0 456 #define HCLK_HOST0_ARB 457 #define HCLK_HOST1 458 @@ -103,6 +117,12 @@ static struct rk_cru_gate rk3399_gates[] = { CRU_GATE(0, "hclk_perilp1_cpll_src", "cpll", 0x320, 1) CRU_GATE(0, "hclk_perilp1_gpll_src", "gpll", 0x320, 0) + /* CRU_CLKGATE_CON12 */ + CRU_GATE(SCLK_USB3OTG0_REF, "sclk_usb3otg0_ref", "xin24m", 0x330, 1) + CRU_GATE(SCLK_USB3OTG1_REF, "sclk_usb3otg1_ref", "xin24m", 0x330, 2) + CRU_GATE(SCLK_USB3OTG0_SUSPEND, "sclk_usb3otg0_suspend", "xin24m", 0x330, 3) + CRU_GATE(SCLK_USB3OTG1_SUSPEND, "sclk_usb3otg1_suspend", "xin24m", 0x330, 4) + /* CRU_CLKGATE_CON20 */ CRU_GATE(HCLK_HOST0, "hclk_host0", "hclk_perihp", 0x350, 5) CRU_GATE(HCLK_HOST0_ARB, "hclk_host0_arb", "hclk_perihp", 0x350, 6) @@ -117,6 +137,19 @@ static struct rk_cru_gate rk3399_gates[] = { CRU_GATE(PCLK_I2C2, "pclk_rki2c2", "pclk_perilp1", 0x358, 9) CRU_GATE(PCLK_I2C3, "pclk_rki2c3", "pclk_perilp1", 0x358, 10) + /* CRU_CLKGATE_CON23 */ + CRU_GATE(PCLK_SPI0, "pclk_spi0", "pclk_perilp1", 0x35C, 10) + CRU_GATE(PCLK_SPI1, "pclk_spi1", "pclk_perilp1", 0x35C, 11) + CRU_GATE(PCLK_SPI2, "pclk_spi2", "pclk_perilp1", 0x35C, 12) + CRU_GATE(PCLK_SPI4, "pclk_spi4", "pclk_perilp1", 0x35C, 13) + + /* CRU_CLKGATE_CON30 */ + CRU_GATE(ACLK_USB3_NOC, "aclk_usb3_noc", "aclk_usb3", 0x378, 0) + CRU_GATE(ACLK_USB3OTG0, "aclk_usb3otg0", "aclk_usb3", 0x378, 1) + CRU_GATE(ACLK_USB3OTG1, "aclk_usb3otg1", "aclk_usb3", 0x378, 2) + CRU_GATE(ACLK_USB3_RKSOC_AXI_PERF, "aclk_usb3_rksoc_axi_perf", "aclk_usb3", 0x378, 3) + CRU_GATE(ACLK_USB3_GRF, "aclk_usb3_grf", "aclk_usb3", 0x378, 4) + /* CRU_CLKGATE_CON31 */ CRU_GATE(PCLK_GPIO2, "pclk_gpio2", "pclk_alive", 0x37c, 3) CRU_GATE(PCLK_GPIO3, "pclk_gpio3", "pclk_alive", 0x37c, 4) @@ -129,6 +162,9 @@ static struct rk_cru_gate rk3399_gates[] = { /* CRU_CLKGATE_CON33 */ CRU_GATE(HCLK_SDMMC, "hclk_sdmmc", "hclk_sd", 0x384, 8) + + /* CRU_CLKGATE_CON34 */ + CRU_GATE(PCLK_SPI4, "pclk_spi5", "pclk_perilp1", 0x388, 5) }; @@ -1066,6 +1102,32 @@ static struct rk_clk_composite_def pclk_perilp1 = { .flags = RK_CLK_COMPOSITE_HAVE_GATE, }; +/* USB3 clock */ + +#define ACLK_USB3 244 +static const char *aclk_usb3_parents[] = {"cpll", "gpll", "npll", "npll"}; +static struct rk_clk_composite_def aclk_usb3 = { + .clkdef = { + .id = ACLK_USB3, + .name = "aclk_usb3", + .parent_names = aclk_usb3_parents, + .parent_cnt = nitems(aclk_usb3_parents), + }, + /* CRU_CLKSET_CON39 */ + .muxdiv_offset = 0x19C, + .mux_shift = 6, + .mux_width = 2, + + .div_shift = 0, + .div_width = 5, + + /* CRU_CLKGATE_CON12 */ + .gate_offset = 0x330, + .gate_shift = 0, + + .flags = RK_CLK_COMPOSITE_HAVE_GATE, +}; + /* * i2c */ @@ -1210,7 +1272,236 @@ static struct rk_clk_composite_def i2c7 = { .flags = RK_CLK_COMPOSITE_HAVE_MUX | RK_CLK_COMPOSITE_HAVE_GATE, }; +/* USB3 */ + +#define SCLK_UPHY0_TCPDPHY_REF 125 +#define SCLK_UPHY0_TCPDCORE 126 + +/* Missing xin32k exported by rk808 */ +static const char *uphy0_tcpdphy_ref_parents[] = {"xin24m"}; + +static struct rk_clk_composite_def uphy0_tcpdphy_ref = { + .clkdef = { + .id = SCLK_UPHY0_TCPDPHY_REF, + .name = "uphy0_tcpdphy_ref", + .parent_names = uphy0_tcpdphy_ref_parents, + .parent_cnt = nitems(uphy0_tcpdphy_ref_parents), + }, + /* CRU_CLKSET_CON64 */ + .muxdiv_offset = 0x0200, + .mux_shift = 15, + .mux_width = 1, + + .div_shift = 8, + .div_width = 5, + + /* CRU_CLKGATE_CON13 */ + .gate_offset = 0x0334, + .gate_shift = 4, + + .flags = RK_CLK_COMPOSITE_HAVE_MUX | RK_CLK_COMPOSITE_HAVE_GATE, +}; + +/* Missing xin32k exported by rk808 */ +static const char *uphy0_tcpdcore_parents[] = {"xin24m", "xin24m", "cpll", "gpll"}; + +static struct rk_clk_composite_def uphy0_tcpdcore = { + .clkdef = { + .id = SCLK_UPHY0_TCPDCORE, + .name = "uphy0_tcpdcore", + .parent_names = uphy0_tcpdcore_parents, + .parent_cnt = nitems(uphy0_tcpdcore_parents), + }, + /* CRU_CLKSET_CON64 */ + .muxdiv_offset = 0x0200, + .mux_shift = 6, + .mux_width = 2, + + .div_shift = 0, + .div_width = 5, + + /* CRU_CLKGATE_CON13 */ + .gate_offset = 0x0334, + .gate_shift = 5, + + .flags = RK_CLK_COMPOSITE_HAVE_MUX | RK_CLK_COMPOSITE_HAVE_GATE, +}; + +#define SCLK_UPHY1_TCPDPHY_REF 127 +#define SCLK_UPHY1_TCPDCORE 128 + +/* Missing xin32k exported by rk808 */ +static const char *uphy1_tcpdphy_ref_parents[] = {"xin24m"}; + +static struct rk_clk_composite_def uphy1_tcpdphy_ref = { + .clkdef = { + .id = SCLK_UPHY1_TCPDPHY_REF, + .name = "uphy1_tcpdphy_ref", + .parent_names = uphy1_tcpdphy_ref_parents, + .parent_cnt = nitems(uphy1_tcpdphy_ref_parents), + }, + /* CRU_CLKSET_CON65 */ + .muxdiv_offset = 0x0204, + .mux_shift = 15, + .mux_width = 1, + + .div_shift = 8, + .div_width = 5, + + /* CRU_CLKGATE_CON13 */ + .gate_offset = 0x0334, + .gate_shift = 6, + + .flags = RK_CLK_COMPOSITE_HAVE_MUX | RK_CLK_COMPOSITE_HAVE_GATE, +}; + +/* Missing xin32k exported by rk808 */ +static const char *uphy1_tcpdcore_parents[] = {"xin24m", "xin24m", "cpll", "gpll"}; + +static struct rk_clk_composite_def uphy1_tcpdcore = { + .clkdef = { + .id = SCLK_UPHY1_TCPDCORE, + .name = "uphy1_tcpdcore", + .parent_names = uphy1_tcpdcore_parents, + .parent_cnt = nitems(uphy1_tcpdcore_parents), + }, + /* CRU_CLKSET_CON65 */ + .muxdiv_offset = 0x0204, + .mux_shift = 6, + .mux_width = 2, + + .div_shift = 0, + .div_width = 5, + + /* CRU_CLKGATE_CON13 */ + .gate_offset = 0x0334, + .gate_shift = 7, + + .flags = RK_CLK_COMPOSITE_HAVE_MUX | RK_CLK_COMPOSITE_HAVE_GATE, +}; + /* + * spi + */ +static const char *spi_parents[] = {"cpll", "gpll"}; + +#define SCLK_SPI0 71 +#define SCLK_SPI1 72 +#define SCLK_SPI2 73 +#define SCLK_SPI4 74 +#define SCLK_SPI5 75 + +static struct rk_clk_composite_def spi0 = { + .clkdef = { + .id = SCLK_SPI0, + .name = "clk_spi0", + .parent_names = spi_parents, + .parent_cnt = nitems(spi_parents), + }, + /* CRU_CLKSEL_CON59 */ + .muxdiv_offset = 0x01ec, + .mux_shift = 7, + .mux_width = 1, + + .div_shift = 0, + .div_width = 7, + + /* CRU_CLKGATE_CON9 */ + .gate_offset = 0x0324, + .gate_shift = 12, + + .flags = RK_CLK_COMPOSITE_HAVE_MUX | RK_CLK_COMPOSITE_HAVE_GATE, +}; + +static struct rk_clk_composite_def spi1 = { + .clkdef = { + .id = SCLK_SPI1, + .name = "clk_spi1", + .parent_names = spi_parents, + .parent_cnt = nitems(spi_parents), + }, + /* CRU_CLKSEL_CON59 */ + .muxdiv_offset = 0x01ec, + .mux_shift = 15, + .mux_width = 1, + + .div_shift = 8, + .div_width = 7, + + /* CRU_CLKGATE_CON9 */ + .gate_offset = 0x0324, + .gate_shift = 13, + + .flags = RK_CLK_COMPOSITE_HAVE_MUX | RK_CLK_COMPOSITE_HAVE_GATE, +}; + +static struct rk_clk_composite_def spi2 = { + .clkdef = { + .id = SCLK_SPI2, + .name = "clk_spi2", + .parent_names = spi_parents, + .parent_cnt = nitems(spi_parents), + }, + /* CRU_CLKSEL_CON60 */ + .muxdiv_offset = 0x01f0, + .mux_shift = 7, + .mux_width = 1, + + .div_shift = 0, + .div_width = 7, + + /* CRU_CLKGATE_CON9 */ + .gate_offset = 0x0324, + .gate_shift = 14, + + .flags = RK_CLK_COMPOSITE_HAVE_MUX | RK_CLK_COMPOSITE_HAVE_GATE, +}; + +static struct rk_clk_composite_def spi4 = { + .clkdef = { + .id = SCLK_SPI4, + .name = "clk_spi4", + .parent_names = spi_parents, + .parent_cnt = nitems(spi_parents), + }, + /* CRU_CLKSEL_CON60 */ + .muxdiv_offset = 0x01f0, + .mux_shift = 15, + .mux_width = 1, + + .div_shift = 8, + .div_width = 7, + + /* CRU_CLKGATE_CON9 */ + .gate_offset = 0x0324, + .gate_shift = 15, + + .flags = RK_CLK_COMPOSITE_HAVE_MUX | RK_CLK_COMPOSITE_HAVE_GATE, +}; + +static struct rk_clk_composite_def spi5 = { + .clkdef = { + .id = SCLK_SPI5, + .name = "clk_spi5", + .parent_names = spi_parents, + .parent_cnt = nitems(spi_parents), + }, + /* CRU_CLKSEL_CON58 */ + .muxdiv_offset = 0x01e8, + .mux_shift = 15, + .mux_width = 1, + + .div_shift = 8, + .div_width = 7, + + /* CRU_CLKGATE_CON13 */ + .gate_offset = 0x0334, + .gate_shift = 13, + + .flags = RK_CLK_COMPOSITE_HAVE_MUX | RK_CLK_COMPOSITE_HAVE_GATE, +}; + +/* * ARM CPU clocks (LITTLE and big) */ #define ARMCLKL 8 @@ -1593,6 +1884,10 @@ static struct rk_clk rk3399_clks[] = { }, { .type = RK_CLK_COMPOSITE, + .clk.composite = &aclk_usb3, + }, + { + .type = RK_CLK_COMPOSITE, .clk.composite = &i2c1, }, { @@ -1614,6 +1909,43 @@ static struct rk_clk rk3399_clks[] = { { .type = RK_CLK_COMPOSITE, .clk.composite = &i2c7, + }, + { + .type = RK_CLK_COMPOSITE, + .clk.composite = &uphy0_tcpdphy_ref, + }, + { + .type = RK_CLK_COMPOSITE, + .clk.composite = &uphy0_tcpdcore, + }, + { + .type = RK_CLK_COMPOSITE, + .clk.composite = &uphy1_tcpdphy_ref, + }, + { + .type = RK_CLK_COMPOSITE, + .clk.composite = &uphy1_tcpdcore, + }, + + { + .type = RK_CLK_COMPOSITE, + .clk.composite = &spi0, + }, + { + .type = RK_CLK_COMPOSITE, + .clk.composite = &spi1, + }, + { + .type = RK_CLK_COMPOSITE, + .clk.composite = &spi2, + }, + { + .type = RK_CLK_COMPOSITE, + .clk.composite = &spi4, + }, + { + .type = RK_CLK_COMPOSITE, + .clk.composite = &spi5, }, { Modified: stable/12/sys/arm64/rockchip/rk805.c ============================================================================== --- stable/12/sys/arm64/rockchip/rk805.c Wed Mar 4 20:43:29 2020 (r358640) +++ stable/12/sys/arm64/rockchip/rk805.c Wed Mar 4 20:48:29 2020 (r358641) @@ -468,9 +468,6 @@ rk805_attach(device_t dev) if (config_intrhook_establish(&sc->intr_hook) != 0) return (ENOMEM); - sc->regs = malloc(sizeof(struct rk805_reg_sc *) * sc->nregs, - M_RK805_REG, M_WAITOK | M_ZERO); - sc->type = ofw_bus_search_compatible(dev, compat_data)->ocd_data; switch (sc->type) { case RK805: @@ -481,7 +478,13 @@ rk805_attach(device_t dev) regdefs = rk808_regdefs; sc->nregs = nitems(rk808_regdefs); break; + default: + device_printf(dev, "Unknown type %d\n", sc->type); + return (ENXIO); } + + sc->regs = malloc(sizeof(struct rk805_reg_sc *) * sc->nregs, + M_RK805_REG, M_WAITOK | M_ZERO); rnode = ofw_bus_find_child(ofw_bus_get_node(dev), "regulators"); if (rnode > 0) { Copied: stable/12/sys/arm64/rockchip/rk_spi.c (from r354103, head/sys/arm64/rockchip/rk_spi.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/arm64/rockchip/rk_spi.c Wed Mar 4 20:48:29 2020 (r358641, copy of r354103, head/sys/arm64/rockchip/rk_spi.c) @@ -0,0 +1,483 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2019 Oleksandr Tymoshenko + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include +#include + +#include "spibus_if.h" + +#define RK_SPI_CTRLR0 0x0000 +#define CTRLR0_OPM_MASTER (0 << 20) +#define CTRLR0_XFM_TR (0 << 18) +#define CTRLR0_FRF_MOTO (0 << 16) +#define CTRLR0_BHT_8BIT (1 << 13) +#define CTRLR0_EM_BIG (1 << 11) +#define CTRLR0_SSD_ONE (1 << 10) +#define CTRLR0_SCPOL (1 << 7) +#define CTRLR0_SCPH (1 << 6) +#define CTRLR0_DFS_8BIT (1 << 0) +#define RK_SPI_CTRLR1 0x0004 +#define RK_SPI_ENR 0x0008 +#define RK_SPI_SER 0x000c +#define RK_SPI_BAUDR 0x0010 +#define RK_SPI_TXFTLR 0x0014 +#define RK_SPI_RXFTLR 0x0018 +#define RK_SPI_TXFLR 0x001c +#define RK_SPI_RXFLR 0x0020 +#define RK_SPI_SR 0x0024 +#define SR_BUSY (1 << 0) +#define RK_SPI_IPR 0x0028 +#define RK_SPI_IMR 0x002c +#define IMR_RFFIM (1 << 4) +#define IMR_TFEIM (1 << 0) +#define RK_SPI_ISR 0x0030 +#define ISR_RFFIS (1 << 4) +#define ISR_TFEIS (1 << 0) +#define RK_SPI_RISR 0x0034 +#define RK_SPI_ICR 0x0038 +#define RK_SPI_DMACR 0x003c +#define RK_SPI_DMATDLR 0x0040 +#define RK_SPI_DMARDLR 0x0044 +#define RK_SPI_TXDR 0x0400 +#define RK_SPI_RXDR 0x0800 + +#define CS_MAX 1 + +static struct ofw_compat_data compat_data[] = { + { "rockchip,rk3399-spi", 1 }, + { NULL, 0 } +}; + +static struct resource_spec rk_spi_spec[] = { + { SYS_RES_MEMORY, 0, RF_ACTIVE }, + { SYS_RES_IRQ, 0, RF_ACTIVE | RF_SHAREABLE }, + { -1, 0 } +}; + +struct rk_spi_softc { + device_t dev; + device_t spibus; + struct resource *res[2]; + struct mtx mtx; + clk_t clk_apb; + clk_t clk_spi; + void * intrhand; + int transfer; + uint32_t fifo_size; + uint64_t max_freq; + + uint32_t intreg; + uint8_t *rxbuf; + uint32_t rxidx; + uint8_t *txbuf; + uint32_t txidx; + uint32_t txlen; + uint32_t rxlen; +}; + +#define RK_SPI_LOCK(sc) mtx_lock(&(sc)->mtx) +#define RK_SPI_UNLOCK(sc) mtx_unlock(&(sc)->mtx) +#define RK_SPI_READ_4(sc, reg) bus_read_4((sc)->res[0], (reg)) +#define RK_SPI_WRITE_4(sc, reg, val) bus_write_4((sc)->res[0], (reg), (val)) + +static int rk_spi_probe(device_t dev); +static int rk_spi_attach(device_t dev); +static int rk_spi_detach(device_t dev); +static void rk_spi_intr(void *arg); + +static void +rk_spi_enable_chip(struct rk_spi_softc *sc, int enable) +{ + + RK_SPI_WRITE_4(sc, RK_SPI_ENR, enable ? 1 : 0); +} + +static int +rk_spi_set_cs(struct rk_spi_softc *sc, uint32_t cs, bool active) +{ + uint32_t reg; + + if (cs & SPIBUS_CS_HIGH) { + device_printf(sc->dev, "SPIBUS_CS_HIGH is not supported\n"); + return (EINVAL); + } + + if (cs > CS_MAX) + return (EINVAL); + + reg = RK_SPI_READ_4(sc, RK_SPI_SER); + if (active) + reg |= (1 << cs); + else + reg &= ~(1 << cs); + RK_SPI_WRITE_4(sc, RK_SPI_SER, reg); + + return (0); +} + +static void +rk_spi_hw_setup(struct rk_spi_softc *sc, uint32_t mode, uint32_t freq) +{ + uint32_t cr0; + uint32_t div; + + cr0 = CTRLR0_OPM_MASTER | CTRLR0_XFM_TR | CTRLR0_FRF_MOTO | + CTRLR0_BHT_8BIT | CTRLR0_EM_BIG | CTRLR0_SSD_ONE | + CTRLR0_DFS_8BIT; + + if (mode & SPIBUS_MODE_CPHA) + cr0 |= CTRLR0_SCPH; + if (mode & SPIBUS_MODE_CPOL) + cr0 |= CTRLR0_SCPOL; + + /* minimum divider is 2 */ + if (sc->max_freq < freq*2) { + clk_set_freq(sc->clk_spi, 2 * freq, CLK_SET_ROUND_DOWN); + clk_get_freq(sc->clk_spi, &sc->max_freq); + } + + div = ((sc->max_freq + freq - 1) / freq); + div = (div + 1) & 0xfffe; + RK_SPI_WRITE_4(sc, RK_SPI_BAUDR, div); + + RK_SPI_WRITE_4(sc, RK_SPI_CTRLR0, cr0); +} + +static uint32_t +rk_spi_fifo_size(struct rk_spi_softc *sc) +{ + uint32_t txftlr, reg; + + for (txftlr = 2; txftlr < 32; txftlr++) { + RK_SPI_WRITE_4(sc, RK_SPI_TXFTLR, txftlr); + reg = RK_SPI_READ_4(sc, RK_SPI_TXFTLR); + if (reg != txftlr) + break; + } + RK_SPI_WRITE_4(sc, RK_SPI_TXFTLR, 0); + + if (txftlr == 31) + return 0; + + return txftlr; +} + +static void +rk_spi_empty_rxfifo(struct rk_spi_softc *sc) +{ + uint32_t rxlevel; + rxlevel = RK_SPI_READ_4(sc, RK_SPI_RXFLR); + while (sc->rxidx < sc->rxlen && + (rxlevel-- > 0)) { + sc->rxbuf[sc->rxidx++] = (uint8_t)RK_SPI_READ_4(sc, RK_SPI_RXDR); + } +} + +static void +rk_spi_fill_txfifo(struct rk_spi_softc *sc) +{ + uint32_t txlevel; + txlevel = RK_SPI_READ_4(sc, RK_SPI_TXFLR); + int cnt = 0; + + while (sc->txidx < sc->txlen && txlevel < sc->fifo_size) { + RK_SPI_WRITE_4(sc, RK_SPI_TXDR, sc->txbuf[sc->txidx++]); + txlevel++; + cnt++; + } + + if (sc->txidx != sc->txlen) + sc->intreg |= (IMR_TFEIM | IMR_RFFIM); +} + +static int +rk_spi_xfer_buf(struct rk_spi_softc *sc, void *rxbuf, void *txbuf, uint32_t len) +{ + int err; + + if (len == 0) + return (0); + + sc->rxbuf = rxbuf; + sc->rxlen = len; + sc->rxidx = 0; + sc->txbuf = txbuf; + sc->txlen = len; + sc->txidx = 0; + sc->intreg = 0; + rk_spi_fill_txfifo(sc); + + RK_SPI_WRITE_4(sc, RK_SPI_IMR, sc->intreg); + + err = 0; + while (err == 0 && sc->intreg != 0) + err = msleep(sc, &sc->mtx, 0, "rk_spi", 10 * hz); + + while (err == 0 && sc->rxidx != sc->txidx) { + /* read residual data from RX fifo */ + rk_spi_empty_rxfifo(sc); + } + + if (sc->rxidx != sc->rxlen || sc->txidx != sc->txlen) + err = EIO; + + return (err); +} + +static int +rk_spi_probe(device_t dev) +{ + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (!ofw_bus_search_compatible(dev, compat_data)->ocd_data) + return (ENXIO); + + device_set_desc(dev, "Rockchip SPI"); + return (BUS_PROBE_DEFAULT); +} + +static int +rk_spi_attach(device_t dev) +{ + struct rk_spi_softc *sc; + int error; + + sc = device_get_softc(dev); + sc->dev = dev; + + mtx_init(&sc->mtx, device_get_nameunit(dev), NULL, MTX_DEF); + + if (bus_alloc_resources(dev, rk_spi_spec, sc->res) != 0) { + device_printf(dev, "cannot allocate resources for device\n"); + error = ENXIO; + goto fail; + } + + if (bus_setup_intr(dev, sc->res[1], + INTR_TYPE_MISC | INTR_MPSAFE, NULL, rk_spi_intr, sc, + &sc->intrhand)) { + bus_release_resources(dev, rk_spi_spec, sc->res); + device_printf(dev, "cannot setup interrupt handler\n"); + return (ENXIO); + } + + /* Activate the module clock. */ + error = clk_get_by_ofw_name(dev, 0, "apb_pclk", &sc->clk_apb); + if (error != 0) { + device_printf(dev, "cannot get apb_pclk clock\n"); + goto fail; + } + error = clk_get_by_ofw_name(dev, 0, "spiclk", &sc->clk_spi); + if (error != 0) { + device_printf(dev, "cannot get spiclk clock\n"); + goto fail; + } + error = clk_enable(sc->clk_apb); + if (error != 0) { + device_printf(dev, "cannot enable ahb clock\n"); + goto fail; + } + error = clk_enable(sc->clk_spi); + if (error != 0) { + device_printf(dev, "cannot enable spiclk clock\n"); + goto fail; + } + clk_get_freq(sc->clk_spi, &sc->max_freq); + + sc->fifo_size = rk_spi_fifo_size(sc); + if (sc->fifo_size == 0) { + device_printf(dev, "failed to get fifo size\n"); + goto fail; + } + + sc->spibus = device_add_child(dev, "spibus", -1); + + RK_SPI_WRITE_4(sc, RK_SPI_IMR, 0); + RK_SPI_WRITE_4(sc, RK_SPI_TXFTLR, sc->fifo_size/2 - 1); + RK_SPI_WRITE_4(sc, RK_SPI_RXFTLR, sc->fifo_size/2 - 1); + + return (bus_generic_attach(dev)); + +fail: + rk_spi_detach(dev); + return (error); +} + +static int +rk_spi_detach(device_t dev) +{ + struct rk_spi_softc *sc; + + sc = device_get_softc(dev); + + bus_generic_detach(sc->dev); + if (sc->spibus != NULL) + device_delete_child(dev, sc->spibus); + + if (sc->clk_spi != NULL) + clk_release(sc->clk_spi); + if (sc->clk_apb) + clk_release(sc->clk_apb); + + if (sc->intrhand != NULL) + bus_teardown_intr(sc->dev, sc->res[1], sc->intrhand); + + bus_release_resources(dev, rk_spi_spec, sc->res); + mtx_destroy(&sc->mtx); + + return (0); +} + +static void +rk_spi_intr(void *arg) +{ + struct rk_spi_softc *sc; + uint32_t intreg, isr; + + sc = arg; + + RK_SPI_LOCK(sc); + intreg = RK_SPI_READ_4(sc, RK_SPI_IMR); + isr = RK_SPI_READ_4(sc, RK_SPI_ISR); + RK_SPI_WRITE_4(sc, RK_SPI_ICR, isr); + + if (isr & ISR_RFFIS) + rk_spi_empty_rxfifo(sc); + + if (isr & ISR_TFEIS) + rk_spi_fill_txfifo(sc); + + /* no bytes left, disable interrupt */ + if (sc->txidx == sc->txlen) { + sc->intreg = 0; + wakeup(sc); + } + + if (sc->intreg != intreg) { + (void)RK_SPI_WRITE_4(sc, RK_SPI_IMR, sc->intreg); + (void)RK_SPI_READ_4(sc, RK_SPI_IMR); + } + + RK_SPI_UNLOCK(sc); +} + +static phandle_t +rk_spi_get_node(device_t bus, device_t dev) +{ + + return ofw_bus_get_node(bus); +} + +static int +rk_spi_transfer(device_t dev, device_t child, struct spi_command *cmd) +{ + struct rk_spi_softc *sc; + uint32_t cs, mode, clock; + int err = 0; + + sc = device_get_softc(dev); + + spibus_get_cs(child, &cs); + spibus_get_clock(child, &clock); + spibus_get_mode(child, &mode); + + RK_SPI_LOCK(sc); + rk_spi_hw_setup(sc, mode, clock); + rk_spi_enable_chip(sc, 1); + err = rk_spi_set_cs(sc, cs, true); + if (err != 0) { + rk_spi_enable_chip(sc, 0); + RK_SPI_UNLOCK(sc); + return (err); + } + + /* Transfer command then data bytes. */ + err = 0; + if (cmd->tx_cmd_sz > 0) + err = rk_spi_xfer_buf(sc, cmd->rx_cmd, cmd->tx_cmd, + cmd->tx_cmd_sz); + if (cmd->tx_data_sz > 0 && err == 0) + err = rk_spi_xfer_buf(sc, cmd->rx_data, cmd->tx_data, + cmd->tx_data_sz); + + rk_spi_set_cs(sc, cs, false); + rk_spi_enable_chip(sc, 0); + RK_SPI_UNLOCK(sc); + + return (err); +} + +static device_method_t rk_spi_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, rk_spi_probe), + DEVMETHOD(device_attach, rk_spi_attach), + DEVMETHOD(device_detach, rk_spi_detach), + + /* spibus_if */ + DEVMETHOD(spibus_transfer, rk_spi_transfer), + + /* ofw_bus_if */ + DEVMETHOD(ofw_bus_get_node, rk_spi_get_node), + + DEVMETHOD_END +}; + +static driver_t rk_spi_driver = { + "spi", + rk_spi_methods, + sizeof(struct rk_spi_softc), +}; + +static devclass_t rk_spi_devclass; + +DRIVER_MODULE(rk_spi, simplebus, rk_spi_driver, rk_spi_devclass, 0, 0); +DRIVER_MODULE(ofw_spibus, rk_spi, ofw_spibus_driver, ofw_spibus_devclass, 0, 0); +MODULE_DEPEND(rk_spi, ofw_spibus, 1, 1, 1); +SIMPLEBUS_PNP_INFO(compat_data); Copied and modified: stable/12/sys/arm64/rockchip/rk_typec_phy.c (from r354089, head/sys/arm64/rockchip/rk_typec_phy.c) ============================================================================== --- head/sys/arm64/rockchip/rk_typec_phy.c Fri Oct 25 18:10:02 2019 (r354089, copy source) +++ stable/12/sys/arm64/rockchip/rk_typec_phy.c Wed Mar 4 20:48:29 2020 (r358641) @@ -191,7 +191,7 @@ rk_typec_phy_enable(struct phynode *phynode, bool enab device_t dev; intptr_t phy; uint32_t reg; - int err; + int err, retry; dev = phynode_get_device(phynode); phy = phynode_get_id(phynode); @@ -271,13 +271,13 @@ rk_typec_phy_enable(struct phynode *phynode, bool enab hwreset_deassert(sc->rst_uphy); - for (int timeout = 10000; timeout > 0; timeout--) { + for (retry = 10000; retry > 0; retry--) { reg = RK_TYPEC_PHY_READ(sc, PMA_CMN_CTRL1); if (reg & PMA_CMN_CTRL1_READY) break; DELAY(10); } - if (timeout == 0) { + if (retry == 0) { device_printf(sc->dev, "Timeout waiting for PMA\n"); return (ENXIO); } Modified: stable/12/sys/conf/files.arm64 ============================================================================== --- stable/12/sys/conf/files.arm64 Wed Mar 4 20:43:29 2020 (r358640) +++ stable/12/sys/conf/files.arm64 Wed Mar 4 20:48:29 2020 (r358641) @@ -284,7 +284,9 @@ arm64/rockchip/rk805.c optional fdt rk805 soc_rockch arm64/rockchip/rk_grf.c optional fdt soc_rockchip_rk3328 | fdt soc_rockchip_rk3399 arm64/rockchip/rk_pinctrl.c optional fdt rk_pinctrl soc_rockchip_rk3328 | fdt rk_pinctrl soc_rockchip_rk3399 arm64/rockchip/rk_gpio.c optional fdt rk_gpio soc_rockchip_rk3328 | fdt rk_gpio soc_rockchip_rk3399 +arm64/rockchip/rk_spi.c optional fdt rk_spi arm64/rockchip/rk_usb2phy.c optional fdt rk_usb2phy soc_rockchip_rk3328 | soc_rockchip_rk3399 +arm64/rockchip/rk_typec_phy.c optional fdt rk_typec_phy soc_rockchip_rk3399 arm64/rockchip/if_dwc_rk.c optional fdt dwc_rk soc_rockchip_rk3328 | fdt dwc_rk soc_rockchip_rk3399 dev/dwc/if_dwc.c optional fdt dwc_rk soc_rockchip_rk3328 | fdt dwc_rk soc_rockchip_rk3399 dev/dwc/if_dwc_if.m optional fdt dwc_rk soc_rockchip_rk3328 | fdt dwc_rk soc_rockchip_rk3399 From owner-svn-src-stable@freebsd.org Wed Mar 4 20:53:01 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 3D67E250EAB; Wed, 4 Mar 2020 20:53:01 +0000 (UTC) (envelope-from manu@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 48XmL40CtYz4YgW; Wed, 4 Mar 2020 20:52:59 +0000 (UTC) (envelope-from manu@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 D9A432406A; Wed, 4 Mar 2020 20:52:59 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 024Kqx93017786; Wed, 4 Mar 2020 20:52:59 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024KqxAd017783; Wed, 4 Mar 2020 20:52:59 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202003042052.024KqxAd017783@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 4 Mar 2020 20:52:59 +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: r358642 - in stable/12/sys: arm64/conf arm64/rockchip conf X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in stable/12/sys: arm64/conf arm64/rockchip conf X-SVN-Commit-Revision: 358642 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: Wed, 04 Mar 2020 20:53:01 -0000 Author: manu Date: Wed Mar 4 20:52:59 2020 New Revision: 358642 URL: https://svnweb.freebsd.org/changeset/base/358642 Log: MFC r354088: arm64: rockchip: Add rk_dwc3 driver This is a simplebus like driver that attaches the dwc3 child node and enable the clocks needed for the module. Added: stable/12/sys/arm64/rockchip/rk_dwc3.c - copied unchanged from r354088, head/sys/arm64/rockchip/rk_dwc3.c Modified: stable/12/sys/arm64/conf/GENERIC stable/12/sys/conf/files.arm64 Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm64/conf/GENERIC ============================================================================== --- stable/12/sys/arm64/conf/GENERIC Wed Mar 4 20:48:29 2020 (r358641) +++ stable/12/sys/arm64/conf/GENERIC Wed Mar 4 20:52:59 2020 (r358642) @@ -186,6 +186,7 @@ device ohci # OHCI USB interface device ehci # EHCI USB interface (USB 2.0) device ehci_mv # Marvell EHCI USB interface device xhci # XHCI PCI->USB interface (USB 3.0) +device rk_dwc3 # Rockchip DWC3 controller device usb # USB Bus (required) device ukbd # Keyboard device umass # Disks/Mass storage - Requires scbus and da Copied: stable/12/sys/arm64/rockchip/rk_dwc3.c (from r354088, head/sys/arm64/rockchip/rk_dwc3.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/arm64/rockchip/rk_dwc3.c Wed Mar 4 20:52:59 2020 (r358642, copy of r354088, head/sys/arm64/rockchip/rk_dwc3.c) @@ -0,0 +1,201 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2019 Emmanuel Vadot + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * Rockchip DWC3 glue + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include + + +#include + +#include +#include +#include +#include + +#include +#include +#include +#include + +static struct ofw_compat_data compat_data[] = { + { "rockchip,rk3399-dwc3", 1 }, + { NULL, 0 } +}; + +struct rk_dwc3_softc { + struct simplebus_softc sc; + device_t dev; + clk_t clk_ref; + clk_t clk_suspend; + clk_t clk_bus; + clk_t clk_axi_perf; + clk_t clk_usb3; + clk_t clk_grf; + hwreset_t rst_usb3; +}; + +static int +rk_dwc3_probe(device_t dev) +{ + phandle_t node; + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) + return (ENXIO); + + /* Binding says that we need a child node for the actual dwc3 controller */ + node = ofw_bus_get_node(dev); + if (OF_child(node) <= 0) + return (ENXIO); + + device_set_desc(dev, "Rockchip RK3399 DWC3"); + return (BUS_PROBE_DEFAULT); +} + +static int +rk_dwc3_attach(device_t dev) +{ + struct rk_dwc3_softc *sc; + device_t cdev; + phandle_t node, child; + int err; + + sc = device_get_softc(dev); + sc->dev = dev; + node = ofw_bus_get_node(dev); + + /* Mandatory clocks */ + if (clk_get_by_ofw_name(dev, 0, "ref_clk", &sc->clk_ref) != 0) { + device_printf(dev, "Cannot get ref_clk clock\n"); + return (ENXIO); + } + err = clk_enable(sc->clk_ref); + if (err != 0) { + device_printf(dev, "Could not enable clock %s\n", + clk_get_name(sc->clk_ref)); + return (ENXIO); + } + if (clk_get_by_ofw_name(dev, 0, "suspend_clk", &sc->clk_suspend) != 0) { + device_printf(dev, "Cannot get suspend_clk clock\n"); + return (ENXIO); + } + err = clk_enable(sc->clk_suspend); + if (err != 0) { + device_printf(dev, "Could not enable clock %s\n", + clk_get_name(sc->clk_suspend)); + return (ENXIO); + } + if (clk_get_by_ofw_name(dev, 0, "bus_clk", &sc->clk_bus) != 0) { + device_printf(dev, "Cannot get bus_clk clock\n"); + return (ENXIO); + } + err = clk_enable(sc->clk_bus); + if (err != 0) { + device_printf(dev, "Could not enable clock %s\n", + clk_get_name(sc->clk_bus)); + return (ENXIO); + } + if (clk_get_by_ofw_name(dev, 0, "grf_clk", &sc->clk_grf) != 0) { + device_printf(dev, "Cannot get grf_clk clock\n"); + return (ENXIO); + } + err = clk_enable(sc->clk_grf); + if (err != 0) { + device_printf(dev, "Could not enable clock %s\n", + clk_get_name(sc->clk_grf)); + return (ENXIO); + } + + /* Optional clocks */ + if (clk_get_by_ofw_name(dev, 0, "aclk_usb3_rksoc_axi_perf", &sc->clk_axi_perf) == 0) { + err = clk_enable(sc->clk_axi_perf); + if (err != 0) { + device_printf(dev, "Could not enable clock %s\n", + clk_get_name(sc->clk_axi_perf)); + return (ENXIO); + } + } + if (clk_get_by_ofw_name(dev, 0, "aclk_usb3", &sc->clk_usb3) == 0) { + err = clk_enable(sc->clk_usb3); + if (err != 0) { + device_printf(dev, "Could not enable clock %s\n", + clk_get_name(sc->clk_usb3)); + return (ENXIO); + } + } + + /* Put module out of reset */ + if (hwreset_get_by_ofw_name(dev, node, "usb3-otg", &sc->rst_usb3) == 0) { + if (hwreset_deassert(sc->rst_usb3) != 0) { + device_printf(dev, "Cannot deassert reset\n"); + return (ENXIO); + } + } + + simplebus_init(dev, node); + if (simplebus_fill_ranges(node, &sc->sc) < 0) { + device_printf(dev, "could not get ranges\n"); + return (ENXIO); + } + + for (child = OF_child(node); child > 0; child = OF_peer(child)) { + cdev = simplebus_add_device(dev, child, 0, NULL, -1, NULL); + if (cdev != NULL) + device_probe_and_attach(cdev); + } + + return (bus_generic_attach(dev)); +} + +static device_method_t rk_dwc3_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, rk_dwc3_probe), + DEVMETHOD(device_attach, rk_dwc3_attach), + + DEVMETHOD_END +}; + +static devclass_t rk_dwc3_devclass; + +DEFINE_CLASS_1(rk_dwc3, rk_dwc3_driver, rk_dwc3_methods, + sizeof(struct rk_dwc3_softc), simplebus_driver); +DRIVER_MODULE(rk_dwc3, simplebus, rk_dwc3_driver, rk_dwc3_devclass, 0, 0); Modified: stable/12/sys/conf/files.arm64 ============================================================================== --- stable/12/sys/conf/files.arm64 Wed Mar 4 20:48:29 2020 (r358641) +++ stable/12/sys/conf/files.arm64 Wed Mar 4 20:52:59 2020 (r358642) @@ -279,6 +279,7 @@ cddl/dev/fbt/aarch64/fbt_isa.c optional dtrace_fbt # RockChip Drivers arm64/rockchip/rk3399_emmcphy.c optional fdt rk_emmcphy soc_rockchip_rk3399 +arm64/rockchip/rk_dwc3.c optional fdt rk_dwc3 soc_rockchip_rk3399 arm64/rockchip/rk_i2c.c optional fdt rk_i2c soc_rockchip_rk3328 | fdt rk_i2c soc_rockchip_rk3399 arm64/rockchip/rk805.c optional fdt rk805 soc_rockchip_rk3328 | fdt rk805 soc_rockchip_rk3399 arm64/rockchip/rk_grf.c optional fdt soc_rockchip_rk3328 | fdt soc_rockchip_rk3399 From owner-svn-src-stable@freebsd.org Wed Mar 4 21:01:25 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 E969A2510CA; Wed, 4 Mar 2020 21:01:25 +0000 (UTC) (envelope-from manu@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 48XmWn460sz3PpD; Wed, 4 Mar 2020 21:01:25 +0000 (UTC) (envelope-from manu@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 6F50C241ED; Wed, 4 Mar 2020 21:01:25 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 024L1PTD019850; Wed, 4 Mar 2020 21:01:25 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024L1PSW019848; Wed, 4 Mar 2020 21:01:25 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202003042101.024L1PSW019848@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 4 Mar 2020 21:01:25 +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: r358644 - in stable/12/sys: arm64/rockchip/clk conf dev/extres/clk X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in stable/12/sys: arm64/rockchip/clk conf dev/extres/clk X-SVN-Commit-Revision: 358644 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: Wed, 04 Mar 2020 21:01:26 -0000 Author: manu Date: Wed Mar 4 21:01:25 2020 New Revision: 358644 URL: https://svnweb.freebsd.org/changeset/base/358644 Log: MFC r354554-r354558, r355115 r354554 by mmel: Implement support for (soft)linked clocks. This kind of clock nodes represent temporary placeholder for clocks defined later in boot process. Also, these are necessary to break circular dependencies occasionally occurring in complex clock graphs. r354555 by mmel: Cleanup Rockchip clocks implementation. - style - unify dprinf defines - make dprinf's 32-bit compatible Not a functional change. Reviewed by: manu, imp Differential Revision: https://reviews.freebsd.org/D22281 r354556 by mmel: Enhance Rockchip clocks implementation. - add support for fractional dividers - allow to declare fixed and linked clock Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D22282 r354557 by mmel: Tidy up Rockchip composite clock. - add support for log2 based dividers - use proper write mask when writing to divider register Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D22283 r354558 by mmel: Remove explicit declaration of rk_clk_fract_set_freq() function forgotten in r354556. MFC with: r354556 Noticed by: manu r355115 by mmel: Finish implementation of RK3299 clocks. - implement of all but mmc clocks. MMC clocks will be added later by own commit. - use 'link' clock type for external clocks. - use macros for initialization of structure's named members. Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D22441 Added: stable/12/sys/arm64/rockchip/clk/rk3399_cru_dt.h - copied unchanged from r355115, head/sys/arm64/rockchip/clk/rk3399_cru_dt.h stable/12/sys/arm64/rockchip/clk/rk_clk_fract.c - copied unchanged from r354558, head/sys/arm64/rockchip/clk/rk_clk_fract.c stable/12/sys/arm64/rockchip/clk/rk_clk_fract.h - copied unchanged from r354558, head/sys/arm64/rockchip/clk/rk_clk_fract.h stable/12/sys/dev/extres/clk/clk_link.c - copied unchanged from r354558, head/sys/dev/extres/clk/clk_link.c stable/12/sys/dev/extres/clk/clk_link.h - copied unchanged from r354558, head/sys/dev/extres/clk/clk_link.h Modified: stable/12/sys/arm64/rockchip/clk/rk3399_cru.c stable/12/sys/arm64/rockchip/clk/rk_clk_armclk.c stable/12/sys/arm64/rockchip/clk/rk_clk_composite.c stable/12/sys/arm64/rockchip/clk/rk_clk_composite.h stable/12/sys/arm64/rockchip/clk/rk_clk_gate.c stable/12/sys/arm64/rockchip/clk/rk_clk_mux.c stable/12/sys/arm64/rockchip/clk/rk_clk_pll.c stable/12/sys/arm64/rockchip/clk/rk_cru.c stable/12/sys/arm64/rockchip/clk/rk_cru.h stable/12/sys/conf/files stable/12/sys/conf/files.arm64 stable/12/sys/dev/extres/clk/clk.c stable/12/sys/dev/extres/clk/clk.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm64/rockchip/clk/rk3399_cru.c ============================================================================== --- stable/12/sys/arm64/rockchip/clk/rk3399_cru.c Wed Mar 4 21:01:22 2020 (r358643) +++ stable/12/sys/arm64/rockchip/clk/rk3399_cru.c Wed Mar 4 21:01:25 2020 (r358644) @@ -50,1930 +50,1188 @@ __FBSDID("$FreeBSD$"); #include -/* GATES */ +#include -#define SCLK_USB2PHY0_REF 123 -#define SCLK_USB2PHY1_REF 124 -#define SCLK_USB3OTG0_REF 129 -#define SCLK_USB3OTG1_REF 130 -#define SCLK_USB3OTG0_SUSPEND 131 -#define SCLK_USB3OTG1_SUSPEND 132 -#define ACLK_EMMC_CORE 241 -#define ACLK_EMMC_NOC 242 -#define ACLK_EMMC_GRF 243 -#define ACLK_USB3_NOC 245 -#define ACLK_USB3OTG0 246 -#define ACLK_USB3OTG1 247 -#define ACLK_USB3_RKSOC_AXI_PERF 248 -#define ACLK_USB3_GRF 249 -#define PCLK_GPIO2 336 -#define PCLK_GPIO3 337 -#define PCLK_GPIO4 338 -#define PCLK_I2C1 341 -#define PCLK_I2C2 342 -#define PCLK_I2C3 343 -#define PCLK_I2C5 344 -#define PCLK_I2C6 345 -#define PCLK_I2C7 346 -#define PCLK_SPI0 347 -#define PCLK_SPI1 348 -#define PCLK_SPI2 349 -#define PCLK_SPI4 350 -#define PCLK_SPI5 351 -#define HCLK_HOST0 456 -#define HCLK_HOST0_ARB 457 -#define HCLK_HOST1 458 -#define HCLK_HOST1_ARB 459 -#define HCLK_SDMMC 462 +#define CRU_CLKSEL_CON(x) (0x100 + (x) * 0x4) +#define CRU_CLKGATE_CON(x) (0x300 + (x) * 0x4) + +/* GATES */ + static struct rk_cru_gate rk3399_gates[] = { /* CRU_CLKGATE_CON0 */ - CRU_GATE(0, "clk_core_l_lpll_src", "lpll", 0x300, 0) - CRU_GATE(0, "clk_core_l_bpll_src", "bpll", 0x300, 1) - CRU_GATE(0, "clk_core_l_dpll_src", "dpll", 0x300, 2) - CRU_GATE(0, "clk_core_l_gpll_src", "gpll", 0x300, 3) + /* 15-8 unused */ + GATE(SCLK_PVTM_CORE_L, "clk_pvtm_core_l", "xin24m", 0, 7), + GATE(0, "pclk_dbg_core_l", "pclk_dbg_core_l_c", 0, 6), + GATE(0, "atclk_core_l", "atclk_core_l_c", 0, 5), + GATE(0, "aclkm_core_l", "aclkm_core_l_c", 0, 4), + GATE(0, "clk_core_l_gpll_src", "gpll", 0, 3), + GATE(0, "clk_core_l_dpll_src", "dpll", 0, 2), + GATE(0, "clk_core_l_bpll_src", "bpll", 0, 1), + GATE(0, "clk_core_l_lpll_src", "lpll", 0, 0), /* CRU_CLKGATE_CON1 */ - CRU_GATE(0, "clk_core_b_lpll_src", "lpll", 0x304, 0) - CRU_GATE(0, "clk_core_b_bpll_src", "bpll", 0x304, 1) - CRU_GATE(0, "clk_core_b_dpll_src", "dpll", 0x304, 2) - CRU_GATE(0, "clk_core_b_gpll_src", "gpll", 0x304, 3) + /* 15 - 8 unused */ + GATE(SCLK_PVTM_CORE_B, "clk_pvtm_core_b", "xin24m", 1, 7), + GATE(0, "pclk_dbg_core_b","pclk_dbg_core_b_c", 1, 6), + GATE(0, "atclk_core_b", "atclk_core_b_c", 1, 5), + GATE(0, "aclkm_core_b", "aclkm_core_b_c", 1, 4), + GATE(0, "clk_core_b_gpll_src", "gpll", 1, 3), + GATE(0, "clk_core_b_dpll_src", "dpll", 1, 2), + GATE(0, "clk_core_b_bpll_src", "bpll", 1, 1), + GATE(0, "clk_core_b_lpll_src", "lpll", 1, 0), + /* CRU_CLKGATE_CON2 */ + /* 15 - 11 unused */ + GATE(0, "npll_cs", "npll", 2, 10), + GATE(0, "gpll_cs", "gpll", 2, 9), + GATE(0, "cpll_cs", "cpll", 2, 8), + GATE(SCLK_CCI_TRACE, "clk_cci_trace", "clk_cci_trace_c", 2, 7), + GATE(0, "gpll_cci_trace", "gpll", 2, 6), + GATE(0, "cpll_cci_trace", "cpll", 2, 5), + GATE(0, "aclk_cci_pre", "aclk_cci_pre_c", 2, 4), + GATE(0, "vpll_aclk_cci_src", "vpll", 2, 3), + GATE(0, "npll_aclk_cci_src", "npll", 2, 2), + GATE(0, "gpll_aclk_cci_src", "gpll", 2, 1), + GATE(0, "cpll_aclk_cci_src", "cpll", 2, 0), + + /* CRU_CLKGATE_CON3 */ + /* 15 - 8 unused */ + GATE(0, "aclk_center", "aclk_center_c", 3, 7), + /* 6 unused */ + /* 5 unused */ + GATE(PCLK_DDR, "pclk_ddr", "pclk_ddr_c", 3, 4), + GATE(0, "clk_ddrc_gpll_src", "gpll", 3, 3), + GATE(0, "clk_ddrc_dpll_src", "dpll", 3, 2), + GATE(0, "clk_ddrc_bpll_src", "bpll", 3, 1), + GATE(0, "clk_ddrc_lpll_src", "lpll", 3, 0), + + + /* CRU_CLKGATE_CON4 */ + /* 15 - 12 unused */ + GATE(SCLK_PVTM_DDR, "clk_pvtm_ddr", "xin24m", 4, 11), + GATE(0, "clk_rga_core", "clk_rga_core_c", 4, 10), + GATE(0, "hclk_rga_pre", "hclk_rga_pre_c", 4, 9), + GATE(0, "aclk_rga_pre", "aclk_rga_pre_c", 4, 8), + GATE(0, "hclk_iep_pre", "hclk_iep_pre_c", 4, 7), + GATE(0, "aclk_iep_pre", "aclk_iep_pre_c", 4, 6), + GATE(SCLK_VDU_CA, "clk_vdu_ca", "clk_vdu_ca_c", 4, 5), + GATE(SCLK_VDU_CORE, "clk_vdu_core", "clk_vdu_core_c", 4, 4), + GATE(0, "hclk_vdu_pre", "hclk_vdu_pre_c", 4, 3), + GATE(0, "aclk_vdu_pre", "aclk_vdu_pre_c", 4, 2), + GATE(0, "hclk_vcodec_pre", "hclk_vcodec_pre_c", 4, 1), + GATE(0, "aclk_vcodec_pre", "aclk_vcodec_pre_c", 4, 0), + /* CRU_CLKGATE_CON5 */ - CRU_GATE(0, "cpll_aclk_perihp_src", "cpll", 0x314, 0) - CRU_GATE(0, "gpll_aclk_perihp_src", "gpll", 0x314, 1) + /* 15 - 10 unused */ + GATE(SCLK_MAC_TX, "clk_rmii_tx", "clk_rmii_src", 5, 9), + GATE(SCLK_MAC_RX, "clk_rmii_rx", "clk_rmii_src", 5, 8), + GATE(SCLK_MACREF, "clk_mac_ref", "clk_rmii_src", 5, 7), + GATE(SCLK_MACREF_OUT, "clk_mac_refout", "clk_rmii_src", 5, 6), + GATE(SCLK_MAC, "clk_gmac", "clk_gmac_c", 5, 5), + GATE(PCLK_PERIHP, "pclk_perihp", "pclk_perihp_c", 5, 4), + GATE(HCLK_PERIHP, "hclk_perihp", "hclk_perihp_c", 5, 3), + GATE(ACLK_PERIHP, "aclk_perihp", "aclk_perihp_c", 5, 2), + GATE(0, "cpll_aclk_perihp_src", "cpll", 5, 1), + GATE(0, "gpll_aclk_perihp_src", "gpll", 5, 0), /* CRU_CLKGATE_CON6 */ - CRU_GATE(0, "gpll_aclk_emmc_src", "gpll", 0x318, 12) - CRU_GATE(0, "cpll_aclk_emmc_src", "cpll", 0x318, 13) - CRU_GATE(SCLK_USB2PHY0_REF, "clk_usb2phy0_ref", "xin24m", 0x318, 5) - CRU_GATE(SCLK_USB2PHY1_REF, "clk_usb2phy1_ref", "xin24m", 0x318, 6) + /* 15 unused */ + GATE(SCLK_EMMC, "clk_emmc", "clk_emmc_c", 6, 14), + GATE(0, "cpll_aclk_emmc_src", "cpll", 6, 13), + GATE(0, "gpll_aclk_emmc_src", "gpll", 6, 12), + GATE(0, "pclk_gmac_pre", "pclk_gmac_pre_c", 6, 11), + GATE(0, "aclk_gmac_pre", "aclk_gmac_pre_c", 6, 10), + GATE(0, "cpll_aclk_gmac_src", "cpll", 6, 9), + GATE(0, "gpll_aclk_gmac_src", "gpll", 6, 8), + /* 7 unused */ + GATE(SCLK_USB2PHY1_REF, "clk_usb2phy1_ref", "xin24m", 6, 6), + GATE(SCLK_USB2PHY0_REF, "clk_usb2phy0_ref", "xin24m", 6, 5), + GATE(SCLK_HSICPHY, "clk_hsicphy", "clk_hsicphy_c", 6, 4), + GATE(0, "clk_pcie_core_cru", "clk_pcie_core_cru_c", 6, 3), + GATE(SCLK_PCIE_PM, "clk_pcie_pm", "clk_pcie_pm_c", 6, 2), + GATE(SCLK_SDMMC, "clk_sdmmc", "clk_sdmmc_c", 6, 1), + GATE(SCLK_SDIO, "clk_sdio", "clk_sdio_c", 6, 0), /* CRU_CLKGATE_CON7 */ - CRU_GATE(0, "gpll_aclk_perilp0_src", "gpll", 0x31C, 0) - CRU_GATE(0, "cpll_aclk_perilp0_src", "cpll", 0x31C, 1) + /* 15 - 10 unused */ + GATE(FCLK_CM0S, "fclk_cm0s", "fclk_cm0s_c", 7, 9), + GATE(SCLK_CRYPTO1, "clk_crypto1", "clk_crypto1_c", 7, 8), + GATE(SCLK_CRYPTO0, "clk_crypto0", "clk_crypto0_c", 7, 7), + GATE(0, "cpll_fclk_cm0s_src", "cpll", 7, 6), + GATE(0, "gpll_fclk_cm0s_src", "gpll", 7, 5), + GATE(PCLK_PERILP0, "pclk_perilp0", "pclk_perilp0_c", 7, 4), + GATE(HCLK_PERILP0, "hclk_perilp0", "hclk_perilp0_c", 7, 3), + GATE(ACLK_PERILP0, "aclk_perilp0", "aclk_perilp0_c", 7, 2), + GATE(0, "cpll_aclk_perilp0_src", "cpll", 7, 1), + GATE(0, "gpll_aclk_perilp0_src", "gpll", 7, 0), /* CRU_CLKGATE_CON8 */ - CRU_GATE(0, "hclk_perilp1_cpll_src", "cpll", 0x320, 1) - CRU_GATE(0, "hclk_perilp1_gpll_src", "gpll", 0x320, 0) + GATE(SCLK_SPDIF_8CH, "clk_spdif", "clk_spdif_mux", 8, 15), + GATE(0, "clk_spdif_frac", "clk_spdif_frac_c", 8, 14), + GATE(0, "clk_spdif_div", "clk_spdif_div_c", 8, 13), + GATE(SCLK_I2S_8CH_OUT, "clk_i2sout", "clk_i2sout_c", 8, 12), + GATE(SCLK_I2S2_8CH, "clk_i2s2", "clk_i2s2_mux", 8, 11), + GATE(0, "clk_i2s2_frac", "clk_i2s2_frac_c", 8, 10), + GATE(0, "clk_i2s2_div", "clk_i2s2_div_c", 8, 9), + GATE(SCLK_I2S1_8CH, "clk_i2s1", "clk_i2s1_mux", 8, 8), + GATE(0, "clk_i2s1_frac", "clk_i2s1_frac_c", 8, 7), + GATE(0, "clk_i2s1_div", "clk_i2s1_div_c", 8, 6), + GATE(SCLK_I2S0_8CH, "clk_i2s0", "clk_i2s0_mux", 8, 5), + GATE(0, "clk_i2s0_frac","clk_i2s0_frac_c", 8, 4), + GATE(0, "clk_i2s0_div","clk_i2s0_div_c", 8, 3), + GATE(PCLK_PERILP1, "pclk_perilp1", "pclk_perilp1_c", 8, 2), + GATE(HCLK_PERILP1, "cpll_hclk_perilp1_src", "cpll", 8, 1), + GATE(0, "gpll_hclk_perilp1_src", "gpll", 8, 0), - /* CRU_CLKGATE_CON12 */ - CRU_GATE(SCLK_USB3OTG0_REF, "sclk_usb3otg0_ref", "xin24m", 0x330, 1) - CRU_GATE(SCLK_USB3OTG1_REF, "sclk_usb3otg1_ref", "xin24m", 0x330, 2) - CRU_GATE(SCLK_USB3OTG0_SUSPEND, "sclk_usb3otg0_suspend", "xin24m", 0x330, 3) - CRU_GATE(SCLK_USB3OTG1_SUSPEND, "sclk_usb3otg1_suspend", "xin24m", 0x330, 4) + /* CRU_CLKGATE_CON9 */ + GATE(SCLK_SPI4, "clk_spi4", "clk_spi4_c", 9, 15), + GATE(SCLK_SPI2, "clk_spi2", "clk_spi2_c", 9, 14), + GATE(SCLK_SPI1, "clk_spi1", "clk_spi1_c", 9, 13), + GATE(SCLK_SPI0, "clk_spi0", "clk_spi0_c", 9, 12), + GATE(SCLK_SARADC, "clk_saradc", "clk_saradc_c", 9, 11), + GATE(SCLK_TSADC, "clk_tsadc", "clk_tsadc_c", 9, 10), + /* 9 - 8 unused */ + GATE(0, "clk_uart3_frac", "clk_uart3_frac_c", 9, 7), + GATE(0, "clk_uart3_div", "clk_uart3_div_c", 9, 6), + GATE(0, "clk_uart2_frac", "clk_uart2_frac_c", 9, 5), + GATE(0, "clk_uart2_div", "clk_uart2_div_c", 9, 4), + GATE(0, "clk_uart1_frac", "clk_uart1_frac_c", 9, 3), + GATE(0, "clk_uart1_div", "clk_uart1_div_c", 9, 2), + GATE(0, "clk_uart0_frac", "clk_uart0_frac_c", 9, 1), + GATE(0, "clk_uart0_div", "clk_uart0_div_c", 9, 0), - /* CRU_CLKGATE_CON20 */ - CRU_GATE(HCLK_HOST0, "hclk_host0", "hclk_perihp", 0x350, 5) - CRU_GATE(HCLK_HOST0_ARB, "hclk_host0_arb", "hclk_perihp", 0x350, 6) - CRU_GATE(HCLK_HOST1, "hclk_host1", "hclk_perihp", 0x350, 7) - CRU_GATE(HCLK_HOST1_ARB, "hclk_host1_arb", "hclk_perihp", 0x350, 8) + /* CRU_CLKGATE_CON10 */ + GATE(SCLK_VOP1_PWM, "clk_vop1_pwm", "clk_vop1_pwm_c", 10, 15), + GATE(SCLK_VOP0_PWM, "clk_vop0_pwm", "clk_vop0_pwm_c", 10, 14), + GATE(DCLK_VOP0_DIV, "dclk_vop0_div", "dclk_vop0_div_c", 10, 12), + GATE(DCLK_VOP1_DIV, "dclk_vop1_div", "dclk_vop1_div_c", 10, 13), + GATE(0, "hclk_vop1_pre", "hclk_vop1_pre_c", 10, 11), + GATE(ACLK_VOP1_PRE, "aclk_vop1_pre", "aclk_vop1_pre_c", 10, 10), + GATE(0, "hclk_vop0_pre", "hclk_vop0_pre_c", 10, 9), + GATE(ACLK_VOP0_PRE, "aclk_vop0_pre", "aclk_vop0_pre_c", 10, 8), + GATE(0, "clk_cifout_src", "clk_cifout_src_c", 10, 7), + GATE(SCLK_SPDIF_REC_DPTX, "clk_spdif_rec_dptx", "clk_spdif_rec_dptx_c", 10, 6), + GATE(SCLK_I2C7, "clk_i2c7", "clk_i2c7_c", 10, 5), + GATE(SCLK_I2C3, "clk_i2c3", "clk_i2c3_c", 10, 4), + GATE(SCLK_I2C6, "clk_i2c6", "clk_i2c6_c", 10, 3), + GATE(SCLK_I2C2, "clk_i2c2", "clk_i2c2_c", 10, 2), + GATE(SCLK_I2C5, "clk_i2c5", "clk_i2c5_c", 10, 1), + GATE(SCLK_I2C1, "clk_i2c1", "clk_i2c1_c", 10, 0), - /* CRU_CLKGATE_CON22 */ - CRU_GATE(PCLK_I2C7, "pclk_rki2c7", "pclk_perilp1", 0x358, 5) - CRU_GATE(PCLK_I2C1, "pclk_rki2c1", "pclk_perilp1", 0x358, 6) - CRU_GATE(PCLK_I2C5, "pclk_rki2c5", "pclk_perilp1", 0x358, 7) - CRU_GATE(PCLK_I2C6, "pclk_rki2c6", "pclk_perilp1", 0x358, 8) - CRU_GATE(PCLK_I2C2, "pclk_rki2c2", "pclk_perilp1", 0x358, 9) - CRU_GATE(PCLK_I2C3, "pclk_rki2c3", "pclk_perilp1", 0x358, 10) - /* CRU_CLKGATE_CON23 */ - CRU_GATE(PCLK_SPI0, "pclk_spi0", "pclk_perilp1", 0x35C, 10) - CRU_GATE(PCLK_SPI1, "pclk_spi1", "pclk_perilp1", 0x35C, 11) - CRU_GATE(PCLK_SPI2, "pclk_spi2", "pclk_perilp1", 0x35C, 12) - CRU_GATE(PCLK_SPI4, "pclk_spi4", "pclk_perilp1", 0x35C, 13) + /* CRU_CLKGATE_CON11 */ + GATE(SCLK_MIPIDPHY_CFG, "clk_mipidphy_cfg", "xin24m", 11, 15), + GATE(SCLK_MIPIDPHY_REF, "clk_mipidphy_ref", "xin24m", 11, 14), + /* 13-12 unused */ + GATE(PCLK_EDP, "pclk_edp", "pclk_edp_c", 11, 11), + GATE(PCLK_HDCP, "pclk_hdcp", "pclk_hdcp_c", 11, 10), + /* 9 unuwsed */ + GATE(SCLK_DP_CORE, "clk_dp_core", "clk_dp_core_c", 11, 8), + GATE(SCLK_HDMI_CEC, "clk_hdmi_cec", "clk_hdmi_cec_c", 11, 7), + GATE(SCLK_HDMI_SFR, "clk_hdmi_sfr", "xin24m", 11, 6), + GATE(SCLK_ISP1, "clk_isp1", "clk_isp1_c", 11, 5), + GATE(SCLK_ISP0, "clk_isp0", "clk_isp0_c", 11, 4), + GATE(HCLK_HDCP, "hclk_hdcp", "hclk_hdcp_c", 11, 3), + GATE(ACLK_HDCP, "aclk_hdcp", "aclk_hdcp_c", 11, 2), + GATE(PCLK_VIO, "pclk_vio", "pclk_vio_c", 11, 1), + GATE(ACLK_VIO, "aclk_vio", "aclk_vio_c", 11, 0), - /* CRU_CLKGATE_CON30 */ - CRU_GATE(ACLK_USB3_NOC, "aclk_usb3_noc", "aclk_usb3", 0x378, 0) - CRU_GATE(ACLK_USB3OTG0, "aclk_usb3otg0", "aclk_usb3", 0x378, 1) - CRU_GATE(ACLK_USB3OTG1, "aclk_usb3otg1", "aclk_usb3", 0x378, 2) - CRU_GATE(ACLK_USB3_RKSOC_AXI_PERF, "aclk_usb3_rksoc_axi_perf", "aclk_usb3", 0x378, 3) - CRU_GATE(ACLK_USB3_GRF, "aclk_usb3_grf", "aclk_usb3", 0x378, 4) + /* CRU_CLKGATE_CON12 */ + /* 15 - 14 unused */ + GATE(HCLK_SD, "hclk_sd", "hclk_sd_c", 12, 13), + GATE(ACLK_GIC_PRE, "aclk_gic_pre", "aclk_gic_pre_c", 12, 12), + GATE(HCLK_ISP1, "hclk_isp1", "hclk_isp1_c", 12, 11), + GATE(ACLK_ISP1, "aclk_isp1", "aclk_isp1_c", 12, 10), + GATE(HCLK_ISP0, "hclk_isp0", "hclk_isp0_c", 12, 9), + GATE(ACLK_ISP0, "aclk_isp0", "aclk_isp0_c", 12, 8), + /* 7 unused */ + GATE(SCLK_PCIEPHY_REF100M, "clk_pciephy_ref100m", "clk_pciephy_ref100m_c", 12, 6), + /* 5 unused */ + GATE(SCLK_USB3OTG1_SUSPEND, "clk_usb3otg1_suspend", "clk_usb3otg1_suspend_c", 12, 4), + GATE(SCLK_USB3OTG0_SUSPEND, "clk_usb3otg0_suspend", "clk_usb3otg0_suspend_c", 12, 3), + GATE(SCLK_USB3OTG1_REF, "clk_usb3otg1_ref", "xin24m", 12, 2), + GATE(SCLK_USB3OTG0_REF, "clk_usb3otg0_ref", "xin24m", 12, 1), + GATE(ACLK_USB3, "aclk_usb3", "aclk_usb3_c", 12, 0), - /* CRU_CLKGATE_CON31 */ - CRU_GATE(PCLK_GPIO2, "pclk_gpio2", "pclk_alive", 0x37c, 3) - CRU_GATE(PCLK_GPIO3, "pclk_gpio3", "pclk_alive", 0x37c, 4) - CRU_GATE(PCLK_GPIO4, "pclk_gpio4", "pclk_alive", 0x37c, 5) + /* CRU_CLKGATE_CON13 */ + GATE(SCLK_TESTCLKOUT2, "clk_testout2", "clk_testout2_c", 13, 15), + GATE(SCLK_TESTCLKOUT1, "clk_testout1", "clk_testout1_c", 13, 14), + GATE(SCLK_SPI5, "clk_spi5", "clk_spi5_c", 13, 13), + GATE(0, "clk_usbphy0_480m_src", "clk_usbphy0_480m", 13, 12), + GATE(0, "clk_usbphy1_480m_src", "clk_usbphy1_480m", 13, 12), + GATE(0, "clk_test", "clk_test_c", 13, 11), + /* 10 unused */ + GATE(0, "clk_test_frac", "clk_test_frac_c", 13, 9), + /* 8 unused */ + GATE(SCLK_UPHY1_TCPDCORE, "clk_uphy1_tcpdcore", "clk_uphy1_tcpdcore_c", 13, 7), + GATE(SCLK_UPHY1_TCPDPHY_REF, "clk_uphy1_tcpdphy_ref", "clk_uphy1_tcpdphy_ref_c", 13, 6), + GATE(SCLK_UPHY0_TCPDCORE, "clk_uphy0_tcpdcore", "clk_uphy0_tcpdcore_c", 13, 5), + GATE(SCLK_UPHY0_TCPDPHY_REF, "clk_uphy0_tcpdphy_ref", "clk_uphy0_tcpdphy_ref_c", 13, 4), + /* 3 - 2 unused */ + GATE(SCLK_PVTM_GPU, "aclk_pvtm_gpu", "xin24m", 13, 1), + GATE(0, "aclk_gpu_pre", "aclk_gpu_pre_c", 13, 0), - /* CRU_CLKGATE_CON32 */ - CRU_GATE(ACLK_EMMC_CORE, "aclk_emmccore", "aclk_emmc", 0x380, 8) - CRU_GATE(ACLK_EMMC_NOC, "aclk_emmc_noc", "aclk_emmc", 0x380, 9) - CRU_GATE(ACLK_EMMC_GRF, "aclk_emmcgrf", "aclk_emmc", 0x380, 10) + /* CRU_CLKGATE_CON14 */ + /* 15 - 14 unused */ + GATE(ACLK_PERF_CORE_L, "aclk_perf_core_l", "aclkm_core_l", 14, 13), + GATE(ACLK_CORE_ADB400_CORE_L_2_CCI500, "aclk_core_adb400_core_l_2_cci500", "aclkm_core_l", 14, 12), + GATE(ACLK_GIC_ADB400_CORE_L_2_GIC, "aclk_core_adb400_core_l_2_gic", "armclkl", 14, 11), + GATE(ACLK_GIC_ADB400_GIC_2_CORE_L, "aclk_core_adb400_gic_2_core_l", "armclkl", 14, 10), + GATE(0, "clk_dbg_pd_core_l", "armclkl", 14, 9), + /* 8 - 7 unused */ + GATE(ACLK_PERF_CORE_B, "aclk_perf_core_b", "aclkm_core_b", 14, 6), + GATE(ACLK_CORE_ADB400_CORE_B_2_CCI500, "aclk_core_adb400_core_b_2_cci500", "aclkm_core_b", 14, 5), + GATE(ACLK_GIC_ADB400_CORE_B_2_GIC, "aclk_core_adb400_core_b_2_gic", "armclkb", 14, 4), + GATE(ACLK_GIC_ADB400_GIC_2_CORE_B, "aclk_core_adb400_gic_2_core_b", "armclkb", 14, 3), + GATE(0, "pclk_dbg_cxcs_pd_core_b", "pclk_dbg_core_b", 14, 2), + GATE(0, "clk_dbg_pd_core_b", "armclkb", 14, 1), + /* 0 unused */ - /* CRU_CLKGATE_CON33 */ - CRU_GATE(HCLK_SDMMC, "hclk_sdmmc", "hclk_sd", 0x384, 8) + /* CRU_CLKGATE_CON15 */ + /* 15 - 8 unused */ + GATE(ACLK_CCI_GRF, "aclk_cci_grf", "aclk_cci_pre", 15, 7), + GATE(0, "clk_dbg_noc", "clk_cs", 15, 6), + GATE(0, "clk_dbg_cxcs", "clk_cs", 15, 5), + GATE(ACLK_CCI_NOC1, "aclk_cci_noc1", "aclk_cci_pre", 15, 4), + GATE(ACLK_CCI_NOC0, "aclk_cci_noc0", "aclk_cci_pre", 15, 3), + GATE(ACLK_CCI, "aclk_cci", "aclk_cci_pre", 15, 2), + GATE(ACLK_ADB400M_PD_CORE_B, "aclk_adb400m_pd_core_b", "aclk_cci_pre", 15, 1), + GATE(ACLK_ADB400M_PD_CORE_L, "aclk_adb400m_pd_core_l", "aclk_cci_pre", 15, 0), - /* CRU_CLKGATE_CON34 */ - CRU_GATE(PCLK_SPI4, "pclk_spi5", "pclk_perilp1", 0x388, 5) -}; + /* CRU_CLKGATE_CON16 */ + /* 15 - 12 unused */ + GATE(HCLK_RGA_NOC, "hclk_rga_noc", "hclk_rga_pre", 16, 11), + GATE(HCLK_RGA, "hclk_rga", "hclk_rga_pre", 16, 10), + GATE(ACLK_RGA_NOC, "aclk_rga_noc", "aclk_rga_pre", 16, 9), + GATE(ACLK_RGA, "aclk_rga", "aclk_rga_pre", 16, 8), + /* 7 - 4 unused */ + GATE(HCLK_IEP_NOC, "hclk_iep_noc", "hclk_iep_pre", 16, 3), + GATE(HCLK_IEP, "hclk_iep", "hclk_iep_pre", 16, 2), + GATE(ACLK_IEP_NOC, "aclk_iep_noc", "aclk_iep_pre", 16, 1), + GATE(ACLK_IEP, "aclk_iep", "aclk_iep_pre", 16, 0), -/* - * PLLs - */ + /* CRU_CLKGATE_CON17 */ + /* 15 - 12 unused */ + GATE(HCLK_VDU_NOC, "hclk_vdu_noc", "hclk_vdu_pre", 17, 11), + GATE(HCLK_VDU, "hclk_vdu", "hclk_vdu_pre", 17, 10), + GATE(ACLK_VDU_NOC, "aclk_vdu_noc", "aclk_vdu_pre", 17, 9), + GATE(ACLK_VDU, "aclk_vdu", "aclk_vdu_pre", 17, 8), + GATE(0, "hclk_vcodec_noc", "hclk_vcodec_pre", 17, 3), + GATE(HCLK_VCODEC, "hclk_vcodec", "hclk_vcodec_pre", 17, 2), + GATE(0, "aclk_vcodec_noc", "aclk_vcodec_pre", 17, 1), + GATE(ACLK_VCODEC, "aclk_vcodec", "aclk_vcodec_pre", 17, 0), -#define PLL_APLLL 1 -#define PLL_APLLB 2 -#define PLL_DPLL 3 -#define PLL_CPLL 4 -#define PLL_GPLL 5 -#define PLL_NPLL 6 -#define PLL_VPLL 7 + /* CRU_CLKGATE_CON18 */ + GATE(PCLK_CIC, "pclk_cic", "pclk_ddr", 18, 15), + GATE(0, "clk_ddr_mon_timer", "xin24m", 18, 14), + GATE(0, "clk_ddr_mon", "clk_ddrc_div2", 18, 13), + GATE(PCLK_DDR_MON, "pclk_ddr_mon", "pclk_ddr", 18, 12), + GATE(0, "clk_ddr_cic", "clk_ddrc_div2", 18, 11), + GATE(PCLK_CENTER_MAIN_NOC, "pclk_center_main_noc", "pclk_ddr", 18, 10), + GATE(0, "clk_ddrcfg_msch1", "clk_ddrc_div2", 18, 9), + GATE(0, "clk_ddrphy1", "clk_ddrc_div2", 18, 8), + GATE(0, "clk_ddrphy_ctrl1", "clk_ddrc_div2", 18, 7), + GATE(0, "clk_ddrc1", "clk_ddrc_div2", 18, 6), + GATE(0, "clk_ddr1_msch", "clk_ddrc_div2", 18, 5), + GATE(0, "clk_ddrcfg_msch0", "clk_ddrc_div2", 18, 4), + GATE(0, "clk_ddrphy0", "clk_ddrc_div2", 18, 3), + GATE(0, "clk_ddrphy_ctrl0", "clk_ddrc_div2", 18, 2), + GATE(0, "clk_ddrc0", "clk_ddrc_div2", 18, 1), -static struct rk_clk_pll_rate rk3399_pll_rates[] = { - { - .freq = 2208000000, - .refdiv = 1, - .fbdiv = 92, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 2184000000, - .refdiv = 1, - .fbdiv = 91, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 2160000000, - .refdiv = 1, - .fbdiv = 90, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 2136000000, - .refdiv = 1, - .fbdiv = 89, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 2112000000, - .refdiv = 1, - .fbdiv = 88, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 2088000000, - .refdiv = 1, - .fbdiv = 87, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 2064000000, - .refdiv = 1, - .fbdiv = 86, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 2040000000, - .refdiv = 1, - .fbdiv = 85, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 2016000000, - .refdiv = 1, - .fbdiv = 84, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1992000000, - .refdiv = 1, - .fbdiv = 83, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1968000000, - .refdiv = 1, - .fbdiv = 82, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1944000000, - .refdiv = 1, - .fbdiv = 81, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1920000000, - .refdiv = 1, - .fbdiv = 80, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1896000000, - .refdiv = 1, - .fbdiv = 79, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1872000000, - .refdiv = 1, - .fbdiv = 78, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1848000000, - .refdiv = 1, - .fbdiv = 77, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1824000000, - .refdiv = 1, - .fbdiv = 76, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1800000000, - .refdiv = 1, - .fbdiv = 75, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1776000000, - .refdiv = 1, - .fbdiv = 74, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1752000000, - .refdiv = 1, - .fbdiv = 73, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1728000000, - .refdiv = 1, - .fbdiv = 72, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1704000000, - .refdiv = 1, - .fbdiv = 71, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1680000000, - .refdiv = 1, - .fbdiv = 70, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1656000000, - .refdiv = 1, - .fbdiv = 69, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1632000000, - .refdiv = 1, - .fbdiv = 68, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1608000000, - .refdiv = 1, - .fbdiv = 67, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1600000000, - .refdiv = 3, - .fbdiv = 200, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1584000000, - .refdiv = 1, - .fbdiv = 66, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1560000000, - .refdiv = 1, - .fbdiv = 65, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1536000000, - .refdiv = 1, - .fbdiv = 64, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1512000000, - .refdiv = 1, - .fbdiv = 63, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1488000000, - .refdiv = 1, - .fbdiv = 62, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1464000000, - .refdiv = 1, - .fbdiv = 61, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1440000000, - .refdiv = 1, - .fbdiv = 60, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1416000000, - .refdiv = 1, - .fbdiv = 59, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1392000000, - .refdiv = 1, - .fbdiv = 58, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1368000000, - .refdiv = 1, - .fbdiv = 57, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1344000000, - .refdiv = 1, - .fbdiv = 56, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1320000000, - .refdiv = 1, - .fbdiv = 55, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1296000000, - .refdiv = 1, - .fbdiv = 54, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1272000000, - .refdiv = 1, - .fbdiv = 53, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1248000000, - .refdiv = 1, - .fbdiv = 52, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1200000000, - .refdiv = 1, - .fbdiv = 50, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1188000000, - .refdiv = 2, - .fbdiv = 99, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1104000000, - .refdiv = 1, - .fbdiv = 46, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1100000000, - .refdiv = 12, - .fbdiv = 550, - .postdiv1 = 1, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1008000000, - .refdiv = 1, - .fbdiv = 84, - .postdiv1 = 2, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 1000000000, - .refdiv = 1, - .fbdiv = 125, - .postdiv1 = 3, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 984000000, - .refdiv = 1, - .fbdiv = 82, - .postdiv1 = 2, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 960000000, - .refdiv = 1, - .fbdiv = 80, - .postdiv1 = 2, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 936000000, - .refdiv = 1, - .fbdiv = 78, - .postdiv1 = 2, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 912000000, - .refdiv = 1, - .fbdiv = 76, - .postdiv1 = 2, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 900000000, - .refdiv = 4, - .fbdiv = 300, - .postdiv1 = 2, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 888000000, - .refdiv = 1, - .fbdiv = 74, - .postdiv1 = 2, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 864000000, - .refdiv = 1, - .fbdiv = 72, - .postdiv1 = 2, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 840000000, - .refdiv = 1, - .fbdiv = 70, - .postdiv1 = 2, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 816000000, - .refdiv = 1, - .fbdiv = 68, - .postdiv1 = 2, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 800000000, - .refdiv = 1, - .fbdiv = 100, - .postdiv1 = 3, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 700000000, - .refdiv = 6, - .fbdiv = 350, - .postdiv1 = 2, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 696000000, - .refdiv = 1, - .fbdiv = 58, - .postdiv1 = 2, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 676000000, - .refdiv = 3, - .fbdiv = 169, - .postdiv1 = 2, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 600000000, - .refdiv = 1, - .fbdiv = 75, - .postdiv1 = 3, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 594000000, - .refdiv = 1, - .fbdiv = 99, - .postdiv1 = 4, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 533250000, - .refdiv = 8, - .fbdiv = 711, - .postdiv1 = 4, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 504000000, - .refdiv = 1, - .fbdiv = 63, - .postdiv1 = 3, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 500000000, - .refdiv = 6, - .fbdiv = 250, - .postdiv1 = 2, - .postdiv2 = 1, - .dsmpd = 1, - }, - { - .freq = 408000000, - .refdiv = 1, - .fbdiv = 68, - .postdiv1 = 2, - .postdiv2 = 2, - .dsmpd = 1, - }, - { - .freq = 312000000, - .refdiv = 1, - .fbdiv = 52, - .postdiv1 = 2, - .postdiv2 = 2, - .dsmpd = 1, - }, - { - .freq = 297000000, - .refdiv = 1, - .fbdiv = 99, - .postdiv1 = 4, - .postdiv2 = 2, - .dsmpd = 1, - }, - { - .freq = 216000000, - .refdiv = 1, - .fbdiv = 72, - .postdiv1 = 4, - .postdiv2 = 2, - .dsmpd = 1, - }, - { - .freq = 148500000, - .refdiv = 1, - .fbdiv = 99, - .postdiv1 = 4, - .postdiv2 = 4, - .dsmpd = 1, - }, - { - .freq = 106500000, - .refdiv = 1, - .fbdiv = 71, - .postdiv1 = 4, - .postdiv2 = 4, - .dsmpd = 1, - }, - { - .freq = 96000000, - .refdiv = 1, - .fbdiv = 64, - .postdiv1 = 4, - .postdiv2 = 4, - .dsmpd = 1, - }, - { - .freq = 74250000, - .refdiv = 2, - .fbdiv = 99, - .postdiv1 = 4, - .postdiv2 = 4, - .dsmpd = 1, - }, - { - .freq = 65000000, - .refdiv = 1, - .fbdiv = 65, - .postdiv1 = 6, - .postdiv2 = 4, - .dsmpd = 1, - }, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@freebsd.org Wed Mar 4 21:04:59 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 6472B25141A; Wed, 4 Mar 2020 21:04:59 +0000 (UTC) (envelope-from manu@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 48Xmbv0nZ1z3wfG; Wed, 4 Mar 2020 21:04:59 +0000 (UTC) (envelope-from manu@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 164C124256; Wed, 4 Mar 2020 21:04:59 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 024L4w3s023876; Wed, 4 Mar 2020 21:04:58 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024L4wKb023872; Wed, 4 Mar 2020 21:04:58 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202003042104.024L4wKb023872@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 4 Mar 2020 21:04:58 +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: r358645 - in stable/12/sys: arm64/rockchip arm64/rockchip/clk conf X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in stable/12/sys: arm64/rockchip arm64/rockchip/clk conf X-SVN-Commit-Revision: 358645 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: Wed, 04 Mar 2020 21:04:59 -0000 Author: manu Date: Wed Mar 4 21:04:57 2020 New Revision: 358645 URL: https://svnweb.freebsd.org/changeset/base/358645 Log: MFC r355173, r355190-r355191 r355173 by mmel: Add driver for temperature sensors found in RK32898, RK3328 and RK3399 SoC's. Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D22442 r355190: arm64: rockchip: tsadc: Do not free the sysctl context is it wasn't created X-MFC-With: r355173 r355191: arm64: rockchip: rk3328: Add TSADC clocks Add the clocks so we can use the rk_tsadc driver to monitor the cpu temperature. Added: stable/12/sys/arm64/rockchip/rk_tsadc.c - copied, changed from r355173, head/sys/arm64/rockchip/rk_tsadc.c stable/12/sys/arm64/rockchip/rk_tsadc_if.m - copied unchanged from r355173, head/sys/arm64/rockchip/rk_tsadc_if.m Modified: stable/12/sys/arm64/rockchip/clk/rk3328_cru.c stable/12/sys/conf/files.arm64 Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm64/rockchip/clk/rk3328_cru.c ============================================================================== --- stable/12/sys/arm64/rockchip/clk/rk3328_cru.c Wed Mar 4 21:01:25 2020 (r358644) +++ stable/12/sys/arm64/rockchip/clk/rk3328_cru.c Wed Mar 4 21:04:57 2020 (r358645) @@ -61,6 +61,7 @@ __FBSDID("$FreeBSD$"); #define PCLK_I2C1 206 #define PCLK_I2C2 207 #define PCLK_I2C3 208 +#define PCLK_TSADC 213 #define HCLK_SDMMC 317 #define HCLK_SDIO 318 #define HCLK_EMMC 319 @@ -91,6 +92,8 @@ static struct rk_cru_gate rk3328_gates[] = { CRU_GATE(PCLK_I2C1, "pclk_i2c1", "pclk_bus", 0x23C, 0) CRU_GATE(PCLK_I2C2, "pclk_i2c2", "pclk_bus", 0x23C, 1) CRU_GATE(PCLK_I2C3, "pclk_i2c3", "pclk_bus", 0x23C, 2) + CRU_GATE(PCLK_TSADC, "pclk_tsadc", "pclk_bus", 0x23C, 14) + CRU_GATE(PCLK_GPIO0, "pclk_gpio0", "pclk_bus", 0x240, 7) CRU_GATE(PCLK_GPIO1, "pclk_gpio1", "pclk_bus", 0x240, 8) CRU_GATE(PCLK_GPIO2, "pclk_gpio2", "pclk_bus", 0x240, 9) @@ -731,6 +734,22 @@ static struct rk_clk_composite_def pclk_bus_pre = { .flags = RK_CLK_COMPOSITE_HAVE_GATE, }; +/* CRU_CLKSEL_CON22 */ + +#define SCLK_TSADC 36 + +static const char *clk_tsadc_parents[] = {"xin24m"}; +static struct rk_clk_composite_def clk_tsadc = { + .clkdef = { + .id = SCLK_TSADC, + .name = "clk_tsadc", + .parent_names = clk_tsadc_parents, + .parent_cnt = nitems(clk_tsadc_parents), + }, + .div_shift = 0, + .div_width = 9, +}; + /* CRU_CLKSEL_CON28 */ #define ACLK_PERI_PRE 137 @@ -1011,6 +1030,10 @@ static struct rk_clk rk3328_clks[] = { .clk.armclk = &armclk, }, + { + .type = RK_CLK_COMPOSITE, + .clk.composite = &clk_tsadc, + }, { .type = RK_CLK_COMPOSITE, .clk.composite = &aclk_peri_pre, Copied and modified: stable/12/sys/arm64/rockchip/rk_tsadc.c (from r355173, head/sys/arm64/rockchip/rk_tsadc.c) ============================================================================== --- head/sys/arm64/rockchip/rk_tsadc.c Thu Nov 28 17:01:31 2019 (r355173, copy source) +++ stable/12/sys/arm64/rockchip/rk_tsadc.c Wed Mar 4 21:04:57 2020 (r358645) @@ -728,16 +728,17 @@ tsadc_attach(device_t dev) rv = tsadc_init_sysctl(sc); if (rv != 0) { device_printf(sc->dev, "Cannot initialize sysctls\n"); - goto fail; + goto fail_sysctl; } OF_device_register_xref(OF_xref_from_node(node), dev); return (bus_generic_attach(dev)); +fail_sysctl: + sysctl_ctx_free(&tsadc_sysctl_ctx); fail: if (sc->irq_ih != NULL) bus_teardown_intr(dev, sc->irq_res, sc->irq_ih); - sysctl_ctx_free(&tsadc_sysctl_ctx); if (sc->tsadc_clk != NULL) clk_release(sc->tsadc_clk); if (sc->apb_pclk_clk != NULL) Copied: stable/12/sys/arm64/rockchip/rk_tsadc_if.m (from r355173, head/sys/arm64/rockchip/rk_tsadc_if.m) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/arm64/rockchip/rk_tsadc_if.m Wed Mar 4 21:04:57 2020 (r358645, copy of r355173, head/sys/arm64/rockchip/rk_tsadc_if.m) @@ -0,0 +1,43 @@ +#- +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# +# Copyright (c) 2019 Michal Meloun +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +#include + +INTERFACE rk_tsadc; + + +/** + * Read temperature + */ +METHOD int get_temperature{ + device_t dev; + device_t consumer; + uintptr_t id; + int *val; +}; Modified: stable/12/sys/conf/files.arm64 ============================================================================== --- stable/12/sys/conf/files.arm64 Wed Mar 4 21:01:25 2020 (r358644) +++ stable/12/sys/conf/files.arm64 Wed Mar 4 21:04:57 2020 (r358645) @@ -289,6 +289,8 @@ arm64/rockchip/rk_spi.c optional fdt rk_spi arm64/rockchip/rk_usb2phy.c optional fdt rk_usb2phy soc_rockchip_rk3328 | soc_rockchip_rk3399 arm64/rockchip/rk_typec_phy.c optional fdt rk_typec_phy soc_rockchip_rk3399 arm64/rockchip/if_dwc_rk.c optional fdt dwc_rk soc_rockchip_rk3328 | fdt dwc_rk soc_rockchip_rk3399 +arm64/rockchip/rk_tsadc_if.m optional fdt soc_rockchip_rk3399 +arm64/rockchip/rk_tsadc.c optional fdt soc_rockchip_rk3399 dev/dwc/if_dwc.c optional fdt dwc_rk soc_rockchip_rk3328 | fdt dwc_rk soc_rockchip_rk3399 dev/dwc/if_dwc_if.m optional fdt dwc_rk soc_rockchip_rk3328 | fdt dwc_rk soc_rockchip_rk3399 From owner-svn-src-stable@freebsd.org Wed Mar 4 21:06:30 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 17CD32514FC; Wed, 4 Mar 2020 21:06:30 +0000 (UTC) (envelope-from manu@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 48Xmdd6yzsz3xJh; Wed, 4 Mar 2020 21:06:29 +0000 (UTC) (envelope-from manu@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 D230E24266; Wed, 4 Mar 2020 21:06:29 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 024L6Txm024146; Wed, 4 Mar 2020 21:06:29 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024L6TYQ024143; Wed, 4 Mar 2020 21:06:29 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202003042106.024L6TYQ024143@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 4 Mar 2020 21:06:29 +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: r358646 - stable/12/sys/arm64/rockchip/clk X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: stable/12/sys/arm64/rockchip/clk X-SVN-Commit-Revision: 358646 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: Wed, 04 Mar 2020 21:06:30 -0000 Author: manu Date: Wed Mar 4 21:06:29 2020 New Revision: 358646 URL: https://svnweb.freebsd.org/changeset/base/358646 Log: MFC r355356: arm64: rockchip: rl3399: Remove the ability to put the PLL in normal mode at boot RK3399 PLLs have three modes : - Normal, where they behave normally and their freq is calculated based on the registers values. - Slow, where the PLL freq is 24Mhz (well, the external oscillator). - Deep Slow, used for suspend where the freq is 32Khz. We used to put every CPU related PLL in normal mode but it can cause problem if the firmware didn't setup the clocks register correctly. And even if it did but left the pll in slow or deep slow mode that might be because the PMIC suppling voltage for the CPU haven't been configured yet and we cannot do that at this point. So remove the ability to set PLLs to normal mode at boot to avoid any problems. Modified: stable/12/sys/arm64/rockchip/clk/rk3399_cru.c stable/12/sys/arm64/rockchip/clk/rk_clk_pll.c stable/12/sys/arm64/rockchip/clk/rk_clk_pll.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm64/rockchip/clk/rk3399_cru.c ============================================================================== --- stable/12/sys/arm64/rockchip/clk/rk3399_cru.c Wed Mar 4 21:04:57 2020 (r358645) +++ stable/12/sys/arm64/rockchip/clk/rk3399_cru.c Wed Mar 4 21:06:29 2020 (r358646) @@ -692,7 +692,7 @@ static struct rk_clk_armclk_rates rk3399_cpu_b_rates[] /* Standard PLL. */ -#define PLL(_id, _name, _base, _nm) \ +#define PLL(_id, _name, _base) \ { \ .type = RK3399_CLK_PLL, \ .clk.pll = &(struct rk_clk_pll_def) { \ @@ -703,7 +703,6 @@ static struct rk_clk_armclk_rates rk3399_cpu_b_rates[] .clkdef.flags = CLK_NODE_STATIC_STRINGS, \ .base_offset = _base, \ .rates = rk3399_pll_rates, \ - .normal_mode = _nm \ }, \ } @@ -796,13 +795,13 @@ static struct rk_clk rk3399_clks[] = { FFACT(0, "clk_ddrc_div2", "clk_ddrc", 1, 2), /* PLLs */ - PLL(PLL_APLLL, "lpll", 0x00, false), - PLL(PLL_APLLB, "bpll", 0x20, true), - PLL(PLL_DPLL, "dpll", 0x40, false), - PLL(PLL_CPLL, "cpll", 0x60, false), - PLL(PLL_GPLL, "gpll", 0x80, false), - PLL(PLL_NPLL, "npll", 0xA0, false), - PLL(PLL_VPLL, "vpll", 0xC0, false), + PLL(PLL_APLLL, "lpll", 0x00), + PLL(PLL_APLLB, "bpll", 0x20), + PLL(PLL_DPLL, "dpll", 0x40), + PLL(PLL_CPLL, "cpll", 0x60), + PLL(PLL_GPLL, "gpll", 0x80), + PLL(PLL_NPLL, "npll", 0xA0), + PLL(PLL_VPLL, "vpll", 0xC0), /* CRU_CLKSEL_CON0 */ CDIV(0, "aclkm_core_l_c", "armclkl", 0, Modified: stable/12/sys/arm64/rockchip/clk/rk_clk_pll.c ============================================================================== --- stable/12/sys/arm64/rockchip/clk/rk_clk_pll.c Wed Mar 4 21:04:57 2020 (r358645) +++ stable/12/sys/arm64/rockchip/clk/rk_clk_pll.c Wed Mar 4 21:06:29 2020 (r358646) @@ -54,8 +54,6 @@ struct rk_clk_pll_sc { struct rk_clk_pll_rate *rates; struct rk_clk_pll_rate *frac_rates; - - bool normal_mode; }; #define WRITE4(_clk, off, val) \ @@ -346,18 +344,8 @@ static int rk3399_clk_pll_init(struct clknode *clk, device_t dev) { struct rk_clk_pll_sc *sc; - uint32_t reg; sc = clknode_get_softc(clk); - - if (sc->normal_mode) { - /* Setting to normal mode */ - reg = RK3399_CLK_PLL_MODE_NORMAL << RK3399_CLK_PLL_MODE_SHIFT; - reg |= RK3399_CLK_PLL_MODE_MASK << RK_CLK_PLL_MASK_SHIFT; - WRITE4(clk, sc->base_offset + RK3399_CLK_PLL_MODE_OFFSET, - reg | RK3399_CLK_PLL_WRITE_MASK); - } - clknode_init_parent_idx(clk, 0); return (0); @@ -549,7 +537,6 @@ rk3399_clk_pll_register(struct clkdom *clkdom, struct sc->flags = clkdef->flags; sc->rates = clkdef->rates; sc->frac_rates = clkdef->frac_rates; - sc->normal_mode = clkdef->normal_mode; clknode_register(clkdom, clk); Modified: stable/12/sys/arm64/rockchip/clk/rk_clk_pll.h ============================================================================== --- stable/12/sys/arm64/rockchip/clk/rk_clk_pll.h Wed Mar 4 21:04:57 2020 (r358645) +++ stable/12/sys/arm64/rockchip/clk/rk_clk_pll.h Wed Mar 4 21:06:29 2020 (r358646) @@ -57,8 +57,6 @@ struct rk_clk_pll_def { struct rk_clk_pll_rate *rates; struct rk_clk_pll_rate *frac_rates; - - bool normal_mode; }; #define RK_CLK_PLL_HAVE_GATE 0x1 From owner-svn-src-stable@freebsd.org Wed Mar 4 21:12:09 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 C901B25190F; Wed, 4 Mar 2020 21:12:09 +0000 (UTC) (envelope-from manu@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 48Xmm93dPTz4C5y; Wed, 4 Mar 2020 21:12:09 +0000 (UTC) (envelope-from manu@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 5EE2F24425; Wed, 4 Mar 2020 21:12:09 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 024LC9kA029930; Wed, 4 Mar 2020 21:12:09 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024LC8sn029928; Wed, 4 Mar 2020 21:12:08 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202003042112.024LC8sn029928@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 4 Mar 2020 21:12:08 +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: r358647 - in stable/12/sys/arm64/rockchip: . clk X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in stable/12/sys/arm64/rockchip: . clk X-SVN-Commit-Revision: 358647 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: Wed, 04 Mar 2020 21:12:09 -0000 Author: manu Date: Wed Mar 4 21:12:08 2020 New Revision: 358647 URL: https://svnweb.freebsd.org/changeset/base/358647 Log: MFC r355624, r355852-r355853 r355624: arm64: rk3328: Add the *clk_peri_niu clocks Those clocks are always enable by default and are not really explained in the TRM but the reason we had them is that they have the periph clock as a parent and those parent should never be disable which can happen if we disable all the childs. The current childs are the sd/emmc/sdio clocks so the board will hang if we disable them. r355852: arm64: rockchip: rk_pinctrl: Fix clear bits in SYSCON_MODIFY r351187 change the SYSCON_WRITE to SYSCON_MODIFY but didn't changed the mask variable that used to hold the bitmask in the upper 16 bits of the register that control which bits are changed. So we ended up clearing bit from the upper 16bits half which are always 0 after a read. Use the correct bit mask for bits that we want to clear. r355853: arm64: rockchip: rk_gpio: Fix pin number The maxpin counter starts at 0, fix one by one error. This is still not totally correct for some banks in some SoC that have fewer pins but this will be dealt with in another commit. Modified: stable/12/sys/arm64/rockchip/clk/rk3328_cru.c stable/12/sys/arm64/rockchip/rk_gpio.c stable/12/sys/arm64/rockchip/rk_pinctrl.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm64/rockchip/clk/rk3328_cru.c ============================================================================== --- stable/12/sys/arm64/rockchip/clk/rk3328_cru.c Wed Mar 4 21:06:29 2020 (r358646) +++ stable/12/sys/arm64/rockchip/clk/rk3328_cru.c Wed Mar 4 21:12:08 2020 (r358647) @@ -103,6 +103,8 @@ static struct rk_cru_gate rk3328_gates[] = { CRU_GATE(HCLK_SDMMC, "hclk_sdmmc", "hclk_peri", 0x24C, 0) CRU_GATE(HCLK_SDIO, "hclk_sdio", "hclk_peri", 0x24C, 1) CRU_GATE(HCLK_EMMC, "hclk_emmc", "hclk_peri", 0x24C, 2) + CRU_GATE(0, "hclk_peri_niu", "hclk_peri", 0x24C, 12) + CRU_GATE(0, "pclk_peri_niu", "hclk_peri", 0x24C, 13) CRU_GATE(HCLK_SDMMC_EXT, "hclk_sdmmc_ext", "hclk_peri", 0x24C, 15) }; Modified: stable/12/sys/arm64/rockchip/rk_gpio.c ============================================================================== --- stable/12/sys/arm64/rockchip/rk_gpio.c Wed Mar 4 21:06:29 2020 (r358646) +++ stable/12/sys/arm64/rockchip/rk_gpio.c Wed Mar 4 21:12:08 2020 (r358647) @@ -196,7 +196,7 @@ rk_gpio_pin_max(device_t dev, int *maxpin) { /* Each bank have always 32 pins */ - *maxpin = 32; + *maxpin = 31; return (0); } Modified: stable/12/sys/arm64/rockchip/rk_pinctrl.c ============================================================================== --- stable/12/sys/arm64/rockchip/rk_pinctrl.c Wed Mar 4 21:06:29 2020 (r358646) +++ stable/12/sys/arm64/rockchip/rk_pinctrl.c Wed Mar 4 21:12:08 2020 (r358647) @@ -883,7 +883,7 @@ rk_pinctrl_configure_pin(struct rk_pinctrl_softc *sc, reg += bank * 0x10 + ((pin / 8) * 0x4); bit = (pin % 8) * 2; - mask = (0x3 << bit) << 16; + mask = (0x3 << bit); SYSCON_MODIFY_4(syscon, reg, mask, bias << bit | (mask << 16)); } @@ -891,7 +891,7 @@ rk_pinctrl_configure_pin(struct rk_pinctrl_softc *sc, rv = rk_pinctrl_parse_drive(sc, pin_conf, bank, subbank, &drive, ®); if (rv == 0) { bit = (pin % 8) * 2; - mask = (0x3 << bit) << 16; + mask = (0x3 << bit); SYSCON_MODIFY_4(syscon, reg, mask, drive << bit | (mask << 16)); } From owner-svn-src-stable@freebsd.org Wed Mar 4 21:20:17 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 BD26B251EC3; Wed, 4 Mar 2020 21:20:17 +0000 (UTC) (envelope-from manu@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 48XmxY3V2sz4YG9; Wed, 4 Mar 2020 21:20:17 +0000 (UTC) (envelope-from manu@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 5247E24496; Wed, 4 Mar 2020 21:20:17 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 024LKHNZ030539; Wed, 4 Mar 2020 21:20:17 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024LKFXd030527; Wed, 4 Mar 2020 21:20:15 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202003042120.024LKFXd030527@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 4 Mar 2020 21:20:15 +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: r358648 - in stable/12/sys: arm64/conf arm64/rockchip conf modules/rockchip modules/rockchip/rk_spi X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in stable/12/sys: arm64/conf arm64/rockchip conf modules/rockchip modules/rockchip/rk_spi X-SVN-Commit-Revision: 358648 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: Wed, 04 Mar 2020 21:20:17 -0000 Author: manu Date: Wed Mar 4 21:20:15 2020 New Revision: 358648 URL: https://svnweb.freebsd.org/changeset/base/358648 Log: MFC r356148-r356149, r356277 r356148: arm64: rockchip: rk808: Add remaining regulators The RK808 driver was missing the LDO and switch regulators. Add support for them. Reviewed by: mmel Differential Revision: https://reviews.freebsd.org/D22852 r356149: arm64: rockchip: Add driver for the io domain This driver configure the registers in the GRF according to the value of the regulators for the platform. Some IP can run with either 3.0V or 1.8V, if we don't configure them correctly according to the external voltage used they will not work. It's only done at boot time for now and might be needed at runtime for IP like sdmmc. Reviewed by: mmel Tested On: RockPro64, Firefly-RK3399 (gonzo), AIO-3288 (mmel) Differential Revision: https://reviews.freebsd.org/D22854 r356277: arm64: rockchip: Add a module for rk_spi The spi node doesn't lives under a simple-bus compatible node so we need OFWBUS_PNP_INFO instead of SIMPLEBUS_PNP_INFO. Added: stable/12/sys/arm64/rockchip/rk_iodomain.c - copied unchanged from r356149, head/sys/arm64/rockchip/rk_iodomain.c stable/12/sys/modules/rockchip/rk_spi/ - copied from r356277, head/sys/modules/rockchip/rk_spi/ Modified: stable/12/sys/arm64/conf/GENERIC stable/12/sys/arm64/rockchip/rk805.c stable/12/sys/arm64/rockchip/rk805reg.h stable/12/sys/arm64/rockchip/rk_spi.c stable/12/sys/conf/files.arm64 stable/12/sys/modules/rockchip/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm64/conf/GENERIC ============================================================================== --- stable/12/sys/arm64/conf/GENERIC Wed Mar 4 21:12:08 2020 (r358647) +++ stable/12/sys/arm64/conf/GENERIC Wed Mar 4 21:20:15 2020 (r358648) @@ -292,6 +292,9 @@ device regulator device syscon device aw_syscon +# IO Domains +device rk_iodomain + # The `bpf' device enables the Berkeley Packet Filter. # Be aware of the administrative consequences of enabling this! # Note that 'bpf' is required for DHCP. Modified: stable/12/sys/arm64/rockchip/rk805.c ============================================================================== --- stable/12/sys/arm64/rockchip/rk805.c Wed Mar 4 21:12:08 2020 (r358647) +++ stable/12/sys/arm64/rockchip/rk805.c Wed Mar 4 21:20:15 2020 (r358648) @@ -222,6 +222,114 @@ static struct rk805_regdef rk808_regdefs[] = { .voltage_step = 100000, .voltage_nstep = 16, }, + { + .id = RK808_LDO1, + .name = "LDO_REG1", + .enable_reg = RK808_LDO_EN, + .enable_mask = 0x1, + .voltage_reg = RK805_LDO1_ON_VSEL, + .voltage_mask = 0x1F, + .voltage_min = 1800000, + .voltage_max = 3400000, + .voltage_step = 100000, + .voltage_nstep = 17, + }, + { + .id = RK808_LDO2, + .name = "LDO_REG2", + .enable_reg = RK808_LDO_EN, + .enable_mask = 0x2, + .voltage_reg = RK805_LDO2_ON_VSEL, + .voltage_mask = 0x1F, + .voltage_min = 1800000, + .voltage_max = 3400000, + .voltage_step = 100000, + .voltage_nstep = 17, + }, + { + .id = RK808_LDO3, + .name = "LDO_REG3", + .enable_reg = RK808_LDO_EN, + .enable_mask = 0x4, + .voltage_reg = RK805_LDO3_ON_VSEL, + .voltage_mask = 0xF, + .voltage_min = 800000, + .voltage_max = 2500000, + .voltage_step = 100000, + .voltage_nstep = 18, + }, + { + .id = RK808_LDO4, + .name = "LDO_REG4", + .enable_reg = RK808_LDO_EN, + .enable_mask = 0x8, + .voltage_reg = RK808_LDO4_ON_VSEL, + .voltage_mask = 0x1F, + .voltage_min = 1800000, + .voltage_max = 3400000, + .voltage_step = 100000, + .voltage_nstep = 17, + }, + { + .id = RK808_LDO5, + .name = "LDO_REG5", + .enable_reg = RK808_LDO_EN, + .enable_mask = 0x10, + .voltage_reg = RK808_LDO5_ON_VSEL, + .voltage_mask = 0x1F, + .voltage_min = 1800000, + .voltage_max = 3400000, + .voltage_step = 100000, + .voltage_nstep = 17, + }, + { + .id = RK808_LDO6, + .name = "LDO_REG6", + .enable_reg = RK808_LDO_EN, + .enable_mask = 0x20, + .voltage_reg = RK808_LDO6_ON_VSEL, + .voltage_mask = 0x1F, + .voltage_min = 800000, + .voltage_max = 2500000, + .voltage_step = 100000, + .voltage_nstep = 18, + }, + { + .id = RK808_LDO7, + .name = "LDO_REG7", + .enable_reg = RK808_LDO_EN, + .enable_mask = 0x40, + .voltage_reg = RK808_LDO7_ON_VSEL, + .voltage_mask = 0x1F, + .voltage_min = 800000, + .voltage_max = 2500000, + .voltage_step = 100000, + .voltage_nstep = 18, + }, + { + .id = RK808_LDO8, + .name = "LDO_REG8", + .enable_reg = RK808_LDO_EN, + .enable_mask = 0x80, + .voltage_reg = RK808_LDO8_ON_VSEL, + .voltage_mask = 0x1F, + .voltage_min = 1800000, + .voltage_max = 3400000, + .voltage_step = 100000, + .voltage_nstep = 17, + }, + { + .id = RK808_SWITCH1, + .name = "SWITCH_REG1", + .enable_reg = RK805_DCDC_EN, + .enable_mask = 0x20, + }, + { + .id = RK808_SWITCH2, + .name = "SWITCH_REG2", + .enable_reg = RK805_DCDC_EN, + .enable_mask = 0x40, + }, }; static int Modified: stable/12/sys/arm64/rockchip/rk805reg.h ============================================================================== --- stable/12/sys/arm64/rockchip/rk805reg.h Wed Mar 4 21:12:08 2020 (r358647) +++ stable/12/sys/arm64/rockchip/rk805reg.h Wed Mar 4 21:20:15 2020 (r358648) @@ -59,6 +59,16 @@ #define RK805_LDO2_SLEEP_VSEL 0x3E #define RK805_LDO3_ON_VSEL 0x3F #define RK805_LDO3_SLEEP_VSEL 0x40 +#define RK808_LDO4_ON_VSEL 0x41 +#define RK808_LDO4_SLEEP_VSEL 0x42 +#define RK808_LDO5_ON_VSEL 0x43 +#define RK808_LDO5_SLEEP_VSEL 0x44 +#define RK808_LDO6_ON_VSEL 0x45 +#define RK808_LDO6_SLEEP_VSEL 0x46 +#define RK808_LDO7_ON_VSEL 0x47 +#define RK808_LDO7_SLEEP_VSEL 0x48 +#define RK808_LDO8_ON_VSEL 0x49 +#define RK808_LDO8_SLEEP_VSEL 0x4A enum rk805_regulator { RK805_DCDC1 = 0, Copied: stable/12/sys/arm64/rockchip/rk_iodomain.c (from r356149, head/sys/arm64/rockchip/rk_iodomain.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/arm64/rockchip/rk_iodomain.c Wed Mar 4 21:20:15 2020 (r358648, copy of r356149, head/sys/arm64/rockchip/rk_iodomain.c) @@ -0,0 +1,207 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2019 Emmanuel Vadot + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include "syscon_if.h" + +#define RK3288_GRF_IO_VSEL 0x380 +#define RK3399_GRF_IO_VSEL 0xe640 +#define RK3399_PMUGRF_IO_VSEL 0x180 + +struct rk_iodomain_supply { + char *name; + uint32_t bit; +}; + +struct rk_iodomain_conf { + struct rk_iodomain_supply *supply; + int nsupply; + uint32_t grf_reg; +}; + +struct rk_iodomain_softc { + device_t dev; + struct syscon *grf; + phandle_t node; + struct rk_iodomain_conf *conf; +}; + +static struct rk_iodomain_supply rk3288_supply[] = { + {"lcdc-supply", 0}, + {"dvp-supply", 1}, + {"flash0-supply", 2}, + {"flash1-supply", 3}, + {"wifi-supply", 4}, + {"bb-supply", 5}, + {"audio-supply", 6}, + {"sdcard-supply", 7}, + {"gpio30-supply", 8}, + {"gpio1830-supply", 9}, +}; + +static struct rk_iodomain_conf rk3288_conf = { + .supply = rk3288_supply, + .nsupply = nitems(rk3288_supply), + .grf_reg = RK3288_GRF_IO_VSEL, +}; + +static struct rk_iodomain_supply rk3399_supply[] = { + {"bt656-supply", 0}, + {"audio-supply", 1}, + {"sdmmc-supply", 2}, + {"gpio1830-supply", 3}, +}; + +static struct rk_iodomain_conf rk3399_conf = { + .supply = rk3399_supply, + .nsupply = nitems(rk3399_supply), + .grf_reg = RK3399_GRF_IO_VSEL, +}; + +static struct rk_iodomain_supply rk3399_pmu_supply[] = { + {"pmu1830-supply", 9}, +}; + +static struct rk_iodomain_conf rk3399_pmu_conf = { + .supply = rk3399_pmu_supply, + .nsupply = nitems(rk3399_pmu_supply), + .grf_reg = RK3399_PMUGRF_IO_VSEL, +}; + +static struct ofw_compat_data compat_data[] = { + {"rockchip,rk3288-io-voltage-domain", (uintptr_t)&rk3288_conf}, + {"rockchip,rk3399-io-voltage-domain", (uintptr_t)&rk3399_conf}, + {"rockchip,rk3399-pmu-io-voltage-domain", (uintptr_t)&rk3399_pmu_conf}, + {NULL, 0} +}; + +static void +rk_iodomain_set(struct rk_iodomain_softc *sc) +{ + regulator_t supply; + uint32_t reg = 0; + uint32_t mask = 0; + int uvolt, i; + + for (i = 0; i < sc->conf->nsupply; i++) { + mask |= (1 << sc->conf->supply[i].bit) << 16; + if (regulator_get_by_ofw_property(sc->dev, sc->node, + sc->conf->supply[i].name, &supply) == 0) { + if (regulator_get_voltage(supply, &uvolt) == 0) { + if (uvolt == 1800000) + reg |= (1 << sc->conf->supply[i].bit); + else if (uvolt != 3000000) + device_printf(sc->dev, + "%s regulator is at %duV, ignoring\n", + sc->conf->supply[i].name, uvolt); + } else + device_printf(sc->dev, "Cannot get current " + "voltage for regulator %s\n", + sc->conf->supply[i].name); + } + } + + SYSCON_WRITE_4(sc->grf, sc->conf->grf_reg, reg | mask); +} + +static int +rk_iodomain_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) + return (ENXIO); + + device_set_desc(dev, "RockChip IO Voltage Domain"); + return (BUS_PROBE_DEFAULT); +} + +static int +rk_iodomain_attach(device_t dev) +{ + struct rk_iodomain_softc *sc; + int rv; + + sc = device_get_softc(dev); + sc->dev = dev; + sc->node = ofw_bus_get_node(dev); + + rv = syscon_get_handle_default(dev, &sc->grf); + if (rv != 0) { + device_printf(dev, "Cannot get grf handle\n"); + return (ENXIO); + } + + sc->conf = (struct rk_iodomain_conf *)ofw_bus_search_compatible(dev, compat_data)->ocd_data; + rk_iodomain_set(sc); + + return (0); +} + +static int +rk_iodomain_detach(device_t dev) +{ + + return (0); +} + +static device_method_t rk_iodomain_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, rk_iodomain_probe), + DEVMETHOD(device_attach, rk_iodomain_attach), + DEVMETHOD(device_detach, rk_iodomain_detach), + + DEVMETHOD_END +}; + +static driver_t rk_iodomain_driver = { + "rk_iodomain", + rk_iodomain_methods, + sizeof(struct rk_iodomain_softc), +}; + +static devclass_t rk_iodomain_devclass; + +EARLY_DRIVER_MODULE(rk_iodomain, simplebus, rk_iodomain_driver, + rk_iodomain_devclass, 0, 0, BUS_PASS_SUPPORTDEV + BUS_PASS_ORDER_MIDDLE); Modified: stable/12/sys/arm64/rockchip/rk_spi.c ============================================================================== --- stable/12/sys/arm64/rockchip/rk_spi.c Wed Mar 4 21:12:08 2020 (r358647) +++ stable/12/sys/arm64/rockchip/rk_spi.c Wed Mar 4 21:20:15 2020 (r358648) @@ -480,4 +480,4 @@ static devclass_t rk_spi_devclass; DRIVER_MODULE(rk_spi, simplebus, rk_spi_driver, rk_spi_devclass, 0, 0); DRIVER_MODULE(ofw_spibus, rk_spi, ofw_spibus_driver, ofw_spibus_devclass, 0, 0); MODULE_DEPEND(rk_spi, ofw_spibus, 1, 1, 1); -SIMPLEBUS_PNP_INFO(compat_data); +OFWBUS_PNP_INFO(compat_data); Modified: stable/12/sys/conf/files.arm64 ============================================================================== --- stable/12/sys/conf/files.arm64 Wed Mar 4 21:12:08 2020 (r358647) +++ stable/12/sys/conf/files.arm64 Wed Mar 4 21:20:15 2020 (r358648) @@ -285,6 +285,7 @@ arm64/rockchip/rk805.c optional fdt rk805 soc_rockch arm64/rockchip/rk_grf.c optional fdt soc_rockchip_rk3328 | fdt soc_rockchip_rk3399 arm64/rockchip/rk_pinctrl.c optional fdt rk_pinctrl soc_rockchip_rk3328 | fdt rk_pinctrl soc_rockchip_rk3399 arm64/rockchip/rk_gpio.c optional fdt rk_gpio soc_rockchip_rk3328 | fdt rk_gpio soc_rockchip_rk3399 +arm64/rockchip/rk_iodomain.c optional fdt rk_iodomain arm64/rockchip/rk_spi.c optional fdt rk_spi arm64/rockchip/rk_usb2phy.c optional fdt rk_usb2phy soc_rockchip_rk3328 | soc_rockchip_rk3399 arm64/rockchip/rk_typec_phy.c optional fdt rk_typec_phy soc_rockchip_rk3399 Modified: stable/12/sys/modules/rockchip/Makefile ============================================================================== --- stable/12/sys/modules/rockchip/Makefile Wed Mar 4 21:12:08 2020 (r358647) +++ stable/12/sys/modules/rockchip/Makefile Wed Mar 4 21:20:15 2020 (r358648) @@ -3,6 +3,8 @@ SUBDIR = \ rk_i2c \ - rk805 + rk805 \ + rk_dwmmc \ + rk_spi .include From owner-svn-src-stable@freebsd.org Wed Mar 4 21:25:50 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 21B2E2521D1; Wed, 4 Mar 2020 21:25:50 +0000 (UTC) (envelope-from manu@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 48Xn3x4vgrz3Ktp; Wed, 4 Mar 2020 21:25:49 +0000 (UTC) (envelope-from manu@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 7A707246BE; Wed, 4 Mar 2020 21:25:49 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 024LPnqL036607; Wed, 4 Mar 2020 21:25:49 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024LPncD036605; Wed, 4 Mar 2020 21:25:49 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202003042125.024LPncD036605@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 4 Mar 2020 21:25:49 +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: r358649 - stable/12/sys/arm64/rockchip X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: stable/12/sys/arm64/rockchip X-SVN-Commit-Revision: 358649 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: Wed, 04 Mar 2020 21:25:50 -0000 Author: manu Date: Wed Mar 4 21:25:48 2020 New Revision: 358649 URL: https://svnweb.freebsd.org/changeset/base/358649 Log: MFC r356485-r356486, r356893, r358278-r358279 r356485: rk808: Add min/max for the switch regulators The two switch regulator are always 3.0V. Add a special case in get_voltage that if min=max we directly return the value without calculating it. Reviewed by: mmel Differential Revision: https://reviews.freebsd.org/D23004 r356486: rk805: Add regnode_status method This allow consumers to check if the regulator is enable or not. Reviewed by: mmel Differential Revision: https://reviews.freebsd.org/D23005 r356893: rk805: Add a regnode_init method This method will set the desired voltaged based on values in the DTS. It will not enable the regulator, this is the job of either a consumer or regnode_set_constraint SYSINIT if the regulator is boot_on or always_on. Reviewed by: mmel Differential Revision: https://reviews.freebsd.org/D23216 r358278: arm64: rockchip: rk_i2c: Bump to DELAY to 1000 In polling mode with use DELAY to wait for interrupts. The value was too low for RK3328. r358279: arm64: rockchip: rk808: Only init regulator not enabled If a regulator is already enabled, do not set its value to the minimum supported on the board. This fixes booting on rock64 where we set some regulator to the minimal value while the IPs needs more based on what the bootloader configured. Modified: stable/12/sys/arm64/rockchip/rk805.c stable/12/sys/arm64/rockchip/rk_i2c.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm64/rockchip/rk805.c ============================================================================== --- stable/12/sys/arm64/rockchip/rk805.c Wed Mar 4 21:20:15 2020 (r358648) +++ stable/12/sys/arm64/rockchip/rk805.c Wed Mar 4 21:25:48 2020 (r358649) @@ -98,6 +98,10 @@ struct rk805_softc { int nregs; }; +static int rk805_regnode_status(struct regnode *regnode, int *status); +static int rk805_regnode_set_voltage(struct regnode *regnode, int min_uvolt, + int max_uvolt, int *udelay); + static struct rk805_regdef rk805_regdefs[] = { { .id = RK805_DCDC1, @@ -205,6 +209,7 @@ static struct rk805_regdef rk808_regdefs[] = { .voltage_nstep = 64, }, { + /* BUCK3 voltage is calculated based on external resistor */ .id = RK805_DCDC3, .name = "DCDC_REG3", .enable_reg = RK805_DCDC_EN, @@ -323,12 +328,16 @@ static struct rk805_regdef rk808_regdefs[] = { .name = "SWITCH_REG1", .enable_reg = RK805_DCDC_EN, .enable_mask = 0x20, + .voltage_min = 3000000, + .voltage_max = 3000000, }, { .id = RK808_SWITCH2, .name = "SWITCH_REG2", .enable_reg = RK805_DCDC_EN, .enable_mask = 0x40, + .voltage_min = 3000000, + .voltage_max = 3000000, }, }; @@ -344,13 +353,37 @@ rk805_read(device_t dev, uint8_t reg, uint8_t *data, u static int rk805_write(device_t dev, uint8_t reg, uint8_t data) { + return (iicdev_writeto(dev, reg, &data, 1, IIC_INTRWAIT)); } static int rk805_regnode_init(struct regnode *regnode) { - return (0); + struct rk805_reg_sc *sc; + struct regnode_std_param *param; + int rv, udelay, status; + + sc = regnode_get_softc(regnode); + param = regnode_get_stdparam(regnode); + if (param->min_uvolt == 0) + return (0); + + /* + * Set the regulator at the correct voltage if it is not enabled. + * Do not enable it, this is will be done either by a + * consumer or by regnode_set_constraint if boot_on is true + */ + rv = rk805_regnode_status(regnode, &status); + if (rv != 0 || status == REGULATOR_STATUS_ENABLED) + return (rv); + + rv = rk805_regnode_set_voltage(regnode, param->min_uvolt, + param->max_uvolt, &udelay); + if (udelay != 0) + DELAY(udelay); + + return (rv); } static int @@ -409,6 +442,22 @@ rk805_regnode_voltage_to_reg(struct rk805_reg_sc *sc, } static int +rk805_regnode_status(struct regnode *regnode, int *status) +{ + struct rk805_reg_sc *sc; + uint8_t val; + + sc = regnode_get_softc(regnode); + + *status = 0; + rk805_read(sc->base_dev, sc->def->enable_reg, &val, 1); + if (val & sc->def->enable_mask) + *status = REGULATOR_STATUS_ENABLED; + + return (0); +} + +static int rk805_regnode_set_voltage(struct regnode *regnode, int min_uvolt, int max_uvolt, int *udelay) { @@ -451,6 +500,11 @@ rk805_regnode_get_voltage(struct regnode *regnode, int sc = regnode_get_softc(regnode); + if (sc->def->voltage_min == sc->def->voltage_max) { + *uvolt = sc->def->voltage_min; + return (0); + } + if (!sc->def->voltage_step) return (ENXIO); @@ -468,6 +522,7 @@ static regnode_method_t rk805_regnode_methods[] = { /* Regulator interface */ REGNODEMETHOD(regnode_init, rk805_regnode_init), REGNODEMETHOD(regnode_enable, rk805_regnode_enable), + REGNODEMETHOD(regnode_status, rk805_regnode_status), REGNODEMETHOD(regnode_set_voltage, rk805_regnode_set_voltage), REGNODEMETHOD(regnode_get_voltage, rk805_regnode_get_voltage), REGNODEMETHOD(regnode_check_voltage, regnode_method_check_voltage), Modified: stable/12/sys/arm64/rockchip/rk_i2c.c ============================================================================== --- stable/12/sys/arm64/rockchip/rk_i2c.c Wed Mar 4 21:20:15 2020 (r358648) +++ stable/12/sys/arm64/rockchip/rk_i2c.c Wed Mar 4 21:25:48 2020 (r358649) @@ -530,7 +530,7 @@ rk_i2c_transfer(device_t dev, struct iic_msg *msgs, ui rk_i2c_intr_locked(sc); if (sc->transfer_done != 0) break; - DELAY(100); + DELAY(1000); } if (timeout <= 0) err = ETIMEDOUT; @@ -609,8 +609,8 @@ rk_i2c_attach(device_t dev) device_printf(dev, "cannot get pclk clock\n"); goto fail; } - if (sc->sclk != NULL) { - error = clk_enable(sc->sclk); + if (sc->pclk != NULL) { + error = clk_enable(sc->pclk); if (error != 0) { device_printf(dev, "cannot enable pclk clock\n"); goto fail; From owner-svn-src-stable@freebsd.org Wed Mar 4 21:30:57 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 92F962524BB; Wed, 4 Mar 2020 21:30:57 +0000 (UTC) (envelope-from manu@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 48Xn9s1HZlz43L5; Wed, 4 Mar 2020 21:30:57 +0000 (UTC) (envelope-from manu@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 C87B8246F9; Wed, 4 Mar 2020 21:30:56 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 024LUu5C037755; Wed, 4 Mar 2020 21:30:56 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024LUtqm037751; Wed, 4 Mar 2020 21:30:55 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202003042130.024LUtqm037751@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 4 Mar 2020 21:30:55 +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: r358651 - in stable/12/sys: arm64/conf arm64/rockchip arm64/rockchip/clk conf X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in stable/12/sys: arm64/conf arm64/rockchip arm64/rockchip/clk conf X-SVN-Commit-Revision: 358651 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: Wed, 04 Mar 2020 21:30:57 -0000 Author: manu Date: Wed Mar 4 21:30:55 2020 New Revision: 358651 URL: https://svnweb.freebsd.org/changeset/base/358651 Log: MFC r356808: arm64: rockchip: Add RK3399 PWM driver Add a driver for the pwm controller in the RK3399 SoC Submitted by: bdragon (original version) Reviewed by: ganbold (previous version) Differential Revision: https://reviews.freebsd.org/D19046 Added: stable/12/sys/arm64/rockchip/rk_pwm.c - copied unchanged from r356808, head/sys/arm64/rockchip/rk_pwm.c Modified: stable/12/sys/arm64/conf/GENERIC stable/12/sys/arm64/rockchip/clk/rk3399_pmucru.c stable/12/sys/conf/files.arm64 Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm64/conf/GENERIC ============================================================================== --- stable/12/sys/arm64/conf/GENERIC Wed Mar 4 21:27:12 2020 (r358650) +++ stable/12/sys/arm64/conf/GENERIC Wed Mar 4 21:30:55 2020 (r358651) @@ -258,6 +258,7 @@ device rk_spi # RockChip SPI controller # PWM device pwm device aw_pwm +device rk_pwm # Console device vt Modified: stable/12/sys/arm64/rockchip/clk/rk3399_pmucru.c ============================================================================== --- stable/12/sys/arm64/rockchip/clk/rk3399_pmucru.c Wed Mar 4 21:27:12 2020 (r358650) +++ stable/12/sys/arm64/rockchip/clk/rk3399_pmucru.c Wed Mar 4 21:30:55 2020 (r358651) @@ -58,6 +58,7 @@ __FBSDID("$FreeBSD$"); #define PCLK_I2C0_PMU 27 #define PCLK_I2C4_PMU 28 #define PCLK_I2C8_PMU 29 +#define PCLK_RKPWM_PMU 30 static struct rk_cru_gate rk3399_pmu_gates[] = { /* PMUCRU_CLKGATE_CON1 */ @@ -67,8 +68,8 @@ static struct rk_cru_gate rk3399_pmu_gates[] = { CRU_GATE(PCLK_I2C0_PMU, "pclk_i2c0_pmu", "pclk_pmu_src", 0x104, 7) CRU_GATE(PCLK_I2C4_PMU, "pclk_i2c4_pmu", "pclk_pmu_src", 0x104, 8) CRU_GATE(PCLK_I2C8_PMU, "pclk_i2c8_pmu", "pclk_pmu_src", 0x104, 9) + CRU_GATE(PCLK_RKPWM_PMU, "pclk_rkpwm_pmu", "pclk_pmu_src", 0x104, 10) }; - /* * PLLs Copied: stable/12/sys/arm64/rockchip/rk_pwm.c (from r356808, head/sys/arm64/rockchip/rk_pwm.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/arm64/rockchip/rk_pwm.c Wed Mar 4 21:30:55 2020 (r358651, copy of r356808, head/sys/arm64/rockchip/rk_pwm.c) @@ -0,0 +1,403 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018 Emmanuel Vadot + * Copyright (c) 2019 Brandon Bergren + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include + +#include "pwmbus_if.h" + +/* Register offsets. */ +#define RK_PWM_COUNTER 0x00 +#define RK_PWM_PERIOD 0x04 +#define RK_PWM_DUTY 0x08 +#define RK_PWM_CTRL 0x0c + +#define SET(reg,mask,val) reg = ((reg & ~mask) | val) + +#define RK_PWM_CTRL_ENABLE_MASK (1 << 0) +#define RK_PWM_CTRL_ENABLED (1 << 0) +#define RK_PWM_CTRL_DISABLED (0) + +#define RK_PWM_CTRL_MODE_MASK (3 << 1) +#define RK_PWM_CTRL_MODE_ONESHOT (0) +#define RK_PWM_CTRL_MODE_CONTINUOUS (1 << 1) +#define RK_PWM_CTRL_MODE_CAPTURE (1 << 2) + +#define RK_PWM_CTRL_DUTY_MASK (1 << 3) +#define RK_PWM_CTRL_DUTY_POSITIVE (1 << 3) +#define RK_PWM_CTRL_DUTY_NEGATIVE (0) + +#define RK_PWM_CTRL_INACTIVE_MASK (1 << 4) +#define RK_PWM_CTRL_INACTIVE_POSITIVE (1 << 4) +#define RK_PWM_CTRL_INACTIVE_NEGATIVE (0) + +/* PWM Output Alignment */ +#define RK_PWM_CTRL_ALIGN_MASK (1 << 5) +#define RK_PWM_CTRL_ALIGN_CENTER (1 << 5) +#define RK_PWM_CTRL_ALIGN_LEFT (0) + +/* Low power mode: disable prescaler when inactive */ +#define RK_PWM_CTRL_LP_MASK (1 << 8) +#define RK_PWM_CTRL_LP_ENABLE (1 << 8) +#define RK_PWM_CTRL_LP_DISABLE (0) + +/* Clock source: bypass the scaler or not */ +#define RK_PWM_CTRL_CLOCKSRC_MASK (1 << 9) +#define RK_PWM_CTRL_CLOCKSRC_NONSCALED (0) +#define RK_PWM_CTRL_CLOCKSRC_SCALED (1 << 9) + +#define RK_PWM_CTRL_PRESCALE_MASK (7 << 12) +#define RK_PWM_CTRL_PRESCALE_SHIFT 12 + +#define RK_PWM_CTRL_SCALE_MASK (0xFF << 16) +#define RK_PWM_CTRL_SCALE_SHIFT 16 + +#define RK_PWM_CTRL_REPEAT_MASK (0xFF << 24) +#define RK_PWM_CTRL_REPEAT_SHIFT 24 + +#define NS_PER_SEC 1000000000 + +static struct ofw_compat_data compat_data[] = { + { "rockchip,rk3399-pwm", 1 }, + { NULL, 0 } +}; + +static struct resource_spec rk_pwm_spec[] = { + { SYS_RES_MEMORY, 0, RF_ACTIVE }, + { -1, 0 } +}; + +struct rk_pwm_softc { + device_t dev; + device_t busdev; + clk_t clk; + struct resource *res; + + uint64_t clk_freq; + unsigned int period; + unsigned int duty; + uint32_t flags; + uint8_t prescaler; + uint8_t scaler; + bool using_scaler; + bool enabled; +}; + +#define RK_PWM_READ(sc, reg) bus_read_4((sc)->res, (reg)) +#define RK_PWM_WRITE(sc, reg, val) bus_write_4((sc)->res, (reg), (val)) + +static int rk_pwm_probe(device_t dev); +static int rk_pwm_attach(device_t dev); +static int rk_pwm_detach(device_t dev); + +static int +rk_pwm_probe(device_t dev) +{ + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (!ofw_bus_search_compatible(dev, compat_data)->ocd_data) + return (ENXIO); + + device_set_desc(dev, "Rockchip PWM"); + return (BUS_PROBE_DEFAULT); +} + +static int +rk_pwm_attach(device_t dev) +{ + struct rk_pwm_softc *sc; + phandle_t node; + uint64_t clk_freq; + uint32_t reg; + int error; + + sc = device_get_softc(dev); + sc->dev = dev; + + error = clk_get_by_ofw_index(dev, 0, 0, &sc->clk); + if (error != 0) { + device_printf(dev, "cannot get clock\n"); + goto fail; + } + error = clk_enable(sc->clk); + if (error != 0) { + device_printf(dev, "cannot enable clock\n"); + goto fail; + } + error = clk_get_freq(sc->clk, &sc->clk_freq); + if (error != 0) { + device_printf(dev, "cannot get base frequency\n"); + goto fail; + } + + if (bus_alloc_resources(dev, rk_pwm_spec, &sc->res) != 0) { + device_printf(dev, "cannot allocate resources for device\n"); + error = ENXIO; + goto fail; + } + + /* Read the configuration left by U-Boot */ + reg = RK_PWM_READ(sc, RK_PWM_CTRL); + if ((reg & RK_PWM_CTRL_ENABLE_MASK) == RK_PWM_CTRL_ENABLED) + sc->enabled = true; + + reg = RK_PWM_READ(sc, RK_PWM_CTRL); + reg &= RK_PWM_CTRL_PRESCALE_MASK; + sc->prescaler = reg >> RK_PWM_CTRL_PRESCALE_SHIFT; + + reg = RK_PWM_READ(sc, RK_PWM_CTRL); + reg &= RK_PWM_CTRL_SCALE_MASK; + sc->scaler = reg >> RK_PWM_CTRL_SCALE_SHIFT; + + reg = RK_PWM_READ(sc, RK_PWM_CTRL); + if ((reg & RK_PWM_CTRL_CLOCKSRC_MASK) == RK_PWM_CTRL_CLOCKSRC_SCALED) + sc->using_scaler = true; + else + sc->using_scaler = false; + + clk_freq = sc->clk_freq / (2 ^ sc->prescaler); + + if (sc->using_scaler) { + if (sc->scaler == 0) + clk_freq /= 512; + else + clk_freq /= (sc->scaler * 2); + } + + reg = RK_PWM_READ(sc, RK_PWM_PERIOD); + sc->period = NS_PER_SEC / + (clk_freq / reg); + reg = RK_PWM_READ(sc, RK_PWM_DUTY); + sc->duty = NS_PER_SEC / + (clk_freq / reg); + + node = ofw_bus_get_node(dev); + OF_device_register_xref(OF_xref_from_node(node), dev); + + sc->busdev = device_add_child(dev, "pwmbus", -1); + + return (bus_generic_attach(dev)); + +fail: + rk_pwm_detach(dev); + return (error); +} + +static int +rk_pwm_detach(device_t dev) +{ + struct rk_pwm_softc *sc; + + sc = device_get_softc(dev); + + bus_generic_detach(sc->dev); + + bus_release_resources(dev, rk_pwm_spec, &sc->res); + + return (0); +} + +static phandle_t +aw_pwm_get_node(device_t bus, device_t dev) +{ + + /* + * Share our controller node with our pwmbus child; it instantiates + * devices by walking the children contained within our node. + */ + return ofw_bus_get_node(bus); +} + +static int +rk_pwm_channel_count(device_t dev, u_int *nchannel) +{ + /* The device supports 4 channels, but attaches multiple times in the + * device tree. This interferes with advanced usage though, as + * the interrupt capability and channel 3 FIFO register offsets + * don't work right in this situation. + * But since we don't support those yet, pretend we are singlechannel. + */ + *nchannel = 1; + + return (0); +} + +static int +rk_pwm_channel_config(device_t dev, u_int channel, u_int period, u_int duty) +{ + struct rk_pwm_softc *sc; + uint64_t period_freq, duty_freq; + uint32_t reg; + uint32_t period_out; + uint32_t duty_out; + uint8_t prescaler; + uint8_t scaler; + bool using_scaler; + + sc = device_get_softc(dev); + + period_freq = NS_PER_SEC / period; + /* Datasheet doesn't define, so use Nyquist frequency. */ + if (period_freq > (sc->clk_freq / 2)) + return (EINVAL); + duty_freq = NS_PER_SEC / duty; + if (duty_freq < period_freq) { + device_printf(sc->dev, "duty < period\n"); + return (EINVAL); + } + + /* Assuming 24 MHz reference, we should never actually have + to use the divider due to pwm API limitations. */ + prescaler = 0; + scaler = 0; + using_scaler = false; + + /* XXX Expand API to allow for 64 bit period/duty. */ + period_out = (sc->clk_freq * period) / NS_PER_SEC; + duty_out = (sc->clk_freq * duty) / NS_PER_SEC; + + reg = RK_PWM_READ(sc, RK_PWM_CTRL); + + if ((reg & RK_PWM_CTRL_MODE_MASK) != RK_PWM_CTRL_MODE_CONTINUOUS) { + /* Switching modes, disable just in case. */ + SET(reg, RK_PWM_CTRL_ENABLE_MASK, RK_PWM_CTRL_DISABLED); + RK_PWM_WRITE(sc, RK_PWM_CTRL, reg); + } + + RK_PWM_WRITE(sc, RK_PWM_PERIOD, period_out); + RK_PWM_WRITE(sc, RK_PWM_DUTY, duty_out); + + SET(reg, RK_PWM_CTRL_ENABLE_MASK, RK_PWM_CTRL_ENABLED); + SET(reg, RK_PWM_CTRL_MODE_MASK, RK_PWM_CTRL_MODE_CONTINUOUS); + SET(reg, RK_PWM_CTRL_ALIGN_MASK, RK_PWM_CTRL_ALIGN_LEFT); + SET(reg, RK_PWM_CTRL_CLOCKSRC_MASK, using_scaler); + SET(reg, RK_PWM_CTRL_PRESCALE_MASK, + prescaler << RK_PWM_CTRL_PRESCALE_SHIFT); + SET(reg, RK_PWM_CTRL_SCALE_MASK, + scaler << RK_PWM_CTRL_SCALE_SHIFT); + + RK_PWM_WRITE(sc, RK_PWM_CTRL, reg); + + sc->period = period; + sc->duty = duty; + + return (0); +} + +static int +rk_pwm_channel_get_config(device_t dev, u_int channel, u_int *period, u_int *duty) +{ + struct rk_pwm_softc *sc; + + sc = device_get_softc(dev); + + *period = sc->period; + *duty = sc->duty; + + return (0); +} + +static int +rk_pwm_channel_enable(device_t dev, u_int channel, bool enable) +{ + struct rk_pwm_softc *sc; + uint32_t reg; + + sc = device_get_softc(dev); + + if (enable && sc->enabled) + return (0); + + reg = RK_PWM_READ(sc, RK_PWM_CTRL); + SET(reg, RK_PWM_CTRL_ENABLE_MASK, enable); + + RK_PWM_WRITE(sc, RK_PWM_CTRL, reg); + + sc->enabled = enable; + + return (0); +} + +static int +rk_pwm_channel_is_enabled(device_t dev, u_int channel, bool *enabled) +{ + struct rk_pwm_softc *sc; + + sc = device_get_softc(dev); + + *enabled = sc->enabled; + + return (0); +} + +static device_method_t rk_pwm_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, rk_pwm_probe), + DEVMETHOD(device_attach, rk_pwm_attach), + DEVMETHOD(device_detach, rk_pwm_detach), + + /* ofw_bus interface */ + DEVMETHOD(ofw_bus_get_node, aw_pwm_get_node), + + /* pwm interface */ + DEVMETHOD(pwmbus_channel_count, rk_pwm_channel_count), + DEVMETHOD(pwmbus_channel_config, rk_pwm_channel_config), + DEVMETHOD(pwmbus_channel_get_config, rk_pwm_channel_get_config), + DEVMETHOD(pwmbus_channel_enable, rk_pwm_channel_enable), + DEVMETHOD(pwmbus_channel_is_enabled, rk_pwm_channel_is_enabled), + + DEVMETHOD_END +}; + +static driver_t rk_pwm_driver = { + "pwm", + rk_pwm_methods, + sizeof(struct rk_pwm_softc), +}; + +static devclass_t rk_pwm_devclass; + +DRIVER_MODULE(rk_pwm, simplebus, rk_pwm_driver, rk_pwm_devclass, 0, 0); +SIMPLEBUS_PNP_INFO(compat_data); Modified: stable/12/sys/conf/files.arm64 ============================================================================== --- stable/12/sys/conf/files.arm64 Wed Mar 4 21:27:12 2020 (r358650) +++ stable/12/sys/conf/files.arm64 Wed Mar 4 21:30:55 2020 (r358651) @@ -292,6 +292,7 @@ arm64/rockchip/rk_typec_phy.c optional fdt rk_typec_p arm64/rockchip/if_dwc_rk.c optional fdt dwc_rk soc_rockchip_rk3328 | fdt dwc_rk soc_rockchip_rk3399 arm64/rockchip/rk_tsadc_if.m optional fdt soc_rockchip_rk3399 arm64/rockchip/rk_tsadc.c optional fdt soc_rockchip_rk3399 +arm64/rockchip/rk_pwm.c optional fdt rk_pwm dev/dwc/if_dwc.c optional fdt dwc_rk soc_rockchip_rk3328 | fdt dwc_rk soc_rockchip_rk3399 dev/dwc/if_dwc_if.m optional fdt dwc_rk soc_rockchip_rk3328 | fdt dwc_rk soc_rockchip_rk3399 From owner-svn-src-stable@freebsd.org Wed Mar 4 21:53:56 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 95E4A253477; Wed, 4 Mar 2020 21:53:56 +0000 (UTC) (envelope-from manu@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 48XnhN36Bwz3MyG; Wed, 4 Mar 2020 21:53:56 +0000 (UTC) (envelope-from manu@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 3921824C73; Wed, 4 Mar 2020 21:53:56 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 024LrtGc054291; Wed, 4 Mar 2020 21:53:55 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024LrsRC054283; Wed, 4 Mar 2020 21:53:54 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202003042153.024LrsRC054283@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 4 Mar 2020 21:53:54 +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: r358653 - in stable/12: share/man/man9 sys/arm/allwinner sys/arm/broadcom/bcm2835 sys/arm64/rockchip sys/dev/fdt X-SVN-Group: stable-12 X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in stable/12: share/man/man9 sys/arm/allwinner sys/arm/broadcom/bcm2835 sys/arm64/rockchip sys/dev/fdt X-SVN-Commit-Revision: 358653 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: Wed, 04 Mar 2020 21:53:56 -0000 Author: manu Date: Wed Mar 4 21:53:54 2020 New Revision: 358653 URL: https://svnweb.freebsd.org/changeset/base/358653 Log: MFC r348885, r351543, r356806-r356807 r348885 by bz: A bit of code hygiene (no functional changes). Hide unused code under #ifdef notyet (in one case the only caller is under that same ifdef), or if it is arm (not arm64) specific code under the __arm__ ifdef to not yield -Wunused-function warnings during the arm64 kernel compile. r351543 by mmel: Add support for RK3288 into existing RockChip drivers. This patch ensures only minimal level of compatibility necessary to boot on RK3288 based boards. GPIO and pinctrl interaction, missing in current implementation, will be improved by own patch in the near future. MFC with: r351452 r356806: fdt_pinctrl: Add new methods for gpios Most of the gpio controller cannot configure or get the configuration of the pin muxing as it's usually handled in the pinctrl driver. But they can know what is the pinmuxing driver either because they are child of it or via the gpio-range property. Add some new methods to fdt_pinctrl that a pin controller can implement. Some methods are : fdt_pinctrl_is_gpio: Use to know if the pin in the gpio mode fdt_pinctrl_set_flags: Set the flags of the pin (pullup/pulldown etc ...) fdt_pinctrl_get_flags: Get the flags of the pin (pullup/pulldown etc ...) The defaults method returns EOPNOTSUPP. Reviewed by: ian, bcr (manpages) Differential Revision: https://reviews.freebsd.org/D23093 r356807: arm64: rockchip: Add new interface for rk_pinctrl The gpio controller in rockchips SoC in a child of the pinctrl driver and cannot control pullups and pulldowns. Use the new fdt_pinctrl interface for accessing pin capabilities and setting them. We can now report that every pins is capable of being IN or OUT function and PULLUP PULLDOWN. If the pin isn't in gpio mode no changes will be allowed. Reviewed by: ganbold (previous version) Differential Revision: https://reviews.freebsd.org/D22849 Modified: stable/12/share/man/man9/fdt_pinctrl.9 stable/12/sys/arm/allwinner/a10_timer.c stable/12/sys/arm/broadcom/bcm2835/bcm2835_sdhost.c stable/12/sys/arm64/rockchip/if_dwc_rk.c stable/12/sys/arm64/rockchip/rk_gpio.c stable/12/sys/arm64/rockchip/rk_grf.c stable/12/sys/arm64/rockchip/rk_pinctrl.c stable/12/sys/dev/fdt/fdt_pinctrl_if.m Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man9/fdt_pinctrl.9 ============================================================================== --- stable/12/share/man/man9/fdt_pinctrl.9 Wed Mar 4 21:45:12 2020 (r358652) +++ stable/12/share/man/man9/fdt_pinctrl.9 Wed Mar 4 21:53:54 2020 (r358653) @@ -125,6 +125,36 @@ foo_configure_pins(device_t dev, phandle_t cfgxref) } static int +foo_is_gpio(device_t dev, device_t gpiodev, bool *is_gpio) +{ + return (foo_is_pin_func_gpio(is_gpio)); +} + +static int +foo_set_flags(device_t dev, device_t gpiodev, uint32_t pin, uint32_t flags) +{ + int rv; + + rv = foo_is_pin_func_gpio(is_gpio); + if (rv != 0) + return (rv); + foo_set_flags(pin, flags); + return (0); +} + +static int +foo_get_flags(device_t dev, device_t gpiodev, uint32_t pin, uint32_t *flags) +{ + int rv; + + rv = foo_is_pin_func_gpio(is_gpio); + if (rv != 0) + return (rv); + foo_get_flags(pin, flags); + return (0); +} + +static int foo_attach(device_t dev) { ... @@ -144,6 +174,9 @@ static device_method_t foo_methods[] = { /* fdt_pinctrl interface */ DEVMETHOD(fdt_pinctrl_configure, foo_configure_pins), + DEVMETHOD(fdt_pinctrl_is_gpio, foo_is_gpio), + DEVMETHOD(fdt_pinctrl_set_flags, foo_set_flags), + DEVMETHOD(fdt_pinctrl_get_flags, foo_get_flags), /* Terminate method list */ DEVMETHOD_END Modified: stable/12/sys/arm/allwinner/a10_timer.c ============================================================================== --- stable/12/sys/arm/allwinner/a10_timer.c Wed Mar 4 21:45:12 2020 (r358652) +++ stable/12/sys/arm/allwinner/a10_timer.c Wed Mar 4 21:53:54 2020 (r358653) @@ -108,12 +108,16 @@ struct a10_timer_softc { bus_write_4(sc->res[A10_TIMER_MEMRES], reg, val) static u_int a10_timer_get_timecount(struct timecounter *); +#if defined(__arm__) static int a10_timer_timer_start(struct eventtimer *, sbintime_t first, sbintime_t period); static int a10_timer_timer_stop(struct eventtimer *); +#endif static uint64_t timer_read_counter64(struct a10_timer_softc *sc); +#if defined(__arm__) static void a10_timer_eventtimer_setup(struct a10_timer_softc *sc); +#endif static void a23_timer_timecounter_setup(struct a10_timer_softc *sc); static u_int a23_timer_get_timecount(struct timecounter *tc); @@ -279,6 +283,7 @@ a10_timer_irq(void *arg) * Event timer function for A10 and A13 */ +#if defined(__arm__) static void a10_timer_eventtimer_setup(struct a10_timer_softc *sc) { @@ -363,6 +368,7 @@ a10_timer_timer_stop(struct eventtimer *et) return (0); } +#endif /* * Timecounter functions for A23 and above Modified: stable/12/sys/arm/broadcom/bcm2835/bcm2835_sdhost.c ============================================================================== --- stable/12/sys/arm/broadcom/bcm2835/bcm2835_sdhost.c Wed Mar 4 21:45:12 2020 (r358652) +++ stable/12/sys/arm/broadcom/bcm2835/bcm2835_sdhost.c Wed Mar 4 21:53:54 2020 (r358653) @@ -251,6 +251,7 @@ WR4(struct bcm_sdhost_softc *sc, bus_size_t off, uint3 bus_space_write_4(sc->sc_bst, sc->sc_bsh, off, val); } +#ifdef notyet static inline uint16_t RD2(struct bcm_sdhost_softc *sc, bus_size_t off) { @@ -260,6 +261,7 @@ RD2(struct bcm_sdhost_softc *sc, bus_size_t off) return ((val >> (off & 3)*8) & 0xffff); } +#endif static inline uint8_t RD1(struct bcm_sdhost_softc *sc, bus_size_t off) Modified: stable/12/sys/arm64/rockchip/if_dwc_rk.c ============================================================================== --- stable/12/sys/arm64/rockchip/if_dwc_rk.c Wed Mar 4 21:45:12 2020 (r358652) +++ stable/12/sys/arm64/rockchip/if_dwc_rk.c Wed Mar 4 21:53:54 2020 (r358653) @@ -65,6 +65,14 @@ __FBSDID("$FreeBSD$"); #define RK3328_GRF_MACPHY_CON3 0x0B0C #define RK3328_GRF_MACPHY_STATUS 0x0B10 +static struct ofw_compat_data compat_data[] = { + {"rockchip,rk3288-gmac", 1}, + {"rockchip,rk3328-gmac", 1}, + {"rockchip,rk3399-gmac", 1}, + {NULL, 0} +}; + +#ifdef notyet static void rk3328_set_delays(struct syscon *grf, phandle_t node) { @@ -82,6 +90,7 @@ rk3328_set_delays(struct syscon *grf, phandle_t node) SYSCON_WRITE_4(grf, RK3328_GRF_MAC_CON0, tx | rx | 0xFFFF0000); } +#endif #define RK3399_GRF_SOC_CON6 0xc218 #define RK3399_GRF_SOC_CON6_TX_MASK 0x7F @@ -89,6 +98,7 @@ rk3328_set_delays(struct syscon *grf, phandle_t node) #define RK3399_GRF_SOC_CON6_RX_MASK 0x7F #define RK3399_GRF_SOC_CON6_RX_SHIFT 8 +#ifdef notyet static void rk3399_set_delays(struct syscon *grf, phandle_t node) { @@ -106,6 +116,7 @@ rk3399_set_delays(struct syscon *grf, phandle_t node) SYSCON_WRITE_4(grf, RK3399_GRF_SOC_CON6, tx | rx | 0xFFFF0000); } +#endif static int if_dwc_rk_probe(device_t dev) @@ -113,8 +124,7 @@ if_dwc_rk_probe(device_t dev) if (!ofw_bus_status_okay(dev)) return (ENXIO); - if (!(ofw_bus_is_compatible(dev, "rockchip,rk3328-gmac") || - ofw_bus_is_compatible(dev, "rockchip,rk3399-gmac"))) + if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) return (ENXIO); device_set_desc(dev, "Rockchip Gigabit Ethernet Controller"); Modified: stable/12/sys/arm64/rockchip/rk_gpio.c ============================================================================== --- stable/12/sys/arm64/rockchip/rk_gpio.c Wed Mar 4 21:45:12 2020 (r358652) +++ stable/12/sys/arm64/rockchip/rk_gpio.c Wed Mar 4 21:53:54 2020 (r358653) @@ -50,10 +50,10 @@ __FBSDID("$FreeBSD$"); #include #include -#include "opt_soc.h" - #include "gpio_if.h" +#include "fdt_pinctrl_if.h" + #define RK_GPIO_SWPORTA_DR 0x00 /* Data register */ #define RK_GPIO_SWPORTA_DDR 0x04 /* Data direction register */ @@ -71,6 +71,9 @@ __FBSDID("$FreeBSD$"); #define RK_GPIO_LS_SYNC 0x60 /* Level sensitive syncronization enable register */ +#define RK_GPIO_DEFAULT_CAPS (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT | \ + GPIO_PIN_PULLUP | GPIO_PIN_PULLDOWN) + struct rk_gpio_softc { device_t sc_dev; device_t sc_busdev; @@ -79,6 +82,7 @@ struct rk_gpio_softc { bus_space_tag_t sc_bst; bus_space_handle_t sc_bsh; clk_t clk; + device_t pinctrl; }; static struct ofw_compat_data compat_data[] = { @@ -126,6 +130,7 @@ rk_gpio_attach(device_t dev) sc = device_get_softc(dev); sc->sc_dev = dev; + sc->pinctrl = device_get_parent(dev); node = ofw_bus_get_node(sc->sc_dev); if (!OF_hasprop(node, "gpio-controller")) @@ -196,6 +201,7 @@ rk_gpio_pin_max(device_t dev, int *maxpin) { /* Each bank have always 32 pins */ + /* XXX not true*/ *maxpin = 31; return (0); } @@ -222,17 +228,30 @@ rk_gpio_pin_getflags(device_t dev, uint32_t pin, uint3 { struct rk_gpio_softc *sc; uint32_t reg; + int rv; + bool is_gpio; sc = device_get_softc(dev); + rv = FDT_PINCTRL_IS_GPIO(sc->pinctrl, dev, pin, &is_gpio); + if (rv != 0) + return (rv); + if (!is_gpio) + return (EINVAL); + + *flags = 0; + rv = FDT_PINCTRL_GET_FLAGS(sc->pinctrl, dev, pin, flags); + if (rv != 0) + return (rv); + RK_GPIO_LOCK(sc); reg = RK_GPIO_READ(sc, RK_GPIO_SWPORTA_DDR); RK_GPIO_UNLOCK(sc); if (reg & (1 << pin)) - *flags = GPIO_PIN_OUTPUT; + *flags |= GPIO_PIN_OUTPUT; else - *flags = GPIO_PIN_INPUT; + *flags |= GPIO_PIN_INPUT; return (0); } @@ -241,8 +260,7 @@ static int rk_gpio_pin_getcaps(device_t dev, uint32_t pin, uint32_t *caps) { - /* Caps are managed by the pinctrl device */ - *caps = 0; + *caps = RK_GPIO_DEFAULT_CAPS; return (0); } @@ -251,9 +269,21 @@ rk_gpio_pin_setflags(device_t dev, uint32_t pin, uint3 { struct rk_gpio_softc *sc; uint32_t reg; + int rv; + bool is_gpio; sc = device_get_softc(dev); + rv = FDT_PINCTRL_IS_GPIO(sc->pinctrl, dev, pin, &is_gpio); + if (rv != 0) + return (rv); + if (!is_gpio) + return (EINVAL); + + rv = FDT_PINCTRL_SET_FLAGS(sc->pinctrl, dev, pin, flags); + if (rv != 0) + return (rv); + RK_GPIO_LOCK(sc); reg = RK_GPIO_READ(sc, RK_GPIO_SWPORTA_DDR); @@ -394,6 +424,14 @@ rk_gpio_map_gpios(device_t bus, phandle_t dev, phandle return (0); } +static phandle_t +rk_gpio_get_node(device_t bus, device_t dev) +{ + + /* We only have one child, the GPIO bus, which needs our own node. */ + return (ofw_bus_get_node(bus)); +} + static device_method_t rk_gpio_methods[] = { /* Device interface */ DEVMETHOD(device_probe, rk_gpio_probe), @@ -414,6 +452,9 @@ static device_method_t rk_gpio_methods[] = { DEVMETHOD(gpio_pin_config_32, rk_gpio_pin_config_32), DEVMETHOD(gpio_map_gpios, rk_gpio_map_gpios), + /* ofw_bus interface */ + DEVMETHOD(ofw_bus_get_node, rk_gpio_get_node), + DEVMETHOD_END }; @@ -425,5 +466,10 @@ static driver_t rk_gpio_driver = { static devclass_t rk_gpio_devclass; +/* + * GPIO driver is always a child of rk_pinctrl driver and should be probed + * and attached within rk_pinctrl_attach function. Due to this, bus pass order + * must be same as bus pass order of rk_pinctrl driver. + */ EARLY_DRIVER_MODULE(rk_gpio, simplebus, rk_gpio_driver, - rk_gpio_devclass, 0, 0, BUS_PASS_INTERRUPT + BUS_PASS_ORDER_LATE); + rk_gpio_devclass, 0, 0, BUS_PASS_INTERRUPT + BUS_PASS_ORDER_MIDDLE); Modified: stable/12/sys/arm64/rockchip/rk_grf.c ============================================================================== --- stable/12/sys/arm64/rockchip/rk_grf.c Wed Mar 4 21:45:12 2020 (r358652) +++ stable/12/sys/arm64/rockchip/rk_grf.c Wed Mar 4 21:53:54 2020 (r358653) @@ -44,16 +44,11 @@ __FBSDID("$FreeBSD$"); #include #include -#include "opt_soc.h" - static struct ofw_compat_data compat_data[] = { -#ifdef SOC_ROCKCHIP_RK3328 + {"rockchip,rk3288-grf", 1}, {"rockchip,rk3328-grf", 1}, -#endif -#ifdef SOC_ROCKCHIP_RK3399 {"rockchip,rk3399-grf", 1}, {"rockchip,rk3399-pmugrf", 1}, -#endif {NULL, 0} }; Modified: stable/12/sys/arm64/rockchip/rk_pinctrl.c ============================================================================== --- stable/12/sys/arm64/rockchip/rk_pinctrl.c Wed Mar 4 21:45:12 2020 (r358652) +++ stable/12/sys/arm64/rockchip/rk_pinctrl.c Wed Mar 4 21:53:54 2020 (r358653) @@ -56,6 +56,7 @@ __FBSDID("$FreeBSD$"); #include "gpio_if.h" #include "syscon_if.h" +#include "fdt_pinctrl_if.h" struct rk_pinctrl_pin_drive { uint32_t bank; @@ -102,6 +103,8 @@ struct rk_pinctrl_conf { uint32_t (*get_pd_offset)(struct rk_pinctrl_softc *, uint32_t); struct syscon *(*get_syscon)(struct rk_pinctrl_softc *, uint32_t); int (*parse_bias)(phandle_t, int); + int (*resolv_bias_value)(int, int); + int (*get_bias_value)(int, int); }; struct rk_pinctrl_softc { @@ -110,8 +113,13 @@ struct rk_pinctrl_softc { struct syscon *grf; struct syscon *pmu; struct rk_pinctrl_conf *conf; + struct mtx mtx; }; +#define RK_PINCTRL_LOCK(_sc) mtx_lock_spin(&(_sc)->mtx) +#define RK_PINCTRL_UNLOCK(_sc) mtx_unlock_spin(&(_sc)->mtx) +#define RK_PINCTRL_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->mtx, MA_OWNED) + #define RK_IOMUX(_bank, _subbank, _offset, _nbits) \ { \ .bank = _bank, \ @@ -385,6 +393,32 @@ rk3288_parse_bias(phandle_t node, int bank) return (-1); } +static int +rk3288_resolv_bias_value(int bank, int bias) +{ + int rv = 0; + + if (bias == 1) + rv = GPIO_PIN_PULLUP; + else if (bias == 2) + rv = GPIO_PIN_PULLDOWN; + + return (rv); +} + +static int +rk3288_get_bias_value(int bank, int bias) +{ + int rv = 0; + + if (bias & GPIO_PIN_PULLUP) + rv = 1; + else if (bias & GPIO_PIN_PULLDOWN) + rv = 2; + + return (rv); +} + struct rk_pinctrl_conf rk3288_conf = { .iomux_conf = rk3288_iomux_bank, .iomux_nbanks = nitems(rk3288_iomux_bank), @@ -397,6 +431,8 @@ struct rk_pinctrl_conf rk3288_conf = { .get_pd_offset = rk3288_get_pd_offset, .get_syscon = rk3288_get_syscon, .parse_bias = rk3288_parse_bias, + .resolv_bias_value = rk3288_resolv_bias_value, + .get_bias_value = rk3288_get_bias_value, }; static struct rk_pinctrl_gpio rk3328_gpio_bank[] = { @@ -541,6 +577,8 @@ struct rk_pinctrl_conf rk3328_conf = { .get_pd_offset = rk3328_get_pd_offset, .get_syscon = rk3328_get_syscon, .parse_bias = rk3288_parse_bias, + .resolv_bias_value = rk3288_resolv_bias_value, + .get_bias_value = rk3288_get_bias_value, }; static struct rk_pinctrl_gpio rk3399_gpio_bank[] = { @@ -664,6 +702,58 @@ rk3399_parse_bias(phandle_t node, int bank) return (-1); } +static int +rk3399_resolv_bias_value(int bank, int bias) +{ + int rv = 0; + + switch (bank) { + case 0: + case 2: + if (bias == 3) + rv = GPIO_PIN_PULLUP; + else if (bias == 1) + rv = GPIO_PIN_PULLDOWN; + break; + case 1: + case 3: + case 4: + if (bias == 1) + rv = GPIO_PIN_PULLUP; + else if (bias == 2) + rv = GPIO_PIN_PULLDOWN; + break; + } + + return (rv); +} + +static int +rk3399_get_bias_value(int bank, int bias) +{ + int rv = 0; + + switch (bank) { + case 0: + case 2: + if (bias & GPIO_PIN_PULLUP) + rv = 3; + else if (bias & GPIO_PIN_PULLDOWN) + rv = 1; + break; + case 1: + case 3: + case 4: + if (bias & GPIO_PIN_PULLUP) + rv = 1; + else if (bias & GPIO_PIN_PULLDOWN) + rv = 2; + break; + } + + return (rv); +} + struct rk_pinctrl_conf rk3399_conf = { .iomux_conf = rk3399_iomux_bank, .iomux_nbanks = nitems(rk3399_iomux_bank), @@ -676,6 +766,8 @@ struct rk_pinctrl_conf rk3399_conf = { .get_pd_offset = rk3399_get_pd_offset, .get_syscon = rk3399_get_syscon, .parse_bias = rk3399_parse_bias, + .resolv_bias_value = rk3399_resolv_bias_value, + .get_bias_value = rk3399_get_bias_value, }; static struct ofw_compat_data compat_data[] = { @@ -921,8 +1013,189 @@ rk_pinctrl_configure_pins(device_t dev, phandle_t cfgx return (0); } +static int +rk_pinctrl_is_gpio_locked(struct rk_pinctrl_softc *sc, struct syscon *syscon, + int bank, uint32_t pin, bool *is_gpio) +{ + uint32_t subbank, bit, mask, reg; + uint32_t pinfunc; + int i; + RK_PINCTRL_LOCK_ASSERT(sc); + + subbank = pin / 8; + *is_gpio = false; + + for (i = 0; i < sc->conf->iomux_nbanks; i++) + if (sc->conf->iomux_conf[i].bank == bank && + sc->conf->iomux_conf[i].subbank == subbank) + break; + + if (i == sc->conf->iomux_nbanks) { + device_printf(sc->dev, "Unknown pin %d in bank %d\n", pin, + bank); + return (EINVAL); + } + + syscon = sc->conf->get_syscon(sc, bank); + + /* Parse pin function */ + reg = sc->conf->iomux_conf[i].offset; + switch (sc->conf->iomux_conf[i].nbits) { + case 4: + if ((pin % 8) >= 4) + reg += 0x4; + bit = (pin % 4) * 4; + mask = (0xF << bit); + break; + case 3: + if ((pin % 8) >= 5) + reg += 4; + bit = (pin % 8 % 5) * 3; + mask = (0x7 << bit); + break; + case 2: + bit = (pin % 8) * 2; + mask = (0x3 << bit); + break; + default: + device_printf(sc->dev, + "Unknown pin stride width %d in bank %d\n", + sc->conf->iomux_conf[i].nbits, bank); + return (EINVAL); + } + rk_pinctrl_get_fixup(sc, bank, pin, ®, &mask, &bit); + + reg = SYSCON_READ_4(syscon, reg); + pinfunc = (reg & mask) >> bit; + + /* Test if the pin is in gpio mode */ + if (pinfunc == 0) + *is_gpio = true; + + return (0); +} + static int +rk_pinctrl_get_bank(struct rk_pinctrl_softc *sc, device_t gpio, int *bank) +{ + int i; + + for (i = 0; i < sc->conf->ngpio_bank; i++) { + if (sc->conf->gpio_bank[i].gpio_dev == gpio) + break; + } + if (i == sc->conf->ngpio_bank) + return (EINVAL); + + *bank = i; + return (0); +} + +static int +rk_pinctrl_is_gpio(device_t pinctrl, device_t gpio, uint32_t pin, bool *is_gpio) +{ + struct rk_pinctrl_softc *sc; + struct syscon *syscon; + int bank; + int rv; + + sc = device_get_softc(pinctrl); + RK_PINCTRL_LOCK(sc); + + rv = rk_pinctrl_get_bank(sc, gpio, &bank); + if (rv != 0) + goto done; + syscon = sc->conf->get_syscon(sc, bank); + rv = rk_pinctrl_is_gpio_locked(sc, syscon, bank, pin, is_gpio); + +done: + RK_PINCTRL_UNLOCK(sc); + + return (rv); +} + +static int +rk_pinctrl_get_flags(device_t pinctrl, device_t gpio, uint32_t pin, + uint32_t *flags) +{ + struct rk_pinctrl_softc *sc; + struct syscon *syscon; + uint32_t reg, mask, bit; + uint32_t bias; + int bank; + int rv = 0; + bool is_gpio; + + sc = device_get_softc(pinctrl); + RK_PINCTRL_LOCK(sc); + + rv = rk_pinctrl_get_bank(sc, gpio, &bank); + if (rv != 0) + goto done; + syscon = sc->conf->get_syscon(sc, bank); + rv = rk_pinctrl_is_gpio_locked(sc, syscon, bank, pin, &is_gpio); + if (rv != 0) + goto done; + if (!is_gpio) { + rv = EINVAL; + goto done; + } + /* Get the pullup/pulldown configuration */ + reg = sc->conf->get_pd_offset(sc, bank); + reg += bank * 0x10 + ((pin / 8) * 0x4); + bit = (pin % 8) * 2; + mask = (0x3 << bit) << 16; + reg = SYSCON_READ_4(syscon, reg); + reg = (reg >> bit) & 0x3; + bias = sc->conf->resolv_bias_value(bank, reg); + *flags = bias; + +done: + RK_PINCTRL_UNLOCK(sc); + return (rv); +} + +static int +rk_pinctrl_set_flags(device_t pinctrl, device_t gpio, uint32_t pin, + uint32_t flags) +{ + struct rk_pinctrl_softc *sc; + struct syscon *syscon; + uint32_t bit, mask, reg; + uint32_t bias; + int bank; + int rv = 0; + bool is_gpio; + + sc = device_get_softc(pinctrl); + RK_PINCTRL_LOCK(sc); + + rv = rk_pinctrl_get_bank(sc, gpio, &bank); + if (rv != 0) + goto done; + syscon = sc->conf->get_syscon(sc, bank); + rv = rk_pinctrl_is_gpio_locked(sc, syscon, bank, pin, &is_gpio); + if (rv != 0) + goto done; + if (!is_gpio) { + rv = EINVAL; + goto done; + } + /* Get the pullup/pulldown configuration */ + reg = sc->conf->get_pd_offset(sc, bank); + reg += bank * 0x10 + ((pin / 8) * 0x4); + bit = (pin % 8) * 2; + mask = (0x3 << bit); + bias = sc->conf->get_bias_value(bank, flags); + SYSCON_MODIFY_4(syscon, reg, mask, bias << bit | (mask << 16)); + +done: + RK_PINCTRL_UNLOCK(sc); + return (rv); +} + +static int rk_pinctrl_register_gpio(struct rk_pinctrl_softc *sc, char *gpio_name, device_t gpio_dev) { @@ -983,6 +1256,8 @@ rk_pinctrl_attach(device_t dev) } } + mtx_init(&sc->mtx, "rk pinctrl", "pinctrl", MTX_SPIN); + sc->conf = (struct rk_pinctrl_conf *)ofw_bus_search_compatible(dev, compat_data)->ocd_data; @@ -1060,6 +1335,9 @@ static device_method_t rk_pinctrl_methods[] = { /* fdt_pinctrl interface */ DEVMETHOD(fdt_pinctrl_configure, rk_pinctrl_configure_pins), + DEVMETHOD(fdt_pinctrl_is_gpio, rk_pinctrl_is_gpio), + DEVMETHOD(fdt_pinctrl_get_flags, rk_pinctrl_get_flags), + DEVMETHOD(fdt_pinctrl_set_flags, rk_pinctrl_set_flags), DEVMETHOD_END }; Modified: stable/12/sys/dev/fdt/fdt_pinctrl_if.m ============================================================================== --- stable/12/sys/dev/fdt/fdt_pinctrl_if.m Wed Mar 4 21:45:12 2020 (r358652) +++ stable/12/sys/dev/fdt/fdt_pinctrl_if.m Wed Mar 4 21:53:54 2020 (r358653) @@ -36,6 +36,31 @@ INTERFACE fdt_pinctrl; +CODE { + static int + fdt_pinctrl_default_is_gpio(device_t pinctrl, device_t gpio, bool *is_gpio) + { + + return (EOPNOTSUPP); + } + + static int + fdt_pinctrl_default_set_flags(device_t pinctrl, device_t gpio, uint32_t pin, + uint32_t flags) + { + + return (EOPNOTSUPP); + } + + static int + fdt_pinctrl_default_get_flags(device_t pinctrl, device_t gpio, uint32_t pin, + uint32_t *flags) + { + + return (EOPNOTSUPP); + } +}; + # Needed for timestamping device probe/attach calls HEADER { #include @@ -57,3 +82,36 @@ METHOD int configure { phandle_t cfgxref; }; + +# +# Test if the pin is in gpio mode +# Called from a gpio device +# +METHOD int is_gpio { + device_t pinctrl; + device_t gpio; + uint32_t pin; + bool *is_gpio; +} DEFAULT fdt_pinctrl_default_is_gpio; + +# +# Set the flags of a pin +# Called from a gpio device +# +METHOD int set_flags { + device_t pinctrl; + device_t gpio; + uint32_t pin; + uint32_t flags; +} DEFAULT fdt_pinctrl_default_set_flags; + +# +# Get the flags of a pin +# Called from a gpio device +# +METHOD int get_flags { + device_t pinctrl; + device_t gpio; + uint32_t pin; + uint32_t *flags; +} DEFAULT fdt_pinctrl_default_get_flags; From owner-svn-src-stable@freebsd.org Wed Mar 4 23:56:39 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 7AABA255B32; Wed, 4 Mar 2020 23:56:39 +0000 (UTC) (envelope-from cy@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 48XrPz1C7Qz40ZT; Wed, 4 Mar 2020 23:56:39 +0000 (UTC) (envelope-from cy@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 ABADE262F2; Wed, 4 Mar 2020 23:56:38 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 024NucsQ026065; Wed, 4 Mar 2020 23:56:38 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024NsE8g025917; Wed, 4 Mar 2020 23:54:14 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202003042354.024NsE8g025917@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 4 Mar 2020 23:54:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r358659 - in stable: 11/contrib/ntp 11/contrib/ntp/html 11/contrib/ntp/html/drivers 11/contrib/ntp/include 11/contrib/ntp/libntp 11/contrib/ntp/libparse 11/contrib/ntp/ntpd 11/contrib/n... X-SVN-Group: stable-11 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/contrib/ntp 11/contrib/ntp/html 11/contrib/ntp/html/drivers 11/contrib/ntp/include 11/contrib/ntp/libntp 11/contrib/ntp/libparse 11/contrib/ntp/ntpd 11/contrib/ntp/ntpdate 11/contrib/ntp... X-SVN-Commit-Revision: 358659 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: Wed, 04 Mar 2020 23:56:39 -0000 Author: cy Date: Wed Mar 4 23:54:13 2020 New Revision: 358659 URL: https://svnweb.freebsd.org/changeset/base/358659 Log: MFC r358652: MFV r358616: Update ntp-4.2.8p13 --> 4.2.8p14. The advisory can be found at: http://support.ntp.org/bin/view/Main/SecurityNotice#\ March_2020_ntp_4_2_8p14_NTP_Rele No CVEs have been documented yet. Security: http://support.ntp.org/bin/view/Main/NtpBug3610 http://support.ntp.org/bin/view/Main/NtpBug3596 http://support.ntp.org/bin/view/Main/NtpBug3592 Added: stable/11/contrib/ntp/include/ntp_calgps.h - copied unchanged from r358652, head/contrib/ntp/include/ntp_calgps.h stable/11/contrib/ntp/include/ntp_psl.h - copied unchanged from r358652, head/contrib/ntp/include/ntp_psl.h stable/11/contrib/ntp/include/timexsup.h - copied unchanged from r358652, head/contrib/ntp/include/timexsup.h stable/11/contrib/ntp/libntp/ntp_calgps.c - copied unchanged from r358652, head/contrib/ntp/libntp/ntp_calgps.c stable/11/contrib/ntp/libntp/timespecops.c - copied unchanged from r358652, head/contrib/ntp/libntp/timespecops.c stable/11/contrib/ntp/libntp/timexsup.c - copied unchanged from r358652, head/contrib/ntp/libntp/timexsup.c stable/11/contrib/ntp/ntpd/psl0.conf - copied unchanged from r358652, head/contrib/ntp/ntpd/psl0.conf stable/11/contrib/ntp/ntpd/psl1.conf - copied unchanged from r358652, head/contrib/ntp/ntpd/psl1.conf stable/11/contrib/ntp/ntpd/psl2.conf - copied unchanged from r358652, head/contrib/ntp/ntpd/psl2.conf Modified: stable/11/contrib/ntp/COPYRIGHT stable/11/contrib/ntp/ChangeLog stable/11/contrib/ntp/CommitLog stable/11/contrib/ntp/NEWS stable/11/contrib/ntp/config.h.in stable/11/contrib/ntp/configure stable/11/contrib/ntp/configure.ac stable/11/contrib/ntp/html/accopt.html stable/11/contrib/ntp/html/clockopt.html stable/11/contrib/ntp/html/confopt.html stable/11/contrib/ntp/html/copyright.html stable/11/contrib/ntp/html/discipline.html stable/11/contrib/ntp/html/drivers/driver20.html stable/11/contrib/ntp/html/drivers/driver29.html stable/11/contrib/ntp/html/miscopt.html stable/11/contrib/ntp/include/Makefile.am stable/11/contrib/ntp/include/Makefile.in stable/11/contrib/ntp/include/ntp.h stable/11/contrib/ntp/include/ntp_calendar.h stable/11/contrib/ntp/include/ntp_config.h stable/11/contrib/ntp/include/ntp_control.h stable/11/contrib/ntp/include/ntp_fp.h stable/11/contrib/ntp/include/ntp_io.h stable/11/contrib/ntp/include/ntp_refclock.h stable/11/contrib/ntp/include/ntp_request.h stable/11/contrib/ntp/include/ntp_stdlib.h stable/11/contrib/ntp/include/ntp_syslog.h stable/11/contrib/ntp/include/ntpd.h stable/11/contrib/ntp/include/timespecops.h stable/11/contrib/ntp/libntp/Makefile.am stable/11/contrib/ntp/libntp/Makefile.in stable/11/contrib/ntp/libntp/decodenetnum.c stable/11/contrib/ntp/libntp/dofptoa.c stable/11/contrib/ntp/libntp/dolfptoa.c stable/11/contrib/ntp/libntp/mstolfp.c stable/11/contrib/ntp/libntp/msyslog.c stable/11/contrib/ntp/libntp/ntp_calendar.c stable/11/contrib/ntp/libntp/recvbuff.c stable/11/contrib/ntp/libntp/statestr.c stable/11/contrib/ntp/libntp/systime.c stable/11/contrib/ntp/libparse/Makefile.am stable/11/contrib/ntp/libparse/Makefile.in stable/11/contrib/ntp/libparse/clk_rawdcf.c stable/11/contrib/ntp/ntpd/Makefile.am stable/11/contrib/ntp/ntpd/Makefile.in stable/11/contrib/ntp/ntpd/cmd_args.c stable/11/contrib/ntp/ntpd/complete.conf.in stable/11/contrib/ntp/ntpd/invoke-ntp.conf.texi stable/11/contrib/ntp/ntpd/invoke-ntp.keys.texi stable/11/contrib/ntp/ntpd/invoke-ntpd.texi stable/11/contrib/ntp/ntpd/keyword-gen-utd stable/11/contrib/ntp/ntpd/keyword-gen.c stable/11/contrib/ntp/ntpd/ntp.conf.5man stable/11/contrib/ntp/ntpd/ntp.conf.5mdoc stable/11/contrib/ntp/ntpd/ntp.conf.def stable/11/contrib/ntp/ntpd/ntp.conf.html stable/11/contrib/ntp/ntpd/ntp.conf.man.in stable/11/contrib/ntp/ntpd/ntp.conf.mdoc.in stable/11/contrib/ntp/ntpd/ntp.keys.5man stable/11/contrib/ntp/ntpd/ntp.keys.5mdoc stable/11/contrib/ntp/ntpd/ntp.keys.html stable/11/contrib/ntp/ntpd/ntp.keys.man.in stable/11/contrib/ntp/ntpd/ntp.keys.mdoc.in stable/11/contrib/ntp/ntpd/ntp_config.c stable/11/contrib/ntp/ntpd/ntp_control.c stable/11/contrib/ntp/ntpd/ntp_io.c stable/11/contrib/ntp/ntpd/ntp_keyword.h stable/11/contrib/ntp/ntpd/ntp_leapsec.c stable/11/contrib/ntp/ntpd/ntp_leapsec.h stable/11/contrib/ntp/ntpd/ntp_loopfilter.c stable/11/contrib/ntp/ntpd/ntp_parser.c stable/11/contrib/ntp/ntpd/ntp_parser.h stable/11/contrib/ntp/ntpd/ntp_peer.c stable/11/contrib/ntp/ntpd/ntp_proto.c stable/11/contrib/ntp/ntpd/ntp_refclock.c stable/11/contrib/ntp/ntpd/ntp_request.c stable/11/contrib/ntp/ntpd/ntp_restrict.c stable/11/contrib/ntp/ntpd/ntp_scanner.c stable/11/contrib/ntp/ntpd/ntp_util.c stable/11/contrib/ntp/ntpd/ntpd-opts.c stable/11/contrib/ntp/ntpd/ntpd-opts.h stable/11/contrib/ntp/ntpd/ntpd.1ntpdman stable/11/contrib/ntp/ntpd/ntpd.1ntpdmdoc stable/11/contrib/ntp/ntpd/ntpd.c stable/11/contrib/ntp/ntpd/ntpd.html stable/11/contrib/ntp/ntpd/ntpd.man.in stable/11/contrib/ntp/ntpd/ntpd.mdoc.in stable/11/contrib/ntp/ntpd/refclock_gpsdjson.c stable/11/contrib/ntp/ntpd/refclock_jupiter.c stable/11/contrib/ntp/ntpd/refclock_nmea.c stable/11/contrib/ntp/ntpd/refclock_oncore.c stable/11/contrib/ntp/ntpd/refclock_palisade.c stable/11/contrib/ntp/ntpd/refclock_palisade.h stable/11/contrib/ntp/ntpd/refclock_parse.c stable/11/contrib/ntp/ntpd/refclock_zyfer.c stable/11/contrib/ntp/ntpdate/ntpdate.c stable/11/contrib/ntp/ntpdc/invoke-ntpdc.texi stable/11/contrib/ntp/ntpdc/layout.std stable/11/contrib/ntp/ntpdc/ntpdc-opts.c stable/11/contrib/ntp/ntpdc/ntpdc-opts.h stable/11/contrib/ntp/ntpdc/ntpdc.1ntpdcman stable/11/contrib/ntp/ntpdc/ntpdc.1ntpdcmdoc stable/11/contrib/ntp/ntpdc/ntpdc.c stable/11/contrib/ntp/ntpdc/ntpdc.html stable/11/contrib/ntp/ntpdc/ntpdc.man.in stable/11/contrib/ntp/ntpdc/ntpdc.mdoc.in stable/11/contrib/ntp/ntpdc/ntpdc_ops.c stable/11/contrib/ntp/ntpq/Makefile.am stable/11/contrib/ntp/ntpq/Makefile.in stable/11/contrib/ntp/ntpq/invoke-ntpq.texi stable/11/contrib/ntp/ntpq/ntpq-opts.c stable/11/contrib/ntp/ntpq/ntpq-opts.h stable/11/contrib/ntp/ntpq/ntpq-subs.c stable/11/contrib/ntp/ntpq/ntpq.1ntpqman stable/11/contrib/ntp/ntpq/ntpq.1ntpqmdoc stable/11/contrib/ntp/ntpq/ntpq.c stable/11/contrib/ntp/ntpq/ntpq.h stable/11/contrib/ntp/ntpq/ntpq.html stable/11/contrib/ntp/ntpq/ntpq.man.in stable/11/contrib/ntp/ntpq/ntpq.mdoc.in stable/11/contrib/ntp/ntpsnmpd/invoke-ntpsnmpd.texi stable/11/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.c stable/11/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.h stable/11/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdman stable/11/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc stable/11/contrib/ntp/ntpsnmpd/ntpsnmpd.html stable/11/contrib/ntp/ntpsnmpd/ntpsnmpd.man.in stable/11/contrib/ntp/ntpsnmpd/ntpsnmpd.mdoc.in stable/11/contrib/ntp/packageinfo.sh stable/11/contrib/ntp/parseutil/dcfd.c stable/11/contrib/ntp/scripts/build/mkver.in stable/11/contrib/ntp/scripts/calc_tickadj/calc_tickadj-opts stable/11/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman stable/11/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc stable/11/contrib/ntp/scripts/calc_tickadj/calc_tickadj.html stable/11/contrib/ntp/scripts/calc_tickadj/calc_tickadj.man.in stable/11/contrib/ntp/scripts/calc_tickadj/calc_tickadj.mdoc.in stable/11/contrib/ntp/scripts/calc_tickadj/invoke-calc_tickadj.texi stable/11/contrib/ntp/scripts/invoke-plot_summary.texi stable/11/contrib/ntp/scripts/invoke-summary.texi stable/11/contrib/ntp/scripts/ntp-wait/invoke-ntp-wait.texi stable/11/contrib/ntp/scripts/ntp-wait/ntp-wait-opts stable/11/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitman stable/11/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc stable/11/contrib/ntp/scripts/ntp-wait/ntp-wait.html stable/11/contrib/ntp/scripts/ntp-wait/ntp-wait.man.in stable/11/contrib/ntp/scripts/ntp-wait/ntp-wait.mdoc.in stable/11/contrib/ntp/scripts/ntpsweep/invoke-ntpsweep.texi stable/11/contrib/ntp/scripts/ntpsweep/ntpsweep-opts stable/11/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepman stable/11/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc stable/11/contrib/ntp/scripts/ntpsweep/ntpsweep.html stable/11/contrib/ntp/scripts/ntpsweep/ntpsweep.man.in stable/11/contrib/ntp/scripts/ntpsweep/ntpsweep.mdoc.in stable/11/contrib/ntp/scripts/ntptrace/invoke-ntptrace.texi stable/11/contrib/ntp/scripts/ntptrace/ntptrace-opts stable/11/contrib/ntp/scripts/ntptrace/ntptrace.1ntptraceman stable/11/contrib/ntp/scripts/ntptrace/ntptrace.1ntptracemdoc stable/11/contrib/ntp/scripts/ntptrace/ntptrace.html stable/11/contrib/ntp/scripts/ntptrace/ntptrace.man.in stable/11/contrib/ntp/scripts/ntptrace/ntptrace.mdoc.in stable/11/contrib/ntp/scripts/plot_summary-opts stable/11/contrib/ntp/scripts/plot_summary.1plot_summaryman stable/11/contrib/ntp/scripts/plot_summary.1plot_summarymdoc stable/11/contrib/ntp/scripts/plot_summary.html stable/11/contrib/ntp/scripts/plot_summary.man.in stable/11/contrib/ntp/scripts/plot_summary.mdoc.in stable/11/contrib/ntp/scripts/summary-opts stable/11/contrib/ntp/scripts/summary.1summaryman stable/11/contrib/ntp/scripts/summary.1summarymdoc stable/11/contrib/ntp/scripts/summary.html stable/11/contrib/ntp/scripts/summary.man.in stable/11/contrib/ntp/scripts/summary.mdoc.in stable/11/contrib/ntp/scripts/update-leap/invoke-update-leap.texi stable/11/contrib/ntp/scripts/update-leap/update-leap-opts stable/11/contrib/ntp/scripts/update-leap/update-leap.1update-leapman stable/11/contrib/ntp/scripts/update-leap/update-leap.1update-leapmdoc stable/11/contrib/ntp/scripts/update-leap/update-leap.html stable/11/contrib/ntp/scripts/update-leap/update-leap.man.in stable/11/contrib/ntp/scripts/update-leap/update-leap.mdoc.in stable/11/contrib/ntp/sntp/COPYRIGHT stable/11/contrib/ntp/sntp/configure stable/11/contrib/ntp/sntp/configure.ac stable/11/contrib/ntp/sntp/crypto.c stable/11/contrib/ntp/sntp/include/copyright.def stable/11/contrib/ntp/sntp/include/version.def stable/11/contrib/ntp/sntp/include/version.texi stable/11/contrib/ntp/sntp/invoke-sntp.texi stable/11/contrib/ntp/sntp/libevent/build-aux/ar-lib stable/11/contrib/ntp/sntp/libevent/build-aux/compile stable/11/contrib/ntp/sntp/libevent/build-aux/config.guess stable/11/contrib/ntp/sntp/libevent/build-aux/config.sub stable/11/contrib/ntp/sntp/libevent/build-aux/depcomp stable/11/contrib/ntp/sntp/libevent/build-aux/install-sh stable/11/contrib/ntp/sntp/libevent/build-aux/missing stable/11/contrib/ntp/sntp/libevent/build-aux/test-driver stable/11/contrib/ntp/sntp/libevent/build-aux/ylwrap stable/11/contrib/ntp/sntp/libevent/test/regress.gen.c stable/11/contrib/ntp/sntp/libevent/test/regress.gen.h stable/11/contrib/ntp/sntp/libopts/m4/libopts.m4 stable/11/contrib/ntp/sntp/m4/ntp_problemtests.m4 stable/11/contrib/ntp/sntp/m4/version.m4 stable/11/contrib/ntp/sntp/main.c stable/11/contrib/ntp/sntp/networking.c stable/11/contrib/ntp/sntp/scm-rev stable/11/contrib/ntp/sntp/sntp-opts.c stable/11/contrib/ntp/sntp/sntp-opts.h stable/11/contrib/ntp/sntp/sntp.1sntpman stable/11/contrib/ntp/sntp/sntp.1sntpmdoc stable/11/contrib/ntp/sntp/sntp.html stable/11/contrib/ntp/sntp/sntp.man.in stable/11/contrib/ntp/sntp/sntp.mdoc.in stable/11/contrib/ntp/sntp/tests/run-crypto.c stable/11/contrib/ntp/sntp/tests/run-keyFile.c stable/11/contrib/ntp/sntp/tests/run-kodDatabase.c stable/11/contrib/ntp/sntp/tests/run-kodFile.c stable/11/contrib/ntp/sntp/tests/run-networking.c stable/11/contrib/ntp/sntp/tests/run-packetHandling.c stable/11/contrib/ntp/sntp/tests/run-packetProcessing.c stable/11/contrib/ntp/sntp/tests/run-t-log.c stable/11/contrib/ntp/sntp/tests/run-utilities.c stable/11/contrib/ntp/sntp/tests/testconf.yml stable/11/contrib/ntp/sntp/version.c stable/11/contrib/ntp/util/invoke-ntp-keygen.texi stable/11/contrib/ntp/util/ntp-keygen-opts.c stable/11/contrib/ntp/util/ntp-keygen-opts.h stable/11/contrib/ntp/util/ntp-keygen.1ntp-keygenman stable/11/contrib/ntp/util/ntp-keygen.1ntp-keygenmdoc stable/11/contrib/ntp/util/ntp-keygen.html stable/11/contrib/ntp/util/ntp-keygen.man.in stable/11/contrib/ntp/util/ntp-keygen.mdoc.in stable/11/contrib/ntp/util/ntptime.c stable/11/usr.sbin/ntp/config.h stable/11/usr.sbin/ntp/libntp/Makefile Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Added: stable/12/contrib/ntp/include/ntp_calgps.h - copied unchanged from r358652, head/contrib/ntp/include/ntp_calgps.h stable/12/contrib/ntp/include/ntp_psl.h - copied unchanged from r358652, head/contrib/ntp/include/ntp_psl.h stable/12/contrib/ntp/include/timexsup.h - copied unchanged from r358652, head/contrib/ntp/include/timexsup.h stable/12/contrib/ntp/libntp/ntp_calgps.c - copied unchanged from r358652, head/contrib/ntp/libntp/ntp_calgps.c stable/12/contrib/ntp/libntp/timespecops.c - copied unchanged from r358652, head/contrib/ntp/libntp/timespecops.c stable/12/contrib/ntp/libntp/timexsup.c - copied unchanged from r358652, head/contrib/ntp/libntp/timexsup.c stable/12/contrib/ntp/ntpd/psl0.conf - copied unchanged from r358652, head/contrib/ntp/ntpd/psl0.conf stable/12/contrib/ntp/ntpd/psl1.conf - copied unchanged from r358652, head/contrib/ntp/ntpd/psl1.conf stable/12/contrib/ntp/ntpd/psl2.conf - copied unchanged from r358652, head/contrib/ntp/ntpd/psl2.conf Modified: stable/12/contrib/ntp/COPYRIGHT stable/12/contrib/ntp/ChangeLog stable/12/contrib/ntp/CommitLog stable/12/contrib/ntp/NEWS stable/12/contrib/ntp/config.h.in stable/12/contrib/ntp/configure stable/12/contrib/ntp/configure.ac stable/12/contrib/ntp/html/accopt.html stable/12/contrib/ntp/html/clockopt.html stable/12/contrib/ntp/html/confopt.html stable/12/contrib/ntp/html/copyright.html stable/12/contrib/ntp/html/discipline.html stable/12/contrib/ntp/html/drivers/driver20.html stable/12/contrib/ntp/html/drivers/driver29.html stable/12/contrib/ntp/html/miscopt.html stable/12/contrib/ntp/include/Makefile.am stable/12/contrib/ntp/include/Makefile.in stable/12/contrib/ntp/include/ntp.h stable/12/contrib/ntp/include/ntp_calendar.h stable/12/contrib/ntp/include/ntp_config.h stable/12/contrib/ntp/include/ntp_control.h stable/12/contrib/ntp/include/ntp_fp.h stable/12/contrib/ntp/include/ntp_io.h stable/12/contrib/ntp/include/ntp_refclock.h stable/12/contrib/ntp/include/ntp_request.h stable/12/contrib/ntp/include/ntp_stdlib.h stable/12/contrib/ntp/include/ntp_syslog.h stable/12/contrib/ntp/include/ntpd.h stable/12/contrib/ntp/include/timespecops.h stable/12/contrib/ntp/libntp/Makefile.am stable/12/contrib/ntp/libntp/Makefile.in stable/12/contrib/ntp/libntp/decodenetnum.c stable/12/contrib/ntp/libntp/dofptoa.c stable/12/contrib/ntp/libntp/dolfptoa.c stable/12/contrib/ntp/libntp/mstolfp.c stable/12/contrib/ntp/libntp/msyslog.c stable/12/contrib/ntp/libntp/ntp_calendar.c stable/12/contrib/ntp/libntp/recvbuff.c stable/12/contrib/ntp/libntp/statestr.c stable/12/contrib/ntp/libntp/systime.c stable/12/contrib/ntp/libparse/Makefile.am stable/12/contrib/ntp/libparse/Makefile.in stable/12/contrib/ntp/libparse/clk_rawdcf.c stable/12/contrib/ntp/ntpd/Makefile.am stable/12/contrib/ntp/ntpd/Makefile.in stable/12/contrib/ntp/ntpd/cmd_args.c stable/12/contrib/ntp/ntpd/complete.conf.in stable/12/contrib/ntp/ntpd/invoke-ntp.conf.texi stable/12/contrib/ntp/ntpd/invoke-ntp.keys.texi stable/12/contrib/ntp/ntpd/invoke-ntpd.texi stable/12/contrib/ntp/ntpd/keyword-gen-utd stable/12/contrib/ntp/ntpd/keyword-gen.c stable/12/contrib/ntp/ntpd/ntp.conf.5man stable/12/contrib/ntp/ntpd/ntp.conf.5mdoc stable/12/contrib/ntp/ntpd/ntp.conf.def stable/12/contrib/ntp/ntpd/ntp.conf.html stable/12/contrib/ntp/ntpd/ntp.conf.man.in stable/12/contrib/ntp/ntpd/ntp.conf.mdoc.in stable/12/contrib/ntp/ntpd/ntp.keys.5man stable/12/contrib/ntp/ntpd/ntp.keys.5mdoc stable/12/contrib/ntp/ntpd/ntp.keys.html stable/12/contrib/ntp/ntpd/ntp.keys.man.in stable/12/contrib/ntp/ntpd/ntp.keys.mdoc.in stable/12/contrib/ntp/ntpd/ntp_config.c stable/12/contrib/ntp/ntpd/ntp_control.c stable/12/contrib/ntp/ntpd/ntp_io.c stable/12/contrib/ntp/ntpd/ntp_keyword.h stable/12/contrib/ntp/ntpd/ntp_leapsec.c stable/12/contrib/ntp/ntpd/ntp_leapsec.h stable/12/contrib/ntp/ntpd/ntp_loopfilter.c stable/12/contrib/ntp/ntpd/ntp_parser.c stable/12/contrib/ntp/ntpd/ntp_parser.h stable/12/contrib/ntp/ntpd/ntp_peer.c stable/12/contrib/ntp/ntpd/ntp_proto.c stable/12/contrib/ntp/ntpd/ntp_refclock.c stable/12/contrib/ntp/ntpd/ntp_request.c stable/12/contrib/ntp/ntpd/ntp_restrict.c stable/12/contrib/ntp/ntpd/ntp_scanner.c stable/12/contrib/ntp/ntpd/ntp_util.c stable/12/contrib/ntp/ntpd/ntpd-opts.c stable/12/contrib/ntp/ntpd/ntpd-opts.h stable/12/contrib/ntp/ntpd/ntpd.1ntpdman stable/12/contrib/ntp/ntpd/ntpd.1ntpdmdoc stable/12/contrib/ntp/ntpd/ntpd.c stable/12/contrib/ntp/ntpd/ntpd.html stable/12/contrib/ntp/ntpd/ntpd.man.in stable/12/contrib/ntp/ntpd/ntpd.mdoc.in stable/12/contrib/ntp/ntpd/refclock_gpsdjson.c stable/12/contrib/ntp/ntpd/refclock_jupiter.c stable/12/contrib/ntp/ntpd/refclock_nmea.c stable/12/contrib/ntp/ntpd/refclock_oncore.c stable/12/contrib/ntp/ntpd/refclock_palisade.c stable/12/contrib/ntp/ntpd/refclock_palisade.h stable/12/contrib/ntp/ntpd/refclock_parse.c stable/12/contrib/ntp/ntpd/refclock_zyfer.c stable/12/contrib/ntp/ntpdate/ntpdate.c stable/12/contrib/ntp/ntpdc/invoke-ntpdc.texi stable/12/contrib/ntp/ntpdc/layout.std stable/12/contrib/ntp/ntpdc/ntpdc-opts.c stable/12/contrib/ntp/ntpdc/ntpdc-opts.h stable/12/contrib/ntp/ntpdc/ntpdc.1ntpdcman stable/12/contrib/ntp/ntpdc/ntpdc.1ntpdcmdoc stable/12/contrib/ntp/ntpdc/ntpdc.c stable/12/contrib/ntp/ntpdc/ntpdc.html stable/12/contrib/ntp/ntpdc/ntpdc.man.in stable/12/contrib/ntp/ntpdc/ntpdc.mdoc.in stable/12/contrib/ntp/ntpdc/ntpdc_ops.c stable/12/contrib/ntp/ntpq/Makefile.am stable/12/contrib/ntp/ntpq/Makefile.in stable/12/contrib/ntp/ntpq/invoke-ntpq.texi stable/12/contrib/ntp/ntpq/ntpq-opts.c stable/12/contrib/ntp/ntpq/ntpq-opts.h stable/12/contrib/ntp/ntpq/ntpq-subs.c stable/12/contrib/ntp/ntpq/ntpq.1ntpqman stable/12/contrib/ntp/ntpq/ntpq.1ntpqmdoc stable/12/contrib/ntp/ntpq/ntpq.c stable/12/contrib/ntp/ntpq/ntpq.h stable/12/contrib/ntp/ntpq/ntpq.html stable/12/contrib/ntp/ntpq/ntpq.man.in stable/12/contrib/ntp/ntpq/ntpq.mdoc.in stable/12/contrib/ntp/ntpsnmpd/invoke-ntpsnmpd.texi stable/12/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.c stable/12/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.h stable/12/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdman stable/12/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc stable/12/contrib/ntp/ntpsnmpd/ntpsnmpd.html stable/12/contrib/ntp/ntpsnmpd/ntpsnmpd.man.in stable/12/contrib/ntp/ntpsnmpd/ntpsnmpd.mdoc.in stable/12/contrib/ntp/packageinfo.sh stable/12/contrib/ntp/parseutil/dcfd.c stable/12/contrib/ntp/scripts/build/mkver.in stable/12/contrib/ntp/scripts/calc_tickadj/calc_tickadj-opts stable/12/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman stable/12/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc stable/12/contrib/ntp/scripts/calc_tickadj/calc_tickadj.html stable/12/contrib/ntp/scripts/calc_tickadj/calc_tickadj.man.in stable/12/contrib/ntp/scripts/calc_tickadj/calc_tickadj.mdoc.in stable/12/contrib/ntp/scripts/calc_tickadj/invoke-calc_tickadj.texi stable/12/contrib/ntp/scripts/invoke-plot_summary.texi stable/12/contrib/ntp/scripts/invoke-summary.texi stable/12/contrib/ntp/scripts/ntp-wait/invoke-ntp-wait.texi stable/12/contrib/ntp/scripts/ntp-wait/ntp-wait-opts stable/12/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitman stable/12/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc stable/12/contrib/ntp/scripts/ntp-wait/ntp-wait.html stable/12/contrib/ntp/scripts/ntp-wait/ntp-wait.man.in stable/12/contrib/ntp/scripts/ntp-wait/ntp-wait.mdoc.in stable/12/contrib/ntp/scripts/ntpsweep/invoke-ntpsweep.texi stable/12/contrib/ntp/scripts/ntpsweep/ntpsweep-opts stable/12/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepman stable/12/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc stable/12/contrib/ntp/scripts/ntpsweep/ntpsweep.html stable/12/contrib/ntp/scripts/ntpsweep/ntpsweep.man.in stable/12/contrib/ntp/scripts/ntpsweep/ntpsweep.mdoc.in stable/12/contrib/ntp/scripts/ntptrace/invoke-ntptrace.texi stable/12/contrib/ntp/scripts/ntptrace/ntptrace-opts stable/12/contrib/ntp/scripts/ntptrace/ntptrace.1ntptraceman stable/12/contrib/ntp/scripts/ntptrace/ntptrace.1ntptracemdoc stable/12/contrib/ntp/scripts/ntptrace/ntptrace.html stable/12/contrib/ntp/scripts/ntptrace/ntptrace.man.in stable/12/contrib/ntp/scripts/ntptrace/ntptrace.mdoc.in stable/12/contrib/ntp/scripts/plot_summary-opts stable/12/contrib/ntp/scripts/plot_summary.1plot_summaryman stable/12/contrib/ntp/scripts/plot_summary.1plot_summarymdoc stable/12/contrib/ntp/scripts/plot_summary.html stable/12/contrib/ntp/scripts/plot_summary.man.in stable/12/contrib/ntp/scripts/plot_summary.mdoc.in stable/12/contrib/ntp/scripts/summary-opts stable/12/contrib/ntp/scripts/summary.1summaryman stable/12/contrib/ntp/scripts/summary.1summarymdoc stable/12/contrib/ntp/scripts/summary.html stable/12/contrib/ntp/scripts/summary.man.in stable/12/contrib/ntp/scripts/summary.mdoc.in stable/12/contrib/ntp/scripts/update-leap/invoke-update-leap.texi stable/12/contrib/ntp/scripts/update-leap/update-leap-opts stable/12/contrib/ntp/scripts/update-leap/update-leap.1update-leapman stable/12/contrib/ntp/scripts/update-leap/update-leap.1update-leapmdoc stable/12/contrib/ntp/scripts/update-leap/update-leap.html stable/12/contrib/ntp/scripts/update-leap/update-leap.man.in stable/12/contrib/ntp/scripts/update-leap/update-leap.mdoc.in stable/12/contrib/ntp/sntp/COPYRIGHT stable/12/contrib/ntp/sntp/configure stable/12/contrib/ntp/sntp/configure.ac stable/12/contrib/ntp/sntp/crypto.c stable/12/contrib/ntp/sntp/include/copyright.def stable/12/contrib/ntp/sntp/include/version.def stable/12/contrib/ntp/sntp/include/version.texi stable/12/contrib/ntp/sntp/invoke-sntp.texi stable/12/contrib/ntp/sntp/libevent/build-aux/ar-lib stable/12/contrib/ntp/sntp/libevent/build-aux/compile stable/12/contrib/ntp/sntp/libevent/build-aux/config.guess stable/12/contrib/ntp/sntp/libevent/build-aux/config.sub stable/12/contrib/ntp/sntp/libevent/build-aux/depcomp stable/12/contrib/ntp/sntp/libevent/build-aux/install-sh stable/12/contrib/ntp/sntp/libevent/build-aux/missing stable/12/contrib/ntp/sntp/libevent/build-aux/test-driver stable/12/contrib/ntp/sntp/libevent/build-aux/ylwrap stable/12/contrib/ntp/sntp/libevent/test/regress.gen.c stable/12/contrib/ntp/sntp/libevent/test/regress.gen.h stable/12/contrib/ntp/sntp/libopts/m4/libopts.m4 stable/12/contrib/ntp/sntp/m4/ntp_problemtests.m4 stable/12/contrib/ntp/sntp/m4/version.m4 stable/12/contrib/ntp/sntp/main.c stable/12/contrib/ntp/sntp/networking.c stable/12/contrib/ntp/sntp/scm-rev stable/12/contrib/ntp/sntp/sntp-opts.c stable/12/contrib/ntp/sntp/sntp-opts.h stable/12/contrib/ntp/sntp/sntp.1sntpman stable/12/contrib/ntp/sntp/sntp.1sntpmdoc stable/12/contrib/ntp/sntp/sntp.html stable/12/contrib/ntp/sntp/sntp.man.in stable/12/contrib/ntp/sntp/sntp.mdoc.in stable/12/contrib/ntp/sntp/tests/run-crypto.c stable/12/contrib/ntp/sntp/tests/run-keyFile.c stable/12/contrib/ntp/sntp/tests/run-kodDatabase.c stable/12/contrib/ntp/sntp/tests/run-kodFile.c stable/12/contrib/ntp/sntp/tests/run-networking.c stable/12/contrib/ntp/sntp/tests/run-packetHandling.c stable/12/contrib/ntp/sntp/tests/run-packetProcessing.c stable/12/contrib/ntp/sntp/tests/run-t-log.c stable/12/contrib/ntp/sntp/tests/run-utilities.c stable/12/contrib/ntp/sntp/tests/testconf.yml stable/12/contrib/ntp/sntp/version.c stable/12/contrib/ntp/util/invoke-ntp-keygen.texi stable/12/contrib/ntp/util/ntp-keygen-opts.c stable/12/contrib/ntp/util/ntp-keygen-opts.h stable/12/contrib/ntp/util/ntp-keygen.1ntp-keygenman stable/12/contrib/ntp/util/ntp-keygen.1ntp-keygenmdoc stable/12/contrib/ntp/util/ntp-keygen.html stable/12/contrib/ntp/util/ntp-keygen.man.in stable/12/contrib/ntp/util/ntp-keygen.mdoc.in stable/12/contrib/ntp/util/ntptime.c stable/12/usr.sbin/ntp/config.h stable/12/usr.sbin/ntp/libntp/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/11/contrib/ntp/COPYRIGHT ============================================================================== --- stable/11/contrib/ntp/COPYRIGHT Wed Mar 4 23:49:20 2020 (r358658) +++ stable/11/contrib/ntp/COPYRIGHT Wed Mar 4 23:54:13 2020 (r358659) @@ -3,7 +3,7 @@ This file is automatically generated from html/copyrig jpg "Clone me," says Dolly sheepishly. - Last update: 2-Jan-2017 11:58 UTC + Last update: 4-Feb-2020 23:47 UTC __________________________________________________________________ The following copyright notice applies to all files collectively called @@ -32,7 +32,7 @@ This file is automatically generated from html/copyrig Burnicki is: *********************************************************************** * * -* Copyright (c) Network Time Foundation 2011-2017 * +* Copyright (c) Network Time Foundation 2011-2020 * * * * All Rights Reserved * * * Modified: stable/11/contrib/ntp/ChangeLog ============================================================================== --- stable/11/contrib/ntp/ChangeLog Wed Mar 4 23:49:20 2020 (r358658) +++ stable/11/contrib/ntp/ChangeLog Wed Mar 4 23:54:13 2020 (r358659) @@ -1,4 +1,100 @@ --- +(4.2.8p14) 2020/03/03 Released by Harlan Stenn + +* [Sec 3610] process_control() should bail earlier on short packets. stenn@ + - Reported by Philippe Antoine +* [Sec 3596] Highly predictable timestamp attack. + - Reported by Miroslav Lichvar +* [Sec 3592] DoS attack on client ntpd + - Reported by Miroslav Lichvar +* [Bug 3637] Emit the version of ntpd in saveconfig. stenn@ +* [Bug 3636] NMEA: combine time/date from multiple sentences +* [Bug 3635] Make leapsecond file hash check optional +* [Bug 3634] Typo in discipline.html, reported by Jason Harrison. stenn@ +* [Bug 3628] raw DCF decoding - improve robustness with Zeller's congruence + - implement Zeller's congruence in libparse and libntp +* [Bug 3627] SIGSEGV on FreeBSD-12 with stack limit and stack gap + - integrated patch by Cy Schubert +* [Bug 3620] memory leak in ntpq sysinfo + - applied patch by Gerry Garvey +* [Bug 3619] Honour drefid setting in cooked mode and sysinfo + - applied patch by Gerry Garvey +* [Bug 3617] Add support for ACE III and Copernicus II receivers + - integrated patch by Richard Steedman +* [Bug 3615] accelerate refclock startup +* [Bug 3613] Propagate noselect to mobilized pool servers + - Reported by Martin Burnicki +* [Bug 3612] Use-of-uninitialized-value in receive function + - Reported by Philippe Antoine +* [Bug 3611] NMEA time interpreted incorrectly + - officially document new "trust date" mode bit for NMEA driver + - restore the (previously undocumented) "trust date" feature lost with [bug 3577] +* [Bug 3609] Fixing wrong falseticker in case of non-statistic jitter + - mostly based on a patch by Michael Haardt, implementing 'fudge minjitter' +* [Bug 3608] libparse fails to compile on S11.4SRU13 and later + - removed ffs() and fls() prototypes as per Brian Utterback +* [Bug 3604] Wrong param byte order passing into record_raw_stats() in + ntp_io.c + - fixed byte and paramter order as suggested by wei6410@sina.com +* [Bug 3601] Tests fail to link on platforms with ntp_cv_gc_sections_runs=no +* [Bug 3599] Build fails on linux-m68k due to alignment issues + - added padding as suggested by John Paul Adrian Glaubitz +* [Bug 3594] ntpd discards messages coming through nmead +* [Bug 3593] ntpd discards silently nmea messages after the 5th string +* [Bug 3590] Update refclock_oncore.c to the new GPS date API +* [Bug 3585] Unity tests mix buffered and unbuffered output + - stdout+stderr are set to line buffered during test setup now +* [Bug 3583] synchronization error + - set clock to base date if system time is before that limit +* [Bug 3582] gpsdjson refclock fudgetime1 adjustment is doubled +* [Bug 3580] Possible bug ntpq-subs (NULL dereference in dogetassoc) + - Reported by Paulo Neves +* [Bug 3577] Update refclock_zyfer.c to the new GPS date API + - also updates for refclock_nmea.c and refclock_jupiter.c +* [Bug 3576] New GPS date function API +* [Bug 3573] nptdate: missleading error message +* [Bug 3570] NMEA driver docs: talker ID not mentioned, typo +* [Bug 3569] cleanup MOD_NANO/STA_NANO handling for 'ntpadjtimex()' + - sidekick: service port resolution in 'ntpdate' +* [Bug 3550] Reproducible build: Respect SOURCE_DATE_EPOCH + - applied patch by Douglas Royds +* [Bug 3542] ntpdc monlist parameters cannot be set +* [Bug 3533] ntpdc peer_info ipv6 issues + - applied patch by Gerry Garvey +* [Bug 3531] make check: test-decodenetnum fails + - try to harden 'decodenetnum()' against 'getaddrinfo()' errors + - fix wrong cond-compile tests in unit tests +* [Bug 3517] Reducing build noise +* [Bug 3516] Require tooling from this decade + - patch by Philipp Prindeville +* [Bug 3515] Refactor ntpdmain() dispatcher loop and group common code + - patch by Philipp Prindeville +* [Bug 3511] Get rid of AC_LANG_SOURCE() warnings + - patch by Philipp Prindeville +* [Bug 3510] Flatten out the #ifdef nesting in ntpdmain() + - partial application of patch by Philipp Prindeville +* [Bug 3491] Signed values of LFP datatypes should always display a sign + - applied patch by Gerry Garvey & fixed unit tests +* [Bug 3490] Patch to support Trimble Resolution Receivers + - applied (modified) patch by Richard Steedman +* [Bug 3473] RefID of refclocks should always be text format + - applied patch by Gerry Garvey (with minor formatting changes) +* [Bug 3132] Building 4.2.8p8 with disabled local libopts fails + - applied patch by Miroslav Lichvar +* [Bug 3094] ntpd trying to listen for broadcasts on a completely ipv6 network + +* [Bug 2420] ntpd doesn't run and exits with retval 0 when invalid user + is specified with -u + - monitor daemon child startup & propagate exit codes +* [Bug 1433] runtime check whether the kernel really supports capabilities + - (modified) patch by Kurt Roeckx +* Clean up sntp/networking.c:sendpkt() error message. +* Provide more detail on unrecognized config file parser tokens. +* Startup log improvements. +* Update the copyright year. +* html/confopt.html: cleanup. + +--- (4.2.8p13) 2019/03/07 Released by Harlan Stenn * [Sec 3565] Crafted null dereference attack in authenticated Modified: stable/11/contrib/ntp/CommitLog ============================================================================== --- stable/11/contrib/ntp/CommitLog Wed Mar 4 23:49:20 2020 (r358658) +++ stable/11/contrib/ntp/CommitLog Wed Mar 4 23:54:13 2020 (r358659) @@ -1,10 +1,3065 @@ -ChangeSet@1.3849, 2019-02-20 17:13:36-08:00, harlan@ntp-build.tal1.ntfo.org +ChangeSet@1.3896, 2020-03-03 17:42:43-08:00, ntpreleng@ntp-build.tal1.ntfo.org + NTP_4_2_8P14 + TAG: NTP_4_2_8P14 + + ChangeLog@1.1974 +1 -1 + NTP_4_2_8P14 + + ntpd/invoke-ntp.conf.texi@1.221 +1 -1 + NTP_4_2_8P14 + + ntpd/invoke-ntp.keys.texi@1.206 +1 -1 + NTP_4_2_8P14 + + ntpd/invoke-ntpd.texi@1.520 +2 -2 + NTP_4_2_8P14 + + ntpd/ntp.conf.5man@1.255 +2 -2 + NTP_4_2_8P14 + + ntpd/ntp.conf.5mdoc@1.255 +1 -1 + NTP_4_2_8P14 + + ntpd/ntp.conf.html@1.203 +1 -1 + NTP_4_2_8P14 + + ntpd/ntp.conf.man.in@1.255 +2 -2 + NTP_4_2_8P14 + + ntpd/ntp.conf.mdoc.in@1.255 +1 -1 + NTP_4_2_8P14 + + ntpd/ntp.keys.5man@1.240 +2 -2 + NTP_4_2_8P14 + + ntpd/ntp.keys.5mdoc@1.240 +1 -1 + NTP_4_2_8P14 + + ntpd/ntp.keys.html@1.201 +1 -1 + NTP_4_2_8P14 + + ntpd/ntp.keys.man.in@1.240 +2 -2 + NTP_4_2_8P14 + + ntpd/ntp.keys.mdoc.in@1.240 +1 -1 + NTP_4_2_8P14 + + ntpd/ntpd-opts.c@1.543 +7 -7 + NTP_4_2_8P14 + + ntpd/ntpd-opts.h@1.542 +3 -3 + NTP_4_2_8P14 + + ntpd/ntpd.1ntpdman@1.349 +2 -2 + NTP_4_2_8P14 + + ntpd/ntpd.1ntpdmdoc@1.349 +1 -1 + NTP_4_2_8P14 + + ntpd/ntpd.html@1.194 +2 -2 + NTP_4_2_8P14 + + ntpd/ntpd.man.in@1.349 +2 -2 + NTP_4_2_8P14 + + ntpd/ntpd.mdoc.in@1.349 +1 -1 + NTP_4_2_8P14 + + ntpdc/invoke-ntpdc.texi@1.517 +2 -2 + NTP_4_2_8P14 + + ntpdc/ntpdc-opts.c@1.536 +7 -7 + NTP_4_2_8P14 + + ntpdc/ntpdc-opts.h@1.535 +3 -3 + NTP_4_2_8P14 + + ntpdc/ntpdc.1ntpdcman@1.348 +2 -2 + NTP_4_2_8P14 + + ntpdc/ntpdc.1ntpdcmdoc@1.348 +1 -1 + NTP_4_2_8P14 + + ntpdc/ntpdc.html@1.363 +2 -2 + NTP_4_2_8P14 + + ntpdc/ntpdc.man.in@1.348 +2 -2 + NTP_4_2_8P14 + + ntpdc/ntpdc.mdoc.in@1.348 +1 -1 + NTP_4_2_8P14 + + ntpq/invoke-ntpq.texi@1.527 +2 -2 + NTP_4_2_8P14 + + ntpq/ntpq-opts.c@1.545 +7 -7 + NTP_4_2_8P14 + + ntpq/ntpq-opts.h@1.543 +3 -3 + NTP_4_2_8P14 + + ntpq/ntpq.1ntpqman@1.355 +2 -2 + NTP_4_2_8P14 + + ntpq/ntpq.1ntpqmdoc@1.355 +1 -1 + NTP_4_2_8P14 + + ntpq/ntpq.html@1.194 +2 -2 + NTP_4_2_8P14 + + ntpq/ntpq.man.in@1.355 +2 -2 + NTP_4_2_8P14 + + ntpq/ntpq.mdoc.in@1.355 +1 -1 + NTP_4_2_8P14 + + ntpsnmpd/invoke-ntpsnmpd.texi@1.519 +1 -1 + NTP_4_2_8P14 + + ntpsnmpd/ntpsnmpd-opts.c@1.538 +7 -7 + NTP_4_2_8P14 + + ntpsnmpd/ntpsnmpd-opts.h@1.537 +3 -3 + NTP_4_2_8P14 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.348 +2 -2 + NTP_4_2_8P14 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.348 +1 -1 + NTP_4_2_8P14 + + ntpsnmpd/ntpsnmpd.html@1.187 +1 -1 + NTP_4_2_8P14 + + ntpsnmpd/ntpsnmpd.man.in@1.348 +2 -2 + NTP_4_2_8P14 + + ntpsnmpd/ntpsnmpd.mdoc.in@1.348 +1 -1 + NTP_4_2_8P14 + + packageinfo.sh@1.544 +1 -1 + NTP_4_2_8P14 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.109 +2 -2 + NTP_4_2_8P14 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.110 +1 -1 + NTP_4_2_8P14 + + scripts/calc_tickadj/calc_tickadj.html@1.110 +1 -1 + NTP_4_2_8P14 + + scripts/calc_tickadj/calc_tickadj.man.in@1.108 +2 -2 + NTP_4_2_8P14 + + scripts/calc_tickadj/calc_tickadj.mdoc.in@1.110 +1 -1 + NTP_4_2_8P14 + + scripts/calc_tickadj/invoke-calc_tickadj.texi@1.113 +1 -1 + NTP_4_2_8P14 + + scripts/invoke-plot_summary.texi@1.131 +2 -2 + NTP_4_2_8P14 + + scripts/invoke-summary.texi@1.130 +2 -2 + NTP_4_2_8P14 + + scripts/ntp-wait/invoke-ntp-wait.texi@1.341 +2 -2 + NTP_4_2_8P14 + + scripts/ntp-wait/ntp-wait-opts@1.77 +2 -2 + NTP_4_2_8P14 + + scripts/ntp-wait/ntp-wait.1ntp-waitman@1.337 +2 -2 + NTP_4_2_8P14 + + scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.338 +1 -1 + NTP_4_2_8P14 + + scripts/ntp-wait/ntp-wait.html@1.359 +2 -2 + NTP_4_2_8P14 + + scripts/ntp-wait/ntp-wait.man.in@1.337 +2 -2 + NTP_4_2_8P14 + + scripts/ntp-wait/ntp-wait.mdoc.in@1.338 +1 -1 + NTP_4_2_8P14 + + scripts/ntpsweep/invoke-ntpsweep.texi@1.128 +2 -2 + NTP_4_2_8P14 + + scripts/ntpsweep/ntpsweep-opts@1.79 +2 -2 + NTP_4_2_8P14 + + scripts/ntpsweep/ntpsweep.1ntpsweepman@1.116 +2 -2 + NTP_4_2_8P14 + + scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.116 +1 -1 + NTP_4_2_8P14 + + scripts/ntpsweep/ntpsweep.html@1.131 +2 -2 + NTP_4_2_8P14 + + scripts/ntpsweep/ntpsweep.man.in@1.116 +2 -2 + NTP_4_2_8P14 + + scripts/ntpsweep/ntpsweep.mdoc.in@1.117 +1 -1 + NTP_4_2_8P14 + + scripts/ntptrace/invoke-ntptrace.texi@1.130 +2 -2 + NTP_4_2_8P14 + + scripts/ntptrace/ntptrace-opts@1.79 +2 -2 + NTP_4_2_8P14 + + scripts/ntptrace/ntptrace.1ntptraceman@1.116 +2 -2 + NTP_4_2_8P14 + + scripts/ntptrace/ntptrace.1ntptracemdoc@1.117 +1 -1 + NTP_4_2_8P14 + + scripts/ntptrace/ntptrace.html@1.132 +2 -2 + NTP_4_2_8P14 + + scripts/ntptrace/ntptrace.man.in@1.116 +2 -2 + NTP_4_2_8P14 + + scripts/ntptrace/ntptrace.mdoc.in@1.118 +1 -1 + NTP_4_2_8P14 + + scripts/plot_summary-opts@1.80 +2 -2 + NTP_4_2_8P14 + + scripts/plot_summary.1plot_summaryman@1.129 +2 -2 + NTP_4_2_8P14 + + scripts/plot_summary.1plot_summarymdoc@1.129 +1 -1 + NTP_4_2_8P14 + + scripts/plot_summary.html@1.134 +2 -2 + NTP_4_2_8P14 + + scripts/plot_summary.man.in@1.129 +2 -2 + NTP_4_2_8P14 + + scripts/plot_summary.mdoc.in@1.129 +1 -1 + NTP_4_2_8P14 + + scripts/summary-opts@1.79 +2 -2 + NTP_4_2_8P14 + + scripts/summary.1summaryman@1.128 +2 -2 + NTP_4_2_8P14 + + scripts/summary.1summarymdoc@1.128 +1 -1 + NTP_4_2_8P14 + + scripts/summary.html@1.133 +2 -2 + NTP_4_2_8P14 + + scripts/summary.man.in@1.128 +2 -2 + NTP_4_2_8P14 + + scripts/summary.mdoc.in@1.128 +1 -1 + NTP_4_2_8P14 + + scripts/update-leap/invoke-update-leap.texi@1.29 +1 -1 + NTP_4_2_8P14 + + scripts/update-leap/update-leap-opts@1.30 +2 -2 + NTP_4_2_8P14 + + scripts/update-leap/update-leap.1update-leapman@1.29 +2 -2 + NTP_4_2_8P14 + + scripts/update-leap/update-leap.1update-leapmdoc@1.29 +1 -1 + NTP_4_2_8P14 + + scripts/update-leap/update-leap.html@1.30 +1 -1 + NTP_4_2_8P14 + + scripts/update-leap/update-leap.man.in@1.29 +2 -2 + NTP_4_2_8P14 + + scripts/update-leap/update-leap.mdoc.in@1.29 +1 -1 + NTP_4_2_8P14 + + sntp/invoke-sntp.texi@1.519 +2 -2 + NTP_4_2_8P14 + + sntp/sntp-opts.c@1.539 +7 -7 + NTP_4_2_8P14 + + sntp/sntp-opts.h@1.537 +3 -3 + NTP_4_2_8P14 + + sntp/sntp.1sntpman@1.354 +2 -2 + NTP_4_2_8P14 + + sntp/sntp.1sntpmdoc@1.354 +1 -1 + NTP_4_2_8P14 + + sntp/sntp.html@1.535 +2 -2 + NTP_4_2_8P14 + + sntp/sntp.man.in@1.354 +2 -2 + NTP_4_2_8P14 + + sntp/sntp.mdoc.in@1.354 +1 -1 + NTP_4_2_8P14 + + util/invoke-ntp-keygen.texi@1.522 +2 -2 + NTP_4_2_8P14 + + util/ntp-keygen-opts.c@1.541 +7 -7 + NTP_4_2_8P14 + + util/ntp-keygen-opts.h@1.539 +3 -3 + NTP_4_2_8P14 + + util/ntp-keygen.1ntp-keygenman@1.350 +2 -2 + NTP_4_2_8P14 + + util/ntp-keygen.1ntp-keygenmdoc@1.350 +1 -1 + NTP_4_2_8P14 + + util/ntp-keygen.html@1.195 +2 -2 + NTP_4_2_8P14 + + util/ntp-keygen.man.in@1.350 +2 -2 + NTP_4_2_8P14 + + util/ntp-keygen.mdoc.in@1.350 +1 -1 + NTP_4_2_8P14 + +ChangeSet@1.3895, 2020-03-03 17:09:57-08:00, ntpreleng@ntp-build.tal1.ntfo.org + quiet some debug messages + + ntpd/ntp_config.c@1.375 +0 -2 + quiet some debug messages + + ntpd/ntp_peer.c@1.166 +2 -0 + quiet some debug messages + +ChangeSet@1.3894, 2020-03-03 16:49:54-08:00, ntpreleng@ntp-build.tal1.ntfo.org + NTP_4_2_8P13 + TAG: NTP_4_2_8P13 + + ChangeLog@1.1973 +1 -0 + NTP_4_2_8P13 + + ntpd/invoke-ntp.conf.texi@1.220 +31 -7 + NTP_4_2_8P13 + + ntpd/invoke-ntp.keys.texi@1.205 +1 -1 + NTP_4_2_8P13 + + ntpd/invoke-ntpd.texi@1.519 +3 -3 + NTP_4_2_8P13 + + ntpd/ntp.conf.5man@1.254 +34 -9 + NTP_4_2_8P13 + + ntpd/ntp.conf.5mdoc@1.254 +41 -6 + NTP_4_2_8P13 + + ntpd/ntp.conf.html@1.202 +33 -7 + NTP_4_2_8P13 + + ntpd/ntp.conf.man.in@1.254 +34 -9 + NTP_4_2_8P13 + + ntpd/ntp.conf.mdoc.in@1.254 +41 -6 + NTP_4_2_8P13 + + ntpd/ntp.keys.5man@1.239 +2 -2 + NTP_4_2_8P13 + + ntpd/ntp.keys.5mdoc@1.239 +3 -3 + NTP_4_2_8P13 + + ntpd/ntp.keys.man.in@1.239 +2 -2 + NTP_4_2_8P13 + + ntpd/ntp.keys.mdoc.in@1.239 +3 -3 + NTP_4_2_8P13 + + ntpd/ntpd-opts.c@1.542 +2 -2 + NTP_4_2_8P13 + + ntpd/ntpd-opts.h@1.541 +3 -3 + NTP_4_2_8P13 + + ntpd/ntpd.1ntpdman@1.348 +2 -2 + NTP_4_2_8P13 + + ntpd/ntpd.1ntpdmdoc@1.348 +2 -2 + NTP_4_2_8P13 + + ntpd/ntpd.man.in@1.348 +2 -2 + NTP_4_2_8P13 + + ntpd/ntpd.mdoc.in@1.348 +2 -2 + NTP_4_2_8P13 + + ntpdc/invoke-ntpdc.texi@1.516 +1 -1 + NTP_4_2_8P13 + + ntpdc/ntpdc-opts.c@1.535 +2 -2 + NTP_4_2_8P13 + + ntpdc/ntpdc-opts.h@1.534 +3 -3 + NTP_4_2_8P13 + + ntpdc/ntpdc.1ntpdcman@1.347 +2 -2 + NTP_4_2_8P13 + + ntpdc/ntpdc.1ntpdcmdoc@1.347 +2 -2 + NTP_4_2_8P13 + + ntpdc/ntpdc.html@1.362 +408 -353 + NTP_4_2_8P13 + + ntpdc/ntpdc.man.in@1.347 +2 -2 + NTP_4_2_8P13 + + ntpdc/ntpdc.mdoc.in@1.347 +2 -2 + NTP_4_2_8P13 + + ntpq/invoke-ntpq.texi@1.526 +1 -1 + NTP_4_2_8P13 + + ntpq/ntpq-opts.c@1.544 +2 -2 + NTP_4_2_8P13 + + ntpq/ntpq-opts.h@1.542 +3 -3 + NTP_4_2_8P13 + + ntpq/ntpq.1ntpqman@1.354 +2 -2 + NTP_4_2_8P13 + + ntpq/ntpq.1ntpqmdoc@1.354 +2 -2 + NTP_4_2_8P13 + + ntpq/ntpq.html@1.193 +1 -1 + NTP_4_2_8P13 + + ntpq/ntpq.man.in@1.354 +2 -2 + NTP_4_2_8P13 + + ntpq/ntpq.mdoc.in@1.354 +2 -2 + NTP_4_2_8P13 + + ntpsnmpd/invoke-ntpsnmpd.texi@1.518 +1 -1 + NTP_4_2_8P13 + + ntpsnmpd/ntpsnmpd-opts.c@1.537 +2 -2 + NTP_4_2_8P13 + + ntpsnmpd/ntpsnmpd-opts.h@1.536 +3 -3 + NTP_4_2_8P13 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.347 +2 -2 + NTP_4_2_8P13 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.347 +2 -2 + NTP_4_2_8P13 + + ntpsnmpd/ntpsnmpd.man.in@1.347 +2 -2 + NTP_4_2_8P13 + + ntpsnmpd/ntpsnmpd.mdoc.in@1.347 +2 -2 + NTP_4_2_8P13 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.108 +2 -2 + NTP_4_2_8P13 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.109 +2 -2 + NTP_4_2_8P13 + + scripts/calc_tickadj/calc_tickadj.html@1.109 +172 -128 + NTP_4_2_8P13 + + scripts/calc_tickadj/calc_tickadj.man.in@1.107 +2 -2 + NTP_4_2_8P13 + + scripts/calc_tickadj/calc_tickadj.mdoc.in@1.109 +2 -2 + NTP_4_2_8P13 + + scripts/calc_tickadj/invoke-calc_tickadj.texi@1.112 +2 -2 + NTP_4_2_8P13 + + scripts/invoke-plot_summary.texi@1.130 +2 -2 + NTP_4_2_8P13 + + scripts/invoke-summary.texi@1.129 +2 -2 + NTP_4_2_8P13 + + scripts/ntp-wait/invoke-ntp-wait.texi@1.340 +2 -2 + NTP_4_2_8P13 + + scripts/ntp-wait/ntp-wait-opts@1.76 +2 -2 + NTP_4_2_8P13 + + scripts/ntp-wait/ntp-wait.1ntp-waitman@1.336 +2 -2 + NTP_4_2_8P13 + + scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.337 +2 -2 + NTP_4_2_8P13 + + scripts/ntp-wait/ntp-wait.html@1.358 +181 -152 + NTP_4_2_8P13 + + scripts/ntp-wait/ntp-wait.man.in@1.336 +2 -2 + NTP_4_2_8P13 + + scripts/ntp-wait/ntp-wait.mdoc.in@1.337 +2 -2 + NTP_4_2_8P13 + + scripts/ntpsweep/invoke-ntpsweep.texi@1.127 +2 -2 + NTP_4_2_8P13 + + scripts/ntpsweep/ntpsweep-opts@1.78 +2 -2 + NTP_4_2_8P13 + + scripts/ntpsweep/ntpsweep.1ntpsweepman@1.115 +2 -2 + NTP_4_2_8P13 + + scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.115 +2 -2 + NTP_4_2_8P13 + + scripts/ntpsweep/ntpsweep.html@1.130 +188 -152 + NTP_4_2_8P13 + + scripts/ntpsweep/ntpsweep.man.in@1.115 +2 -2 + NTP_4_2_8P13 + + scripts/ntpsweep/ntpsweep.mdoc.in@1.116 +2 -2 + NTP_4_2_8P13 + + scripts/ntptrace/invoke-ntptrace.texi@1.129 +2 -2 + NTP_4_2_8P13 + + scripts/ntptrace/ntptrace-opts@1.78 +2 -2 + NTP_4_2_8P13 + + scripts/ntptrace/ntptrace.1ntptraceman@1.115 +2 -2 + NTP_4_2_8P13 + + scripts/ntptrace/ntptrace.1ntptracemdoc@1.116 +2 -2 + NTP_4_2_8P13 + + scripts/ntptrace/ntptrace.html@1.131 +179 -129 + NTP_4_2_8P13 + + scripts/ntptrace/ntptrace.man.in@1.115 +2 -2 + NTP_4_2_8P13 + + scripts/ntptrace/ntptrace.mdoc.in@1.117 +2 -2 + NTP_4_2_8P13 + + scripts/plot_summary-opts@1.79 +2 -2 + NTP_4_2_8P13 + + scripts/plot_summary.1plot_summaryman@1.128 +2 -2 + NTP_4_2_8P13 + + scripts/plot_summary.1plot_summarymdoc@1.128 +2 -2 + NTP_4_2_8P13 + + scripts/plot_summary.html@1.133 +203 -161 + NTP_4_2_8P13 + + scripts/plot_summary.man.in@1.128 +2 -2 + NTP_4_2_8P13 + + scripts/plot_summary.mdoc.in@1.128 +2 -2 + NTP_4_2_8P13 + + scripts/summary-opts@1.78 +2 -2 + NTP_4_2_8P13 + + scripts/summary.1summaryman@1.127 +2 -2 + NTP_4_2_8P13 + + scripts/summary.1summarymdoc@1.127 +2 -2 + NTP_4_2_8P13 + + scripts/summary.html@1.132 +184 -136 + NTP_4_2_8P13 + + scripts/summary.man.in@1.127 +2 -2 + NTP_4_2_8P13 + + scripts/summary.mdoc.in@1.127 +2 -2 + NTP_4_2_8P13 + + scripts/update-leap/invoke-update-leap.texi@1.28 +1 -1 + NTP_4_2_8P13 + + scripts/update-leap/update-leap-opts@1.29 +2 -2 + NTP_4_2_8P13 + + scripts/update-leap/update-leap.1update-leapman@1.28 +2 -2 + NTP_4_2_8P13 + + scripts/update-leap/update-leap.1update-leapmdoc@1.28 +2 -2 + NTP_4_2_8P13 + + scripts/update-leap/update-leap.html@1.29 +1 -1 + NTP_4_2_8P13 + + scripts/update-leap/update-leap.man.in@1.28 +2 -2 + NTP_4_2_8P13 + + scripts/update-leap/update-leap.mdoc.in@1.28 +2 -2 + NTP_4_2_8P13 + + sntp/invoke-sntp.texi@1.518 +1 -1 + NTP_4_2_8P13 + + sntp/sntp-opts.c@1.538 +2 -2 + NTP_4_2_8P13 + + sntp/sntp-opts.h@1.536 +3 -3 + NTP_4_2_8P13 + + sntp/sntp.1sntpman@1.353 +2 -2 + NTP_4_2_8P13 + + sntp/sntp.1sntpmdoc@1.353 +2 -2 + NTP_4_2_8P13 + + sntp/sntp.html@1.534 +472 -418 + NTP_4_2_8P13 + + sntp/sntp.man.in@1.353 +2 -2 + NTP_4_2_8P13 + + sntp/sntp.mdoc.in@1.353 +2 -2 + NTP_4_2_8P13 + + util/invoke-ntp-keygen.texi@1.521 +1 -1 + NTP_4_2_8P13 + + util/ntp-keygen-opts.c@1.540 +2 -2 + NTP_4_2_8P13 + + util/ntp-keygen-opts.h@1.538 +3 -3 + NTP_4_2_8P13 + + util/ntp-keygen.1ntp-keygenman@1.349 +2 -2 + NTP_4_2_8P13 + + util/ntp-keygen.1ntp-keygenmdoc@1.349 +2 -2 + NTP_4_2_8P13 + + util/ntp-keygen.html@1.194 +1 -1 + NTP_4_2_8P13 + + util/ntp-keygen.man.in@1.349 +2 -2 + NTP_4_2_8P13 + + util/ntp-keygen.mdoc.in@1.349 +2 -2 + NTP_4_2_8P13 + +ChangeSet@1.3893, 2020-03-03 16:25:14-08:00, ntpreleng@ntp-build.tal1.ntfo.org + Replace line with head -1 + + scripts/build/addChangeLogTag@1.6 +1 -1 + Replace line with head -1 + +ChangeSet@1.3892, 2020-03-03 16:05:38-08:00, ntpreleng@ntp-build.tal1.ntfo.org + provide get_pollskew() for simulator + + ntpd/ntp_config.c@1.374 +2 -2 + provide get_pollskew() for simulator + +ChangeSet@1.3844.24.1, 2020-03-03 03:30:13-08:00, ntpreleng@ntp-build.tal1.ntfo.org + NTP_4_2_8P13 + TAG: NTP_4_2_8P13 (currently on 1.3894) + + BitKeeper/triggers/2mirrors@1.11 +6 -2 + NTP_4_2_8P13 + + ntpd/ntpd-opts.c@1.539.1.1 +1 -1 + NTP_4_2_8P13 + + ntpd/ntpd-opts.h@1.538.1.1 +1 -1 + NTP_4_2_8P13 + + ntpd/ntpd.html@1.193 +3 -3 + NTP_4_2_8P13 + + ntpd/ntpdsim-opts.c@1.29 +372 -340 + NTP_4_2_8P13 + + ntpd/ntpdsim-opts.h@1.29 +44 -37 + NTP_4_2_8P13 + + ntpdc/ntpdc-opts.c@1.532.1.1 +1 -1 + NTP_4_2_8P13 + + ntpdc/ntpdc-opts.h@1.531.1.1 +1 -1 + NTP_4_2_8P13 + + ntpq/ntpq-opts.c@1.541.1.1 +1 -1 + NTP_4_2_8P13 + + ntpq/ntpq-opts.h@1.539.1.1 +1 -1 + NTP_4_2_8P13 + + ntpq/ntpq.html@1.192 +1 -1 + NTP_4_2_8P13 + + ntpsnmpd/ntpsnmpd-opts.c@1.534.1.1 +1 -1 + NTP_4_2_8P13 + + ntpsnmpd/ntpsnmpd-opts.h@1.533.1.1 +1 -1 + NTP_4_2_8P13 + + scripts/calc_tickadj/calc_tickadj-opts@1.10 +2 -2 + NTP_4_2_8P13 + + scripts/ntp-wait/invoke-ntp-wait.texi@1.337.1.1 +1 -1 + NTP_4_2_8P13 + + scripts/ntp-wait/ntp-wait-opts@1.73.1.1 +1 -1 + NTP_4_2_8P13 + + scripts/ntpsweep/ntpsweep-opts@1.75.1.1 +1 -1 + NTP_4_2_8P13 + + scripts/ntptrace/invoke-ntptrace.texi@1.126.1.1 +1 -1 + NTP_4_2_8P13 + + scripts/ntptrace/ntptrace-opts@1.75.1.1 +1 -1 + NTP_4_2_8P13 + + scripts/plot_summary-opts@1.76.1.1 +1 -1 + NTP_4_2_8P13 + + scripts/summary-opts@1.75.1.1 +1 -1 + NTP_4_2_8P13 + + scripts/update-leap/update-leap-opts@1.26.1.1 +1 -1 + NTP_4_2_8P13 + + sntp/sntp-opts.c@1.535.1.1 +1 -1 + NTP_4_2_8P13 + + sntp/sntp-opts.h@1.533.1.1 +1 -1 + NTP_4_2_8P13 + + util/ntp-keygen-opts.c@1.537.1.1 +1 -1 + NTP_4_2_8P13 + + util/ntp-keygen-opts.h@1.535.1.1 +1 -1 + NTP_4_2_8P13 + + util/ntp-keygen.html@1.193 +1 -1 + NTP_4_2_8P13 + +ChangeSet@1.3888, 2020-03-03 07:26:56+00:00, stenn@psp-deb1.ntp.org + cleanup + + NEWS@1.197.1.3 +3 -2 + cleanup + +ChangeSet@1.3887, 2020-02-18 05:11:26+00:00, stenn@psp-deb1.ntp.org + Cleanup distcheck psl* files + + ntpd/Makefile.am@1.138 +11 -0 + Cleanup distcheck psl* files + +ChangeSet@1.3886, 2020-02-18 05:10:35+00:00, stenn@psp-deb1.ntp.org + Distribute ntp_calgps.h + + include/Makefile.am@1.58 +1 -0 + Distribute ntp_calgps.h + +ChangeSet@1.3885, 2020-02-18 03:32:51+00:00, stenn@psp-deb1.ntp.org + Update the NEWS file for p14 + + NEWS@1.197.1.2 +107 -0 + Update the NEWS file for p14 + +ChangeSet@1.3884, 2020-02-17 11:05:46+00:00, stenn@psp-deb1.ntp.org + merge cleanup + + ntpd/ntp_proto.c@1.432 +1 -1 + merge cleanup + +ChangeSet@1.3881, 2020-02-17 08:50:00+00:00, stenn@psp-deb1.ntp.org + update + + ntpd/ntp_keyword.h@1.38 +545 -539 + update + +ChangeSet@1.3880, 2020-02-17 08:48:45+00:00, stenn@psp-deb1.ntp.org + Startp logging improvements. + Bug3596. + + html/accopt.html@1.48 +7 -2 + cleanup. + bug3596: document 'serverresponse fuzz' + + html/confopt.html@1.64.1.1 +22 -9 + Cleanup. + + Bug 3596: document xmtnonce + + html/miscopt.html@1.93 +19 -1 + Cleanup. + + bug3596: document pollskewlist + + include/Makefile.am@1.57 +1 -0 + pollskew upodates + + include/ntp.h@1.232 +8 -2 + bug3596 chagnes: + - srvfuzrft patches + - pollskew updates + - xmtnonce + + include/ntp_config.h@1.89 +27 -20 + bug3596 updates: + - pollskewlist + - srvfuzrft patches + + include/ntp_psl.h@1.1 +17 -0 + BitKeeper file include/ntp_psl.h + --- + bug3596 + + include/ntp_psl.h@1.0 +0 -0 + + include/ntp_request.h@1.54 +2 -1 + srvfuzrft patches + + include/ntp_stdlib.h@1.88 +1 -1 + randomizepoll/server response fuzz reftime fixes + + include/ntpd.h@1.207 +1 -1 + bug3596 cleanup + + libntp/statestr.c@1.31 +12 -5 + bug3596 srvrspfuz fixes + + ntpd/Makefile.am@1.137 +37 -7 + bug3596 pollskewlist changes + + ntpd/complete.conf.in@1.37 +4 -2 + bug3596: randompoll, pollskew xmtnonce + + ntpd/keyword-gen-utd@1.35 +1 -1 + Keyword table updates + + ntpd/keyword-gen.c@1.42 +3 -3 + bug3596: serverresponse fuzz, pollskewlist, xmtnonce + + ntpd/ntp.conf.def@1.34 +40 -4 + Cleanup. + bug3596: xmtnonce, serverresponse fuzz, pollskewlist, + + ntpd/ntp_config.c@1.373 +250 -26 + bug3596: serverresponse fuzz, pollskewlist, xmtnonce + + ntpd/ntp_loopfilter.c@1.195 +1 -1 + pollskew upodates + + ntpd/ntp_parser.c@1.117 +1298 -1283 + bug3596 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@freebsd.org Wed Mar 4 23:59:03 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 B9E89255E1F; Wed, 4 Mar 2020 23:59:03 +0000 (UTC) (envelope-from cy@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 48XrSl4bMbz44qf; Wed, 4 Mar 2020 23:59:03 +0000 (UTC) (envelope-from cy@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 47803262F8; Wed, 4 Mar 2020 23:59:03 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 024Nx3aO026178; Wed, 4 Mar 2020 23:59:03 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 024Nucka026071; Wed, 4 Mar 2020 23:56:38 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202003042356.024Nucka026071@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 4 Mar 2020 23:56:38 +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: r358659 - in stable: 11/contrib/ntp 11/contrib/ntp/html 11/contrib/ntp/html/drivers 11/contrib/ntp/include 11/contrib/ntp/libntp 11/contrib/ntp/libparse 11/contrib/ntp/ntpd 11/contrib/n... X-SVN-Group: stable-12 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/contrib/ntp 11/contrib/ntp/html 11/contrib/ntp/html/drivers 11/contrib/ntp/include 11/contrib/ntp/libntp 11/contrib/ntp/libparse 11/contrib/ntp/ntpd 11/contrib/ntp/ntpdate 11/contrib/ntp... X-SVN-Commit-Revision: 358659 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: Wed, 04 Mar 2020 23:59:03 -0000 Author: cy Date: Wed Mar 4 23:54:13 2020 New Revision: 358659 URL: https://svnweb.freebsd.org/changeset/base/358659 Log: MFC r358652: MFV r358616: Update ntp-4.2.8p13 --> 4.2.8p14. The advisory can be found at: http://support.ntp.org/bin/view/Main/SecurityNotice#\ March_2020_ntp_4_2_8p14_NTP_Rele No CVEs have been documented yet. Security: http://support.ntp.org/bin/view/Main/NtpBug3610 http://support.ntp.org/bin/view/Main/NtpBug3596 http://support.ntp.org/bin/view/Main/NtpBug3592 Added: stable/12/contrib/ntp/include/ntp_calgps.h - copied unchanged from r358652, head/contrib/ntp/include/ntp_calgps.h stable/12/contrib/ntp/include/ntp_psl.h - copied unchanged from r358652, head/contrib/ntp/include/ntp_psl.h stable/12/contrib/ntp/include/timexsup.h - copied unchanged from r358652, head/contrib/ntp/include/timexsup.h stable/12/contrib/ntp/libntp/ntp_calgps.c - copied unchanged from r358652, head/contrib/ntp/libntp/ntp_calgps.c stable/12/contrib/ntp/libntp/timespecops.c - copied unchanged from r358652, head/contrib/ntp/libntp/timespecops.c stable/12/contrib/ntp/libntp/timexsup.c - copied unchanged from r358652, head/contrib/ntp/libntp/timexsup.c stable/12/contrib/ntp/ntpd/psl0.conf - copied unchanged from r358652, head/contrib/ntp/ntpd/psl0.conf stable/12/contrib/ntp/ntpd/psl1.conf - copied unchanged from r358652, head/contrib/ntp/ntpd/psl1.conf stable/12/contrib/ntp/ntpd/psl2.conf - copied unchanged from r358652, head/contrib/ntp/ntpd/psl2.conf Modified: stable/12/contrib/ntp/COPYRIGHT stable/12/contrib/ntp/ChangeLog stable/12/contrib/ntp/CommitLog stable/12/contrib/ntp/NEWS stable/12/contrib/ntp/config.h.in stable/12/contrib/ntp/configure stable/12/contrib/ntp/configure.ac stable/12/contrib/ntp/html/accopt.html stable/12/contrib/ntp/html/clockopt.html stable/12/contrib/ntp/html/confopt.html stable/12/contrib/ntp/html/copyright.html stable/12/contrib/ntp/html/discipline.html stable/12/contrib/ntp/html/drivers/driver20.html stable/12/contrib/ntp/html/drivers/driver29.html stable/12/contrib/ntp/html/miscopt.html stable/12/contrib/ntp/include/Makefile.am stable/12/contrib/ntp/include/Makefile.in stable/12/contrib/ntp/include/ntp.h stable/12/contrib/ntp/include/ntp_calendar.h stable/12/contrib/ntp/include/ntp_config.h stable/12/contrib/ntp/include/ntp_control.h stable/12/contrib/ntp/include/ntp_fp.h stable/12/contrib/ntp/include/ntp_io.h stable/12/contrib/ntp/include/ntp_refclock.h stable/12/contrib/ntp/include/ntp_request.h stable/12/contrib/ntp/include/ntp_stdlib.h stable/12/contrib/ntp/include/ntp_syslog.h stable/12/contrib/ntp/include/ntpd.h stable/12/contrib/ntp/include/timespecops.h stable/12/contrib/ntp/libntp/Makefile.am stable/12/contrib/ntp/libntp/Makefile.in stable/12/contrib/ntp/libntp/decodenetnum.c stable/12/contrib/ntp/libntp/dofptoa.c stable/12/contrib/ntp/libntp/dolfptoa.c stable/12/contrib/ntp/libntp/mstolfp.c stable/12/contrib/ntp/libntp/msyslog.c stable/12/contrib/ntp/libntp/ntp_calendar.c stable/12/contrib/ntp/libntp/recvbuff.c stable/12/contrib/ntp/libntp/statestr.c stable/12/contrib/ntp/libntp/systime.c stable/12/contrib/ntp/libparse/Makefile.am stable/12/contrib/ntp/libparse/Makefile.in stable/12/contrib/ntp/libparse/clk_rawdcf.c stable/12/contrib/ntp/ntpd/Makefile.am stable/12/contrib/ntp/ntpd/Makefile.in stable/12/contrib/ntp/ntpd/cmd_args.c stable/12/contrib/ntp/ntpd/complete.conf.in stable/12/contrib/ntp/ntpd/invoke-ntp.conf.texi stable/12/contrib/ntp/ntpd/invoke-ntp.keys.texi stable/12/contrib/ntp/ntpd/invoke-ntpd.texi stable/12/contrib/ntp/ntpd/keyword-gen-utd stable/12/contrib/ntp/ntpd/keyword-gen.c stable/12/contrib/ntp/ntpd/ntp.conf.5man stable/12/contrib/ntp/ntpd/ntp.conf.5mdoc stable/12/contrib/ntp/ntpd/ntp.conf.def stable/12/contrib/ntp/ntpd/ntp.conf.html stable/12/contrib/ntp/ntpd/ntp.conf.man.in stable/12/contrib/ntp/ntpd/ntp.conf.mdoc.in stable/12/contrib/ntp/ntpd/ntp.keys.5man stable/12/contrib/ntp/ntpd/ntp.keys.5mdoc stable/12/contrib/ntp/ntpd/ntp.keys.html stable/12/contrib/ntp/ntpd/ntp.keys.man.in stable/12/contrib/ntp/ntpd/ntp.keys.mdoc.in stable/12/contrib/ntp/ntpd/ntp_config.c stable/12/contrib/ntp/ntpd/ntp_control.c stable/12/contrib/ntp/ntpd/ntp_io.c stable/12/contrib/ntp/ntpd/ntp_keyword.h stable/12/contrib/ntp/ntpd/ntp_leapsec.c stable/12/contrib/ntp/ntpd/ntp_leapsec.h stable/12/contrib/ntp/ntpd/ntp_loopfilter.c stable/12/contrib/ntp/ntpd/ntp_parser.c stable/12/contrib/ntp/ntpd/ntp_parser.h stable/12/contrib/ntp/ntpd/ntp_peer.c stable/12/contrib/ntp/ntpd/ntp_proto.c stable/12/contrib/ntp/ntpd/ntp_refclock.c stable/12/contrib/ntp/ntpd/ntp_request.c stable/12/contrib/ntp/ntpd/ntp_restrict.c stable/12/contrib/ntp/ntpd/ntp_scanner.c stable/12/contrib/ntp/ntpd/ntp_util.c stable/12/contrib/ntp/ntpd/ntpd-opts.c stable/12/contrib/ntp/ntpd/ntpd-opts.h stable/12/contrib/ntp/ntpd/ntpd.1ntpdman stable/12/contrib/ntp/ntpd/ntpd.1ntpdmdoc stable/12/contrib/ntp/ntpd/ntpd.c stable/12/contrib/ntp/ntpd/ntpd.html stable/12/contrib/ntp/ntpd/ntpd.man.in stable/12/contrib/ntp/ntpd/ntpd.mdoc.in stable/12/contrib/ntp/ntpd/refclock_gpsdjson.c stable/12/contrib/ntp/ntpd/refclock_jupiter.c stable/12/contrib/ntp/ntpd/refclock_nmea.c stable/12/contrib/ntp/ntpd/refclock_oncore.c stable/12/contrib/ntp/ntpd/refclock_palisade.c stable/12/contrib/ntp/ntpd/refclock_palisade.h stable/12/contrib/ntp/ntpd/refclock_parse.c stable/12/contrib/ntp/ntpd/refclock_zyfer.c stable/12/contrib/ntp/ntpdate/ntpdate.c stable/12/contrib/ntp/ntpdc/invoke-ntpdc.texi stable/12/contrib/ntp/ntpdc/layout.std stable/12/contrib/ntp/ntpdc/ntpdc-opts.c stable/12/contrib/ntp/ntpdc/ntpdc-opts.h stable/12/contrib/ntp/ntpdc/ntpdc.1ntpdcman stable/12/contrib/ntp/ntpdc/ntpdc.1ntpdcmdoc stable/12/contrib/ntp/ntpdc/ntpdc.c stable/12/contrib/ntp/ntpdc/ntpdc.html stable/12/contrib/ntp/ntpdc/ntpdc.man.in stable/12/contrib/ntp/ntpdc/ntpdc.mdoc.in stable/12/contrib/ntp/ntpdc/ntpdc_ops.c stable/12/contrib/ntp/ntpq/Makefile.am stable/12/contrib/ntp/ntpq/Makefile.in stable/12/contrib/ntp/ntpq/invoke-ntpq.texi stable/12/contrib/ntp/ntpq/ntpq-opts.c stable/12/contrib/ntp/ntpq/ntpq-opts.h stable/12/contrib/ntp/ntpq/ntpq-subs.c stable/12/contrib/ntp/ntpq/ntpq.1ntpqman stable/12/contrib/ntp/ntpq/ntpq.1ntpqmdoc stable/12/contrib/ntp/ntpq/ntpq.c stable/12/contrib/ntp/ntpq/ntpq.h stable/12/contrib/ntp/ntpq/ntpq.html stable/12/contrib/ntp/ntpq/ntpq.man.in stable/12/contrib/ntp/ntpq/ntpq.mdoc.in stable/12/contrib/ntp/ntpsnmpd/invoke-ntpsnmpd.texi stable/12/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.c stable/12/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.h stable/12/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdman stable/12/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc stable/12/contrib/ntp/ntpsnmpd/ntpsnmpd.html stable/12/contrib/ntp/ntpsnmpd/ntpsnmpd.man.in stable/12/contrib/ntp/ntpsnmpd/ntpsnmpd.mdoc.in stable/12/contrib/ntp/packageinfo.sh stable/12/contrib/ntp/parseutil/dcfd.c stable/12/contrib/ntp/scripts/build/mkver.in stable/12/contrib/ntp/scripts/calc_tickadj/calc_tickadj-opts stable/12/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman stable/12/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc stable/12/contrib/ntp/scripts/calc_tickadj/calc_tickadj.html stable/12/contrib/ntp/scripts/calc_tickadj/calc_tickadj.man.in stable/12/contrib/ntp/scripts/calc_tickadj/calc_tickadj.mdoc.in stable/12/contrib/ntp/scripts/calc_tickadj/invoke-calc_tickadj.texi stable/12/contrib/ntp/scripts/invoke-plot_summary.texi stable/12/contrib/ntp/scripts/invoke-summary.texi stable/12/contrib/ntp/scripts/ntp-wait/invoke-ntp-wait.texi stable/12/contrib/ntp/scripts/ntp-wait/ntp-wait-opts stable/12/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitman stable/12/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc stable/12/contrib/ntp/scripts/ntp-wait/ntp-wait.html stable/12/contrib/ntp/scripts/ntp-wait/ntp-wait.man.in stable/12/contrib/ntp/scripts/ntp-wait/ntp-wait.mdoc.in stable/12/contrib/ntp/scripts/ntpsweep/invoke-ntpsweep.texi stable/12/contrib/ntp/scripts/ntpsweep/ntpsweep-opts stable/12/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepman stable/12/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc stable/12/contrib/ntp/scripts/ntpsweep/ntpsweep.html stable/12/contrib/ntp/scripts/ntpsweep/ntpsweep.man.in stable/12/contrib/ntp/scripts/ntpsweep/ntpsweep.mdoc.in stable/12/contrib/ntp/scripts/ntptrace/invoke-ntptrace.texi stable/12/contrib/ntp/scripts/ntptrace/ntptrace-opts stable/12/contrib/ntp/scripts/ntptrace/ntptrace.1ntptraceman stable/12/contrib/ntp/scripts/ntptrace/ntptrace.1ntptracemdoc stable/12/contrib/ntp/scripts/ntptrace/ntptrace.html stable/12/contrib/ntp/scripts/ntptrace/ntptrace.man.in stable/12/contrib/ntp/scripts/ntptrace/ntptrace.mdoc.in stable/12/contrib/ntp/scripts/plot_summary-opts stable/12/contrib/ntp/scripts/plot_summary.1plot_summaryman stable/12/contrib/ntp/scripts/plot_summary.1plot_summarymdoc stable/12/contrib/ntp/scripts/plot_summary.html stable/12/contrib/ntp/scripts/plot_summary.man.in stable/12/contrib/ntp/scripts/plot_summary.mdoc.in stable/12/contrib/ntp/scripts/summary-opts stable/12/contrib/ntp/scripts/summary.1summaryman stable/12/contrib/ntp/scripts/summary.1summarymdoc stable/12/contrib/ntp/scripts/summary.html stable/12/contrib/ntp/scripts/summary.man.in stable/12/contrib/ntp/scripts/summary.mdoc.in stable/12/contrib/ntp/scripts/update-leap/invoke-update-leap.texi stable/12/contrib/ntp/scripts/update-leap/update-leap-opts stable/12/contrib/ntp/scripts/update-leap/update-leap.1update-leapman stable/12/contrib/ntp/scripts/update-leap/update-leap.1update-leapmdoc stable/12/contrib/ntp/scripts/update-leap/update-leap.html stable/12/contrib/ntp/scripts/update-leap/update-leap.man.in stable/12/contrib/ntp/scripts/update-leap/update-leap.mdoc.in stable/12/contrib/ntp/sntp/COPYRIGHT stable/12/contrib/ntp/sntp/configure stable/12/contrib/ntp/sntp/configure.ac stable/12/contrib/ntp/sntp/crypto.c stable/12/contrib/ntp/sntp/include/copyright.def stable/12/contrib/ntp/sntp/include/version.def stable/12/contrib/ntp/sntp/include/version.texi stable/12/contrib/ntp/sntp/invoke-sntp.texi stable/12/contrib/ntp/sntp/libevent/build-aux/ar-lib stable/12/contrib/ntp/sntp/libevent/build-aux/compile stable/12/contrib/ntp/sntp/libevent/build-aux/config.guess stable/12/contrib/ntp/sntp/libevent/build-aux/config.sub stable/12/contrib/ntp/sntp/libevent/build-aux/depcomp stable/12/contrib/ntp/sntp/libevent/build-aux/install-sh stable/12/contrib/ntp/sntp/libevent/build-aux/missing stable/12/contrib/ntp/sntp/libevent/build-aux/test-driver stable/12/contrib/ntp/sntp/libevent/build-aux/ylwrap stable/12/contrib/ntp/sntp/libevent/test/regress.gen.c stable/12/contrib/ntp/sntp/libevent/test/regress.gen.h stable/12/contrib/ntp/sntp/libopts/m4/libopts.m4 stable/12/contrib/ntp/sntp/m4/ntp_problemtests.m4 stable/12/contrib/ntp/sntp/m4/version.m4 stable/12/contrib/ntp/sntp/main.c stable/12/contrib/ntp/sntp/networking.c stable/12/contrib/ntp/sntp/scm-rev stable/12/contrib/ntp/sntp/sntp-opts.c stable/12/contrib/ntp/sntp/sntp-opts.h stable/12/contrib/ntp/sntp/sntp.1sntpman stable/12/contrib/ntp/sntp/sntp.1sntpmdoc stable/12/contrib/ntp/sntp/sntp.html stable/12/contrib/ntp/sntp/sntp.man.in stable/12/contrib/ntp/sntp/sntp.mdoc.in stable/12/contrib/ntp/sntp/tests/run-crypto.c stable/12/contrib/ntp/sntp/tests/run-keyFile.c stable/12/contrib/ntp/sntp/tests/run-kodDatabase.c stable/12/contrib/ntp/sntp/tests/run-kodFile.c stable/12/contrib/ntp/sntp/tests/run-networking.c stable/12/contrib/ntp/sntp/tests/run-packetHandling.c stable/12/contrib/ntp/sntp/tests/run-packetProcessing.c stable/12/contrib/ntp/sntp/tests/run-t-log.c stable/12/contrib/ntp/sntp/tests/run-utilities.c stable/12/contrib/ntp/sntp/tests/testconf.yml stable/12/contrib/ntp/sntp/version.c stable/12/contrib/ntp/util/invoke-ntp-keygen.texi stable/12/contrib/ntp/util/ntp-keygen-opts.c stable/12/contrib/ntp/util/ntp-keygen-opts.h stable/12/contrib/ntp/util/ntp-keygen.1ntp-keygenman stable/12/contrib/ntp/util/ntp-keygen.1ntp-keygenmdoc stable/12/contrib/ntp/util/ntp-keygen.html stable/12/contrib/ntp/util/ntp-keygen.man.in stable/12/contrib/ntp/util/ntp-keygen.mdoc.in stable/12/contrib/ntp/util/ntptime.c stable/12/usr.sbin/ntp/config.h stable/12/usr.sbin/ntp/libntp/Makefile Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Added: stable/11/contrib/ntp/include/ntp_calgps.h - copied unchanged from r358652, head/contrib/ntp/include/ntp_calgps.h stable/11/contrib/ntp/include/ntp_psl.h - copied unchanged from r358652, head/contrib/ntp/include/ntp_psl.h stable/11/contrib/ntp/include/timexsup.h - copied unchanged from r358652, head/contrib/ntp/include/timexsup.h stable/11/contrib/ntp/libntp/ntp_calgps.c - copied unchanged from r358652, head/contrib/ntp/libntp/ntp_calgps.c stable/11/contrib/ntp/libntp/timespecops.c - copied unchanged from r358652, head/contrib/ntp/libntp/timespecops.c stable/11/contrib/ntp/libntp/timexsup.c - copied unchanged from r358652, head/contrib/ntp/libntp/timexsup.c stable/11/contrib/ntp/ntpd/psl0.conf - copied unchanged from r358652, head/contrib/ntp/ntpd/psl0.conf stable/11/contrib/ntp/ntpd/psl1.conf - copied unchanged from r358652, head/contrib/ntp/ntpd/psl1.conf stable/11/contrib/ntp/ntpd/psl2.conf - copied unchanged from r358652, head/contrib/ntp/ntpd/psl2.conf Modified: stable/11/contrib/ntp/COPYRIGHT stable/11/contrib/ntp/ChangeLog stable/11/contrib/ntp/CommitLog stable/11/contrib/ntp/NEWS stable/11/contrib/ntp/config.h.in stable/11/contrib/ntp/configure stable/11/contrib/ntp/configure.ac stable/11/contrib/ntp/html/accopt.html stable/11/contrib/ntp/html/clockopt.html stable/11/contrib/ntp/html/confopt.html stable/11/contrib/ntp/html/copyright.html stable/11/contrib/ntp/html/discipline.html stable/11/contrib/ntp/html/drivers/driver20.html stable/11/contrib/ntp/html/drivers/driver29.html stable/11/contrib/ntp/html/miscopt.html stable/11/contrib/ntp/include/Makefile.am stable/11/contrib/ntp/include/Makefile.in stable/11/contrib/ntp/include/ntp.h stable/11/contrib/ntp/include/ntp_calendar.h stable/11/contrib/ntp/include/ntp_config.h stable/11/contrib/ntp/include/ntp_control.h stable/11/contrib/ntp/include/ntp_fp.h stable/11/contrib/ntp/include/ntp_io.h stable/11/contrib/ntp/include/ntp_refclock.h stable/11/contrib/ntp/include/ntp_request.h stable/11/contrib/ntp/include/ntp_stdlib.h stable/11/contrib/ntp/include/ntp_syslog.h stable/11/contrib/ntp/include/ntpd.h stable/11/contrib/ntp/include/timespecops.h stable/11/contrib/ntp/libntp/Makefile.am stable/11/contrib/ntp/libntp/Makefile.in stable/11/contrib/ntp/libntp/decodenetnum.c stable/11/contrib/ntp/libntp/dofptoa.c stable/11/contrib/ntp/libntp/dolfptoa.c stable/11/contrib/ntp/libntp/mstolfp.c stable/11/contrib/ntp/libntp/msyslog.c stable/11/contrib/ntp/libntp/ntp_calendar.c stable/11/contrib/ntp/libntp/recvbuff.c stable/11/contrib/ntp/libntp/statestr.c stable/11/contrib/ntp/libntp/systime.c stable/11/contrib/ntp/libparse/Makefile.am stable/11/contrib/ntp/libparse/Makefile.in stable/11/contrib/ntp/libparse/clk_rawdcf.c stable/11/contrib/ntp/ntpd/Makefile.am stable/11/contrib/ntp/ntpd/Makefile.in stable/11/contrib/ntp/ntpd/cmd_args.c stable/11/contrib/ntp/ntpd/complete.conf.in stable/11/contrib/ntp/ntpd/invoke-ntp.conf.texi stable/11/contrib/ntp/ntpd/invoke-ntp.keys.texi stable/11/contrib/ntp/ntpd/invoke-ntpd.texi stable/11/contrib/ntp/ntpd/keyword-gen-utd stable/11/contrib/ntp/ntpd/keyword-gen.c stable/11/contrib/ntp/ntpd/ntp.conf.5man stable/11/contrib/ntp/ntpd/ntp.conf.5mdoc stable/11/contrib/ntp/ntpd/ntp.conf.def stable/11/contrib/ntp/ntpd/ntp.conf.html stable/11/contrib/ntp/ntpd/ntp.conf.man.in stable/11/contrib/ntp/ntpd/ntp.conf.mdoc.in stable/11/contrib/ntp/ntpd/ntp.keys.5man stable/11/contrib/ntp/ntpd/ntp.keys.5mdoc stable/11/contrib/ntp/ntpd/ntp.keys.html stable/11/contrib/ntp/ntpd/ntp.keys.man.in stable/11/contrib/ntp/ntpd/ntp.keys.mdoc.in stable/11/contrib/ntp/ntpd/ntp_config.c stable/11/contrib/ntp/ntpd/ntp_control.c stable/11/contrib/ntp/ntpd/ntp_io.c stable/11/contrib/ntp/ntpd/ntp_keyword.h stable/11/contrib/ntp/ntpd/ntp_leapsec.c stable/11/contrib/ntp/ntpd/ntp_leapsec.h stable/11/contrib/ntp/ntpd/ntp_loopfilter.c stable/11/contrib/ntp/ntpd/ntp_parser.c stable/11/contrib/ntp/ntpd/ntp_parser.h stable/11/contrib/ntp/ntpd/ntp_peer.c stable/11/contrib/ntp/ntpd/ntp_proto.c stable/11/contrib/ntp/ntpd/ntp_refclock.c stable/11/contrib/ntp/ntpd/ntp_request.c stable/11/contrib/ntp/ntpd/ntp_restrict.c stable/11/contrib/ntp/ntpd/ntp_scanner.c stable/11/contrib/ntp/ntpd/ntp_util.c stable/11/contrib/ntp/ntpd/ntpd-opts.c stable/11/contrib/ntp/ntpd/ntpd-opts.h stable/11/contrib/ntp/ntpd/ntpd.1ntpdman stable/11/contrib/ntp/ntpd/ntpd.1ntpdmdoc stable/11/contrib/ntp/ntpd/ntpd.c stable/11/contrib/ntp/ntpd/ntpd.html stable/11/contrib/ntp/ntpd/ntpd.man.in stable/11/contrib/ntp/ntpd/ntpd.mdoc.in stable/11/contrib/ntp/ntpd/refclock_gpsdjson.c stable/11/contrib/ntp/ntpd/refclock_jupiter.c stable/11/contrib/ntp/ntpd/refclock_nmea.c stable/11/contrib/ntp/ntpd/refclock_oncore.c stable/11/contrib/ntp/ntpd/refclock_palisade.c stable/11/contrib/ntp/ntpd/refclock_palisade.h stable/11/contrib/ntp/ntpd/refclock_parse.c stable/11/contrib/ntp/ntpd/refclock_zyfer.c stable/11/contrib/ntp/ntpdate/ntpdate.c stable/11/contrib/ntp/ntpdc/invoke-ntpdc.texi stable/11/contrib/ntp/ntpdc/layout.std stable/11/contrib/ntp/ntpdc/ntpdc-opts.c stable/11/contrib/ntp/ntpdc/ntpdc-opts.h stable/11/contrib/ntp/ntpdc/ntpdc.1ntpdcman stable/11/contrib/ntp/ntpdc/ntpdc.1ntpdcmdoc stable/11/contrib/ntp/ntpdc/ntpdc.c stable/11/contrib/ntp/ntpdc/ntpdc.html stable/11/contrib/ntp/ntpdc/ntpdc.man.in stable/11/contrib/ntp/ntpdc/ntpdc.mdoc.in stable/11/contrib/ntp/ntpdc/ntpdc_ops.c stable/11/contrib/ntp/ntpq/Makefile.am stable/11/contrib/ntp/ntpq/Makefile.in stable/11/contrib/ntp/ntpq/invoke-ntpq.texi stable/11/contrib/ntp/ntpq/ntpq-opts.c stable/11/contrib/ntp/ntpq/ntpq-opts.h stable/11/contrib/ntp/ntpq/ntpq-subs.c stable/11/contrib/ntp/ntpq/ntpq.1ntpqman stable/11/contrib/ntp/ntpq/ntpq.1ntpqmdoc stable/11/contrib/ntp/ntpq/ntpq.c stable/11/contrib/ntp/ntpq/ntpq.h stable/11/contrib/ntp/ntpq/ntpq.html stable/11/contrib/ntp/ntpq/ntpq.man.in stable/11/contrib/ntp/ntpq/ntpq.mdoc.in stable/11/contrib/ntp/ntpsnmpd/invoke-ntpsnmpd.texi stable/11/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.c stable/11/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.h stable/11/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdman stable/11/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc stable/11/contrib/ntp/ntpsnmpd/ntpsnmpd.html stable/11/contrib/ntp/ntpsnmpd/ntpsnmpd.man.in stable/11/contrib/ntp/ntpsnmpd/ntpsnmpd.mdoc.in stable/11/contrib/ntp/packageinfo.sh stable/11/contrib/ntp/parseutil/dcfd.c stable/11/contrib/ntp/scripts/build/mkver.in stable/11/contrib/ntp/scripts/calc_tickadj/calc_tickadj-opts stable/11/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman stable/11/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc stable/11/contrib/ntp/scripts/calc_tickadj/calc_tickadj.html stable/11/contrib/ntp/scripts/calc_tickadj/calc_tickadj.man.in stable/11/contrib/ntp/scripts/calc_tickadj/calc_tickadj.mdoc.in stable/11/contrib/ntp/scripts/calc_tickadj/invoke-calc_tickadj.texi stable/11/contrib/ntp/scripts/invoke-plot_summary.texi stable/11/contrib/ntp/scripts/invoke-summary.texi stable/11/contrib/ntp/scripts/ntp-wait/invoke-ntp-wait.texi stable/11/contrib/ntp/scripts/ntp-wait/ntp-wait-opts stable/11/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitman stable/11/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc stable/11/contrib/ntp/scripts/ntp-wait/ntp-wait.html stable/11/contrib/ntp/scripts/ntp-wait/ntp-wait.man.in stable/11/contrib/ntp/scripts/ntp-wait/ntp-wait.mdoc.in stable/11/contrib/ntp/scripts/ntpsweep/invoke-ntpsweep.texi stable/11/contrib/ntp/scripts/ntpsweep/ntpsweep-opts stable/11/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepman stable/11/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc stable/11/contrib/ntp/scripts/ntpsweep/ntpsweep.html stable/11/contrib/ntp/scripts/ntpsweep/ntpsweep.man.in stable/11/contrib/ntp/scripts/ntpsweep/ntpsweep.mdoc.in stable/11/contrib/ntp/scripts/ntptrace/invoke-ntptrace.texi stable/11/contrib/ntp/scripts/ntptrace/ntptrace-opts stable/11/contrib/ntp/scripts/ntptrace/ntptrace.1ntptraceman stable/11/contrib/ntp/scripts/ntptrace/ntptrace.1ntptracemdoc stable/11/contrib/ntp/scripts/ntptrace/ntptrace.html stable/11/contrib/ntp/scripts/ntptrace/ntptrace.man.in stable/11/contrib/ntp/scripts/ntptrace/ntptrace.mdoc.in stable/11/contrib/ntp/scripts/plot_summary-opts stable/11/contrib/ntp/scripts/plot_summary.1plot_summaryman stable/11/contrib/ntp/scripts/plot_summary.1plot_summarymdoc stable/11/contrib/ntp/scripts/plot_summary.html stable/11/contrib/ntp/scripts/plot_summary.man.in stable/11/contrib/ntp/scripts/plot_summary.mdoc.in stable/11/contrib/ntp/scripts/summary-opts stable/11/contrib/ntp/scripts/summary.1summaryman stable/11/contrib/ntp/scripts/summary.1summarymdoc stable/11/contrib/ntp/scripts/summary.html stable/11/contrib/ntp/scripts/summary.man.in stable/11/contrib/ntp/scripts/summary.mdoc.in stable/11/contrib/ntp/scripts/update-leap/invoke-update-leap.texi stable/11/contrib/ntp/scripts/update-leap/update-leap-opts stable/11/contrib/ntp/scripts/update-leap/update-leap.1update-leapman stable/11/contrib/ntp/scripts/update-leap/update-leap.1update-leapmdoc stable/11/contrib/ntp/scripts/update-leap/update-leap.html stable/11/contrib/ntp/scripts/update-leap/update-leap.man.in stable/11/contrib/ntp/scripts/update-leap/update-leap.mdoc.in stable/11/contrib/ntp/sntp/COPYRIGHT stable/11/contrib/ntp/sntp/configure stable/11/contrib/ntp/sntp/configure.ac stable/11/contrib/ntp/sntp/crypto.c stable/11/contrib/ntp/sntp/include/copyright.def stable/11/contrib/ntp/sntp/include/version.def stable/11/contrib/ntp/sntp/include/version.texi stable/11/contrib/ntp/sntp/invoke-sntp.texi stable/11/contrib/ntp/sntp/libevent/build-aux/ar-lib stable/11/contrib/ntp/sntp/libevent/build-aux/compile stable/11/contrib/ntp/sntp/libevent/build-aux/config.guess stable/11/contrib/ntp/sntp/libevent/build-aux/config.sub stable/11/contrib/ntp/sntp/libevent/build-aux/depcomp stable/11/contrib/ntp/sntp/libevent/build-aux/install-sh stable/11/contrib/ntp/sntp/libevent/build-aux/missing stable/11/contrib/ntp/sntp/libevent/build-aux/test-driver stable/11/contrib/ntp/sntp/libevent/build-aux/ylwrap stable/11/contrib/ntp/sntp/libevent/test/regress.gen.c stable/11/contrib/ntp/sntp/libevent/test/regress.gen.h stable/11/contrib/ntp/sntp/libopts/m4/libopts.m4 stable/11/contrib/ntp/sntp/m4/ntp_problemtests.m4 stable/11/contrib/ntp/sntp/m4/version.m4 stable/11/contrib/ntp/sntp/main.c stable/11/contrib/ntp/sntp/networking.c stable/11/contrib/ntp/sntp/scm-rev stable/11/contrib/ntp/sntp/sntp-opts.c stable/11/contrib/ntp/sntp/sntp-opts.h stable/11/contrib/ntp/sntp/sntp.1sntpman stable/11/contrib/ntp/sntp/sntp.1sntpmdoc stable/11/contrib/ntp/sntp/sntp.html stable/11/contrib/ntp/sntp/sntp.man.in stable/11/contrib/ntp/sntp/sntp.mdoc.in stable/11/contrib/ntp/sntp/tests/run-crypto.c stable/11/contrib/ntp/sntp/tests/run-keyFile.c stable/11/contrib/ntp/sntp/tests/run-kodDatabase.c stable/11/contrib/ntp/sntp/tests/run-kodFile.c stable/11/contrib/ntp/sntp/tests/run-networking.c stable/11/contrib/ntp/sntp/tests/run-packetHandling.c stable/11/contrib/ntp/sntp/tests/run-packetProcessing.c stable/11/contrib/ntp/sntp/tests/run-t-log.c stable/11/contrib/ntp/sntp/tests/run-utilities.c stable/11/contrib/ntp/sntp/tests/testconf.yml stable/11/contrib/ntp/sntp/version.c stable/11/contrib/ntp/util/invoke-ntp-keygen.texi stable/11/contrib/ntp/util/ntp-keygen-opts.c stable/11/contrib/ntp/util/ntp-keygen-opts.h stable/11/contrib/ntp/util/ntp-keygen.1ntp-keygenman stable/11/contrib/ntp/util/ntp-keygen.1ntp-keygenmdoc stable/11/contrib/ntp/util/ntp-keygen.html stable/11/contrib/ntp/util/ntp-keygen.man.in stable/11/contrib/ntp/util/ntp-keygen.mdoc.in stable/11/contrib/ntp/util/ntptime.c stable/11/usr.sbin/ntp/config.h stable/11/usr.sbin/ntp/libntp/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/12/contrib/ntp/COPYRIGHT ============================================================================== --- stable/12/contrib/ntp/COPYRIGHT Wed Mar 4 23:49:20 2020 (r358658) +++ stable/12/contrib/ntp/COPYRIGHT Wed Mar 4 23:54:13 2020 (r358659) @@ -3,7 +3,7 @@ This file is automatically generated from html/copyrig jpg "Clone me," says Dolly sheepishly. - Last update: 2-Jan-2017 11:58 UTC + Last update: 4-Feb-2020 23:47 UTC __________________________________________________________________ The following copyright notice applies to all files collectively called @@ -32,7 +32,7 @@ This file is automatically generated from html/copyrig Burnicki is: *********************************************************************** * * -* Copyright (c) Network Time Foundation 2011-2017 * +* Copyright (c) Network Time Foundation 2011-2020 * * * * All Rights Reserved * * * Modified: stable/12/contrib/ntp/ChangeLog ============================================================================== --- stable/12/contrib/ntp/ChangeLog Wed Mar 4 23:49:20 2020 (r358658) +++ stable/12/contrib/ntp/ChangeLog Wed Mar 4 23:54:13 2020 (r358659) @@ -1,4 +1,100 @@ --- +(4.2.8p14) 2020/03/03 Released by Harlan Stenn + +* [Sec 3610] process_control() should bail earlier on short packets. stenn@ + - Reported by Philippe Antoine +* [Sec 3596] Highly predictable timestamp attack. + - Reported by Miroslav Lichvar +* [Sec 3592] DoS attack on client ntpd + - Reported by Miroslav Lichvar +* [Bug 3637] Emit the version of ntpd in saveconfig. stenn@ +* [Bug 3636] NMEA: combine time/date from multiple sentences +* [Bug 3635] Make leapsecond file hash check optional +* [Bug 3634] Typo in discipline.html, reported by Jason Harrison. stenn@ +* [Bug 3628] raw DCF decoding - improve robustness with Zeller's congruence + - implement Zeller's congruence in libparse and libntp +* [Bug 3627] SIGSEGV on FreeBSD-12 with stack limit and stack gap + - integrated patch by Cy Schubert +* [Bug 3620] memory leak in ntpq sysinfo + - applied patch by Gerry Garvey +* [Bug 3619] Honour drefid setting in cooked mode and sysinfo + - applied patch by Gerry Garvey +* [Bug 3617] Add support for ACE III and Copernicus II receivers + - integrated patch by Richard Steedman +* [Bug 3615] accelerate refclock startup +* [Bug 3613] Propagate noselect to mobilized pool servers + - Reported by Martin Burnicki +* [Bug 3612] Use-of-uninitialized-value in receive function + - Reported by Philippe Antoine +* [Bug 3611] NMEA time interpreted incorrectly + - officially document new "trust date" mode bit for NMEA driver + - restore the (previously undocumented) "trust date" feature lost with [bug 3577] +* [Bug 3609] Fixing wrong falseticker in case of non-statistic jitter + - mostly based on a patch by Michael Haardt, implementing 'fudge minjitter' +* [Bug 3608] libparse fails to compile on S11.4SRU13 and later + - removed ffs() and fls() prototypes as per Brian Utterback +* [Bug 3604] Wrong param byte order passing into record_raw_stats() in + ntp_io.c + - fixed byte and paramter order as suggested by wei6410@sina.com +* [Bug 3601] Tests fail to link on platforms with ntp_cv_gc_sections_runs=no +* [Bug 3599] Build fails on linux-m68k due to alignment issues + - added padding as suggested by John Paul Adrian Glaubitz +* [Bug 3594] ntpd discards messages coming through nmead +* [Bug 3593] ntpd discards silently nmea messages after the 5th string +* [Bug 3590] Update refclock_oncore.c to the new GPS date API +* [Bug 3585] Unity tests mix buffered and unbuffered output + - stdout+stderr are set to line buffered during test setup now +* [Bug 3583] synchronization error + - set clock to base date if system time is before that limit +* [Bug 3582] gpsdjson refclock fudgetime1 adjustment is doubled +* [Bug 3580] Possible bug ntpq-subs (NULL dereference in dogetassoc) + - Reported by Paulo Neves +* [Bug 3577] Update refclock_zyfer.c to the new GPS date API + - also updates for refclock_nmea.c and refclock_jupiter.c +* [Bug 3576] New GPS date function API +* [Bug 3573] nptdate: missleading error message +* [Bug 3570] NMEA driver docs: talker ID not mentioned, typo +* [Bug 3569] cleanup MOD_NANO/STA_NANO handling for 'ntpadjtimex()' + - sidekick: service port resolution in 'ntpdate' +* [Bug 3550] Reproducible build: Respect SOURCE_DATE_EPOCH + - applied patch by Douglas Royds +* [Bug 3542] ntpdc monlist parameters cannot be set +* [Bug 3533] ntpdc peer_info ipv6 issues + - applied patch by Gerry Garvey +* [Bug 3531] make check: test-decodenetnum fails + - try to harden 'decodenetnum()' against 'getaddrinfo()' errors + - fix wrong cond-compile tests in unit tests +* [Bug 3517] Reducing build noise +* [Bug 3516] Require tooling from this decade + - patch by Philipp Prindeville +* [Bug 3515] Refactor ntpdmain() dispatcher loop and group common code + - patch by Philipp Prindeville +* [Bug 3511] Get rid of AC_LANG_SOURCE() warnings + - patch by Philipp Prindeville +* [Bug 3510] Flatten out the #ifdef nesting in ntpdmain() + - partial application of patch by Philipp Prindeville +* [Bug 3491] Signed values of LFP datatypes should always display a sign + - applied patch by Gerry Garvey & fixed unit tests +* [Bug 3490] Patch to support Trimble Resolution Receivers + - applied (modified) patch by Richard Steedman +* [Bug 3473] RefID of refclocks should always be text format + - applied patch by Gerry Garvey (with minor formatting changes) +* [Bug 3132] Building 4.2.8p8 with disabled local libopts fails + - applied patch by Miroslav Lichvar +* [Bug 3094] ntpd trying to listen for broadcasts on a completely ipv6 network + +* [Bug 2420] ntpd doesn't run and exits with retval 0 when invalid user + is specified with -u + - monitor daemon child startup & propagate exit codes +* [Bug 1433] runtime check whether the kernel really supports capabilities + - (modified) patch by Kurt Roeckx +* Clean up sntp/networking.c:sendpkt() error message. +* Provide more detail on unrecognized config file parser tokens. +* Startup log improvements. +* Update the copyright year. +* html/confopt.html: cleanup. + +--- (4.2.8p13) 2019/03/07 Released by Harlan Stenn * [Sec 3565] Crafted null dereference attack in authenticated Modified: stable/12/contrib/ntp/CommitLog ============================================================================== --- stable/12/contrib/ntp/CommitLog Wed Mar 4 23:49:20 2020 (r358658) +++ stable/12/contrib/ntp/CommitLog Wed Mar 4 23:54:13 2020 (r358659) @@ -1,10 +1,3065 @@ -ChangeSet@1.3849, 2019-02-20 17:13:36-08:00, harlan@ntp-build.tal1.ntfo.org +ChangeSet@1.3896, 2020-03-03 17:42:43-08:00, ntpreleng@ntp-build.tal1.ntfo.org + NTP_4_2_8P14 + TAG: NTP_4_2_8P14 + + ChangeLog@1.1974 +1 -1 + NTP_4_2_8P14 + + ntpd/invoke-ntp.conf.texi@1.221 +1 -1 + NTP_4_2_8P14 + + ntpd/invoke-ntp.keys.texi@1.206 +1 -1 + NTP_4_2_8P14 + + ntpd/invoke-ntpd.texi@1.520 +2 -2 + NTP_4_2_8P14 + + ntpd/ntp.conf.5man@1.255 +2 -2 + NTP_4_2_8P14 + + ntpd/ntp.conf.5mdoc@1.255 +1 -1 + NTP_4_2_8P14 + + ntpd/ntp.conf.html@1.203 +1 -1 + NTP_4_2_8P14 + + ntpd/ntp.conf.man.in@1.255 +2 -2 + NTP_4_2_8P14 + + ntpd/ntp.conf.mdoc.in@1.255 +1 -1 + NTP_4_2_8P14 + + ntpd/ntp.keys.5man@1.240 +2 -2 + NTP_4_2_8P14 + + ntpd/ntp.keys.5mdoc@1.240 +1 -1 + NTP_4_2_8P14 + + ntpd/ntp.keys.html@1.201 +1 -1 + NTP_4_2_8P14 + + ntpd/ntp.keys.man.in@1.240 +2 -2 + NTP_4_2_8P14 + + ntpd/ntp.keys.mdoc.in@1.240 +1 -1 + NTP_4_2_8P14 + + ntpd/ntpd-opts.c@1.543 +7 -7 + NTP_4_2_8P14 + + ntpd/ntpd-opts.h@1.542 +3 -3 + NTP_4_2_8P14 + + ntpd/ntpd.1ntpdman@1.349 +2 -2 + NTP_4_2_8P14 + + ntpd/ntpd.1ntpdmdoc@1.349 +1 -1 + NTP_4_2_8P14 + + ntpd/ntpd.html@1.194 +2 -2 + NTP_4_2_8P14 + + ntpd/ntpd.man.in@1.349 +2 -2 + NTP_4_2_8P14 + + ntpd/ntpd.mdoc.in@1.349 +1 -1 + NTP_4_2_8P14 + + ntpdc/invoke-ntpdc.texi@1.517 +2 -2 + NTP_4_2_8P14 + + ntpdc/ntpdc-opts.c@1.536 +7 -7 + NTP_4_2_8P14 + + ntpdc/ntpdc-opts.h@1.535 +3 -3 + NTP_4_2_8P14 + + ntpdc/ntpdc.1ntpdcman@1.348 +2 -2 + NTP_4_2_8P14 + + ntpdc/ntpdc.1ntpdcmdoc@1.348 +1 -1 + NTP_4_2_8P14 + + ntpdc/ntpdc.html@1.363 +2 -2 + NTP_4_2_8P14 + + ntpdc/ntpdc.man.in@1.348 +2 -2 + NTP_4_2_8P14 + + ntpdc/ntpdc.mdoc.in@1.348 +1 -1 + NTP_4_2_8P14 + + ntpq/invoke-ntpq.texi@1.527 +2 -2 + NTP_4_2_8P14 + + ntpq/ntpq-opts.c@1.545 +7 -7 + NTP_4_2_8P14 + + ntpq/ntpq-opts.h@1.543 +3 -3 + NTP_4_2_8P14 + + ntpq/ntpq.1ntpqman@1.355 +2 -2 + NTP_4_2_8P14 + + ntpq/ntpq.1ntpqmdoc@1.355 +1 -1 + NTP_4_2_8P14 + + ntpq/ntpq.html@1.194 +2 -2 + NTP_4_2_8P14 + + ntpq/ntpq.man.in@1.355 +2 -2 + NTP_4_2_8P14 + + ntpq/ntpq.mdoc.in@1.355 +1 -1 + NTP_4_2_8P14 + + ntpsnmpd/invoke-ntpsnmpd.texi@1.519 +1 -1 + NTP_4_2_8P14 + + ntpsnmpd/ntpsnmpd-opts.c@1.538 +7 -7 + NTP_4_2_8P14 + + ntpsnmpd/ntpsnmpd-opts.h@1.537 +3 -3 + NTP_4_2_8P14 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.348 +2 -2 + NTP_4_2_8P14 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.348 +1 -1 + NTP_4_2_8P14 + + ntpsnmpd/ntpsnmpd.html@1.187 +1 -1 + NTP_4_2_8P14 + + ntpsnmpd/ntpsnmpd.man.in@1.348 +2 -2 + NTP_4_2_8P14 + + ntpsnmpd/ntpsnmpd.mdoc.in@1.348 +1 -1 + NTP_4_2_8P14 + + packageinfo.sh@1.544 +1 -1 + NTP_4_2_8P14 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.109 +2 -2 + NTP_4_2_8P14 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.110 +1 -1 + NTP_4_2_8P14 + + scripts/calc_tickadj/calc_tickadj.html@1.110 +1 -1 + NTP_4_2_8P14 + + scripts/calc_tickadj/calc_tickadj.man.in@1.108 +2 -2 + NTP_4_2_8P14 + + scripts/calc_tickadj/calc_tickadj.mdoc.in@1.110 +1 -1 + NTP_4_2_8P14 + + scripts/calc_tickadj/invoke-calc_tickadj.texi@1.113 +1 -1 + NTP_4_2_8P14 + + scripts/invoke-plot_summary.texi@1.131 +2 -2 + NTP_4_2_8P14 + + scripts/invoke-summary.texi@1.130 +2 -2 + NTP_4_2_8P14 + + scripts/ntp-wait/invoke-ntp-wait.texi@1.341 +2 -2 + NTP_4_2_8P14 + + scripts/ntp-wait/ntp-wait-opts@1.77 +2 -2 + NTP_4_2_8P14 + + scripts/ntp-wait/ntp-wait.1ntp-waitman@1.337 +2 -2 + NTP_4_2_8P14 + + scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.338 +1 -1 + NTP_4_2_8P14 + + scripts/ntp-wait/ntp-wait.html@1.359 +2 -2 + NTP_4_2_8P14 + + scripts/ntp-wait/ntp-wait.man.in@1.337 +2 -2 + NTP_4_2_8P14 + + scripts/ntp-wait/ntp-wait.mdoc.in@1.338 +1 -1 + NTP_4_2_8P14 + + scripts/ntpsweep/invoke-ntpsweep.texi@1.128 +2 -2 + NTP_4_2_8P14 + + scripts/ntpsweep/ntpsweep-opts@1.79 +2 -2 + NTP_4_2_8P14 + + scripts/ntpsweep/ntpsweep.1ntpsweepman@1.116 +2 -2 + NTP_4_2_8P14 + + scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.116 +1 -1 + NTP_4_2_8P14 + + scripts/ntpsweep/ntpsweep.html@1.131 +2 -2 + NTP_4_2_8P14 + + scripts/ntpsweep/ntpsweep.man.in@1.116 +2 -2 + NTP_4_2_8P14 + + scripts/ntpsweep/ntpsweep.mdoc.in@1.117 +1 -1 + NTP_4_2_8P14 + + scripts/ntptrace/invoke-ntptrace.texi@1.130 +2 -2 + NTP_4_2_8P14 + + scripts/ntptrace/ntptrace-opts@1.79 +2 -2 + NTP_4_2_8P14 + + scripts/ntptrace/ntptrace.1ntptraceman@1.116 +2 -2 + NTP_4_2_8P14 + + scripts/ntptrace/ntptrace.1ntptracemdoc@1.117 +1 -1 + NTP_4_2_8P14 + + scripts/ntptrace/ntptrace.html@1.132 +2 -2 + NTP_4_2_8P14 + + scripts/ntptrace/ntptrace.man.in@1.116 +2 -2 + NTP_4_2_8P14 + + scripts/ntptrace/ntptrace.mdoc.in@1.118 +1 -1 + NTP_4_2_8P14 + + scripts/plot_summary-opts@1.80 +2 -2 + NTP_4_2_8P14 + + scripts/plot_summary.1plot_summaryman@1.129 +2 -2 + NTP_4_2_8P14 + + scripts/plot_summary.1plot_summarymdoc@1.129 +1 -1 + NTP_4_2_8P14 + + scripts/plot_summary.html@1.134 +2 -2 + NTP_4_2_8P14 + + scripts/plot_summary.man.in@1.129 +2 -2 + NTP_4_2_8P14 + + scripts/plot_summary.mdoc.in@1.129 +1 -1 + NTP_4_2_8P14 + + scripts/summary-opts@1.79 +2 -2 + NTP_4_2_8P14 + + scripts/summary.1summaryman@1.128 +2 -2 + NTP_4_2_8P14 + + scripts/summary.1summarymdoc@1.128 +1 -1 + NTP_4_2_8P14 + + scripts/summary.html@1.133 +2 -2 + NTP_4_2_8P14 + + scripts/summary.man.in@1.128 +2 -2 + NTP_4_2_8P14 + + scripts/summary.mdoc.in@1.128 +1 -1 + NTP_4_2_8P14 + + scripts/update-leap/invoke-update-leap.texi@1.29 +1 -1 + NTP_4_2_8P14 + + scripts/update-leap/update-leap-opts@1.30 +2 -2 + NTP_4_2_8P14 + + scripts/update-leap/update-leap.1update-leapman@1.29 +2 -2 + NTP_4_2_8P14 + + scripts/update-leap/update-leap.1update-leapmdoc@1.29 +1 -1 + NTP_4_2_8P14 + + scripts/update-leap/update-leap.html@1.30 +1 -1 + NTP_4_2_8P14 + + scripts/update-leap/update-leap.man.in@1.29 +2 -2 + NTP_4_2_8P14 + + scripts/update-leap/update-leap.mdoc.in@1.29 +1 -1 + NTP_4_2_8P14 + + sntp/invoke-sntp.texi@1.519 +2 -2 + NTP_4_2_8P14 + + sntp/sntp-opts.c@1.539 +7 -7 + NTP_4_2_8P14 + + sntp/sntp-opts.h@1.537 +3 -3 + NTP_4_2_8P14 + + sntp/sntp.1sntpman@1.354 +2 -2 + NTP_4_2_8P14 + + sntp/sntp.1sntpmdoc@1.354 +1 -1 + NTP_4_2_8P14 + + sntp/sntp.html@1.535 +2 -2 + NTP_4_2_8P14 + + sntp/sntp.man.in@1.354 +2 -2 + NTP_4_2_8P14 + + sntp/sntp.mdoc.in@1.354 +1 -1 + NTP_4_2_8P14 + + util/invoke-ntp-keygen.texi@1.522 +2 -2 + NTP_4_2_8P14 + + util/ntp-keygen-opts.c@1.541 +7 -7 + NTP_4_2_8P14 + + util/ntp-keygen-opts.h@1.539 +3 -3 + NTP_4_2_8P14 + + util/ntp-keygen.1ntp-keygenman@1.350 +2 -2 + NTP_4_2_8P14 + + util/ntp-keygen.1ntp-keygenmdoc@1.350 +1 -1 + NTP_4_2_8P14 + + util/ntp-keygen.html@1.195 +2 -2 + NTP_4_2_8P14 + + util/ntp-keygen.man.in@1.350 +2 -2 + NTP_4_2_8P14 + + util/ntp-keygen.mdoc.in@1.350 +1 -1 + NTP_4_2_8P14 + +ChangeSet@1.3895, 2020-03-03 17:09:57-08:00, ntpreleng@ntp-build.tal1.ntfo.org + quiet some debug messages + + ntpd/ntp_config.c@1.375 +0 -2 + quiet some debug messages + + ntpd/ntp_peer.c@1.166 +2 -0 + quiet some debug messages + +ChangeSet@1.3894, 2020-03-03 16:49:54-08:00, ntpreleng@ntp-build.tal1.ntfo.org + NTP_4_2_8P13 + TAG: NTP_4_2_8P13 + + ChangeLog@1.1973 +1 -0 + NTP_4_2_8P13 + + ntpd/invoke-ntp.conf.texi@1.220 +31 -7 + NTP_4_2_8P13 + + ntpd/invoke-ntp.keys.texi@1.205 +1 -1 + NTP_4_2_8P13 + + ntpd/invoke-ntpd.texi@1.519 +3 -3 + NTP_4_2_8P13 + + ntpd/ntp.conf.5man@1.254 +34 -9 + NTP_4_2_8P13 + + ntpd/ntp.conf.5mdoc@1.254 +41 -6 + NTP_4_2_8P13 + + ntpd/ntp.conf.html@1.202 +33 -7 + NTP_4_2_8P13 + + ntpd/ntp.conf.man.in@1.254 +34 -9 + NTP_4_2_8P13 + + ntpd/ntp.conf.mdoc.in@1.254 +41 -6 + NTP_4_2_8P13 + + ntpd/ntp.keys.5man@1.239 +2 -2 + NTP_4_2_8P13 + + ntpd/ntp.keys.5mdoc@1.239 +3 -3 + NTP_4_2_8P13 + + ntpd/ntp.keys.man.in@1.239 +2 -2 + NTP_4_2_8P13 + + ntpd/ntp.keys.mdoc.in@1.239 +3 -3 + NTP_4_2_8P13 + + ntpd/ntpd-opts.c@1.542 +2 -2 + NTP_4_2_8P13 + + ntpd/ntpd-opts.h@1.541 +3 -3 + NTP_4_2_8P13 + + ntpd/ntpd.1ntpdman@1.348 +2 -2 + NTP_4_2_8P13 + + ntpd/ntpd.1ntpdmdoc@1.348 +2 -2 + NTP_4_2_8P13 + + ntpd/ntpd.man.in@1.348 +2 -2 + NTP_4_2_8P13 + + ntpd/ntpd.mdoc.in@1.348 +2 -2 + NTP_4_2_8P13 + + ntpdc/invoke-ntpdc.texi@1.516 +1 -1 + NTP_4_2_8P13 + + ntpdc/ntpdc-opts.c@1.535 +2 -2 + NTP_4_2_8P13 + + ntpdc/ntpdc-opts.h@1.534 +3 -3 + NTP_4_2_8P13 + + ntpdc/ntpdc.1ntpdcman@1.347 +2 -2 + NTP_4_2_8P13 + + ntpdc/ntpdc.1ntpdcmdoc@1.347 +2 -2 + NTP_4_2_8P13 + + ntpdc/ntpdc.html@1.362 +408 -353 + NTP_4_2_8P13 + + ntpdc/ntpdc.man.in@1.347 +2 -2 + NTP_4_2_8P13 + + ntpdc/ntpdc.mdoc.in@1.347 +2 -2 + NTP_4_2_8P13 + + ntpq/invoke-ntpq.texi@1.526 +1 -1 + NTP_4_2_8P13 + + ntpq/ntpq-opts.c@1.544 +2 -2 + NTP_4_2_8P13 + + ntpq/ntpq-opts.h@1.542 +3 -3 + NTP_4_2_8P13 + + ntpq/ntpq.1ntpqman@1.354 +2 -2 + NTP_4_2_8P13 + + ntpq/ntpq.1ntpqmdoc@1.354 +2 -2 + NTP_4_2_8P13 + + ntpq/ntpq.html@1.193 +1 -1 + NTP_4_2_8P13 + + ntpq/ntpq.man.in@1.354 +2 -2 + NTP_4_2_8P13 + + ntpq/ntpq.mdoc.in@1.354 +2 -2 + NTP_4_2_8P13 + + ntpsnmpd/invoke-ntpsnmpd.texi@1.518 +1 -1 + NTP_4_2_8P13 + + ntpsnmpd/ntpsnmpd-opts.c@1.537 +2 -2 + NTP_4_2_8P13 + + ntpsnmpd/ntpsnmpd-opts.h@1.536 +3 -3 + NTP_4_2_8P13 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.347 +2 -2 + NTP_4_2_8P13 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.347 +2 -2 + NTP_4_2_8P13 + + ntpsnmpd/ntpsnmpd.man.in@1.347 +2 -2 + NTP_4_2_8P13 + + ntpsnmpd/ntpsnmpd.mdoc.in@1.347 +2 -2 + NTP_4_2_8P13 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.108 +2 -2 + NTP_4_2_8P13 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.109 +2 -2 + NTP_4_2_8P13 + + scripts/calc_tickadj/calc_tickadj.html@1.109 +172 -128 + NTP_4_2_8P13 + + scripts/calc_tickadj/calc_tickadj.man.in@1.107 +2 -2 + NTP_4_2_8P13 + + scripts/calc_tickadj/calc_tickadj.mdoc.in@1.109 +2 -2 + NTP_4_2_8P13 + + scripts/calc_tickadj/invoke-calc_tickadj.texi@1.112 +2 -2 + NTP_4_2_8P13 + + scripts/invoke-plot_summary.texi@1.130 +2 -2 + NTP_4_2_8P13 + + scripts/invoke-summary.texi@1.129 +2 -2 + NTP_4_2_8P13 + + scripts/ntp-wait/invoke-ntp-wait.texi@1.340 +2 -2 + NTP_4_2_8P13 + + scripts/ntp-wait/ntp-wait-opts@1.76 +2 -2 + NTP_4_2_8P13 + + scripts/ntp-wait/ntp-wait.1ntp-waitman@1.336 +2 -2 + NTP_4_2_8P13 + + scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.337 +2 -2 + NTP_4_2_8P13 + + scripts/ntp-wait/ntp-wait.html@1.358 +181 -152 + NTP_4_2_8P13 + + scripts/ntp-wait/ntp-wait.man.in@1.336 +2 -2 + NTP_4_2_8P13 + + scripts/ntp-wait/ntp-wait.mdoc.in@1.337 +2 -2 + NTP_4_2_8P13 + + scripts/ntpsweep/invoke-ntpsweep.texi@1.127 +2 -2 + NTP_4_2_8P13 + + scripts/ntpsweep/ntpsweep-opts@1.78 +2 -2 + NTP_4_2_8P13 + + scripts/ntpsweep/ntpsweep.1ntpsweepman@1.115 +2 -2 + NTP_4_2_8P13 + + scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.115 +2 -2 + NTP_4_2_8P13 + + scripts/ntpsweep/ntpsweep.html@1.130 +188 -152 + NTP_4_2_8P13 + + scripts/ntpsweep/ntpsweep.man.in@1.115 +2 -2 + NTP_4_2_8P13 + + scripts/ntpsweep/ntpsweep.mdoc.in@1.116 +2 -2 + NTP_4_2_8P13 + + scripts/ntptrace/invoke-ntptrace.texi@1.129 +2 -2 + NTP_4_2_8P13 + + scripts/ntptrace/ntptrace-opts@1.78 +2 -2 + NTP_4_2_8P13 + + scripts/ntptrace/ntptrace.1ntptraceman@1.115 +2 -2 + NTP_4_2_8P13 + + scripts/ntptrace/ntptrace.1ntptracemdoc@1.116 +2 -2 + NTP_4_2_8P13 + + scripts/ntptrace/ntptrace.html@1.131 +179 -129 + NTP_4_2_8P13 + + scripts/ntptrace/ntptrace.man.in@1.115 +2 -2 + NTP_4_2_8P13 + + scripts/ntptrace/ntptrace.mdoc.in@1.117 +2 -2 + NTP_4_2_8P13 + + scripts/plot_summary-opts@1.79 +2 -2 + NTP_4_2_8P13 + + scripts/plot_summary.1plot_summaryman@1.128 +2 -2 + NTP_4_2_8P13 + + scripts/plot_summary.1plot_summarymdoc@1.128 +2 -2 + NTP_4_2_8P13 + + scripts/plot_summary.html@1.133 +203 -161 + NTP_4_2_8P13 + + scripts/plot_summary.man.in@1.128 +2 -2 + NTP_4_2_8P13 + + scripts/plot_summary.mdoc.in@1.128 +2 -2 + NTP_4_2_8P13 + + scripts/summary-opts@1.78 +2 -2 + NTP_4_2_8P13 + + scripts/summary.1summaryman@1.127 +2 -2 + NTP_4_2_8P13 + + scripts/summary.1summarymdoc@1.127 +2 -2 + NTP_4_2_8P13 + + scripts/summary.html@1.132 +184 -136 + NTP_4_2_8P13 + + scripts/summary.man.in@1.127 +2 -2 + NTP_4_2_8P13 + + scripts/summary.mdoc.in@1.127 +2 -2 + NTP_4_2_8P13 + + scripts/update-leap/invoke-update-leap.texi@1.28 +1 -1 + NTP_4_2_8P13 + + scripts/update-leap/update-leap-opts@1.29 +2 -2 + NTP_4_2_8P13 + + scripts/update-leap/update-leap.1update-leapman@1.28 +2 -2 + NTP_4_2_8P13 + + scripts/update-leap/update-leap.1update-leapmdoc@1.28 +2 -2 + NTP_4_2_8P13 + + scripts/update-leap/update-leap.html@1.29 +1 -1 + NTP_4_2_8P13 + + scripts/update-leap/update-leap.man.in@1.28 +2 -2 + NTP_4_2_8P13 + + scripts/update-leap/update-leap.mdoc.in@1.28 +2 -2 + NTP_4_2_8P13 + + sntp/invoke-sntp.texi@1.518 +1 -1 + NTP_4_2_8P13 + + sntp/sntp-opts.c@1.538 +2 -2 + NTP_4_2_8P13 + + sntp/sntp-opts.h@1.536 +3 -3 + NTP_4_2_8P13 + + sntp/sntp.1sntpman@1.353 +2 -2 + NTP_4_2_8P13 + + sntp/sntp.1sntpmdoc@1.353 +2 -2 + NTP_4_2_8P13 + + sntp/sntp.html@1.534 +472 -418 + NTP_4_2_8P13 + + sntp/sntp.man.in@1.353 +2 -2 + NTP_4_2_8P13 + + sntp/sntp.mdoc.in@1.353 +2 -2 + NTP_4_2_8P13 + + util/invoke-ntp-keygen.texi@1.521 +1 -1 + NTP_4_2_8P13 + + util/ntp-keygen-opts.c@1.540 +2 -2 + NTP_4_2_8P13 + + util/ntp-keygen-opts.h@1.538 +3 -3 + NTP_4_2_8P13 + + util/ntp-keygen.1ntp-keygenman@1.349 +2 -2 + NTP_4_2_8P13 + + util/ntp-keygen.1ntp-keygenmdoc@1.349 +2 -2 + NTP_4_2_8P13 + + util/ntp-keygen.html@1.194 +1 -1 + NTP_4_2_8P13 + + util/ntp-keygen.man.in@1.349 +2 -2 + NTP_4_2_8P13 + + util/ntp-keygen.mdoc.in@1.349 +2 -2 + NTP_4_2_8P13 + +ChangeSet@1.3893, 2020-03-03 16:25:14-08:00, ntpreleng@ntp-build.tal1.ntfo.org + Replace line with head -1 + + scripts/build/addChangeLogTag@1.6 +1 -1 + Replace line with head -1 + +ChangeSet@1.3892, 2020-03-03 16:05:38-08:00, ntpreleng@ntp-build.tal1.ntfo.org + provide get_pollskew() for simulator + + ntpd/ntp_config.c@1.374 +2 -2 + provide get_pollskew() for simulator + +ChangeSet@1.3844.24.1, 2020-03-03 03:30:13-08:00, ntpreleng@ntp-build.tal1.ntfo.org + NTP_4_2_8P13 + TAG: NTP_4_2_8P13 (currently on 1.3894) + + BitKeeper/triggers/2mirrors@1.11 +6 -2 + NTP_4_2_8P13 + + ntpd/ntpd-opts.c@1.539.1.1 +1 -1 + NTP_4_2_8P13 + + ntpd/ntpd-opts.h@1.538.1.1 +1 -1 + NTP_4_2_8P13 + + ntpd/ntpd.html@1.193 +3 -3 + NTP_4_2_8P13 + + ntpd/ntpdsim-opts.c@1.29 +372 -340 + NTP_4_2_8P13 + + ntpd/ntpdsim-opts.h@1.29 +44 -37 + NTP_4_2_8P13 + + ntpdc/ntpdc-opts.c@1.532.1.1 +1 -1 + NTP_4_2_8P13 + + ntpdc/ntpdc-opts.h@1.531.1.1 +1 -1 + NTP_4_2_8P13 + + ntpq/ntpq-opts.c@1.541.1.1 +1 -1 + NTP_4_2_8P13 + + ntpq/ntpq-opts.h@1.539.1.1 +1 -1 + NTP_4_2_8P13 + + ntpq/ntpq.html@1.192 +1 -1 + NTP_4_2_8P13 + + ntpsnmpd/ntpsnmpd-opts.c@1.534.1.1 +1 -1 + NTP_4_2_8P13 + + ntpsnmpd/ntpsnmpd-opts.h@1.533.1.1 +1 -1 + NTP_4_2_8P13 + + scripts/calc_tickadj/calc_tickadj-opts@1.10 +2 -2 + NTP_4_2_8P13 + + scripts/ntp-wait/invoke-ntp-wait.texi@1.337.1.1 +1 -1 + NTP_4_2_8P13 + + scripts/ntp-wait/ntp-wait-opts@1.73.1.1 +1 -1 + NTP_4_2_8P13 + + scripts/ntpsweep/ntpsweep-opts@1.75.1.1 +1 -1 + NTP_4_2_8P13 + + scripts/ntptrace/invoke-ntptrace.texi@1.126.1.1 +1 -1 + NTP_4_2_8P13 + + scripts/ntptrace/ntptrace-opts@1.75.1.1 +1 -1 + NTP_4_2_8P13 + + scripts/plot_summary-opts@1.76.1.1 +1 -1 + NTP_4_2_8P13 + + scripts/summary-opts@1.75.1.1 +1 -1 + NTP_4_2_8P13 + + scripts/update-leap/update-leap-opts@1.26.1.1 +1 -1 + NTP_4_2_8P13 + + sntp/sntp-opts.c@1.535.1.1 +1 -1 + NTP_4_2_8P13 + + sntp/sntp-opts.h@1.533.1.1 +1 -1 + NTP_4_2_8P13 + + util/ntp-keygen-opts.c@1.537.1.1 +1 -1 + NTP_4_2_8P13 + + util/ntp-keygen-opts.h@1.535.1.1 +1 -1 + NTP_4_2_8P13 + + util/ntp-keygen.html@1.193 +1 -1 + NTP_4_2_8P13 + +ChangeSet@1.3888, 2020-03-03 07:26:56+00:00, stenn@psp-deb1.ntp.org + cleanup + + NEWS@1.197.1.3 +3 -2 + cleanup + +ChangeSet@1.3887, 2020-02-18 05:11:26+00:00, stenn@psp-deb1.ntp.org + Cleanup distcheck psl* files + + ntpd/Makefile.am@1.138 +11 -0 + Cleanup distcheck psl* files + +ChangeSet@1.3886, 2020-02-18 05:10:35+00:00, stenn@psp-deb1.ntp.org + Distribute ntp_calgps.h + + include/Makefile.am@1.58 +1 -0 + Distribute ntp_calgps.h + +ChangeSet@1.3885, 2020-02-18 03:32:51+00:00, stenn@psp-deb1.ntp.org + Update the NEWS file for p14 + + NEWS@1.197.1.2 +107 -0 + Update the NEWS file for p14 + +ChangeSet@1.3884, 2020-02-17 11:05:46+00:00, stenn@psp-deb1.ntp.org + merge cleanup + + ntpd/ntp_proto.c@1.432 +1 -1 + merge cleanup + +ChangeSet@1.3881, 2020-02-17 08:50:00+00:00, stenn@psp-deb1.ntp.org + update + + ntpd/ntp_keyword.h@1.38 +545 -539 + update + +ChangeSet@1.3880, 2020-02-17 08:48:45+00:00, stenn@psp-deb1.ntp.org + Startp logging improvements. + Bug3596. + + html/accopt.html@1.48 +7 -2 + cleanup. + bug3596: document 'serverresponse fuzz' + + html/confopt.html@1.64.1.1 +22 -9 + Cleanup. + + Bug 3596: document xmtnonce + + html/miscopt.html@1.93 +19 -1 + Cleanup. + + bug3596: document pollskewlist + + include/Makefile.am@1.57 +1 -0 + pollskew upodates + + include/ntp.h@1.232 +8 -2 + bug3596 chagnes: + - srvfuzrft patches + - pollskew updates + - xmtnonce + + include/ntp_config.h@1.89 +27 -20 + bug3596 updates: + - pollskewlist + - srvfuzrft patches + + include/ntp_psl.h@1.1 +17 -0 + BitKeeper file include/ntp_psl.h + --- + bug3596 + + include/ntp_psl.h@1.0 +0 -0 + + include/ntp_request.h@1.54 +2 -1 + srvfuzrft patches + + include/ntp_stdlib.h@1.88 +1 -1 + randomizepoll/server response fuzz reftime fixes + + include/ntpd.h@1.207 +1 -1 + bug3596 cleanup + + libntp/statestr.c@1.31 +12 -5 + bug3596 srvrspfuz fixes + + ntpd/Makefile.am@1.137 +37 -7 + bug3596 pollskewlist changes + + ntpd/complete.conf.in@1.37 +4 -2 + bug3596: randompoll, pollskew xmtnonce + + ntpd/keyword-gen-utd@1.35 +1 -1 + Keyword table updates + + ntpd/keyword-gen.c@1.42 +3 -3 + bug3596: serverresponse fuzz, pollskewlist, xmtnonce + + ntpd/ntp.conf.def@1.34 +40 -4 + Cleanup. + bug3596: xmtnonce, serverresponse fuzz, pollskewlist, + + ntpd/ntp_config.c@1.373 +250 -26 + bug3596: serverresponse fuzz, pollskewlist, xmtnonce + + ntpd/ntp_loopfilter.c@1.195 +1 -1 + pollskew upodates + + ntpd/ntp_parser.c@1.117 +1298 -1283 + bug3596 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@freebsd.org Thu Mar 5 00:18:09 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 EE77B2565F7; Thu, 5 Mar 2020 00:18:09 +0000 (UTC) (envelope-from cy@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 48Xrtn5z5Gz4Mm0; Thu, 5 Mar 2020 00:18:09 +0000 (UTC) (envelope-from cy@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 C376D26693; Thu, 5 Mar 2020 00:18:09 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0250I9pC038144; Thu, 5 Mar 2020 00:18:09 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0250I9pT038143; Thu, 5 Mar 2020 00:18:09 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202003050018.0250I9pT038143@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Thu, 5 Mar 2020 00:18:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r358660 - stable/11/contrib/ntp/ntpd X-SVN-Group: stable-11 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: stable/11/contrib/ntp/ntpd X-SVN-Commit-Revision: 358660 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: Thu, 05 Mar 2020 00:18:10 -0000 Author: cy Date: Thu Mar 5 00:18:09 2020 New Revision: 358660 URL: https://svnweb.freebsd.org/changeset/base/358660 Log: This is a direct commit to stable/11: Stack gap is not supported on stable/11. Modified: stable/11/contrib/ntp/ntpd/ntpd.c Modified: stable/11/contrib/ntp/ntpd/ntpd.c ============================================================================== --- stable/11/contrib/ntp/ntpd/ntpd.c Wed Mar 4 23:54:13 2020 (r358659) +++ stable/11/contrib/ntp/ntpd/ntpd.c Thu Mar 5 00:18:09 2020 (r358660) @@ -424,18 +424,6 @@ main( char *argv[] ) { -# ifdef __FreeBSD__ - { - /* - * We Must disable ASLR stack gap on FreeBSD to avoid a - * segfault. See PR/241421 and PR/241960. - */ - int aslr_var = PROC_STACKGAP_DISABLE; - - pid_t my_pid = getpid(); - procctl(P_PID, my_pid, PROC_STACKGAP_CTL, &aslr_var); - } -# endif return ntpdmain(argc, argv); } #endif /* !SYS_WINNT */ From owner-svn-src-stable@freebsd.org Thu Mar 5 06:19:22 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 6808725E8A6; Thu, 5 Mar 2020 06:19:22 +0000 (UTC) (envelope-from imp@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 48Y0vZ12j6z4X6h; Thu, 5 Mar 2020 06:19:22 +0000 (UTC) (envelope-from imp@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 D6E432A6C; Thu, 5 Mar 2020 06:19:21 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0256JLVX053210; Thu, 5 Mar 2020 06:19:21 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0256JLS4053209; Thu, 5 Mar 2020 06:19:21 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202003050619.0256JLS4053209@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 5 Mar 2020 06:19:21 +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: r358661 - stable/12/sys/conf X-SVN-Group: stable-12 X-SVN-Commit-Author: imp X-SVN-Commit-Paths: stable/12/sys/conf X-SVN-Commit-Revision: 358661 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: Thu, 05 Mar 2020 06:19:22 -0000 Author: imp Date: Thu Mar 5 06:19:21 2020 New Revision: 358661 URL: https://svnweb.freebsd.org/changeset/base/358661 Log: MFC: r346018 | imp | 2019-04-07 12:39:55 -0600 (Sun, 07 Apr 2019) | 6 lines Use default shell assignment rather more complicated if then construct. Discussed with: emaste@, allanjude@ (changes (or not) based on their feedback) Differential Revision: https://reviews.freebsd.org/D19797 Modified: stable/12/sys/conf/newvers.sh Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/conf/newvers.sh ============================================================================== --- stable/12/sys/conf/newvers.sh Thu Mar 5 00:18:09 2020 (r358660) +++ stable/12/sys/conf/newvers.sh Thu Mar 5 06:19:21 2020 (r358661) @@ -46,10 +46,7 @@ TYPE="FreeBSD" REVISION="12.1" -BRANCH="STABLE" -if [ -n "${BRANCH_OVERRIDE}" ]; then - BRANCH=${BRANCH_OVERRIDE} -fi +BRANCH=${BRANCH_OVERRIDE:-STABLE} RELEASE="${REVISION}-${BRANCH}" VERSION="${TYPE} ${RELEASE}" @@ -80,21 +77,16 @@ if [ -z "${SYSDIR}" ]; then SYSDIR=$(dirname $0)/.. fi -if [ -n "${PARAMFILE}" ]; then - RELDATE=$(awk '/__FreeBSD_version.*propagated to newvers/ {print $3}' \ - ${PARAMFILE}) -else - RELDATE=$(awk '/__FreeBSD_version.*propagated to newvers/ {print $3}' \ - ${SYSDIR}/sys/param.h) -fi +RELDATE=$(awk '/__FreeBSD_version.*propagated to newvers/ {print $3}' \ + ${PARAMFILE:-${SYSDIR}/sys/param.h}) -b=share/examples/etc/bsd-style-copyright if [ -r "${SYSDIR}/../COPYRIGHT" ]; then year=$(sed -Ee '/^Copyright .* The FreeBSD Project/!d;s/^.*1992-([0-9]*) .*$/\1/g' ${SYSDIR}/../COPYRIGHT) else year=$(date +%Y) fi # look for copyright template +b=share/examples/etc/bsd-style-copyright for bsd_copyright in ../$b ../../$b ../../../$b /usr/src/$b /usr/$b do if [ -r "$bsd_copyright" ]; then @@ -123,9 +115,7 @@ COPYRIGHT="$COPYRIGHT # VARS_ONLY means no files should be generated, this is just being # included. -if [ -n "$VARS_ONLY" ]; then - return 0 -fi +[ -n "$VARS_ONLY" ] && return 0 LC_ALL=C; export LC_ALL if [ ! -r version ] From owner-svn-src-stable@freebsd.org Thu Mar 5 06:35:07 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 7853C25F52B; Thu, 5 Mar 2020 06:35:07 +0000 (UTC) (envelope-from cy@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 48Y1Fl1lCDz4Fbg; Thu, 5 Mar 2020 06:35:07 +0000 (UTC) (envelope-from cy@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 114522E55; Thu, 5 Mar 2020 06:35:07 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0256Z6LK064890; Thu, 5 Mar 2020 06:35:06 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0256Z5gW064885; Thu, 5 Mar 2020 06:35:05 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202003050635.0256Z5gW064885@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Thu, 5 Mar 2020 06:35:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r358664 - in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Group: stable-11 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 358664 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: Thu, 05 Mar 2020 06:35:07 -0000 Author: cy Date: Thu Mar 5 06:35:05 2020 New Revision: 358664 URL: https://svnweb.freebsd.org/changeset/base/358664 Log: MFC r358558: Continuing the effort started in r343701, #ifdef cleanup, checking for __FreeBSD_version > 3.0 and 5.0 is redundant. Modified: stable/11/sys/contrib/ipfilter/netinet/ip_compat.h stable/11/sys/contrib/ipfilter/netinet/ip_fil.h stable/11/sys/contrib/ipfilter/netinet/ip_proxy.c stable/11/sys/contrib/ipfilter/netinet/ip_state.c stable/11/sys/contrib/ipfilter/netinet/ip_sync.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/sys/contrib/ipfilter/netinet/ip_compat.h stable/12/sys/contrib/ipfilter/netinet/ip_fil.h stable/12/sys/contrib/ipfilter/netinet/ip_proxy.c stable/12/sys/contrib/ipfilter/netinet/ip_state.c stable/12/sys/contrib/ipfilter/netinet/ip_sync.c Directory Properties: stable/12/ (props changed) Modified: stable/11/sys/contrib/ipfilter/netinet/ip_compat.h ============================================================================== --- stable/11/sys/contrib/ipfilter/netinet/ip_compat.h Thu Mar 5 06:21:00 2020 (r358663) +++ stable/11/sys/contrib/ipfilter/netinet/ip_compat.h Thu Mar 5 06:35:05 2020 (r358664) @@ -126,7 +126,7 @@ * There may be other, safe, kernels but this is not extensively tested yet. */ # define HAVE_M_PULLDOWN -# if !defined(IPFILTER_LKM) && (__FreeBSD_version >= 300000) +# if !defined(IPFILTER_LKM) && defined(__FreeBSD_version) # include "opt_ipfilter.h" # endif # define COPYIN(a,b,c) copyin((caddr_t)(a), (caddr_t)(b), (c)) Modified: stable/11/sys/contrib/ipfilter/netinet/ip_fil.h ============================================================================== --- stable/11/sys/contrib/ipfilter/netinet/ip_fil.h Thu Mar 5 06:21:00 2020 (r358663) +++ stable/11/sys/contrib/ipfilter/netinet/ip_fil.h Thu Mar 5 06:35:05 2020 (r358664) @@ -1420,8 +1420,7 @@ typedef struct ipftune { ** HPUX Port */ -#if !defined(CDEV_MAJOR) && defined (__FreeBSD_version) && \ - (__FreeBSD_version >= 220000) +#if !defined(CDEV_MAJOR) && defined (__FreeBSD_version) # define CDEV_MAJOR 79 #endif Modified: stable/11/sys/contrib/ipfilter/netinet/ip_proxy.c ============================================================================== --- stable/11/sys/contrib/ipfilter/netinet/ip_proxy.c Thu Mar 5 06:21:00 2020 (r358663) +++ stable/11/sys/contrib/ipfilter/netinet/ip_proxy.c Thu Mar 5 06:35:05 2020 (r358664) @@ -51,7 +51,7 @@ # include # include #endif -#if __FreeBSD_version >= 300000 +#ifdef __FreeBSD_version # include #endif #include Modified: stable/11/sys/contrib/ipfilter/netinet/ip_state.c ============================================================================== --- stable/11/sys/contrib/ipfilter/netinet/ip_state.c Thu Mar 5 06:21:00 2020 (r358663) +++ stable/11/sys/contrib/ipfilter/netinet/ip_state.c Thu Mar 5 06:35:05 2020 (r358664) @@ -82,7 +82,7 @@ #ifdef USE_INET6 #include #endif -#if FREEBSD_GE_REV(300000) +#ifdef __FreeBSD_version # include # if defined(_KERNEL) && !defined(IPFILTER_LKM) # include @@ -307,7 +307,7 @@ ipf_state_seed_alloc(u_int state_size, u_int state_max /* * XXX - ipf_state_seed[X] should be a random number of sorts. */ -#if FREEBSD_GE_REV(400000) +#ifdef __FreeBSD_version state_seed[i] = arc4random(); #else state_seed[i] = ((u_long)state_seed + i) * state_size; Modified: stable/11/sys/contrib/ipfilter/netinet/ip_sync.c ============================================================================== --- stable/11/sys/contrib/ipfilter/netinet/ip_sync.c Thu Mar 5 06:21:00 2020 (r358663) +++ stable/11/sys/contrib/ipfilter/netinet/ip_sync.c Thu Mar 5 06:35:05 2020 (r358664) @@ -30,7 +30,7 @@ # include # endif # include -# if __FreeBSD_version >= 500000 +# ifdef __FreeBSD_version # include # endif #endif From owner-svn-src-stable@freebsd.org Thu Mar 5 06:35:09 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 091CF25F554; Thu, 5 Mar 2020 06:35:09 +0000 (UTC) (envelope-from cy@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 48Y1Fm50jmz4Ff5; Thu, 5 Mar 2020 06:35:08 +0000 (UTC) (envelope-from cy@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 311682E56; Thu, 5 Mar 2020 06:35:08 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0256Z8q8064901; Thu, 5 Mar 2020 06:35:08 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0256Z779064895; Thu, 5 Mar 2020 06:35:07 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202003050635.0256Z779064895@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Thu, 5 Mar 2020 06:35:07 +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: r358664 - in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 358664 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: Thu, 05 Mar 2020 06:35:09 -0000 Author: cy Date: Thu Mar 5 06:35:05 2020 New Revision: 358664 URL: https://svnweb.freebsd.org/changeset/base/358664 Log: MFC r358558: Continuing the effort started in r343701, #ifdef cleanup, checking for __FreeBSD_version > 3.0 and 5.0 is redundant. Modified: stable/12/sys/contrib/ipfilter/netinet/ip_compat.h stable/12/sys/contrib/ipfilter/netinet/ip_fil.h stable/12/sys/contrib/ipfilter/netinet/ip_proxy.c stable/12/sys/contrib/ipfilter/netinet/ip_state.c stable/12/sys/contrib/ipfilter/netinet/ip_sync.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/contrib/ipfilter/netinet/ip_compat.h stable/11/sys/contrib/ipfilter/netinet/ip_fil.h stable/11/sys/contrib/ipfilter/netinet/ip_proxy.c stable/11/sys/contrib/ipfilter/netinet/ip_state.c stable/11/sys/contrib/ipfilter/netinet/ip_sync.c Directory Properties: stable/11/ (props changed) Modified: stable/12/sys/contrib/ipfilter/netinet/ip_compat.h ============================================================================== --- stable/12/sys/contrib/ipfilter/netinet/ip_compat.h Thu Mar 5 06:21:00 2020 (r358663) +++ stable/12/sys/contrib/ipfilter/netinet/ip_compat.h Thu Mar 5 06:35:05 2020 (r358664) @@ -126,7 +126,7 @@ * There may be other, safe, kernels but this is not extensively tested yet. */ # define HAVE_M_PULLDOWN -# if !defined(IPFILTER_LKM) && (__FreeBSD_version >= 300000) +# if !defined(IPFILTER_LKM) && defined(__FreeBSD_version) # include "opt_ipfilter.h" # endif # define COPYIN(a,b,c) copyin((caddr_t)(a), (caddr_t)(b), (c)) Modified: stable/12/sys/contrib/ipfilter/netinet/ip_fil.h ============================================================================== --- stable/12/sys/contrib/ipfilter/netinet/ip_fil.h Thu Mar 5 06:21:00 2020 (r358663) +++ stable/12/sys/contrib/ipfilter/netinet/ip_fil.h Thu Mar 5 06:35:05 2020 (r358664) @@ -1420,8 +1420,7 @@ typedef struct ipftune { ** HPUX Port */ -#if !defined(CDEV_MAJOR) && defined (__FreeBSD_version) && \ - (__FreeBSD_version >= 220000) +#if !defined(CDEV_MAJOR) && defined (__FreeBSD_version) # define CDEV_MAJOR 79 #endif Modified: stable/12/sys/contrib/ipfilter/netinet/ip_proxy.c ============================================================================== --- stable/12/sys/contrib/ipfilter/netinet/ip_proxy.c Thu Mar 5 06:21:00 2020 (r358663) +++ stable/12/sys/contrib/ipfilter/netinet/ip_proxy.c Thu Mar 5 06:35:05 2020 (r358664) @@ -51,7 +51,7 @@ # include # include #endif -#if __FreeBSD_version >= 300000 +#ifdef __FreeBSD_version # include #endif #include Modified: stable/12/sys/contrib/ipfilter/netinet/ip_state.c ============================================================================== --- stable/12/sys/contrib/ipfilter/netinet/ip_state.c Thu Mar 5 06:21:00 2020 (r358663) +++ stable/12/sys/contrib/ipfilter/netinet/ip_state.c Thu Mar 5 06:35:05 2020 (r358664) @@ -82,7 +82,7 @@ #ifdef USE_INET6 #include #endif -#if FREEBSD_GE_REV(300000) +#ifdef __FreeBSD_version # include # if defined(_KERNEL) && !defined(IPFILTER_LKM) # include @@ -307,7 +307,7 @@ ipf_state_seed_alloc(u_int state_size, u_int state_max /* * XXX - ipf_state_seed[X] should be a random number of sorts. */ -#if FREEBSD_GE_REV(400000) +#ifdef __FreeBSD_version state_seed[i] = arc4random(); #else state_seed[i] = ((u_long)state_seed + i) * state_size; Modified: stable/12/sys/contrib/ipfilter/netinet/ip_sync.c ============================================================================== --- stable/12/sys/contrib/ipfilter/netinet/ip_sync.c Thu Mar 5 06:21:00 2020 (r358663) +++ stable/12/sys/contrib/ipfilter/netinet/ip_sync.c Thu Mar 5 06:35:05 2020 (r358664) @@ -30,7 +30,7 @@ # include # endif # include -# if __FreeBSD_version >= 500000 +# ifdef __FreeBSD_version # include # endif #endif From owner-svn-src-stable@freebsd.org Thu Mar 5 06:36:25 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 49CBB25F69D; Thu, 5 Mar 2020 06:36:25 +0000 (UTC) (envelope-from cy@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 48Y1HD5Vbqz4J63; Thu, 5 Mar 2020 06:36:24 +0000 (UTC) (envelope-from cy@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 516182E59; Thu, 5 Mar 2020 06:36:24 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0256aO50065009; Thu, 5 Mar 2020 06:36:24 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0256aOYc065008; Thu, 5 Mar 2020 06:36:24 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202003050636.0256aOYc065008@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Thu, 5 Mar 2020 06:36:24 +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: r358665 - in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 358665 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: Thu, 05 Mar 2020 06:36:25 -0000 Author: cy Date: Thu Mar 5 06:36:23 2020 New Revision: 358665 URL: https://svnweb.freebsd.org/changeset/base/358665 Log: MFC r358559: Remove the now unused FREEBSD_GE_REV, FREEBSD_GT_REV, and FREEBSD_LT_REV macros. Modified: stable/12/sys/contrib/ipfilter/netinet/ip_compat.h Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/contrib/ipfilter/netinet/ip_compat.h Directory Properties: stable/11/ (props changed) Modified: stable/12/sys/contrib/ipfilter/netinet/ip_compat.h ============================================================================== --- stable/12/sys/contrib/ipfilter/netinet/ip_compat.h Thu Mar 5 06:35:05 2020 (r358664) +++ stable/12/sys/contrib/ipfilter/netinet/ip_compat.h Thu Mar 5 06:36:23 2020 (r358665) @@ -89,12 +89,6 @@ (__NetBSD_Version__ > (x))) #define NETBSD_LT_REV(x) (defined(__NetBSD_Version__) && \ (__NetBSD_Version__ < (x))) -#define FREEBSD_GE_REV(x) (defined(__FreeBSD_version) && \ - (__FreeBSD_version >= (x))) -#define FREEBSD_GT_REV(x) (defined(__FreeBSD_version) && \ - (__FreeBSD_version > (x))) -#define FREEBSD_LT_REV(x) (defined(__FreeBSD_version) && \ - (__FreeBSD_version < (x))) #define BSD_GE_YEAR(x) (defined(BSD) && (BSD >= (x))) #define BSD_GT_YEAR(x) (defined(BSD) && (BSD > (x))) #define BSD_LT_YEAR(x) (defined(BSD) && (BSD < (x))) From owner-svn-src-stable@freebsd.org Thu Mar 5 06:36:24 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 626F025F68B; Thu, 5 Mar 2020 06:36:24 +0000 (UTC) (envelope-from cy@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 48Y1HD0xbCz4J5H; Thu, 5 Mar 2020 06:36:24 +0000 (UTC) (envelope-from cy@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 E89F02E58; Thu, 5 Mar 2020 06:36:23 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0256aNVP065003; Thu, 5 Mar 2020 06:36:23 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0256aNJP065002; Thu, 5 Mar 2020 06:36:23 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202003050636.0256aNJP065002@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Thu, 5 Mar 2020 06:36:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r358665 - in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Group: stable-11 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 358665 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: Thu, 05 Mar 2020 06:36:24 -0000 Author: cy Date: Thu Mar 5 06:36:23 2020 New Revision: 358665 URL: https://svnweb.freebsd.org/changeset/base/358665 Log: MFC r358559: Remove the now unused FREEBSD_GE_REV, FREEBSD_GT_REV, and FREEBSD_LT_REV macros. Modified: stable/11/sys/contrib/ipfilter/netinet/ip_compat.h Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/sys/contrib/ipfilter/netinet/ip_compat.h Directory Properties: stable/12/ (props changed) Modified: stable/11/sys/contrib/ipfilter/netinet/ip_compat.h ============================================================================== --- stable/11/sys/contrib/ipfilter/netinet/ip_compat.h Thu Mar 5 06:35:05 2020 (r358664) +++ stable/11/sys/contrib/ipfilter/netinet/ip_compat.h Thu Mar 5 06:36:23 2020 (r358665) @@ -89,12 +89,6 @@ (__NetBSD_Version__ > (x))) #define NETBSD_LT_REV(x) (defined(__NetBSD_Version__) && \ (__NetBSD_Version__ < (x))) -#define FREEBSD_GE_REV(x) (defined(__FreeBSD_version) && \ - (__FreeBSD_version >= (x))) -#define FREEBSD_GT_REV(x) (defined(__FreeBSD_version) && \ - (__FreeBSD_version > (x))) -#define FREEBSD_LT_REV(x) (defined(__FreeBSD_version) && \ - (__FreeBSD_version < (x))) #define BSD_GE_YEAR(x) (defined(BSD) && (BSD >= (x))) #define BSD_GT_YEAR(x) (defined(BSD) && (BSD > (x))) #define BSD_LT_YEAR(x) (defined(BSD) && (BSD < (x))) From owner-svn-src-stable@freebsd.org Thu Mar 5 06:38:06 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 2E95525F83C; Thu, 5 Mar 2020 06:38:06 +0000 (UTC) (envelope-from cy@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 48Y1K93LSbz4LJw; Thu, 5 Mar 2020 06:38:05 +0000 (UTC) (envelope-from cy@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 83EE12E5D; Thu, 5 Mar 2020 06:38:04 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0256c4Ox065130; Thu, 5 Mar 2020 06:38:04 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0256c4F5065128; Thu, 5 Mar 2020 06:38:04 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202003050638.0256c4F5065128@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Thu, 5 Mar 2020 06:38:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r358666 - in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Group: stable-11 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 358666 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: Thu, 05 Mar 2020 06:38:06 -0000 Author: cy Date: Thu Mar 5 06:38:03 2020 New Revision: 358666 URL: https://svnweb.freebsd.org/changeset/base/358666 Log: MFC r358560: Retire macros: BSD_GE_YEAR BSD_GT_YEAR BSD_LT_YEAR Modified: stable/11/sys/contrib/ipfilter/netinet/ip_compat.h stable/11/sys/contrib/ipfilter/netinet/ip_nat.c stable/11/sys/contrib/ipfilter/netinet/ip_sync.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/sys/contrib/ipfilter/netinet/ip_compat.h stable/12/sys/contrib/ipfilter/netinet/ip_nat.c stable/12/sys/contrib/ipfilter/netinet/ip_sync.c Directory Properties: stable/12/ (props changed) Modified: stable/11/sys/contrib/ipfilter/netinet/ip_compat.h ============================================================================== --- stable/11/sys/contrib/ipfilter/netinet/ip_compat.h Thu Mar 5 06:36:23 2020 (r358665) +++ stable/11/sys/contrib/ipfilter/netinet/ip_compat.h Thu Mar 5 06:38:03 2020 (r358666) @@ -89,9 +89,6 @@ (__NetBSD_Version__ > (x))) #define NETBSD_LT_REV(x) (defined(__NetBSD_Version__) && \ (__NetBSD_Version__ < (x))) -#define BSD_GE_YEAR(x) (defined(BSD) && (BSD >= (x))) -#define BSD_GT_YEAR(x) (defined(BSD) && (BSD > (x))) -#define BSD_LT_YEAR(x) (defined(BSD) && (BSD < (x))) /* ----------------------------------------------------------------------- */ @@ -438,7 +435,7 @@ extern mb_t *allocmbt(size_t); * On BSD's use quad_t as a guarantee for getting at least a 64bit sized * object. */ -#if !defined(__amd64__) && BSD_GT_YEAR(199306) +#if !defined(__amd64__) && !SOLARIS # define USE_QUAD_T # define U_QUAD_T unsigned long long # define QUAD_T long long @@ -732,7 +729,7 @@ typedef struct tcpiphdr tcpiphdr_t; #define TCPF_ALL (TH_FIN|TH_SYN|TH_RST|TH_PUSH|TH_ACK|TH_URG|\ TH_ECN|TH_CWR) -#if BSD_GE_YEAR(199306) && !defined(m_act) +#if !SOLARIS && !defined(m_act) # define m_act m_nextpkt #endif Modified: stable/11/sys/contrib/ipfilter/netinet/ip_nat.c ============================================================================== --- stable/11/sys/contrib/ipfilter/netinet/ip_nat.c Thu Mar 5 06:36:23 2020 (r358665) +++ stable/11/sys/contrib/ipfilter/netinet/ip_nat.c Thu Mar 5 06:38:03 2020 (r358666) @@ -1010,7 +1010,7 @@ ipf_nat_ioctl(softc, data, cmd, mode, uid, ctx) ipnat_t natd; SPL_INT(s); -#if BSD_GE_YEAR(199306) && defined(_KERNEL) +#if !SOLARIS && defined(_KERNEL) # if NETBSD_GE_REV(399002000) if ((mode & FWRITE) && kauth_authorize_network(curlwp->l_cred, KAUTH_NETWORK_FIREWALL, Modified: stable/11/sys/contrib/ipfilter/netinet/ip_sync.c ============================================================================== --- stable/11/sys/contrib/ipfilter/netinet/ip_sync.c Thu Mar 5 06:36:23 2020 (r358665) +++ stable/11/sys/contrib/ipfilter/netinet/ip_sync.c Thu Mar 5 06:38:03 2020 (r358666) @@ -437,7 +437,7 @@ ipf_sync_write(softc, uio) int err = 0; -# if BSD_GE_YEAR(199306) || defined(__FreeBSD__) +# if defined(__NetBSD__) || defined(__FreeBSD__) uio->uio_rw = UIO_WRITE; # endif @@ -585,7 +585,7 @@ ipf_sync_read(softc, uio) return EINVAL; } -# if BSD_GE_YEAR(199306) || defined(__FreeBSD__) +# if defined(__NetBSD__) || defined(__FreeBSD__) uio->uio_rw = UIO_READ; # endif From owner-svn-src-stable@freebsd.org Thu Mar 5 06:38:06 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 499A225F83D; Thu, 5 Mar 2020 06:38:06 +0000 (UTC) (envelope-from cy@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 48Y1K95tCvz4LKQ; Thu, 5 Mar 2020 06:38:05 +0000 (UTC) (envelope-from cy@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 5FC992E5E; Thu, 5 Mar 2020 06:38:05 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0256c5As065138; Thu, 5 Mar 2020 06:38:05 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0256c4jV065135; Thu, 5 Mar 2020 06:38:04 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202003050638.0256c4jV065135@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Thu, 5 Mar 2020 06:38:04 +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: r358666 - in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/sys/contrib/ipfilter/netinet 12/sys/contrib/ipfilter/netinet X-SVN-Commit-Revision: 358666 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: Thu, 05 Mar 2020 06:38:06 -0000 Author: cy Date: Thu Mar 5 06:38:03 2020 New Revision: 358666 URL: https://svnweb.freebsd.org/changeset/base/358666 Log: MFC r358560: Retire macros: BSD_GE_YEAR BSD_GT_YEAR BSD_LT_YEAR Modified: stable/12/sys/contrib/ipfilter/netinet/ip_compat.h stable/12/sys/contrib/ipfilter/netinet/ip_nat.c stable/12/sys/contrib/ipfilter/netinet/ip_sync.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/sys/contrib/ipfilter/netinet/ip_compat.h stable/11/sys/contrib/ipfilter/netinet/ip_nat.c stable/11/sys/contrib/ipfilter/netinet/ip_sync.c Directory Properties: stable/11/ (props changed) Modified: stable/12/sys/contrib/ipfilter/netinet/ip_compat.h ============================================================================== --- stable/12/sys/contrib/ipfilter/netinet/ip_compat.h Thu Mar 5 06:36:23 2020 (r358665) +++ stable/12/sys/contrib/ipfilter/netinet/ip_compat.h Thu Mar 5 06:38:03 2020 (r358666) @@ -89,9 +89,6 @@ (__NetBSD_Version__ > (x))) #define NETBSD_LT_REV(x) (defined(__NetBSD_Version__) && \ (__NetBSD_Version__ < (x))) -#define BSD_GE_YEAR(x) (defined(BSD) && (BSD >= (x))) -#define BSD_GT_YEAR(x) (defined(BSD) && (BSD > (x))) -#define BSD_LT_YEAR(x) (defined(BSD) && (BSD < (x))) /* ----------------------------------------------------------------------- */ @@ -439,7 +436,7 @@ extern mb_t *allocmbt(size_t); * On BSD's use quad_t as a guarantee for getting at least a 64bit sized * object. */ -#if !defined(__amd64__) && BSD_GT_YEAR(199306) +#if !defined(__amd64__) && !SOLARIS # define USE_QUAD_T # define U_QUAD_T unsigned long long # define QUAD_T long long @@ -733,7 +730,7 @@ typedef struct tcpiphdr tcpiphdr_t; #define TCPF_ALL (TH_FIN|TH_SYN|TH_RST|TH_PUSH|TH_ACK|TH_URG|\ TH_ECN|TH_CWR) -#if BSD_GE_YEAR(199306) && !defined(m_act) +#if !SOLARIS && !defined(m_act) # define m_act m_nextpkt #endif Modified: stable/12/sys/contrib/ipfilter/netinet/ip_nat.c ============================================================================== --- stable/12/sys/contrib/ipfilter/netinet/ip_nat.c Thu Mar 5 06:36:23 2020 (r358665) +++ stable/12/sys/contrib/ipfilter/netinet/ip_nat.c Thu Mar 5 06:38:03 2020 (r358666) @@ -1010,7 +1010,7 @@ ipf_nat_ioctl(softc, data, cmd, mode, uid, ctx) ipnat_t natd; SPL_INT(s); -#if BSD_GE_YEAR(199306) && defined(_KERNEL) +#if !SOLARIS && defined(_KERNEL) # if NETBSD_GE_REV(399002000) if ((mode & FWRITE) && kauth_authorize_network(curlwp->l_cred, KAUTH_NETWORK_FIREWALL, Modified: stable/12/sys/contrib/ipfilter/netinet/ip_sync.c ============================================================================== --- stable/12/sys/contrib/ipfilter/netinet/ip_sync.c Thu Mar 5 06:36:23 2020 (r358665) +++ stable/12/sys/contrib/ipfilter/netinet/ip_sync.c Thu Mar 5 06:38:03 2020 (r358666) @@ -437,7 +437,7 @@ ipf_sync_write(softc, uio) int err = 0; -# if BSD_GE_YEAR(199306) || defined(__FreeBSD__) +# if defined(__NetBSD__) || defined(__FreeBSD__) uio->uio_rw = UIO_WRITE; # endif @@ -585,7 +585,7 @@ ipf_sync_read(softc, uio) return EINVAL; } -# if BSD_GE_YEAR(199306) || defined(__FreeBSD__) +# if defined(__NetBSD__) || defined(__FreeBSD__) uio->uio_rw = UIO_READ; # endif From owner-svn-src-stable@freebsd.org Thu Mar 5 14:05:23 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 46E2226A9BA; Thu, 5 Mar 2020 14:05:23 +0000 (UTC) (envelope-from imp@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 48YCFH12S6z4B6C; Thu, 5 Mar 2020 14:05:23 +0000 (UTC) (envelope-from imp@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 1E99E8489; Thu, 5 Mar 2020 14:05:23 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 025E5NPi034712; Thu, 5 Mar 2020 14:05:23 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 025E5M0B034711; Thu, 5 Mar 2020 14:05:23 GMT (envelope-from imp@FreeBSD.org) Message-Id: <202003051405.025E5M0B034711@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 5 Mar 2020 14:05:22 +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: r358671 - stable/12/sys/conf X-SVN-Group: stable-12 X-SVN-Commit-Author: imp X-SVN-Commit-Paths: stable/12/sys/conf X-SVN-Commit-Revision: 358671 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: Thu, 05 Mar 2020 14:05:23 -0000 Author: imp Date: Thu Mar 5 14:05:22 2020 New Revision: 358671 URL: https://svnweb.freebsd.org/changeset/base/358671 Log: MFC r346022: r346022 | imp | 2019-04-07 15:01:02 -0600 (Sun, 07 Apr 2019) | 23 lines Make RELDATE be on a single line. All variable assignments that start in column 1 have to be on a single line for amd to build due to as weird dependency there (most likely it can be fixed to use the new VARS_ONLY feature, but it isn't today). usr.sbin/amd/include/Makefile calls usr.sbin/amd/include/newvers.sh which does: eval `LC_ALL=C egrep '^[A-Z]+=' $1 | grep -v COPYRIGHT` which is where that requirement comes from. It handles COPYRIGHT since that's an exception. Rather than add additional exceptions, cope with the long line in newvers.sh instead. Note: it no longer needs to filter COPYRIGHT because the assignment doesn't start in column 1 anymore. I had done a universe when I had an earlier version of r346018 that had it as one line. When I changed it to multi-line as suggested in the review, I only built kernels on a couple of architectures to make sure it didn't break anything. Add comment to newvers.sh noting this. Obviously, this unbreaks the amd build. Modified: stable/12/sys/conf/newvers.sh Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/conf/newvers.sh ============================================================================== --- stable/12/sys/conf/newvers.sh Thu Mar 5 12:24:48 2020 (r358670) +++ stable/12/sys/conf/newvers.sh Thu Mar 5 14:05:22 2020 (r358671) @@ -44,6 +44,9 @@ # checkout from a version control system. Metadata is # included if the tree is modified. +# Note: usr.sbin/amd/include/newvers.sh assumes all variable assignments of +# upper case variables starting in column 1 are on one line w/o continuation. + TYPE="FreeBSD" REVISION="12.1" BRANCH=${BRANCH_OVERRIDE:-STABLE} @@ -77,8 +80,7 @@ if [ -z "${SYSDIR}" ]; then SYSDIR=$(dirname $0)/.. fi -RELDATE=$(awk '/__FreeBSD_version.*propagated to newvers/ {print $3}' \ - ${PARAMFILE:-${SYSDIR}/sys/param.h}) +RELDATE=$(awk '/__FreeBSD_version.*propagated to newvers/ {print $3}' ${PARAMFILE:-${SYSDIR}/sys/param.h}) if [ -r "${SYSDIR}/../COPYRIGHT" ]; then year=$(sed -Ee '/^Copyright .* The FreeBSD Project/!d;s/^.*1992-([0-9]*) .*$/\1/g' ${SYSDIR}/../COPYRIGHT) From owner-svn-src-stable@freebsd.org Fri Mar 6 12:01:59 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 6483D267173; Fri, 6 Mar 2020 12:01:59 +0000 (UTC) (envelope-from hselasky@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 48YmSQ52Qpz44hy; Fri, 6 Mar 2020 12:01:58 +0000 (UTC) (envelope-from hselasky@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 A7A531FBBC; Fri, 6 Mar 2020 12:01:58 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 026C1wdM025716; Fri, 6 Mar 2020 12:01:58 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026C1woW025715; Fri, 6 Mar 2020 12:01:58 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202003061201.026C1woW025715@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 6 Mar 2020 12:01:58 +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: r358696 - stable/12/sys/dev/usb/input X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/12/sys/dev/usb/input X-SVN-Commit-Revision: 358696 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, 06 Mar 2020 12:01:59 -0000 Author: hselasky Date: Fri Mar 6 12:01:58 2020 New Revision: 358696 URL: https://svnweb.freebsd.org/changeset/base/358696 Log: MFC r358609: Restart the USB keyboard repeat timer at every valid key-press. This fixes a regression issue after r357861. Reported by: James Wright PR: 224592 PR: 233884 Sponsored by: Mellanox Technologies Modified: stable/12/sys/dev/usb/input/ukbd.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/usb/input/ukbd.c ============================================================================== --- stable/12/sys/dev/usb/input/ukbd.c Fri Mar 6 11:26:16 2020 (r358695) +++ stable/12/sys/dev/usb/input/ukbd.c Fri Mar 6 12:01:58 2020 (r358696) @@ -521,15 +521,9 @@ ukbd_interrupt(struct ukbd_softc *sc) if (ukbd_is_modifier_key(key)) continue; - /* - * Check for first new key and set - * initial delay and [re]start timer: - */ - if (sc->sc_repeat_key == 0) { - sc->sc_co_basetime = sbinuptime(); - sc->sc_delay = sc->sc_kbd.kb_delay1; - ukbd_start_timer(sc); - } + sc->sc_co_basetime = sbinuptime(); + sc->sc_delay = sc->sc_kbd.kb_delay1; + ukbd_start_timer(sc); /* set repeat time for last key */ sc->sc_repeat_time = now + sc->sc_kbd.kb_delay1; From owner-svn-src-stable@freebsd.org Fri Mar 6 12:02:43 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 508B32672B4; Fri, 6 Mar 2020 12:02:43 +0000 (UTC) (envelope-from hselasky@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 48YmTH1W5Cz457j; Fri, 6 Mar 2020 12:02:43 +0000 (UTC) (envelope-from hselasky@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 2EEE31FCF8; Fri, 6 Mar 2020 12:02:43 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 026C2hIO025838; Fri, 6 Mar 2020 12:02:43 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026C2hFJ025837; Fri, 6 Mar 2020 12:02:43 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202003061202.026C2hFJ025837@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 6 Mar 2020 12:02:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r358697 - stable/11/sys/dev/usb/input X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: stable/11/sys/dev/usb/input X-SVN-Commit-Revision: 358697 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, 06 Mar 2020 12:02:43 -0000 Author: hselasky Date: Fri Mar 6 12:02:42 2020 New Revision: 358697 URL: https://svnweb.freebsd.org/changeset/base/358697 Log: MFC r358609: Restart the USB keyboard repeat timer at every valid key-press. This fixes a regression issue after r357861. Reported by: James Wright PR: 224592 PR: 233884 Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/usb/input/ukbd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/usb/input/ukbd.c ============================================================================== --- stable/11/sys/dev/usb/input/ukbd.c Fri Mar 6 12:01:58 2020 (r358696) +++ stable/11/sys/dev/usb/input/ukbd.c Fri Mar 6 12:02:42 2020 (r358697) @@ -543,15 +543,9 @@ ukbd_interrupt(struct ukbd_softc *sc) if (ukbd_is_modifier_key(key)) continue; - /* - * Check for first new key and set - * initial delay and [re]start timer: - */ - if (sc->sc_repeat_key == 0) { - sc->sc_co_basetime = sbinuptime(); - sc->sc_delay = sc->sc_kbd.kb_delay1; - ukbd_start_timer(sc); - } + sc->sc_co_basetime = sbinuptime(); + sc->sc_delay = sc->sc_kbd.kb_delay1; + ukbd_start_timer(sc); /* set repeat time for last key */ sc->sc_repeat_time = now + sc->sc_kbd.kb_delay1; From owner-svn-src-stable@freebsd.org Fri Mar 6 13:57:01 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 DF1B9269209; Fri, 6 Mar 2020 13:57:01 +0000 (UTC) (envelope-from hselasky@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 48Yq190f87z4B4D; Fri, 6 Mar 2020 13:57:01 +0000 (UTC) (envelope-from hselasky@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 A35A32117C; Fri, 6 Mar 2020 13:57:00 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 026Dv0BW091770; Fri, 6 Mar 2020 13:57:00 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026Dv03v091769; Fri, 6 Mar 2020 13:57:00 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202003061357.026Dv03v091769@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 6 Mar 2020 13:57:00 +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: r358699 - in stable/12/sys/compat/linuxkpi/common: include/linux src X-SVN-Group: stable-12 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/12/sys/compat/linuxkpi/common: include/linux src X-SVN-Commit-Revision: 358699 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, 06 Mar 2020 13:57:02 -0000 Author: hselasky Date: Fri Mar 6 13:57:00 2020 New Revision: 358699 URL: https://svnweb.freebsd.org/changeset/base/358699 Log: MFC r358387: Extend the range of the return value from nsecs_to_jiffies64() to support Mesa's drm_syncobj usage, in the LinuxKPI. While at it optimise the jiffies conversion functions to avoid repeated and constant calculations. Submitted by: Greg V Differential Revision: https://reviews.freebsd.org/D23846 Sponsored by: Mellanox Technologies Modified: stable/12/sys/compat/linuxkpi/common/include/linux/jiffies.h stable/12/sys/compat/linuxkpi/common/src/linux_compat.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linuxkpi/common/include/linux/jiffies.h ============================================================================== --- stable/12/sys/compat/linuxkpi/common/include/linux/jiffies.h Fri Mar 6 12:37:04 2020 (r358698) +++ stable/12/sys/compat/linuxkpi/common/include/linux/jiffies.h Fri Mar 6 13:57:00 2020 (r358699) @@ -54,6 +54,18 @@ #define HZ hz +extern uint64_t lkpi_nsec2hz_rem; +extern uint64_t lkpi_nsec2hz_div; +extern uint64_t lkpi_nsec2hz_max; + +extern uint64_t lkpi_usec2hz_rem; +extern uint64_t lkpi_usec2hz_div; +extern uint64_t lkpi_usec2hz_max; + +extern uint64_t lkpi_msec2hz_rem; +extern uint64_t lkpi_msec2hz_div; +extern uint64_t lkpi_msec2hz_max; + static inline int timespec_to_jiffies(const struct timespec *ts) { @@ -70,12 +82,11 @@ timespec_to_jiffies(const struct timespec *ts) static inline int msecs_to_jiffies(uint64_t msec) { - uint64_t msec_max, result; + uint64_t result; - msec_max = -1ULL / (uint64_t)hz; - if (msec > msec_max) - msec = msec_max; - result = howmany(msec * (uint64_t)hz, 1000ULL); + if (msec > lkpi_msec2hz_max) + msec = lkpi_msec2hz_max; + result = howmany(msec * lkpi_msec2hz_rem, lkpi_msec2hz_div); if (result > MAX_JIFFY_OFFSET) result = MAX_JIFFY_OFFSET; @@ -85,12 +96,11 @@ msecs_to_jiffies(uint64_t msec) static inline int usecs_to_jiffies(uint64_t usec) { - uint64_t usec_max, result; + uint64_t result; - usec_max = -1ULL / (uint64_t)hz; - if (usec > usec_max) - usec = usec_max; - result = howmany(usec * (uint64_t)hz, 1000000ULL); + if (usec > lkpi_usec2hz_max) + usec = lkpi_usec2hz_max; + result = howmany(usec * lkpi_usec2hz_rem, lkpi_usec2hz_div); if (result > MAX_JIFFY_OFFSET) result = MAX_JIFFY_OFFSET; @@ -100,23 +110,24 @@ usecs_to_jiffies(uint64_t usec) static inline uint64_t nsecs_to_jiffies64(uint64_t nsec) { - uint64_t nsec_max, result; - nsec_max = -1ULL / (uint64_t)hz; - if (nsec > nsec_max) - nsec = nsec_max; - result = howmany(nsec * (uint64_t)hz, 1000000000ULL); - if (result > MAX_JIFFY_OFFSET) - result = MAX_JIFFY_OFFSET; - - return (result); + if (nsec > lkpi_nsec2hz_max) + nsec = lkpi_nsec2hz_max; + return (howmany(nsec * lkpi_nsec2hz_rem, lkpi_nsec2hz_div)); } -static inline uint64_t -nsecs_to_jiffies(uint64_t n) +static inline unsigned long +nsecs_to_jiffies(uint64_t nsec) { - return (usecs_to_jiffies(howmany(n, 1000ULL))); + if (sizeof(unsigned long) >= sizeof(uint64_t)) { + if (nsec > lkpi_nsec2hz_max) + nsec = lkpi_nsec2hz_max; + } else { + if (nsec > (lkpi_nsec2hz_max >> 32)) + nsec = (lkpi_nsec2hz_max >> 32); + } + return (howmany(nsec * lkpi_nsec2hz_rem, lkpi_nsec2hz_div)); } static inline uint64_t Modified: stable/12/sys/compat/linuxkpi/common/src/linux_compat.c ============================================================================== --- stable/12/sys/compat/linuxkpi/common/src/linux_compat.c Fri Mar 6 12:37:04 2020 (r358698) +++ stable/12/sys/compat/linuxkpi/common/src/linux_compat.c Fri Mar 6 13:57:00 2020 (r358699) @@ -1934,9 +1934,38 @@ del_timer(struct timer_list *timer) return (1); } +/* greatest common divisor, Euclid equation */ +static uint64_t +lkpi_gcd_64(uint64_t a, uint64_t b) +{ + uint64_t an; + uint64_t bn; + + while (b != 0) { + an = b; + bn = a % b; + a = an; + b = bn; + } + return (a); +} + +uint64_t lkpi_nsec2hz_rem; +uint64_t lkpi_nsec2hz_div = 1000000000ULL; +uint64_t lkpi_nsec2hz_max; + +uint64_t lkpi_usec2hz_rem; +uint64_t lkpi_usec2hz_div = 1000000ULL; +uint64_t lkpi_usec2hz_max; + +uint64_t lkpi_msec2hz_rem; +uint64_t lkpi_msec2hz_div = 1000ULL; +uint64_t lkpi_msec2hz_max; + static void linux_timer_init(void *arg) { + uint64_t gcd; /* * Compute an internal HZ value which can divide 2**32 to @@ -1947,6 +1976,27 @@ linux_timer_init(void *arg) while (linux_timer_hz_mask < (unsigned long)hz) linux_timer_hz_mask *= 2; linux_timer_hz_mask--; + + /* compute some internal constants */ + + lkpi_nsec2hz_rem = hz; + lkpi_usec2hz_rem = hz; + lkpi_msec2hz_rem = hz; + + gcd = lkpi_gcd_64(lkpi_nsec2hz_rem, lkpi_nsec2hz_div); + lkpi_nsec2hz_rem /= gcd; + lkpi_nsec2hz_div /= gcd; + lkpi_nsec2hz_max = -1ULL / lkpi_nsec2hz_rem; + + gcd = lkpi_gcd_64(lkpi_usec2hz_rem, lkpi_usec2hz_div); + lkpi_usec2hz_rem /= gcd; + lkpi_usec2hz_div /= gcd; + lkpi_usec2hz_max = -1ULL / lkpi_usec2hz_rem; + + gcd = lkpi_gcd_64(lkpi_msec2hz_rem, lkpi_msec2hz_div); + lkpi_msec2hz_rem /= gcd; + lkpi_msec2hz_div /= gcd; + lkpi_msec2hz_max = -1ULL / lkpi_msec2hz_rem; } SYSINIT(linux_timer, SI_SUB_DRIVERS, SI_ORDER_FIRST, linux_timer_init, NULL); From owner-svn-src-stable@freebsd.org Fri Mar 6 13:58:10 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 1D6AE26927C; Fri, 6 Mar 2020 13:58:10 +0000 (UTC) (envelope-from hselasky@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 48Yq2T3H4Mz4Dby; Fri, 6 Mar 2020 13:58:08 +0000 (UTC) (envelope-from hselasky@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 D72692117D; Fri, 6 Mar 2020 13:58:08 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 026Dw8OE091885; Fri, 6 Mar 2020 13:58:08 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026Dw8PG091883; Fri, 6 Mar 2020 13:58:08 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202003061358.026Dw8PG091883@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 6 Mar 2020 13:58:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r358700 - in stable/11/sys/compat/linuxkpi/common: include/linux src X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/11/sys/compat/linuxkpi/common: include/linux src X-SVN-Commit-Revision: 358700 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, 06 Mar 2020 13:58:10 -0000 Author: hselasky Date: Fri Mar 6 13:58:08 2020 New Revision: 358700 URL: https://svnweb.freebsd.org/changeset/base/358700 Log: MFC r358387: Extend the range of the return value from nsecs_to_jiffies64() to support Mesa's drm_syncobj usage, in the LinuxKPI. While at it optimise the jiffies conversion functions to avoid repeated and constant calculations. Submitted by: Greg V Differential Revision: https://reviews.freebsd.org/D23846 Sponsored by: Mellanox Technologies Modified: stable/11/sys/compat/linuxkpi/common/include/linux/jiffies.h stable/11/sys/compat/linuxkpi/common/src/linux_compat.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linuxkpi/common/include/linux/jiffies.h ============================================================================== --- stable/11/sys/compat/linuxkpi/common/include/linux/jiffies.h Fri Mar 6 13:57:00 2020 (r358699) +++ stable/11/sys/compat/linuxkpi/common/include/linux/jiffies.h Fri Mar 6 13:58:08 2020 (r358700) @@ -54,6 +54,18 @@ #define HZ hz +extern uint64_t lkpi_nsec2hz_rem; +extern uint64_t lkpi_nsec2hz_div; +extern uint64_t lkpi_nsec2hz_max; + +extern uint64_t lkpi_usec2hz_rem; +extern uint64_t lkpi_usec2hz_div; +extern uint64_t lkpi_usec2hz_max; + +extern uint64_t lkpi_msec2hz_rem; +extern uint64_t lkpi_msec2hz_div; +extern uint64_t lkpi_msec2hz_max; + static inline int timespec_to_jiffies(const struct timespec *ts) { @@ -70,12 +82,11 @@ timespec_to_jiffies(const struct timespec *ts) static inline int msecs_to_jiffies(uint64_t msec) { - uint64_t msec_max, result; + uint64_t result; - msec_max = -1ULL / (uint64_t)hz; - if (msec > msec_max) - msec = msec_max; - result = howmany(msec * (uint64_t)hz, 1000ULL); + if (msec > lkpi_msec2hz_max) + msec = lkpi_msec2hz_max; + result = howmany(msec * lkpi_msec2hz_rem, lkpi_msec2hz_div); if (result > MAX_JIFFY_OFFSET) result = MAX_JIFFY_OFFSET; @@ -85,12 +96,11 @@ msecs_to_jiffies(uint64_t msec) static inline int usecs_to_jiffies(uint64_t usec) { - uint64_t usec_max, result; + uint64_t result; - usec_max = -1ULL / (uint64_t)hz; - if (usec > usec_max) - usec = usec_max; - result = howmany(usec * (uint64_t)hz, 1000000ULL); + if (usec > lkpi_usec2hz_max) + usec = lkpi_usec2hz_max; + result = howmany(usec * lkpi_usec2hz_rem, lkpi_usec2hz_div); if (result > MAX_JIFFY_OFFSET) result = MAX_JIFFY_OFFSET; @@ -100,23 +110,24 @@ usecs_to_jiffies(uint64_t usec) static inline uint64_t nsecs_to_jiffies64(uint64_t nsec) { - uint64_t nsec_max, result; - nsec_max = -1ULL / (uint64_t)hz; - if (nsec > nsec_max) - nsec = nsec_max; - result = howmany(nsec * (uint64_t)hz, 1000000000ULL); - if (result > MAX_JIFFY_OFFSET) - result = MAX_JIFFY_OFFSET; - - return (result); + if (nsec > lkpi_nsec2hz_max) + nsec = lkpi_nsec2hz_max; + return (howmany(nsec * lkpi_nsec2hz_rem, lkpi_nsec2hz_div)); } -static inline uint64_t -nsecs_to_jiffies(uint64_t n) +static inline unsigned long +nsecs_to_jiffies(uint64_t nsec) { - return (usecs_to_jiffies(howmany(n, 1000ULL))); + if (sizeof(unsigned long) >= sizeof(uint64_t)) { + if (nsec > lkpi_nsec2hz_max) + nsec = lkpi_nsec2hz_max; + } else { + if (nsec > (lkpi_nsec2hz_max >> 32)) + nsec = (lkpi_nsec2hz_max >> 32); + } + return (howmany(nsec * lkpi_nsec2hz_rem, lkpi_nsec2hz_div)); } static inline uint64_t Modified: stable/11/sys/compat/linuxkpi/common/src/linux_compat.c ============================================================================== --- stable/11/sys/compat/linuxkpi/common/src/linux_compat.c Fri Mar 6 13:57:00 2020 (r358699) +++ stable/11/sys/compat/linuxkpi/common/src/linux_compat.c Fri Mar 6 13:58:08 2020 (r358700) @@ -1925,9 +1925,38 @@ add_timer_on(struct timer_list *timer, int cpu) &linux_timer_callback_wrapper, timer, cpu); } +/* greatest common divisor, Euclid equation */ +static uint64_t +lkpi_gcd_64(uint64_t a, uint64_t b) +{ + uint64_t an; + uint64_t bn; + + while (b != 0) { + an = b; + bn = a % b; + a = an; + b = bn; + } + return (a); +} + +uint64_t lkpi_nsec2hz_rem; +uint64_t lkpi_nsec2hz_div = 1000000000ULL; +uint64_t lkpi_nsec2hz_max; + +uint64_t lkpi_usec2hz_rem; +uint64_t lkpi_usec2hz_div = 1000000ULL; +uint64_t lkpi_usec2hz_max; + +uint64_t lkpi_msec2hz_rem; +uint64_t lkpi_msec2hz_div = 1000ULL; +uint64_t lkpi_msec2hz_max; + static void linux_timer_init(void *arg) { + uint64_t gcd; /* * Compute an internal HZ value which can divide 2**32 to @@ -1938,6 +1967,27 @@ linux_timer_init(void *arg) while (linux_timer_hz_mask < (unsigned long)hz) linux_timer_hz_mask *= 2; linux_timer_hz_mask--; + + /* compute some internal constants */ + + lkpi_nsec2hz_rem = hz; + lkpi_usec2hz_rem = hz; + lkpi_msec2hz_rem = hz; + + gcd = lkpi_gcd_64(lkpi_nsec2hz_rem, lkpi_nsec2hz_div); + lkpi_nsec2hz_rem /= gcd; + lkpi_nsec2hz_div /= gcd; + lkpi_nsec2hz_max = -1ULL / lkpi_nsec2hz_rem; + + gcd = lkpi_gcd_64(lkpi_usec2hz_rem, lkpi_usec2hz_div); + lkpi_usec2hz_rem /= gcd; + lkpi_usec2hz_div /= gcd; + lkpi_usec2hz_max = -1ULL / lkpi_usec2hz_rem; + + gcd = lkpi_gcd_64(lkpi_msec2hz_rem, lkpi_msec2hz_div); + lkpi_msec2hz_rem /= gcd; + lkpi_msec2hz_div /= gcd; + lkpi_msec2hz_max = -1ULL / lkpi_msec2hz_rem; } SYSINIT(linux_timer, SI_SUB_DRIVERS, SI_ORDER_FIRST, linux_timer_init, NULL); From owner-svn-src-stable@freebsd.org Fri Mar 6 14:24:11 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 624F32699E4; Fri, 6 Mar 2020 14:24:11 +0000 (UTC) (envelope-from gjb@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 48YqcW1RFzz49GZ; Fri, 6 Mar 2020 14:24:11 +0000 (UTC) (envelope-from gjb@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 DFC57216DB; Fri, 6 Mar 2020 14:24:10 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 026EOAEW010169; Fri, 6 Mar 2020 14:24:10 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026EOAYF010168; Fri, 6 Mar 2020 14:24:10 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <202003061424.026EOAYF010168@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 6 Mar 2020 14:24:10 +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: r358701 - stable/12/sys/modules/rockchip/rk_dwmmc X-SVN-Group: stable-12 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: stable/12/sys/modules/rockchip/rk_dwmmc X-SVN-Commit-Revision: 358701 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, 06 Mar 2020 14:24:11 -0000 Author: gjb Date: Fri Mar 6 14:24:10 2020 New Revision: 358701 URL: https://svnweb.freebsd.org/changeset/base/358701 Log: MFC r355626 (manu): arm64: rockchip: Add a module for rk_dwmmc This is mostly needed for dev/debug as most users will have their root on the sdcard or emmc. * This should fix the stable/12 aarch64 build after r358648. Sponsored by: Rubicon Communications, LLC (netgate.com) Added: stable/12/sys/modules/rockchip/rk_dwmmc/ - copied from r355626, head/sys/modules/rockchip/rk_dwmmc/ Modified: Directory Properties: stable/12/ (props changed) From owner-svn-src-stable@freebsd.org Fri Mar 6 14:43:14 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 493F8269F9C; Fri, 6 Mar 2020 14:43:14 +0000 (UTC) (envelope-from kib@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 48Yr2V00SBz3wpd; Fri, 6 Mar 2020 14:43:14 +0000 (UTC) (envelope-from kib@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 E868121AB3; Fri, 6 Mar 2020 14:43:13 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 026EhDiQ022379; Fri, 6 Mar 2020 14:43:13 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026EhDXr022378; Fri, 6 Mar 2020 14:43:13 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202003061443.026EhDXr022378@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 6 Mar 2020 14:43:13 +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: r358702 - stable/12/sys/kern X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/sys/kern X-SVN-Commit-Revision: 358702 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, 06 Mar 2020 14:43:14 -0000 Author: kib Date: Fri Mar 6 14:43:13 2020 New Revision: 358702 URL: https://svnweb.freebsd.org/changeset/base/358702 Log: MFC r357948: Consolidate read code for timecounters and fix possible overflow in bintime()/binuptime(). Modified: stable/12/sys/kern/kern_tc.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/kern_tc.c ============================================================================== --- stable/12/sys/kern/kern_tc.c Fri Mar 6 14:24:10 2020 (r358701) +++ stable/12/sys/kern/kern_tc.c Fri Mar 6 14:43:13 2020 (r358702) @@ -72,6 +72,7 @@ struct timehands { struct timecounter *th_counter; int64_t th_adjustment; uint64_t th_scale; + u_int th_large_delta; u_int th_offset_count; struct bintime th_offset; struct bintime th_bintime; @@ -87,6 +88,7 @@ static struct timehands ths[16] = { [0] = { .th_counter = &dummy_timecounter, .th_scale = (uint64_t)-1 / 1000000, + .th_large_delta = 1000000, .th_offset = { .sec = 1 }, .th_generation = 1, }, @@ -201,23 +203,75 @@ tc_delta(struct timehands *th) * the comment in for a description of these 12 functions. */ -#ifdef FFCLOCK -void -fbclock_binuptime(struct bintime *bt) +static __inline void +bintime_off(struct bintime *bt, u_int off) { struct timehands *th; - unsigned int gen; + struct bintime *btp; + uint64_t scale, x; + u_int delta, gen, large_delta; do { th = timehands; gen = atomic_load_acq_int(&th->th_generation); - *bt = th->th_offset; - bintime_addx(bt, th->th_scale * tc_delta(th)); + btp = (struct bintime *)((vm_offset_t)th + off); + *bt = *btp; + scale = th->th_scale; + delta = tc_delta(th); + large_delta = th->th_large_delta; atomic_thread_fence_acq(); } while (gen == 0 || gen != th->th_generation); + + if (__predict_false(delta >= large_delta)) { + /* Avoid overflow for scale * delta. */ + x = (scale >> 32) * delta; + bt->sec += x >> 32; + bintime_addx(bt, x << 32); + bintime_addx(bt, (scale & 0xffffffff) * delta); + } else { + bintime_addx(bt, scale * delta); + } } +#define GETTHBINTIME(dst, member) \ +do { \ + _Static_assert(_Generic(((struct timehands *)NULL)->member, \ + struct bintime: 1, default: 0) == 1, \ + "struct timehands member is not of struct bintime type"); \ + bintime_off(dst, __offsetof(struct timehands, member)); \ +} while (0) +static __inline void +getthmember(void *out, size_t out_size, u_int off) +{ + struct timehands *th; + u_int gen; + + do { + th = timehands; + gen = atomic_load_acq_int(&th->th_generation); + memcpy(out, (char *)th + off, out_size); + atomic_thread_fence_acq(); + } while (gen == 0 || gen != th->th_generation); +} +#define GETTHMEMBER(dst, member) \ +do { \ + _Static_assert(_Generic(*dst, \ + __typeof(((struct timehands *)NULL)->member): 1, \ + default: 0) == 1, \ + "*dst and struct timehands member have different types"); \ + getthmember(dst, sizeof(*dst), __offsetof(struct timehands, \ + member)); \ +} while (0) + +#ifdef FFCLOCK void +fbclock_binuptime(struct bintime *bt) +{ + + GETTHBINTIME(bt, th_offset); +} + +void fbclock_nanouptime(struct timespec *tsp) { struct bintime bt; @@ -238,16 +292,8 @@ fbclock_microuptime(struct timeval *tvp) void fbclock_bintime(struct bintime *bt) { - struct timehands *th; - unsigned int gen; - do { - th = timehands; - gen = atomic_load_acq_int(&th->th_generation); - *bt = th->th_bintime; - bintime_addx(bt, th->th_scale * tc_delta(th)); - atomic_thread_fence_acq(); - } while (gen == 0 || gen != th->th_generation); + GETTHBINTIME(bt, th_bintime); } void @@ -271,100 +317,55 @@ fbclock_microtime(struct timeval *tvp) void fbclock_getbinuptime(struct bintime *bt) { - struct timehands *th; - unsigned int gen; - do { - th = timehands; - gen = atomic_load_acq_int(&th->th_generation); - *bt = th->th_offset; - atomic_thread_fence_acq(); - } while (gen == 0 || gen != th->th_generation); + GETTHMEMBER(bt, th_offset); } void fbclock_getnanouptime(struct timespec *tsp) { - struct timehands *th; - unsigned int gen; + struct bintime bt; - do { - th = timehands; - gen = atomic_load_acq_int(&th->th_generation); - bintime2timespec(&th->th_offset, tsp); - atomic_thread_fence_acq(); - } while (gen == 0 || gen != th->th_generation); + GETTHMEMBER(&bt, th_offset); + bintime2timespec(&bt, tsp); } void fbclock_getmicrouptime(struct timeval *tvp) { - struct timehands *th; - unsigned int gen; + struct bintime bt; - do { - th = timehands; - gen = atomic_load_acq_int(&th->th_generation); - bintime2timeval(&th->th_offset, tvp); - atomic_thread_fence_acq(); - } while (gen == 0 || gen != th->th_generation); + GETTHMEMBER(&bt, th_offset); + bintime2timeval(&bt, tvp); } void fbclock_getbintime(struct bintime *bt) { - struct timehands *th; - unsigned int gen; - do { - th = timehands; - gen = atomic_load_acq_int(&th->th_generation); - *bt = th->th_bintime; - atomic_thread_fence_acq(); - } while (gen == 0 || gen != th->th_generation); + GETTHMEMBER(bt, th_bintime); } void fbclock_getnanotime(struct timespec *tsp) { - struct timehands *th; - unsigned int gen; - do { - th = timehands; - gen = atomic_load_acq_int(&th->th_generation); - *tsp = th->th_nanotime; - atomic_thread_fence_acq(); - } while (gen == 0 || gen != th->th_generation); + GETTHMEMBER(tsp, th_nanotime); } void fbclock_getmicrotime(struct timeval *tvp) { - struct timehands *th; - unsigned int gen; - do { - th = timehands; - gen = atomic_load_acq_int(&th->th_generation); - *tvp = th->th_microtime; - atomic_thread_fence_acq(); - } while (gen == 0 || gen != th->th_generation); + GETTHMEMBER(tvp, th_microtime); } #else /* !FFCLOCK */ + void binuptime(struct bintime *bt) { - struct timehands *th; - u_int gen; - do { - th = timehands; - gen = atomic_load_acq_int(&th->th_generation); - *bt = th->th_offset; - bintime_addx(bt, th->th_scale * tc_delta(th)); - atomic_thread_fence_acq(); - } while (gen == 0 || gen != th->th_generation); + GETTHBINTIME(bt, th_offset); } void @@ -388,16 +389,8 @@ microuptime(struct timeval *tvp) void bintime(struct bintime *bt) { - struct timehands *th; - u_int gen; - do { - th = timehands; - gen = atomic_load_acq_int(&th->th_generation); - *bt = th->th_bintime; - bintime_addx(bt, th->th_scale * tc_delta(th)); - atomic_thread_fence_acq(); - } while (gen == 0 || gen != th->th_generation); + GETTHBINTIME(bt, th_bintime); } void @@ -421,85 +414,47 @@ microtime(struct timeval *tvp) void getbinuptime(struct bintime *bt) { - struct timehands *th; - u_int gen; - do { - th = timehands; - gen = atomic_load_acq_int(&th->th_generation); - *bt = th->th_offset; - atomic_thread_fence_acq(); - } while (gen == 0 || gen != th->th_generation); + GETTHMEMBER(bt, th_offset); } void getnanouptime(struct timespec *tsp) { - struct timehands *th; - u_int gen; + struct bintime bt; - do { - th = timehands; - gen = atomic_load_acq_int(&th->th_generation); - bintime2timespec(&th->th_offset, tsp); - atomic_thread_fence_acq(); - } while (gen == 0 || gen != th->th_generation); + GETTHMEMBER(&bt, th_offset); + bintime2timespec(&bt, tsp); } void getmicrouptime(struct timeval *tvp) { - struct timehands *th; - u_int gen; + struct bintime bt; - do { - th = timehands; - gen = atomic_load_acq_int(&th->th_generation); - bintime2timeval(&th->th_offset, tvp); - atomic_thread_fence_acq(); - } while (gen == 0 || gen != th->th_generation); + GETTHMEMBER(&bt, th_offset); + bintime2timeval(&bt, tvp); } void getbintime(struct bintime *bt) { - struct timehands *th; - u_int gen; - do { - th = timehands; - gen = atomic_load_acq_int(&th->th_generation); - *bt = th->th_bintime; - atomic_thread_fence_acq(); - } while (gen == 0 || gen != th->th_generation); + GETTHMEMBER(bt, th_bintime); } void getnanotime(struct timespec *tsp) { - struct timehands *th; - u_int gen; - do { - th = timehands; - gen = atomic_load_acq_int(&th->th_generation); - *tsp = th->th_nanotime; - atomic_thread_fence_acq(); - } while (gen == 0 || gen != th->th_generation); + GETTHMEMBER(tsp, th_nanotime); } void getmicrotime(struct timeval *tvp) { - struct timehands *th; - u_int gen; - do { - th = timehands; - gen = atomic_load_acq_int(&th->th_generation); - *tvp = th->th_microtime; - atomic_thread_fence_acq(); - } while (gen == 0 || gen != th->th_generation); + GETTHMEMBER(tvp, th_microtime); } #endif /* FFCLOCK */ @@ -515,15 +470,8 @@ getboottime(struct timeval *boottime) void getboottimebin(struct bintime *boottimebin) { - struct timehands *th; - u_int gen; - do { - th = timehands; - gen = atomic_load_acq_int(&th->th_generation); - *boottimebin = th->th_boottime; - atomic_thread_fence_acq(); - } while (gen == 0 || gen != th->th_generation); + GETTHMEMBER(boottimebin, th_boottime); } #ifdef FFCLOCK @@ -1039,15 +987,8 @@ getmicrotime(struct timeval *tvp) void dtrace_getnanotime(struct timespec *tsp) { - struct timehands *th; - u_int gen; - do { - th = timehands; - gen = atomic_load_acq_int(&th->th_generation); - *tsp = th->th_nanotime; - atomic_thread_fence_acq(); - } while (gen == 0 || gen != th->th_generation); + GETTHMEMBER(tsp, th_nanotime); } /* @@ -1465,6 +1406,7 @@ tc_windup(struct bintime *new_boottimebin) scale += (th->th_adjustment / 1024) * 2199; scale /= th->th_counter->tc_frequency; th->th_scale = scale * 2; + th->th_large_delta = MIN(((uint64_t)1 << 63) / scale, UINT_MAX); /* * Now that the struct timehands is again consistent, set the new From owner-svn-src-stable@freebsd.org Fri Mar 6 14:56:03 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 D594226A29B; Fri, 6 Mar 2020 14:56:03 +0000 (UTC) (envelope-from markj@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 48YrKH1kpFz4T1N; Fri, 6 Mar 2020 14:56:03 +0000 (UTC) (envelope-from markj@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 A8B7021C96; Fri, 6 Mar 2020 14:56:02 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 026Eu2lZ028559; Fri, 6 Mar 2020 14:56:02 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026Eu2Ke028558; Fri, 6 Mar 2020 14:56:02 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202003061456.026Eu2Ke028558@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 6 Mar 2020 14:56:02 +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: r358704 - stable/12/sys/cddl/dev/systrace X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sys/cddl/dev/systrace X-SVN-Commit-Revision: 358704 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, 06 Mar 2020 14:56:04 -0000 Author: markj Date: Fri Mar 6 14:56:02 2020 New Revision: 358704 URL: https://svnweb.freebsd.org/changeset/base/358704 Log: MFC r358433: Clear systrace_args_func when systrace probes are disabled. Modified: stable/12/sys/cddl/dev/systrace/systrace.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cddl/dev/systrace/systrace.c ============================================================================== --- stable/12/sys/cddl/dev/systrace/systrace.c Fri Mar 6 14:46:50 2020 (r358703) +++ stable/12/sys/cddl/dev/systrace/systrace.c Fri Mar 6 14:56:02 2020 (r358704) @@ -298,9 +298,9 @@ systrace_destroy(void *arg, dtrace_id_t id, void *parg * disabled. */ if (SYSTRACE_ISENTRY((uintptr_t)parg)) { - ASSERT(sysent[sysnum].sy_entry == 0); + ASSERT(sysent[sysnum].sy_entry == DTRACE_IDNONE); } else { - ASSERT(sysent[sysnum].sy_return == 0); + ASSERT(sysent[sysnum].sy_return == DTRACE_IDNONE); } #endif } @@ -310,8 +310,7 @@ systrace_enable(void *arg, dtrace_id_t id, void *parg) { int sysnum = SYSTRACE_SYSNUM((uintptr_t)parg); - if (SYSENT[sysnum].sy_systrace_args_func == NULL) - SYSENT[sysnum].sy_systrace_args_func = systrace_args; + SYSENT[sysnum].sy_systrace_args_func = systrace_args; if (SYSTRACE_ISENTRY((uintptr_t)parg)) SYSENT[sysnum].sy_entry = id; @@ -327,8 +326,9 @@ systrace_disable(void *arg, dtrace_id_t id, void *parg { int sysnum = SYSTRACE_SYSNUM((uintptr_t)parg); - SYSENT[sysnum].sy_entry = 0; - SYSENT[sysnum].sy_return = 0; + SYSENT[sysnum].sy_systrace_args_func = NULL; + SYSENT[sysnum].sy_entry = DTRACE_IDNONE; + SYSENT[sysnum].sy_return = DTRACE_IDNONE; systrace_enabled_count--; if (systrace_enabled_count == 0) systrace_enabled = false; From owner-svn-src-stable@freebsd.org Fri Mar 6 14:56:48 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 C300026A316; Fri, 6 Mar 2020 14:56:48 +0000 (UTC) (envelope-from markj@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 48YrL82fVqz4VgT; Fri, 6 Mar 2020 14:56:48 +0000 (UTC) (envelope-from markj@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 34FFE21C9D; Fri, 6 Mar 2020 14:56:48 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 026EumMg028644; Fri, 6 Mar 2020 14:56:48 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026EumQp028643; Fri, 6 Mar 2020 14:56:48 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202003061456.026EumQp028643@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 6 Mar 2020 14:56:48 +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: r358705 - stable/12/cddl/contrib/opensolaris/lib/libdtrace/common X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/cddl/contrib/opensolaris/lib/libdtrace/common X-SVN-Commit-Revision: 358705 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, 06 Mar 2020 14:56:48 -0000 Author: markj Date: Fri Mar 6 14:56:47 2020 New Revision: 358705 URL: https://svnweb.freebsd.org/changeset/base/358705 Log: MFC r358435: Do not load dtraceall.ko if dtrace.ko is already loaded. Modified: stable/12/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Directory Properties: stable/12/ (props changed) Modified: stable/12/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c ============================================================================== --- stable/12/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Fri Mar 6 14:56:02 2020 (r358704) +++ stable/12/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Fri Mar 6 14:56:47 2020 (r358705) @@ -1105,7 +1105,7 @@ dt_vopen(int version, int flags, int *errp, dt_provmod_open(&provmod, &df); dtfd = open("/dev/dtrace/dtrace", O_RDWR | O_CLOEXEC); - err = errno; /* save errno from opening dtfd */ + err = dtfd == -1 ? errno : 0; /* save errno from opening dtfd */ #if defined(__FreeBSD__) /* * Automatically load the 'dtraceall' module if we couldn't open the From owner-svn-src-stable@freebsd.org Fri Mar 6 15:57:23 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 3921E26B1F8; Fri, 6 Mar 2020 15:57:23 +0000 (UTC) (envelope-from kib@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 48Ysh2670Xz3QSC; Fri, 6 Mar 2020 15:57:22 +0000 (UTC) (envelope-from kib@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 2E4752287D; Fri, 6 Mar 2020 15:57:22 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 026FvMl4064320; Fri, 6 Mar 2020 15:57:22 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026FvM1e064319; Fri, 6 Mar 2020 15:57:22 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202003061557.026FvM1e064319@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 6 Mar 2020 15:57:22 +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: r358707 - stable/12/sys/kern X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/sys/kern X-SVN-Commit-Revision: 358707 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, 06 Mar 2020 15:57:23 -0000 Author: kib Date: Fri Mar 6 15:57:21 2020 New Revision: 358707 URL: https://svnweb.freebsd.org/changeset/base/358707 Log: Adjust r358702 by dropping type asserts. They depend on the C11 Generic feature that is not supported by gcc 4.2.1 used on stable/12 for some arches. This is a direct commit to the branch. Reported by: gjb Sponsored by: The FreeBSD Foundation Modified: stable/12/sys/kern/kern_tc.c Modified: stable/12/sys/kern/kern_tc.c ============================================================================== --- stable/12/sys/kern/kern_tc.c Fri Mar 6 15:26:15 2020 (r358706) +++ stable/12/sys/kern/kern_tc.c Fri Mar 6 15:57:21 2020 (r358707) @@ -234,9 +234,11 @@ bintime_off(struct bintime *bt, u_int off) } #define GETTHBINTIME(dst, member) \ do { \ +/* \ _Static_assert(_Generic(((struct timehands *)NULL)->member, \ struct bintime: 1, default: 0) == 1, \ "struct timehands member is not of struct bintime type"); \ +*/ \ bintime_off(dst, __offsetof(struct timehands, member)); \ } while (0) @@ -255,10 +257,12 @@ getthmember(void *out, size_t out_size, u_int off) } #define GETTHMEMBER(dst, member) \ do { \ +/* \ _Static_assert(_Generic(*dst, \ __typeof(((struct timehands *)NULL)->member): 1, \ default: 0) == 1, \ "*dst and struct timehands member have different types"); \ +*/ \ getthmember(dst, sizeof(*dst), __offsetof(struct timehands, \ member)); \ } while (0) From owner-svn-src-stable@freebsd.org Fri Mar 6 16:52:21 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 DEAD826C004; Fri, 6 Mar 2020 16:52:21 +0000 (UTC) (envelope-from jhibbits@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 48YtvT1WNPz4BhX; Fri, 6 Mar 2020 16:52:21 +0000 (UTC) (envelope-from jhibbits@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 F2D1223337; Fri, 6 Mar 2020 16:52:20 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 026GqKKA096753; Fri, 6 Mar 2020 16:52:20 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026GqKoN096749; Fri, 6 Mar 2020 16:52:20 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <202003061652.026GqKoN096749@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Fri, 6 Mar 2020 16:52:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r358710 - in stable: 11/share/man/man4 11/sys/dev/ismt 12/share/man/man4 12/sys/dev/ismt X-SVN-Group: stable-11 X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: in stable: 11/share/man/man4 11/sys/dev/ismt 12/share/man/man4 12/sys/dev/ismt X-SVN-Commit-Revision: 358710 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, 06 Mar 2020 16:52:22 -0000 Author: jhibbits Date: Fri Mar 6 16:52:20 2020 New Revision: 358710 URL: https://svnweb.freebsd.org/changeset/base/358710 Log: MFC r358595,r358619: Add Atom C3000 (Denverton) SMT PCI ID. Update ismt(4) man page. Sponsored by: Juniper Networks, Inc Modified: stable/11/share/man/man4/ismt.4 stable/11/sys/dev/ismt/ismt.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/share/man/man4/ismt.4 stable/12/sys/dev/ismt/ismt.c Directory Properties: stable/12/ (props changed) Modified: stable/11/share/man/man4/ismt.4 ============================================================================== --- stable/11/share/man/man4/ismt.4 Fri Mar 6 16:00:35 2020 (r358709) +++ stable/11/share/man/man4/ismt.4 Fri Mar 6 16:52:20 2020 (r358710) @@ -33,7 +33,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 11, 2016 +.Dd March 4, 2020 .Dt ISMT 4 .Os .Sh NAME @@ -46,7 +46,7 @@ .Cd device ismt .Sh DESCRIPTION This driver provides access to the SMBus 2.0 controller device contained -in the Intel Atom S1200 and C2000 CPUs. +in the Intel Atom S1200, C2000 and C3000 CPUs. .Sh SEE ALSO .Xr ichsmb 4 , .Xr smb 4 , Modified: stable/11/sys/dev/ismt/ismt.c ============================================================================== --- stable/11/sys/dev/ismt/ismt.c Fri Mar 6 16:00:35 2020 (r358709) +++ stable/11/sys/dev/ismt/ismt.c Fri Mar 6 16:52:20 2020 (r358710) @@ -717,6 +717,7 @@ fail: #define ID_INTEL_S1200_SMT0 0x0c598086 #define ID_INTEL_S1200_SMT1 0x0c5a8086 #define ID_INTEL_C2000_SMT 0x1f158086 +#define ID_INTEL_C3000_SMT 0x19ac8086 static int ismt_probe(device_t dev) @@ -732,6 +733,9 @@ ismt_probe(device_t dev) break; case ID_INTEL_C2000_SMT: desc = "Atom Processor C2000 SMBus 2.0"; + break; + case ID_INTEL_C3000_SMT: + desc = "Atom Processor C3000 SMBus 2.0"; break; default: return (ENXIO); From owner-svn-src-stable@freebsd.org Fri Mar 6 16:52:21 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 DF29C26C005; Fri, 6 Mar 2020 16:52:21 +0000 (UTC) (envelope-from jhibbits@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 48YtvT4QjDz4Bjx; Fri, 6 Mar 2020 16:52:21 +0000 (UTC) (envelope-from jhibbits@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 73D4323339; Fri, 6 Mar 2020 16:52:21 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 026GqLdV096762; Fri, 6 Mar 2020 16:52:21 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 026GqL1B096760; Fri, 6 Mar 2020 16:52:21 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <202003061652.026GqL1B096760@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Fri, 6 Mar 2020 16:52:21 +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: r358710 - in stable: 11/share/man/man4 11/sys/dev/ismt 12/share/man/man4 12/sys/dev/ismt X-SVN-Group: stable-12 X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: in stable: 11/share/man/man4 11/sys/dev/ismt 12/share/man/man4 12/sys/dev/ismt X-SVN-Commit-Revision: 358710 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, 06 Mar 2020 16:52:22 -0000 Author: jhibbits Date: Fri Mar 6 16:52:20 2020 New Revision: 358710 URL: https://svnweb.freebsd.org/changeset/base/358710 Log: MFC r358595,r358619: Add Atom C3000 (Denverton) SMT PCI ID. Update ismt(4) man page. Sponsored by: Juniper Networks, Inc Modified: stable/12/share/man/man4/ismt.4 stable/12/sys/dev/ismt/ismt.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/share/man/man4/ismt.4 stable/11/sys/dev/ismt/ismt.c Directory Properties: stable/11/ (props changed) Modified: stable/12/share/man/man4/ismt.4 ============================================================================== --- stable/12/share/man/man4/ismt.4 Fri Mar 6 16:00:35 2020 (r358709) +++ stable/12/share/man/man4/ismt.4 Fri Mar 6 16:52:20 2020 (r358710) @@ -33,7 +33,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 11, 2016 +.Dd March 4, 2020 .Dt ISMT 4 .Os .Sh NAME @@ -46,7 +46,7 @@ .Cd device ismt .Sh DESCRIPTION This driver provides access to the SMBus 2.0 controller device contained -in the Intel Atom S1200 and C2000 CPUs. +in the Intel Atom S1200, C2000 and C3000 CPUs. .Sh SEE ALSO .Xr ichsmb 4 , .Xr smb 4 , Modified: stable/12/sys/dev/ismt/ismt.c ============================================================================== --- stable/12/sys/dev/ismt/ismt.c Fri Mar 6 16:00:35 2020 (r358709) +++ stable/12/sys/dev/ismt/ismt.c Fri Mar 6 16:52:20 2020 (r358710) @@ -717,6 +717,7 @@ fail: #define ID_INTEL_S1200_SMT0 0x0c598086 #define ID_INTEL_S1200_SMT1 0x0c5a8086 #define ID_INTEL_C2000_SMT 0x1f158086 +#define ID_INTEL_C3000_SMT 0x19ac8086 static int ismt_probe(device_t dev) @@ -732,6 +733,9 @@ ismt_probe(device_t dev) break; case ID_INTEL_C2000_SMT: desc = "Atom Processor C2000 SMBus 2.0"; + break; + case ID_INTEL_C3000_SMT: + desc = "Atom Processor C3000 SMBus 2.0"; break; default: return (ENXIO);