[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240607164212.GA850739@bhelgaas>
Date: Fri, 7 Jun 2024 11:42:12 -0500
From: Bjorn Helgaas <helgaas@...nel.org>
To: Wei Huang <wei.huang2@....com>
Cc: linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-doc@...r.kernel.org, netdev@...r.kernel.org,
bhelgaas@...gle.com, corbet@....net, davem@...emloft.net,
edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
alex.williamson@...hat.com, gospo@...adcom.com,
michael.chan@...adcom.com, ajit.khaparde@...adcom.com,
somnath.kotur@...adcom.com, andrew.gospodarek@...adcom.com,
manoj.panicker2@....com, Eric.VanTassell@....com,
vadim.fedorenko@...ux.dev, horms@...nel.org, bagasdotme@...il.com
Subject: Re: [PATCH V2 2/9] PCI: Add TPH related register definition
On Fri, May 31, 2024 at 04:38:34PM -0500, Wei Huang wrote:
> Linux has some basic, but incomplete, definition for the TPH Requester
> capability registers. Also the control registers of TPH Requester and
> the TPH Completer are missing. This patch adds all required definitions
> to support TPH enablement.
s/This patch adds/Add/
> +#define PCI_EXP_DEVCAP2_TPH_COMP_SHIFT 12
> +#define PCI_EXP_DEVCAP2_TPH_COMP_NONE 0x0 /* None */
> +#define PCI_EXP_DEVCAP2_TPH_COMP_TPH_ONLY 0x1 /* TPH only */
> +#define PCI_EXP_DEVCAP2_TPH_COMP_TPH_AND_EXT 0x3 /* TPH and Extended TPH */
Drop the _SHIFT definitions and use FIELD_GET() and FIELD_PREP()
instead.
> /* TPH Requester */
> #define PCI_TPH_CAP 4 /* capability register */
> +#define PCI_TPH_CAP_NO_ST 0x1 /* no ST mode supported */
> +#define PCI_TPH_CAP_NO_ST_SHIFT 0x0 /* no ST mode supported shift */
Drop _SHIFT and show full register width for PCI_TPH_CAP_NO_ST, e.g.,
#define PCI_TPH_CAP_NO_ST 0x00000001
The existing PCI_TPH_CAP_* definitions don't follow that convention,
but the rest of the file does, and this should match.
Powered by blists - more mailing lists