linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] lspci: Decode 10-Bit Tag Requester Enable
@ 2020-08-01  7:21 Dongdong Liu
  2020-08-28  1:01 ` Dongdong Liu
  2020-08-28 16:49 ` Bjorn Helgaas
  0 siblings, 2 replies; 6+ messages in thread
From: Dongdong Liu @ 2020-08-01  7:21 UTC (permalink / raw)
  To: mj; +Cc: helgaas, linux-pci

Decode 10-Bit Tag Requester Enable bit in Device Control 2 Register.

Sample output changes:

  - DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis- LTR- OBFF Disabled, ARIFwd-
  + DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis- LTR- 10BitTagReq- OBFF Disabled, ARIFwd-

Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 lib/header.h | 1 +
 ls-caps.c    | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/header.h b/lib/header.h
index 472816e..eaf6517 100644
--- a/lib/header.h
+++ b/lib/header.h
@@ -898,6 +898,7 @@
 #define  PCI_EXP_DEVCAP2_64BIT_ATOMICOP_COMP	0x0100	/* 64bit AtomicOp Completer Supported */
 #define  PCI_EXP_DEVCAP2_128BIT_CAS_COMP	0x0200	/* 128bit CAS Completer Supported */
 #define  PCI_EXP_DEV2_LTR		0x0400	/* LTR enabled */
+#define  PCI_EXP_DEV2_10BIT_TAG_REQ	0x1000 /* 10 Bit Tag Requester enabled */
 #define  PCI_EXP_DEV2_OBFF(x)		(((x) >> 13) & 3) /* OBFF enabled */
 #define PCI_EXP_DEVSTA2			0x2a	/* Device Status */
 #define PCI_EXP_LNKCAP2			0x2c	/* Link Capabilities */
diff --git a/ls-caps.c b/ls-caps.c
index a09b0cf..d17cbad 100644
--- a/ls-caps.c
+++ b/ls-caps.c
@@ -1134,10 +1134,11 @@ static void cap_express_dev2(struct device *d, int where, int type)
     }
 
   w = get_conf_word(d, where + PCI_EXP_DEVCTL2);
-  printf("\t\tDevCtl2: Completion Timeout: %s, TimeoutDis%c LTR%c OBFF %s,",
+  printf("\t\tDevCtl2: Completion Timeout: %s, TimeoutDis%c LTR%c 10BitTagReq%c OBFF %s,",
 	cap_express_dev2_timeout_value(PCI_EXP_DEV2_TIMEOUT_VALUE(w)),
 	FLAG(w, PCI_EXP_DEV2_TIMEOUT_DIS),
 	FLAG(w, PCI_EXP_DEV2_LTR),
+	FLAG(w, PCI_EXP_DEV2_10BIT_TAG_REQ),
 	cap_express_devctl2_obff(PCI_EXP_DEV2_OBFF(w)));
   if (type == PCI_EXP_TYPE_ROOT_PORT || type == PCI_EXP_TYPE_DOWNSTREAM)
     printf(" ARIFwd%c\n", FLAG(w, PCI_EXP_DEV2_ARI));
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] lspci: Decode 10-Bit Tag Requester Enable
  2020-08-01  7:21 [PATCH] lspci: Decode 10-Bit Tag Requester Enable Dongdong Liu
@ 2020-08-28  1:01 ` Dongdong Liu
  2020-08-28 16:49 ` Bjorn Helgaas
  1 sibling, 0 replies; 6+ messages in thread
From: Dongdong Liu @ 2020-08-28  1:01 UTC (permalink / raw)
  To: mj; +Cc: helgaas, linux-pci

ping...

On 2020/8/1 15:21, Dongdong Liu wrote:
> Decode 10-Bit Tag Requester Enable bit in Device Control 2 Register.
>
> Sample output changes:
>
>   - DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis- LTR- OBFF Disabled, ARIFwd-
>   + DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis- LTR- 10BitTagReq- OBFF Disabled, ARIFwd-
>
> Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
> ---
>  lib/header.h | 1 +
>  ls-caps.c    | 3 ++-
>  2 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/lib/header.h b/lib/header.h
> index 472816e..eaf6517 100644
> --- a/lib/header.h
> +++ b/lib/header.h
> @@ -898,6 +898,7 @@
>  #define  PCI_EXP_DEVCAP2_64BIT_ATOMICOP_COMP	0x0100	/* 64bit AtomicOp Completer Supported */
>  #define  PCI_EXP_DEVCAP2_128BIT_CAS_COMP	0x0200	/* 128bit CAS Completer Supported */
>  #define  PCI_EXP_DEV2_LTR		0x0400	/* LTR enabled */
> +#define  PCI_EXP_DEV2_10BIT_TAG_REQ	0x1000 /* 10 Bit Tag Requester enabled */
>  #define  PCI_EXP_DEV2_OBFF(x)		(((x) >> 13) & 3) /* OBFF enabled */
>  #define PCI_EXP_DEVSTA2			0x2a	/* Device Status */
>  #define PCI_EXP_LNKCAP2			0x2c	/* Link Capabilities */
> diff --git a/ls-caps.c b/ls-caps.c
> index a09b0cf..d17cbad 100644
> --- a/ls-caps.c
> +++ b/ls-caps.c
> @@ -1134,10 +1134,11 @@ static void cap_express_dev2(struct device *d, int where, int type)
>      }
>
>    w = get_conf_word(d, where + PCI_EXP_DEVCTL2);
> -  printf("\t\tDevCtl2: Completion Timeout: %s, TimeoutDis%c LTR%c OBFF %s,",
> +  printf("\t\tDevCtl2: Completion Timeout: %s, TimeoutDis%c LTR%c 10BitTagReq%c OBFF %s,",
>  	cap_express_dev2_timeout_value(PCI_EXP_DEV2_TIMEOUT_VALUE(w)),
>  	FLAG(w, PCI_EXP_DEV2_TIMEOUT_DIS),
>  	FLAG(w, PCI_EXP_DEV2_LTR),
> +	FLAG(w, PCI_EXP_DEV2_10BIT_TAG_REQ),
>  	cap_express_devctl2_obff(PCI_EXP_DEV2_OBFF(w)));
>    if (type == PCI_EXP_TYPE_ROOT_PORT || type == PCI_EXP_TYPE_DOWNSTREAM)
>      printf(" ARIFwd%c\n", FLAG(w, PCI_EXP_DEV2_ARI));
>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] lspci: Decode 10-Bit Tag Requester Enable
  2020-08-01  7:21 [PATCH] lspci: Decode 10-Bit Tag Requester Enable Dongdong Liu
  2020-08-28  1:01 ` Dongdong Liu
@ 2020-08-28 16:49 ` Bjorn Helgaas
  2020-08-28 20:56   ` Martin Mareš
  2020-08-29  2:03   ` Dongdong Liu
  1 sibling, 2 replies; 6+ messages in thread
From: Bjorn Helgaas @ 2020-08-28 16:49 UTC (permalink / raw)
  To: Dongdong Liu; +Cc: mj, linux-pci

On Sat, Aug 01, 2020 at 03:21:20PM +0800, Dongdong Liu wrote:
> Decode 10-Bit Tag Requester Enable bit in Device Control 2 Register.
> 
> Sample output changes:
> 
>   - DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis- LTR- OBFF Disabled, ARIFwd-
>   + DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis- LTR- 10BitTagReq- OBFF Disabled, ARIFwd-
> 
> Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
> ---
>  lib/header.h | 1 +
>  ls-caps.c    | 3 ++-
>  2 files changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/header.h b/lib/header.h
> index 472816e..eaf6517 100644
> --- a/lib/header.h
> +++ b/lib/header.h
> @@ -898,6 +898,7 @@
>  #define  PCI_EXP_DEVCAP2_64BIT_ATOMICOP_COMP	0x0100	/* 64bit AtomicOp Completer Supported */
>  #define  PCI_EXP_DEVCAP2_128BIT_CAS_COMP	0x0200	/* 128bit CAS Completer Supported */
>  #define  PCI_EXP_DEV2_LTR		0x0400	/* LTR enabled */
> +#define  PCI_EXP_DEV2_10BIT_TAG_REQ	0x1000 /* 10 Bit Tag Requester enabled */

Looks OK to me (but I don't maintain lspci, of course).

And we have a bit of a mess in the names here.  There are a bunch of
"PCI_EXP_DEV2_*" names that would be "PCI_EXP_DEVCTL2_*" if they
followed the convention.  You didn't start that trend, so I'm just
pointing it out in case you or Martin want to clean it up.  When I add
names I try to use the same name between the Linux kernel source [1]
and lspci.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/linux/pci_regs.h#n651

>  #define  PCI_EXP_DEV2_OBFF(x)		(((x) >> 13) & 3) /* OBFF enabled */
>  #define PCI_EXP_DEVSTA2			0x2a	/* Device Status */
>  #define PCI_EXP_LNKCAP2			0x2c	/* Link Capabilities */
> diff --git a/ls-caps.c b/ls-caps.c
> index a09b0cf..d17cbad 100644
> --- a/ls-caps.c
> +++ b/ls-caps.c
> @@ -1134,10 +1134,11 @@ static void cap_express_dev2(struct device *d, int where, int type)
>      }
>  
>    w = get_conf_word(d, where + PCI_EXP_DEVCTL2);
> -  printf("\t\tDevCtl2: Completion Timeout: %s, TimeoutDis%c LTR%c OBFF %s,",
> +  printf("\t\tDevCtl2: Completion Timeout: %s, TimeoutDis%c LTR%c 10BitTagReq%c OBFF %s,",
>  	cap_express_dev2_timeout_value(PCI_EXP_DEV2_TIMEOUT_VALUE(w)),
>  	FLAG(w, PCI_EXP_DEV2_TIMEOUT_DIS),
>  	FLAG(w, PCI_EXP_DEV2_LTR),
> +	FLAG(w, PCI_EXP_DEV2_10BIT_TAG_REQ),
>  	cap_express_devctl2_obff(PCI_EXP_DEV2_OBFF(w)));
>    if (type == PCI_EXP_TYPE_ROOT_PORT || type == PCI_EXP_TYPE_DOWNSTREAM)
>      printf(" ARIFwd%c\n", FLAG(w, PCI_EXP_DEV2_ARI));
> -- 
> 1.9.1
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] lspci: Decode 10-Bit Tag Requester Enable
  2020-08-28 16:49 ` Bjorn Helgaas
@ 2020-08-28 20:56   ` Martin Mareš
  2020-08-29  2:05     ` Dongdong Liu
  2020-08-29  2:03   ` Dongdong Liu
  1 sibling, 1 reply; 6+ messages in thread
From: Martin Mareš @ 2020-08-28 20:56 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: Dongdong Liu, linux-pci

Hello!

> And we have a bit of a mess in the names here.  There are a bunch of
> "PCI_EXP_DEV2_*" names that would be "PCI_EXP_DEVCTL2_*" if they
> followed the convention.  You didn't start that trend, so I'm just
> pointing it out in case you or Martin want to clean it up.  When I add
> names I try to use the same name between the Linux kernel source [1]
> and lspci.

Yes, could you please clean it up?

Otherwise it's OK.

					Martin

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] lspci: Decode 10-Bit Tag Requester Enable
  2020-08-28 16:49 ` Bjorn Helgaas
  2020-08-28 20:56   ` Martin Mareš
@ 2020-08-29  2:03   ` Dongdong Liu
  1 sibling, 0 replies; 6+ messages in thread
From: Dongdong Liu @ 2020-08-29  2:03 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: mj, linux-pci

Hi Bjorn

Many thanks for your review.
On 2020/8/29 0:49, Bjorn Helgaas wrote:
> On Sat, Aug 01, 2020 at 03:21:20PM +0800, Dongdong Liu wrote:
>> Decode 10-Bit Tag Requester Enable bit in Device Control 2 Register.
>>
>> Sample output changes:
>>
>>   - DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis- LTR- OBFF Disabled, ARIFwd-
>>   + DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis- LTR- 10BitTagReq- OBFF Disabled, ARIFwd-
>>
>> Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
>> ---
>>  lib/header.h | 1 +
>>  ls-caps.c    | 3 ++-
>>  2 files changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/lib/header.h b/lib/header.h
>> index 472816e..eaf6517 100644
>> --- a/lib/header.h
>> +++ b/lib/header.h
>> @@ -898,6 +898,7 @@
>>  #define  PCI_EXP_DEVCAP2_64BIT_ATOMICOP_COMP	0x0100	/* 64bit AtomicOp Completer Supported */
>>  #define  PCI_EXP_DEVCAP2_128BIT_CAS_COMP	0x0200	/* 128bit CAS Completer Supported */
>>  #define  PCI_EXP_DEV2_LTR		0x0400	/* LTR enabled */
>> +#define  PCI_EXP_DEV2_10BIT_TAG_REQ	0x1000 /* 10 Bit Tag Requester enabled */
>
> Looks OK to me (but I don't maintain lspci, of course).
>
> And we have a bit of a mess in the names here.  There are a bunch of
> "PCI_EXP_DEV2_*" names that would be "PCI_EXP_DEVCTL2_*" if they
> followed the convention.  You didn't start that trend, so I'm just
> pointing it out in case you or Martin want to clean it up.  When I add
> names I try to use the same name between the Linux kernel source [1]
> and lspci.

Will do in next patch.

Thanks,
Dongdong
>
> [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/linux/pci_regs.h#n651
>
>>  #define  PCI_EXP_DEV2_OBFF(x)		(((x) >> 13) & 3) /* OBFF enabled */
>>  #define PCI_EXP_DEVSTA2			0x2a	/* Device Status */
>>  #define PCI_EXP_LNKCAP2			0x2c	/* Link Capabilities */
>> diff --git a/ls-caps.c b/ls-caps.c
>> index a09b0cf..d17cbad 100644
>> --- a/ls-caps.c
>> +++ b/ls-caps.c
>> @@ -1134,10 +1134,11 @@ static void cap_express_dev2(struct device *d, int where, int type)
>>      }
>>
>>    w = get_conf_word(d, where + PCI_EXP_DEVCTL2);
>> -  printf("\t\tDevCtl2: Completion Timeout: %s, TimeoutDis%c LTR%c OBFF %s,",
>> +  printf("\t\tDevCtl2: Completion Timeout: %s, TimeoutDis%c LTR%c 10BitTagReq%c OBFF %s,",
>>  	cap_express_dev2_timeout_value(PCI_EXP_DEV2_TIMEOUT_VALUE(w)),
>>  	FLAG(w, PCI_EXP_DEV2_TIMEOUT_DIS),
>>  	FLAG(w, PCI_EXP_DEV2_LTR),
>> +	FLAG(w, PCI_EXP_DEV2_10BIT_TAG_REQ),
>>  	cap_express_devctl2_obff(PCI_EXP_DEV2_OBFF(w)));
>>    if (type == PCI_EXP_TYPE_ROOT_PORT || type == PCI_EXP_TYPE_DOWNSTREAM)
>>      printf(" ARIFwd%c\n", FLAG(w, PCI_EXP_DEV2_ARI));
>> --
>> 1.9.1
>>
>
> .
>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] lspci: Decode 10-Bit Tag Requester Enable
  2020-08-28 20:56   ` Martin Mareš
@ 2020-08-29  2:05     ` Dongdong Liu
  0 siblings, 0 replies; 6+ messages in thread
From: Dongdong Liu @ 2020-08-29  2:05 UTC (permalink / raw)
  To: Martin Mareš, Bjorn Helgaas; +Cc: linux-pci

Hi Martin, Bjorn

On 2020/8/29 4:56, Martin Mareš wrote:
> Hello!
>
>> And we have a bit of a mess in the names here.  There are a bunch of
>> "PCI_EXP_DEV2_*" names that would be "PCI_EXP_DEVCTL2_*" if they
>> followed the convention.  You didn't start that trend, so I'm just
>> pointing it out in case you or Martin want to clean it up.  When I add
>> names I try to use the same name between the Linux kernel source [1]
>> and lspci.
>
> Yes, could you please clean it up?
>
> Otherwise it's OK.
>
> 					Martin

Will do in next patch.

Thanks,
Dongdong.
>
> .
>


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-08-29  2:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-01  7:21 [PATCH] lspci: Decode 10-Bit Tag Requester Enable Dongdong Liu
2020-08-28  1:01 ` Dongdong Liu
2020-08-28 16:49 ` Bjorn Helgaas
2020-08-28 20:56   ` Martin Mareš
2020-08-29  2:05     ` Dongdong Liu
2020-08-29  2:03   ` Dongdong Liu

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).