All of lore.kernel.org
 help / color / mirror / Atom feed
From: Changbin Du <changbin.du@gmail.com>
To: Jonathan Corbet <corbet@lwn.net>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
	linux-pci@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org, Changbin Du <changbin.du@gmail.com>
Subject: [PATCH 12/12] pci doc: convert PCI/endpoint/pci-test-howto.txt to rst format
Date: Sat, 30 Mar 2019 00:04:13 +0800	[thread overview]
Message-ID: <20190329160413.4293-13-changbin.du@gmail.com> (raw)
In-Reply-To: <20190329160413.4293-1-changbin.du@gmail.com>

This converts the plain text documentation to reStructuredText format and
add it to Sphinx TOC tree. No essential content change.

Signed-off-by: Changbin Du <changbin.du@gmail.com>
---
 Documentation/PCI/endpoint/index.rst          |  1 +
 ...{pci-test-howto.txt => pci-test-howto.rst} | 51 +++++++++++++------
 2 files changed, 37 insertions(+), 15 deletions(-)
 rename Documentation/PCI/endpoint/{pci-test-howto.txt => pci-test-howto.rst} (83%)

diff --git a/Documentation/PCI/endpoint/index.rst b/Documentation/PCI/endpoint/index.rst
index b680a3fc4fec..d114ea74b444 100644
--- a/Documentation/PCI/endpoint/index.rst
+++ b/Documentation/PCI/endpoint/index.rst
@@ -10,3 +10,4 @@ PCI Endpoint Framework
    pci-endpoint
    pci-endpoint-cfs
    pci-test-function
+   pci-test-howto
diff --git a/Documentation/PCI/endpoint/pci-test-howto.txt b/Documentation/PCI/endpoint/pci-test-howto.rst
similarity index 83%
rename from Documentation/PCI/endpoint/pci-test-howto.txt
rename to Documentation/PCI/endpoint/pci-test-howto.rst
index 040479f437a5..a81ae7daafa0 100644
--- a/Documentation/PCI/endpoint/pci-test-howto.txt
+++ b/Documentation/PCI/endpoint/pci-test-howto.rst
@@ -1,38 +1,49 @@
-			    PCI TEST USERGUIDE
-		    Kishon Vijay Abraham I <kishon@ti.com>
+.. SPDX-License-Identifier: GPL-2.0
+
+==================
+PCI TEST USERGUIDE
+==================
+
+:Author: Kishon Vijay Abraham I <kishon@ti.com>
 
 This document is a guide to help users use pci-epf-test function driver
 and pci_endpoint_test host driver for testing PCI. The list of steps to
 be followed in the host side and EP side is given below.
 
 1. Endpoint Device
+==================
 
 1.1 Endpoint Controller Devices
+-------------------------------
 
-To find the list of endpoint controller devices in the system:
+To find the list of endpoint controller devices in the system::
 
 	# ls /sys/class/pci_epc/
 	  51000000.pcie_ep
 
-If PCI_ENDPOINT_CONFIGFS is enabled
+If PCI_ENDPOINT_CONFIGFS is enabled::
+
 	# ls /sys/kernel/config/pci_ep/controllers
 	  51000000.pcie_ep
 
 1.2 Endpoint Function Drivers
+-----------------------------
 
-To find the list of endpoint function drivers in the system:
+To find the list of endpoint function drivers in the system::
 
 	# ls /sys/bus/pci-epf/drivers
 	  pci_epf_test
 
-If PCI_ENDPOINT_CONFIGFS is enabled
+If PCI_ENDPOINT_CONFIGFS is enabled::
+
 	# ls /sys/kernel/config/pci_ep/functions
 	  pci_epf_test
 
 1.3 Creating pci-epf-test Device
+--------------------------------
 
 PCI endpoint function device can be created using the configfs. To create
-pci-epf-test device, the following commands can be used
+pci-epf-test device, the following commands can be used::
 
 	# mount -t configfs none /sys/kernel/config
 	# cd /sys/kernel/config/pci_ep/
@@ -42,7 +53,7 @@ The "mkdir func1" above creates the pci-epf-test function device that will
 be probed by pci_epf_test driver.
 
 The PCI endpoint framework populates the directory with the following
-configurable fields.
+configurable fields::
 
 	# ls functions/pci_epf_test/func1
 	  baseclass_code	interrupt_pin	progif_code	subsys_id
@@ -51,7 +62,7 @@ configurable fields.
 
 The PCI endpoint function driver populates these entries with default values
 when the device is bound to the driver. The pci-epf-test driver populates
-vendorid with 0xffff and interrupt_pin with 0x0001
+vendorid with 0xffff and interrupt_pin with 0x0001::
 
 	# cat functions/pci_epf_test/func1/vendorid
 	  0xffff
@@ -59,10 +70,11 @@ vendorid with 0xffff and interrupt_pin with 0x0001
 	  0x0001
 
 1.4 Configuring pci-epf-test Device
+-----------------------------------
 
 The user can configure the pci-epf-test device using configfs entry. In order
 to change the vendorid and the number of MSI interrupts used by the function
-device, the following commands can be used.
+device, the following commands can be used::
 
 	# echo 0x104c > functions/pci_epf_test/func1/vendorid
 	# echo 0xb500 > functions/pci_epf_test/func1/deviceid
@@ -70,10 +82,11 @@ device, the following commands can be used.
 	# echo 8 > functions/pci_epf_test/func1/msix_interrupts
 
 1.5 Binding pci-epf-test Device to EP Controller
+------------------------------------------------
 
 In order for the endpoint function device to be useful, it has to be bound to
 a PCI endpoint controller driver. Use the configfs to bind the function
-device to one of the controller driver present in the system.
+device to one of the controller driver present in the system::
 
 	# ln -s functions/pci_epf_test/func1 controllers/51000000.pcie_ep/
 
@@ -81,30 +94,35 @@ Once the above step is completed, the PCI endpoint is ready to establish a link
 with the host.
 
 1.6 Start the Link
+------------------
 
 In order for the endpoint device to establish a link with the host, the _start_
-field should be populated with '1'.
+field should be populated with '1'::
 
 	# echo 1 > controllers/51000000.pcie_ep/start
 
 2. RootComplex Device
+=====================
 
 2.1 lspci Output
+----------------
 
-Note that the devices listed here correspond to the value populated in 1.4 above
+Note that the devices listed here correspond to the value populated in 1.4
+above::
 
 	00:00.0 PCI bridge: Texas Instruments Device 8888 (rev 01)
 	01:00.0 Unassigned class [ff00]: Texas Instruments Device b500
 
 2.2 Using Endpoint Test function Device
+---------------------------------------
 
 pcitest.sh added in tools/pci/ can be used to run all the default PCI endpoint
-tests. To compile this tool the following commands should be used:
+tests. To compile this tool the following commands should be used::
 
 	# cd <kernel-dir>
 	# make -C tools/pci
 
-or if you desire to compile and install in your system:
+or if you desire to compile and install in your system::
 
 	# cd <kernel-dir>
 	# make -C tools/pci install
@@ -112,6 +130,9 @@ or if you desire to compile and install in your system:
 The tool and script will be located in <rootfs>/usr/bin/
 
 2.2.1 pcitest.sh Output
+~~~~~~~~~~~~~~~~~~~~~~~
+::
+
 	# pcitest.sh
 	BAR tests
 
-- 
2.20.1


  parent reply	other threads:[~2019-03-29 16:05 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-29 16:04 [PATCH 00/12] Include linux PCI docs into Sphinx TOC tree Changbin Du
2019-03-29 16:04 ` [PATCH 01/12] Documentation: add Linux PCI to " Changbin Du
2019-03-29 16:04 ` [PATCH 02/12] pci doc: convert PCI/pci.txt to rst format Changbin Du
2019-03-29 16:04 ` [PATCH 03/12] pci doc: convert PCI/PCIEBUS-HOWTO.txt " Changbin Du
2019-03-29 16:04 ` [PATCH 04/12] pci doc: convert PCI/pci-iov-howto.txt " Changbin Du
2019-03-29 16:04 ` [PATCH 05/12] pci doc: convert PCI/MSI-HOWTO.txt " Changbin Du
2019-03-30  4:00   ` Matthew Wilcox
2019-03-31  5:18     ` Changbin Du
2019-03-31 15:33   ` Changbin Du
2019-03-29 16:04 ` [PATCH 06/12] pci doc: convert PCI/acpi-info.txt " Changbin Du
2019-03-29 16:04 ` [PATCH 07/12] pci doc: convert PCI/pci-error-recovery.txt " Changbin Du
2019-03-29 16:04 ` [PATCH 08/12] pci doc: convert PCI/pcieaer-howto.txt " Changbin Du
2019-03-29 16:04 ` [PATCH 09/12] pci doc: convert PCI/endpoint/pci-endpoint.txt " Changbin Du
2019-03-29 16:04 ` [PATCH 10/12] pci doc: convert PCI/endpoint/pci-endpoint-cfs.txt " Changbin Du
2019-03-29 16:04 ` [PATCH 11/12] pci doc: convert PCI/endpoint/pci-test-function.txt " Changbin Du
2019-03-29 16:04 ` Changbin Du [this message]
2019-04-01 23:03 ` [PATCH 00/12] Include linux PCI docs into Sphinx TOC tree Bjorn Helgaas
2019-04-02 15:08   ` Changbin Du
2019-04-02 18:07     ` Bjorn Helgaas
2019-04-03 15:39       ` Changbin Du

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=20190329160413.4293-13-changbin.du@gmail.com \
    --to=changbin.du@gmail.com \
    --cc=bhelgaas@google.com \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.