All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] PCI: Add #defines for max payload size options
@ 2020-08-13 14:08 Gustavo Pimentel
  2020-08-20 20:59 ` Bjorn Helgaas
  0 siblings, 1 reply; 4+ messages in thread
From: Gustavo Pimentel @ 2020-08-13 14:08 UTC (permalink / raw)
  To: bhelgaas, linux-pci; +Cc: Gustavo Pimentel, Joao Pinto

Add #defines for the max payload size options. No functional change
intended.

Cc: Joao Pinto <jpinto@synopsys.com>
Signed-off-by: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
---
 include/uapi/linux/pci_regs.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/uapi/linux/pci_regs.h b/include/uapi/linux/pci_regs.h
index f970141..db625bd 100644
--- a/include/uapi/linux/pci_regs.h
+++ b/include/uapi/linux/pci_regs.h
@@ -503,6 +503,12 @@
 #define  PCI_EXP_DEVCTL_URRE	0x0008	/* Unsupported Request Reporting En. */
 #define  PCI_EXP_DEVCTL_RELAX_EN 0x0010 /* Enable relaxed ordering */
 #define  PCI_EXP_DEVCTL_PAYLOAD	0x00e0	/* Max_Payload_Size */
+#define  PCI_EXP_DEVCTL_PAYLOAD_128B  0x0000 /* 128 Bytes */
+#define  PCI_EXP_DEVCTL_PAYLOAD_256B  0x0020 /* 256 Bytes */
+#define  PCI_EXP_DEVCTL_PAYLOAD_512B  0x0040 /* 512 Bytes */
+#define  PCI_EXP_DEVCTL_PAYLOAD_1024B 0x0060 /* 1024 Bytes */
+#define  PCI_EXP_DEVCTL_PAYLOAD_2048B 0x0080 /* 2048 Bytes */
+#define  PCI_EXP_DEVCTL_PAYLOAD_4096B 0x00a0 /* 4096 Bytes */
 #define  PCI_EXP_DEVCTL_EXT_TAG	0x0100	/* Extended Tag Field Enable */
 #define  PCI_EXP_DEVCTL_PHANTOM	0x0200	/* Phantom Functions Enable */
 #define  PCI_EXP_DEVCTL_AUX_PME	0x0400	/* Auxiliary Power PM Enable */
-- 
2.7.4


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

* Re: [PATCH] PCI: Add #defines for max payload size options
  2020-08-13 14:08 [PATCH] PCI: Add #defines for max payload size options Gustavo Pimentel
@ 2020-08-20 20:59 ` Bjorn Helgaas
  2020-08-24 16:49   ` Gustavo Pimentel
  0 siblings, 1 reply; 4+ messages in thread
From: Bjorn Helgaas @ 2020-08-20 20:59 UTC (permalink / raw)
  To: Gustavo Pimentel; +Cc: bhelgaas, linux-pci, Joao Pinto

On Thu, Aug 13, 2020 at 04:08:50PM +0200, Gustavo Pimentel wrote:
> Add #defines for the max payload size options. No functional change
> intended.
> 
> Cc: Joao Pinto <jpinto@synopsys.com>
> Signed-off-by: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
> ---
>  include/uapi/linux/pci_regs.h | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/include/uapi/linux/pci_regs.h b/include/uapi/linux/pci_regs.h
> index f970141..db625bd 100644
> --- a/include/uapi/linux/pci_regs.h
> +++ b/include/uapi/linux/pci_regs.h
> @@ -503,6 +503,12 @@
>  #define  PCI_EXP_DEVCTL_URRE	0x0008	/* Unsupported Request Reporting En. */
>  #define  PCI_EXP_DEVCTL_RELAX_EN 0x0010 /* Enable relaxed ordering */
>  #define  PCI_EXP_DEVCTL_PAYLOAD	0x00e0	/* Max_Payload_Size */
> +#define  PCI_EXP_DEVCTL_PAYLOAD_128B  0x0000 /* 128 Bytes */
> +#define  PCI_EXP_DEVCTL_PAYLOAD_256B  0x0020 /* 256 Bytes */
> +#define  PCI_EXP_DEVCTL_PAYLOAD_512B  0x0040 /* 512 Bytes */
> +#define  PCI_EXP_DEVCTL_PAYLOAD_1024B 0x0060 /* 1024 Bytes */
> +#define  PCI_EXP_DEVCTL_PAYLOAD_2048B 0x0080 /* 2048 Bytes */
> +#define  PCI_EXP_DEVCTL_PAYLOAD_4096B 0x00a0 /* 4096 Bytes */

I would apply this if we actually *used* these anywhere, but I'm not
sure it's worth adding them just as documentation.

>  #define  PCI_EXP_DEVCTL_EXT_TAG	0x0100	/* Extended Tag Field Enable */
>  #define  PCI_EXP_DEVCTL_PHANTOM	0x0200	/* Phantom Functions Enable */
>  #define  PCI_EXP_DEVCTL_AUX_PME	0x0400	/* Auxiliary Power PM Enable */
> -- 
> 2.7.4
> 

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

* RE: [PATCH] PCI: Add #defines for max payload size options
  2020-08-20 20:59 ` Bjorn Helgaas
@ 2020-08-24 16:49   ` Gustavo Pimentel
  2020-08-24 16:59     ` Bjorn Helgaas
  0 siblings, 1 reply; 4+ messages in thread
From: Gustavo Pimentel @ 2020-08-24 16:49 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: bhelgaas, linux-pci, Joao Pinto

On Thu, Aug 20, 2020 at 21:59:42, Bjorn Helgaas <helgaas@kernel.org> 
wrote:

> On Thu, Aug 13, 2020 at 04:08:50PM +0200, Gustavo Pimentel wrote:
> > Add #defines for the max payload size options. No functional change
> > intended.
> > 
> > Cc: Joao Pinto <jpinto@synopsys.com>
> > Signed-off-by: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
> > ---
> >  include/uapi/linux/pci_regs.h | 6 ++++++
> >  1 file changed, 6 insertions(+)
> > 
> > diff --git a/include/uapi/linux/pci_regs.h b/include/uapi/linux/pci_regs.h
> > index f970141..db625bd 100644
> > --- a/include/uapi/linux/pci_regs.h
> > +++ b/include/uapi/linux/pci_regs.h
> > @@ -503,6 +503,12 @@
> >  #define  PCI_EXP_DEVCTL_URRE	0x0008	/* Unsupported Request Reporting En. */
> >  #define  PCI_EXP_DEVCTL_RELAX_EN 0x0010 /* Enable relaxed ordering */
> >  #define  PCI_EXP_DEVCTL_PAYLOAD	0x00e0	/* Max_Payload_Size */
> > +#define  PCI_EXP_DEVCTL_PAYLOAD_128B  0x0000 /* 128 Bytes */
> > +#define  PCI_EXP_DEVCTL_PAYLOAD_256B  0x0020 /* 256 Bytes */
> > +#define  PCI_EXP_DEVCTL_PAYLOAD_512B  0x0040 /* 512 Bytes */
> > +#define  PCI_EXP_DEVCTL_PAYLOAD_1024B 0x0060 /* 1024 Bytes */
> > +#define  PCI_EXP_DEVCTL_PAYLOAD_2048B 0x0080 /* 2048 Bytes */
> > +#define  PCI_EXP_DEVCTL_PAYLOAD_4096B 0x00a0 /* 4096 Bytes */
> 
> I would apply this if we actually *used* these anywhere, but I'm not
> sure it's worth adding them just as documentation.

Hi Bjorn,

I'll be using that with a driver that I developed. I didn't send the 
driver yet, because I'm still waiting for a final validation from a 
colleague that is on vacation. If you want I can include this patch with 
the driver patch set.

-Gustavo

> 
> >  #define  PCI_EXP_DEVCTL_EXT_TAG	0x0100	/* Extended Tag Field Enable */
> >  #define  PCI_EXP_DEVCTL_PHANTOM	0x0200	/* Phantom Functions Enable */
> >  #define  PCI_EXP_DEVCTL_AUX_PME	0x0400	/* Auxiliary Power PM Enable */
> > -- 
> > 2.7.4
> > 



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

* Re: [PATCH] PCI: Add #defines for max payload size options
  2020-08-24 16:49   ` Gustavo Pimentel
@ 2020-08-24 16:59     ` Bjorn Helgaas
  0 siblings, 0 replies; 4+ messages in thread
From: Bjorn Helgaas @ 2020-08-24 16:59 UTC (permalink / raw)
  To: Gustavo Pimentel; +Cc: bhelgaas, linux-pci, Joao Pinto

On Mon, Aug 24, 2020 at 04:49:27PM +0000, Gustavo Pimentel wrote:
> On Thu, Aug 20, 2020 at 21:59:42, Bjorn Helgaas <helgaas@kernel.org> 
> wrote:
> 
> > On Thu, Aug 13, 2020 at 04:08:50PM +0200, Gustavo Pimentel wrote:
> > > Add #defines for the max payload size options. No functional change
> > > intended.
> > > 
> > > Cc: Joao Pinto <jpinto@synopsys.com>
> > > Signed-off-by: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
> > > ---
> > >  include/uapi/linux/pci_regs.h | 6 ++++++
> > >  1 file changed, 6 insertions(+)
> > > 
> > > diff --git a/include/uapi/linux/pci_regs.h b/include/uapi/linux/pci_regs.h
> > > index f970141..db625bd 100644
> > > --- a/include/uapi/linux/pci_regs.h
> > > +++ b/include/uapi/linux/pci_regs.h
> > > @@ -503,6 +503,12 @@
> > >  #define  PCI_EXP_DEVCTL_URRE	0x0008	/* Unsupported Request Reporting En. */
> > >  #define  PCI_EXP_DEVCTL_RELAX_EN 0x0010 /* Enable relaxed ordering */
> > >  #define  PCI_EXP_DEVCTL_PAYLOAD	0x00e0	/* Max_Payload_Size */
> > > +#define  PCI_EXP_DEVCTL_PAYLOAD_128B  0x0000 /* 128 Bytes */
> > > +#define  PCI_EXP_DEVCTL_PAYLOAD_256B  0x0020 /* 256 Bytes */
> > > +#define  PCI_EXP_DEVCTL_PAYLOAD_512B  0x0040 /* 512 Bytes */
> > > +#define  PCI_EXP_DEVCTL_PAYLOAD_1024B 0x0060 /* 1024 Bytes */
> > > +#define  PCI_EXP_DEVCTL_PAYLOAD_2048B 0x0080 /* 2048 Bytes */
> > > +#define  PCI_EXP_DEVCTL_PAYLOAD_4096B 0x00a0 /* 4096 Bytes */
> > 
> > I would apply this if we actually *used* these anywhere, but I'm not
> > sure it's worth adding them just as documentation.
> 
> Hi Bjorn,
> 
> I'll be using that with a driver that I developed. I didn't send the 
> driver yet, because I'm still waiting for a final validation from a 
> colleague that is on vacation. If you want I can include this patch with 
> the driver patch set.

Yes, please include it with the driver.  Thanks!

Bjorn

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

end of thread, other threads:[~2020-08-24 16:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-13 14:08 [PATCH] PCI: Add #defines for max payload size options Gustavo Pimentel
2020-08-20 20:59 ` Bjorn Helgaas
2020-08-24 16:49   ` Gustavo Pimentel
2020-08-24 16:59     ` Bjorn Helgaas

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.