From owner-dev-commits-src-main@freebsd.org Tue Jun 1 17:44:56 2021 Return-Path: Delivered-To: dev-commits-src-main@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 8E4D765961D; Tue, 1 Jun 2021 17:44:56 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FvfgX3g10z3vCp; Tue, 1 Jun 2021 17:44:56 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro.local (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id B12262BE23; Tue, 1 Jun 2021 17:44:55 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: git: 2f176a2b2010 - main - pciconf: Fix up pciconf -lc output To: David Bright , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202106011556.151Fu6ZE084734@gitrepo.freebsd.org> From: John Baldwin Message-ID: <93b7adea-1980-b097-cdf1-d3426dd0d531@FreeBSD.org> Date: Tue, 1 Jun 2021 10:44:51 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 MIME-Version: 1.0 In-Reply-To: <202106011556.151Fu6ZE084734@gitrepo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jun 2021 17:44:56 -0000 On 6/1/21 8:56 AM, David Bright wrote: > The branch main has been updated by dab: > > URL: https://cgit.FreeBSD.org/src/commit/?id=2f176a2b20107f7a9132242223e9eef657400514 > > commit 2f176a2b20107f7a9132242223e9eef657400514 > Author: David Bright > AuthorDate: 2021-05-24 19:02:43 +0000 > Commit: David Bright > CommitDate: 2021-06-01 15:55:44 +0000 > > pciconf: Fix up pciconf -lc output > > The pciconf command fails to emit newlines when particular ecap field > values are seen. Fix them up. This has been seen on several systems at > $JOB. The documentation for PCI capabilities says that capability > type 0 should not be used once the spec for PCI capabilities was > published, but that seems more wishful-thinking than reality. pciconf > also chooses not to print fields related to field values that are > zero, but it seems several of these fields are zero on actual > hardware. > > Reviewed by: vangyzen, imp, Bret Ketchum (Bret.Ketchum@dell.com) > Sponsored by: Dell EMC Isilon > Submitted by: Robert Herndon (Robert.Herndon@dell.com) > Differential Revision: https://reviews.freebsd.org/D30441 Are the ecap registers actually valid for version 1 in this case? That is, should we treat version 0 as being version 1? The current checks are just defensive coding for not parsing something unless we know it is valid. If the only version 0 caps in practice are always compatible with version 1 we could just treat 0 as if it were 1. -- John Baldwin