DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH kmods] linux/igb_uio: fix build on Linux 5.18+
@ 2022-12-16 17:18 luca.boccassi
  2022-12-18 14:24 ` Ferruh Yigit
  0 siblings, 1 reply; 3+ messages in thread
From: luca.boccassi @ 2022-12-16 17:18 UTC (permalink / raw)
  To: dev

From: Luca Boccassi <bluca@debian.org>

Reported-by: Paolo Pisati <p.pisati@gmail.com>
Signed-off-by: Luca Boccassi <bluca@debian.org>
---
Only build-tested.

 linux/igb_uio/igb_uio.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/linux/igb_uio/igb_uio.c b/linux/igb_uio/igb_uio.c
index 33e0e02..3d8a8a8 100644
--- a/linux/igb_uio/igb_uio.c
+++ b/linux/igb_uio/igb_uio.c
@@ -512,13 +512,21 @@ igbuio_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
 		goto fail_release_iomem;
 
 	/* set 64-bit DMA mask */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 18, 0)
 	err = pci_set_dma_mask(dev,  DMA_BIT_MASK(64));
+#else
+	err = dma_set_mask(&dev->dev, DMA_BIT_MASK(64));
+#endif
 	if (err != 0) {
 		dev_err(&dev->dev, "Cannot set DMA mask\n");
 		goto fail_release_iomem;
 	}
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 18, 0)
 	err = pci_set_consistent_dma_mask(dev, DMA_BIT_MASK(64));
+#else
+	err = dma_set_coherent_mask(&dev->dev, DMA_BIT_MASK(64));
+#endif
 	if (err != 0) {
 		dev_err(&dev->dev, "Cannot set consistent DMA mask\n");
 		goto fail_release_iomem;
-- 
2.34.1


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

* Re: [PATCH kmods] linux/igb_uio: fix build on Linux 5.18+
  2022-12-16 17:18 [PATCH kmods] linux/igb_uio: fix build on Linux 5.18+ luca.boccassi
@ 2022-12-18 14:24 ` Ferruh Yigit
  2022-12-22 15:35   ` Luca Boccassi
  0 siblings, 1 reply; 3+ messages in thread
From: Ferruh Yigit @ 2022-12-18 14:24 UTC (permalink / raw)
  To: luca.boccassi, dev

On 12/16/2022 5:18 PM, luca.boccassi@gmail.com wrote:
> From: Luca Boccassi <bluca@debian.org>
> 
> Reported-by: Paolo Pisati <p.pisati@gmail.com>
> Signed-off-by: Luca Boccassi <bluca@debian.org>
> ---
> Only build-tested.
> 
>  linux/igb_uio/igb_uio.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/linux/igb_uio/igb_uio.c b/linux/igb_uio/igb_uio.c
> index 33e0e02..3d8a8a8 100644
> --- a/linux/igb_uio/igb_uio.c
> +++ b/linux/igb_uio/igb_uio.c
> @@ -512,13 +512,21 @@ igbuio_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
>  		goto fail_release_iomem;
>  
>  	/* set 64-bit DMA mask */
> +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 18, 0)
>  	err = pci_set_dma_mask(dev,  DMA_BIT_MASK(64));
> +#else
> +	err = dma_set_mask(&dev->dev, DMA_BIT_MASK(64));
> +#endif


Hi Luca,

Can you please check following, I guess these patches are for same issue:
https://patches.dpdk.org/project/dpdk/patch/20221216115732.3552650-1-ferruh.yigit@amd.com/

>  	if (err != 0) {
>  		dev_err(&dev->dev, "Cannot set DMA mask\n");
>  		goto fail_release_iomem;
>  	}
>  
> +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 18, 0)
>  	err = pci_set_consistent_dma_mask(dev, DMA_BIT_MASK(64));
> +#else
> +	err = dma_set_coherent_mask(&dev->dev, DMA_BIT_MASK(64));
> +#endif
>  	if (err != 0) {
>  		dev_err(&dev->dev, "Cannot set consistent DMA mask\n");
>  		goto fail_release_iomem;


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

* Re: [PATCH kmods] linux/igb_uio: fix build on Linux 5.18+
  2022-12-18 14:24 ` Ferruh Yigit
@ 2022-12-22 15:35   ` Luca Boccassi
  0 siblings, 0 replies; 3+ messages in thread
From: Luca Boccassi @ 2022-12-22 15:35 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev

On Sun, 18 Dec 2022 at 15:25, Ferruh Yigit <ferruh.yigit@amd.com> wrote:
>
> On 12/16/2022 5:18 PM, luca.boccassi@gmail.com wrote:
> > From: Luca Boccassi <bluca@debian.org>
> >
> > Reported-by: Paolo Pisati <p.pisati@gmail.com>
> > Signed-off-by: Luca Boccassi <bluca@debian.org>
> > ---
> > Only build-tested.
> >
> >  linux/igb_uio/igb_uio.c | 8 ++++++++
> >  1 file changed, 8 insertions(+)
> >
> > diff --git a/linux/igb_uio/igb_uio.c b/linux/igb_uio/igb_uio.c
> > index 33e0e02..3d8a8a8 100644
> > --- a/linux/igb_uio/igb_uio.c
> > +++ b/linux/igb_uio/igb_uio.c
> > @@ -512,13 +512,21 @@ igbuio_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
> >               goto fail_release_iomem;
> >
> >       /* set 64-bit DMA mask */
> > +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 18, 0)
> >       err = pci_set_dma_mask(dev,  DMA_BIT_MASK(64));
> > +#else
> > +     err = dma_set_mask(&dev->dev, DMA_BIT_MASK(64));
> > +#endif
>
>
> Hi Luca,
>
> Can you please check following, I guess these patches are for same issue:
> https://patches.dpdk.org/project/dpdk/patch/20221216115732.3552650-1-ferruh.yigit@amd.com/

Yeah that's better, thanks.

Kind regards,
Luca Boccassi

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

end of thread, other threads:[~2022-12-22 15:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-16 17:18 [PATCH kmods] linux/igb_uio: fix build on Linux 5.18+ luca.boccassi
2022-12-18 14:24 ` Ferruh Yigit
2022-12-22 15:35   ` Luca Boccassi

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