devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Manivannan Sadhasivam <mani@kernel.org>
To: Frank Li <Frank.Li@nxp.com>
Cc: manivannan.sadhasivam@linaro.org, aisheng.dong@nxp.com,
	bhelgaas@google.com, devicetree@vger.kernel.org,
	festevam@gmail.com, imx@lists.linux.dev, jdmason@kudzu.us,
	kernel@pengutronix.de, kishon@kernel.org, kw@linux.com,
	linux-arm-kernel@lists.infradead.org, linux-imx@nxp.com,
	linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,
	lorenzo.pieralisi@arm.com, lpieralisi@kernel.org, maz@kernel.org,
	s.hauer@pengutronix.de, shawnguo@kernel.org, tglx@linutronix.de
Subject: Re: [PATCH v2 5/5] tools: PCI: Add 'B' option for test doorbell
Date: Fri, 20 Oct 2023 23:25:27 +0530	[thread overview]
Message-ID: <20231020175527.GD46191@thinkpad> (raw)
In-Reply-To: <20230911220920.1817033-6-Frank.Li@nxp.com>

On Mon, Sep 11, 2023 at 06:09:20PM -0400, Frank Li wrote:
> Add doorbell test support.
> 
> Signed-off-by: Frank Li <Frank.Li@nxp.com>
> ---
>  tools/pci/pcitest.c | 16 +++++++++++++++-
>  1 file changed, 15 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/pci/pcitest.c b/tools/pci/pcitest.c
> index 441b542346354..215d0aa8a09fe 100644
> --- a/tools/pci/pcitest.c
> +++ b/tools/pci/pcitest.c
> @@ -36,6 +36,7 @@ struct pci_test {
>  	bool		copy;
>  	unsigned long	size;
>  	bool		use_dma;
> +	bool		doorbell;
>  };
>  
>  static int run_test(struct pci_test *test)
> @@ -149,6 +150,15 @@ static int run_test(struct pci_test *test)
>  			fprintf(stdout, "%s\n", result[ret]);
>  	}
>  
> +	if (test->doorbell) {
> +		ret = ioctl(fd, PCITEST_DOORBELL, 0);
> +		fprintf(stdout, "Push doorbell\t\t");

"Ringing doorbell on the EP".

- Mani

> +		if (ret < 0)
> +			fprintf(stdout, "TEST FAILED\n");
> +		else
> +			fprintf(stdout, "%s\n", result[ret]);
> +	}
> +
>  	fflush(stdout);
>  	close(fd);
>  	return (ret < 0) ? ret : 1 - ret; /* return 0 if test succeeded */
> @@ -174,7 +184,7 @@ int main(int argc, char **argv)
>  	/* set default endpoint device */
>  	test->device = "/dev/pci-endpoint-test.0";
>  
> -	while ((c = getopt(argc, argv, "D:b:m:x:i:deIlhrwcs:")) != EOF)
> +	while ((c = getopt(argc, argv, "D:b:m:x:i:BdeIlhrwcs:")) != EOF)
>  	switch (c) {
>  	case 'D':
>  		test->device = optarg;
> @@ -224,6 +234,9 @@ int main(int argc, char **argv)
>  	case 'd':
>  		test->use_dma = true;
>  		continue;
> +	case 'B':
> +		test->doorbell = true;
> +		continue;
>  	case 'h':
>  	default:
>  usage:
> @@ -243,6 +256,7 @@ int main(int argc, char **argv)
>  			"\t-w			Write buffer test\n"
>  			"\t-c			Copy buffer test\n"
>  			"\t-s <size>		Size of buffer {default: 100KB}\n"
> +			"\t-B			Doorbell test\n"
>  			"\t-h			Print this help message\n",
>  			argv[0]);
>  		return -EINVAL;
> -- 
> 2.34.1
> 

-- 
மணிவண்ணன் சதாசிவம்

  reply	other threads:[~2023-10-20 17:55 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-11 22:09 [PATCH v2 0/5] Add RC-to-EP doorbell with platform MSI controller Frank Li
2023-09-11 22:09 ` [PATCH v2 1/5] PCI: endpoint: Add RC-to-EP doorbell support using " Frank Li
2023-09-29  9:30   ` Kishon Vijay Abraham I
2023-09-29 14:39     ` Frank Li
2023-10-17 18:37   ` Manivannan Sadhasivam
2023-10-17 18:55     ` Frank Li
2023-10-19 15:04       ` Manivannan Sadhasivam
2023-10-19 16:00         ` Frank Li
2023-10-19 17:23           ` Manivannan Sadhasivam
2023-10-19 18:11             ` [PATCH v2 1/5] PCI: endpoint: Add RC-to-EP doorbell support using platform MSI controllery Frank Li
2023-10-20 17:12               ` Manivannan Sadhasivam
2023-10-20 18:00                 ` Frank Li
2023-10-20 18:10                   ` Manivannan Sadhasivam
2023-09-11 22:09 ` [PATCH v2 2/5] PCI: dwc: add doorbell support by use MSI controller Frank Li
2023-09-11 22:09 ` [PATCH v2 3/5] PCI: endpoint: pci-epf-test: add doorbell test Frank Li
2023-09-29  9:33   ` Kishon Vijay Abraham I
2023-09-29 14:26     ` Frank Li
2023-10-20 17:44   ` Manivannan Sadhasivam
2023-09-11 22:09 ` [PATCH v2 4/5] misc: pci_endpoint_test: Add doorbell test case Frank Li
2023-10-20 17:53   ` Manivannan Sadhasivam
2023-10-20 18:01     ` Manivannan Sadhasivam
2023-10-20 18:07       ` Frank Li
2023-10-20 18:26         ` Manivannan Sadhasivam
2023-10-30 18:33           ` Frank Li
2023-11-02 17:58             ` Manivannan Sadhasivam
2023-11-09  4:44   ` Kishon Vijay Abraham I
2023-09-11 22:09 ` [PATCH v2 5/5] tools: PCI: Add 'B' option for test doorbell Frank Li
2023-10-20 17:55   ` Manivannan Sadhasivam [this message]
2023-09-20 21:39 ` [PATCH v2 0/5] Add RC-to-EP doorbell with platform MSI controller Frank Li
2023-09-30  9:02   ` Manivannan Sadhasivam
2023-10-10 14:21     ` Frank Li
2023-10-16 14:50       ` Frank Li
2023-10-16 17:16         ` Manivannan Sadhasivam
2024-10-09 16:01 ` Niklas Cassel
2024-10-09 16:20   ` Frank Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231020175527.GD46191@thinkpad \
    --to=mani@kernel.org \
    --cc=Frank.Li@nxp.com \
    --cc=aisheng.dong@nxp.com \
    --cc=bhelgaas@google.com \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=imx@lists.linux.dev \
    --cc=jdmason@kudzu.us \
    --cc=kernel@pengutronix.de \
    --cc=kishon@kernel.org \
    --cc=kw@linux.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=lpieralisi@kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=maz@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).