Re: [PATCH v5 09/11] pci_endpoint_test: Add 2 ioctl commands

From: Gustavo Pimentel
Date: Thu Jun 21 2018 - 06:25:40 EST


On 20/06/2018 19:12, Randy Dunlap wrote:
> On 06/20/2018 09:28 AM, Gustavo Pimentel wrote:
>> Add MSI-X support and update driver documentation accordingly.
>>
>> Add 2 new IOCTL commands:
>> - Allow to reconfigure driver IRQ type in runtime.
>> - Allow to retrieve current driver IRQ type configured.
>>
>> Signed-off-by: Gustavo Pimentel <gustavo.pimentel@xxxxxxxxxxxx>
>> ---
>> Change v2->v3: | --------------------------------------------------------------------------------------------
>> - New patch file created base on the previous patch | --------------------------------------------------------------------------------------------
>> "misc: pci_endpoint_test: Add MSI-X support" patch file following | --------------------------------------------------------------------------------------------
>> Kishon's suggestion. | --------------------------------------------------------------------------------------------
>> Change v3->v4: | --------------------------------------------------------------------------------------------
>> - Rebased to Lorenzo's master branch v4.18-rc1.
>> Change v4->v5:
>> - Nothing changed, just to follow the patch set version.
>>
>> Documentation/misc-devices/pci-endpoint-test.txt | 3 +
>> drivers/misc/pci_endpoint_test.c | 177 +++++++++++++++++------
>> 2 files changed, 132 insertions(+), 48 deletions(-)
>>
>> diff --git a/Documentation/misc-devices/pci-endpoint-test.txt b/Documentation/misc-devices/pci-endpoint-test.txt
>> index fdfa0f6..58ccca4 100644
>> --- a/Documentation/misc-devices/pci-endpoint-test.txt
>> +++ b/Documentation/misc-devices/pci-endpoint-test.txt
>> @@ -28,6 +28,9 @@ ioctl
>> to be tested should be passed as argument.
>> PCITEST_MSIX: Tests message signalled interrupts. The MSI-X number
>> to be tested should be passed as argument.
>> + PCITEST_SET_IRQTYPE: Changes driver IRQ type configuration. The IRQ type
>> + should be passed as argument (0: Legacy, 1:MSI, 2:MSI-X).
>> + PCITEST_GET_IRQTYPE: Gets driver IRQ type configuration.
>> PCITEST_WRITE: Perform write tests. The size of the buffer should be passed
>> as argument.
>> PCITEST_READ: Perform read tests. The size of the buffer should be passed
>> diff --git a/drivers/misc/pci_endpoint_test.c b/drivers/misc/pci_endpoint_test.c
>> index 2b58887..82fa0c2 100644
>> --- a/drivers/misc/pci_endpoint_test.c
>> +++ b/drivers/misc/pci_endpoint_test.c
>
> Hi,
>
> The ioctl "type" (as "type" is used in <uapi/asm-generic/ioctl.h>),
> value of 'P' in this case, should be documented in
> Documentation/ioctl/ioctl-number.txt.

Hi Randy,

I wasn't aware of this file. Adding the entry bellow would be suitable?

'P' 01-09 drivers/misc/pci_endpoint_test.c conflict!

Regards,
Gustavo

>
> thanks,
>