* [PATCH -next] pga: dfl: pci: Make sure DMA related error check is not done twice
@ 2022-02-22 4:27 Yusuf Khan
2022-02-22 4:39 ` Yusuf Khan
0 siblings, 1 reply; 7+ messages in thread
From: Yusuf Khan @ 2022-02-22 4:27 UTC (permalink / raw)
To: linux-kernel; +Cc: linux-fpga, yilun.xu, mdf, trix, hao.wu, Yusuf Khan
In the case that the DMA 64 bit bit mask error check does not fail,
the error check will be done twice, this patch fixed that.
NOTE: This patch is only for use in the linux-next branch as the
commit that caused this bug happened there.
Signed-off-by: Yusuf Khan <yusisamerican@gmail.com>
---
drivers/fpga/dfl-pci.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/fpga/dfl-pci.c b/drivers/fpga/dfl-pci.c
index 717ac9715970..6222f18aed4b 100644
--- a/drivers/fpga/dfl-pci.c
+++ b/drivers/fpga/dfl-pci.c
@@ -356,11 +356,12 @@ int cci_pci_probe(struct pci_dev *pcidev, const struct pci_device_id *pcidevid)
pci_set_master(pcidev);
ret = dma_set_mask_and_coherent(&pcidev->dev, DMA_BIT_MASK(64));
- if (ret)
- ret = dma_set_mask_and_coherent(&pcidev->dev, DMA_BIT_MASK(32));
if (ret) {
- dev_err(&pcidev->dev, "No suitable DMA support available.\n");
- goto disable_error_report_exit;
+ ret = dma_set_mask_and_coherent(&pcidev->dev, DMA_BIT_MASK(32));
+ if (ret) {
+ dev_err(&pcidev->dev, "No suitable DMA support available.\n");
+ goto disable_error_report_exit;
+ }
}
ret = cci_init_drvdata(pcidev);
--
2.25.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH -next] pga: dfl: pci: Make sure DMA related error check is not done twice
2022-02-22 4:27 [PATCH -next] pga: dfl: pci: Make sure DMA related error check is not done twice Yusuf Khan
@ 2022-02-22 4:39 ` Yusuf Khan
2022-02-25 15:52 ` Xu Yilun
0 siblings, 1 reply; 7+ messages in thread
From: Yusuf Khan @ 2022-02-22 4:39 UTC (permalink / raw)
To: linux-kernel; +Cc: linux-fpga, yilun.xu, mdf, trix, hao.wu
Note: This bug was introduced here:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/patch/?id=ada3caabaf6135150077c3f729bb06e8f3b5b8f6
I saw this commit inside the linux-next branch, it is not present in
the mainline branch.
The linux-next branch was last updated 5 days ago, so I am unsure
about the state of that commit.
On Mon, Feb 21, 2022 at 8:27 PM Yusuf Khan <yusisamerican@gmail.com> wrote:
>
> In the case that the DMA 64 bit bit mask error check does not fail,
> the error check will be done twice, this patch fixed that.
>
> NOTE: This patch is only for use in the linux-next branch as the
> commit that caused this bug happened there.
>
> Signed-off-by: Yusuf Khan <yusisamerican@gmail.com>
> ---
> drivers/fpga/dfl-pci.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/fpga/dfl-pci.c b/drivers/fpga/dfl-pci.c
> index 717ac9715970..6222f18aed4b 100644
> --- a/drivers/fpga/dfl-pci.c
> +++ b/drivers/fpga/dfl-pci.c
> @@ -356,11 +356,12 @@ int cci_pci_probe(struct pci_dev *pcidev, const struct pci_device_id *pcidevid)
> pci_set_master(pcidev);
>
> ret = dma_set_mask_and_coherent(&pcidev->dev, DMA_BIT_MASK(64));
> - if (ret)
> - ret = dma_set_mask_and_coherent(&pcidev->dev, DMA_BIT_MASK(32));
> if (ret) {
> - dev_err(&pcidev->dev, "No suitable DMA support available.\n");
> - goto disable_error_report_exit;
> + ret = dma_set_mask_and_coherent(&pcidev->dev, DMA_BIT_MASK(32));
> + if (ret) {
> + dev_err(&pcidev->dev, "No suitable DMA support available.\n");
> + goto disable_error_report_exit;
> + }
> }
>
> ret = cci_init_drvdata(pcidev);
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH -next] pga: dfl: pci: Make sure DMA related error check is not done twice
2022-02-22 4:39 ` Yusuf Khan
@ 2022-02-25 15:52 ` Xu Yilun
2022-02-28 9:58 ` Wu, Hao
0 siblings, 1 reply; 7+ messages in thread
From: Xu Yilun @ 2022-02-25 15:52 UTC (permalink / raw)
To: Yusuf Khan; +Cc: linux-kernel, linux-fpga, mdf, trix, hao.wu
On Mon, Feb 21, 2022 at 08:39:48PM -0800, Yusuf Khan wrote:
> Note: This bug was introduced here:
> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/patch/?id=ada3caabaf6135150077c3f729bb06e8f3b5b8f6
> I saw this commit inside the linux-next branch, it is not present in
> the mainline branch.
> The linux-next branch was last updated 5 days ago, so I am unsure
> about the state of that commit.
>
> On Mon, Feb 21, 2022 at 8:27 PM Yusuf Khan <yusisamerican@gmail.com> wrote:
> >
> > In the case that the DMA 64 bit bit mask error check does not fail,
> > the error check will be done twice, this patch fixed that.
> >
> > NOTE: This patch is only for use in the linux-next branch as the
> > commit that caused this bug happened there.
> >
> > Signed-off-by: Yusuf Khan <yusisamerican@gmail.com>
> > ---
> > drivers/fpga/dfl-pci.c | 9 +++++----
> > 1 file changed, 5 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/fpga/dfl-pci.c b/drivers/fpga/dfl-pci.c
> > index 717ac9715970..6222f18aed4b 100644
> > --- a/drivers/fpga/dfl-pci.c
> > +++ b/drivers/fpga/dfl-pci.c
> > @@ -356,11 +356,12 @@ int cci_pci_probe(struct pci_dev *pcidev, const struct pci_device_id *pcidevid)
> > pci_set_master(pcidev);
> >
> > ret = dma_set_mask_and_coherent(&pcidev->dev, DMA_BIT_MASK(64));
> > - if (ret)
> > - ret = dma_set_mask_and_coherent(&pcidev->dev, DMA_BIT_MASK(32));
> > if (ret) {
> > - dev_err(&pcidev->dev, "No suitable DMA support available.\n");
> > - goto disable_error_report_exit;
> > + ret = dma_set_mask_and_coherent(&pcidev->dev, DMA_BIT_MASK(32));
> > + if (ret) {
> > + dev_err(&pcidev->dev, "No suitable DMA support available.\n");
> > + goto disable_error_report_exit;
> > + }
Looks good to me.
Acked-by: Xu Yilun <yilun.xu@intel.com>
> > }
> >
> > ret = cci_init_drvdata(pcidev);
> > --
> > 2.25.1
> >
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [PATCH -next] pga: dfl: pci: Make sure DMA related error check is not done twice
2022-02-25 15:52 ` Xu Yilun
@ 2022-02-28 9:58 ` Wu, Hao
2022-03-01 1:59 ` Yusuf Khan
0 siblings, 1 reply; 7+ messages in thread
From: Wu, Hao @ 2022-02-28 9:58 UTC (permalink / raw)
To: Xu, Yilun, Yusuf Khan
Cc: linux-kernel@vger.kernel.org, linux-fpga@vger.kernel.org,
mdf@kernel.org, trix@redhat.com
> On Mon, Feb 21, 2022 at 08:39:48PM -0800, Yusuf Khan wrote:
> > Note: This bug was introduced here:
> > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-
> next.git/patch/?id=ada3caabaf6135150077c3f729bb06e8f3b5b8f6
> > I saw this commit inside the linux-next branch, it is not present in
> > the mainline branch.
> > The linux-next branch was last updated 5 days ago, so I am unsure
> > about the state of that commit.
> >
> > On Mon, Feb 21, 2022 at 8:27 PM Yusuf Khan <yusisamerican@gmail.com>
> wrote:
> > >
> > > In the case that the DMA 64 bit bit mask error check does not fail,
> > > the error check will be done twice, this patch fixed that.
> > >
> > > NOTE: This patch is only for use in the linux-next branch as the
> > > commit that caused this bug happened there.
Thanks for the patch.
please remove this from the commit message, and fix the title
s/pga/fpga/
Thanks
Hao
> > >
> > > Signed-off-by: Yusuf Khan <yusisamerican@gmail.com>
> > > ---
> > > drivers/fpga/dfl-pci.c | 9 +++++----
> > > 1 file changed, 5 insertions(+), 4 deletions(-)
> > >
> > > diff --git a/drivers/fpga/dfl-pci.c b/drivers/fpga/dfl-pci.c
> > > index 717ac9715970..6222f18aed4b 100644
> > > --- a/drivers/fpga/dfl-pci.c
> > > +++ b/drivers/fpga/dfl-pci.c
> > > @@ -356,11 +356,12 @@ int cci_pci_probe(struct pci_dev *pcidev, const
> struct pci_device_id *pcidevid)
> > > pci_set_master(pcidev);
> > >
> > > ret = dma_set_mask_and_coherent(&pcidev->dev, DMA_BIT_MASK(64));
> > > - if (ret)
> > > - ret = dma_set_mask_and_coherent(&pcidev->dev,
> DMA_BIT_MASK(32));
> > > if (ret) {
> > > - dev_err(&pcidev->dev, "No suitable DMA support available.\n");
> > > - goto disable_error_report_exit;
> > > + ret = dma_set_mask_and_coherent(&pcidev->dev,
> DMA_BIT_MASK(32));
> > > + if (ret) {
> > > + dev_err(&pcidev->dev, "No suitable DMA support
> available.\n");
> > > + goto disable_error_report_exit;
> > > + }
>
> Looks good to me.
>
> Acked-by: Xu Yilun <yilun.xu@intel.com>
>
> > > }
> > >
> > > ret = cci_init_drvdata(pcidev);
> > > --
> > > 2.25.1
> > >
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH -next] pga: dfl: pci: Make sure DMA related error check is not done twice
2022-02-28 9:58 ` Wu, Hao
@ 2022-03-01 1:59 ` Yusuf Khan
2022-03-01 2:34 ` Wu, Hao
0 siblings, 1 reply; 7+ messages in thread
From: Yusuf Khan @ 2022-03-01 1:59 UTC (permalink / raw)
To: Wu, Hao
Cc: Xu, Yilun, linux-kernel@vger.kernel.org,
linux-fpga@vger.kernel.org, mdf@kernel.org, trix@redhat.com
Will do, but I do not know exactly what to remove from the commit message,
I understand what to do for the title
Yusuf
On Mon, Feb 28, 2022 at 1:58 AM Wu, Hao <hao.wu@intel.com> wrote:
>
> > On Mon, Feb 21, 2022 at 08:39:48PM -0800, Yusuf Khan wrote:
> > > Note: This bug was introduced here:
> > > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-
> > next.git/patch/?id=ada3caabaf6135150077c3f729bb06e8f3b5b8f6
> > > I saw this commit inside the linux-next branch, it is not present in
> > > the mainline branch.
> > > The linux-next branch was last updated 5 days ago, so I am unsure
> > > about the state of that commit.
> > >
> > > On Mon, Feb 21, 2022 at 8:27 PM Yusuf Khan <yusisamerican@gmail.com>
> > wrote:
> > > >
> > > > In the case that the DMA 64 bit bit mask error check does not fail,
> > > > the error check will be done twice, this patch fixed that.
> > > >
> > > > NOTE: This patch is only for use in the linux-next branch as the
> > > > commit that caused this bug happened there.
>
> Thanks for the patch.
> please remove this from the commit message, and fix the title
> s/pga/fpga/
>
> Thanks
> Hao
>
> > > >
> > > > Signed-off-by: Yusuf Khan <yusisamerican@gmail.com>
> > > > ---
> > > > drivers/fpga/dfl-pci.c | 9 +++++----
> > > > 1 file changed, 5 insertions(+), 4 deletions(-)
> > > >
> > > > diff --git a/drivers/fpga/dfl-pci.c b/drivers/fpga/dfl-pci.c
> > > > index 717ac9715970..6222f18aed4b 100644
> > > > --- a/drivers/fpga/dfl-pci.c
> > > > +++ b/drivers/fpga/dfl-pci.c
> > > > @@ -356,11 +356,12 @@ int cci_pci_probe(struct pci_dev *pcidev, const
> > struct pci_device_id *pcidevid)
> > > > pci_set_master(pcidev);
> > > >
> > > > ret = dma_set_mask_and_coherent(&pcidev->dev, DMA_BIT_MASK(64));
> > > > - if (ret)
> > > > - ret = dma_set_mask_and_coherent(&pcidev->dev,
> > DMA_BIT_MASK(32));
> > > > if (ret) {
> > > > - dev_err(&pcidev->dev, "No suitable DMA support available.\n");
> > > > - goto disable_error_report_exit;
> > > > + ret = dma_set_mask_and_coherent(&pcidev->dev,
> > DMA_BIT_MASK(32));
> > > > + if (ret) {
> > > > + dev_err(&pcidev->dev, "No suitable DMA support
> > available.\n");
> > > > + goto disable_error_report_exit;
> > > > + }
> >
> > Looks good to me.
> >
> > Acked-by: Xu Yilun <yilun.xu@intel.com>
> >
> > > > }
> > > >
> > > > ret = cci_init_drvdata(pcidev);
> > > > --
> > > > 2.25.1
> > > >
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [PATCH -next] pga: dfl: pci: Make sure DMA related error check is not done twice
2022-03-01 1:59 ` Yusuf Khan
@ 2022-03-01 2:34 ` Wu, Hao
2022-03-01 2:59 ` Yusuf Khan
0 siblings, 1 reply; 7+ messages in thread
From: Wu, Hao @ 2022-03-01 2:34 UTC (permalink / raw)
To: Yusuf Khan
Cc: Xu, Yilun, linux-kernel@vger.kernel.org,
linux-fpga@vger.kernel.org, mdf@kernel.org, trix@redhat.com
> -----Original Message-----
> From: Yusuf Khan <yusisamerican@gmail.com>
> Sent: Tuesday, March 1, 2022 9:59 AM
> To: Wu, Hao <hao.wu@intel.com>
> Cc: Xu, Yilun <yilun.xu@intel.com>; linux-kernel@vger.kernel.org; linux-
> fpga@vger.kernel.org; mdf@kernel.org; trix@redhat.com
> Subject: Re: [PATCH -next] pga: dfl: pci: Make sure DMA related error check is
> not done twice
>
> Will do, but I do not know exactly what to remove from the commit message,
> I understand what to do for the title
> > > > > NOTE: This patch is only for use in the linux-next branch as the
> > > > > commit that caused this bug happened there.
Remove this NOTE
Hao
>
> Yusuf
>
> On Mon, Feb 28, 2022 at 1:58 AM Wu, Hao <hao.wu@intel.com> wrote:
> >
> > > On Mon, Feb 21, 2022 at 08:39:48PM -0800, Yusuf Khan wrote:
> > > > Note: This bug was introduced here:
> > > > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-
> > > next.git/patch/?id=ada3caabaf6135150077c3f729bb06e8f3b5b8f6
> > > > I saw this commit inside the linux-next branch, it is not present in
> > > > the mainline branch.
> > > > The linux-next branch was last updated 5 days ago, so I am unsure
> > > > about the state of that commit.
> > > >
> > > > On Mon, Feb 21, 2022 at 8:27 PM Yusuf Khan <yusisamerican@gmail.com>
> > > wrote:
> > > > >
> > > > > In the case that the DMA 64 bit bit mask error check does not fail,
> > > > > the error check will be done twice, this patch fixed that.
> > > > >
> > > > > NOTE: This patch is only for use in the linux-next branch as the
> > > > > commit that caused this bug happened there.
> >
> > Thanks for the patch.
> > please remove this from the commit message, and fix the title
> > s/pga/fpga/
> >
> > Thanks
> > Hao
> >
> > > > >
> > > > > Signed-off-by: Yusuf Khan <yusisamerican@gmail.com>
> > > > > ---
> > > > > drivers/fpga/dfl-pci.c | 9 +++++----
> > > > > 1 file changed, 5 insertions(+), 4 deletions(-)
> > > > >
> > > > > diff --git a/drivers/fpga/dfl-pci.c b/drivers/fpga/dfl-pci.c
> > > > > index 717ac9715970..6222f18aed4b 100644
> > > > > --- a/drivers/fpga/dfl-pci.c
> > > > > +++ b/drivers/fpga/dfl-pci.c
> > > > > @@ -356,11 +356,12 @@ int cci_pci_probe(struct pci_dev *pcidev, const
> > > struct pci_device_id *pcidevid)
> > > > > pci_set_master(pcidev);
> > > > >
> > > > > ret = dma_set_mask_and_coherent(&pcidev->dev,
> DMA_BIT_MASK(64));
> > > > > - if (ret)
> > > > > - ret = dma_set_mask_and_coherent(&pcidev->dev,
> > > DMA_BIT_MASK(32));
> > > > > if (ret) {
> > > > > - dev_err(&pcidev->dev, "No suitable DMA support available.\n");
> > > > > - goto disable_error_report_exit;
> > > > > + ret = dma_set_mask_and_coherent(&pcidev->dev,
> > > DMA_BIT_MASK(32));
> > > > > + if (ret) {
> > > > > + dev_err(&pcidev->dev, "No suitable DMA support
> > > available.\n");
> > > > > + goto disable_error_report_exit;
> > > > > + }
> > >
> > > Looks good to me.
> > >
> > > Acked-by: Xu Yilun <yilun.xu@intel.com>
> > >
> > > > > }
> > > > >
> > > > > ret = cci_init_drvdata(pcidev);
> > > > > --
> > > > > 2.25.1
> > > > >
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH -next] pga: dfl: pci: Make sure DMA related error check is not done twice
2022-03-01 2:34 ` Wu, Hao
@ 2022-03-01 2:59 ` Yusuf Khan
0 siblings, 0 replies; 7+ messages in thread
From: Yusuf Khan @ 2022-03-01 2:59 UTC (permalink / raw)
To: Wu, Hao
Cc: Xu, Yilun, linux-kernel@vger.kernel.org,
linux-fpga@vger.kernel.org, mdf@kernel.org, trix@redhat.com
Done. Resent
On Mon, Feb 28, 2022 at 6:34 PM Wu, Hao <hao.wu@intel.com> wrote:
>
> > -----Original Message-----
> > From: Yusuf Khan <yusisamerican@gmail.com>
> > Sent: Tuesday, March 1, 2022 9:59 AM
> > To: Wu, Hao <hao.wu@intel.com>
> > Cc: Xu, Yilun <yilun.xu@intel.com>; linux-kernel@vger.kernel.org; linux-
> > fpga@vger.kernel.org; mdf@kernel.org; trix@redhat.com
> > Subject: Re: [PATCH -next] pga: dfl: pci: Make sure DMA related error check is
> > not done twice
> >
> > Will do, but I do not know exactly what to remove from the commit message,
> > I understand what to do for the title
>
> > > > > > NOTE: This patch is only for use in the linux-next branch as the
> > > > > > commit that caused this bug happened there.
>
> Remove this NOTE
>
> Hao
>
> >
> > Yusuf
> >
> > On Mon, Feb 28, 2022 at 1:58 AM Wu, Hao <hao.wu@intel.com> wrote:
> > >
> > > > On Mon, Feb 21, 2022 at 08:39:48PM -0800, Yusuf Khan wrote:
> > > > > Note: This bug was introduced here:
> > > > > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-
> > > > next.git/patch/?id=ada3caabaf6135150077c3f729bb06e8f3b5b8f6
> > > > > I saw this commit inside the linux-next branch, it is not present in
> > > > > the mainline branch.
> > > > > The linux-next branch was last updated 5 days ago, so I am unsure
> > > > > about the state of that commit.
> > > > >
> > > > > On Mon, Feb 21, 2022 at 8:27 PM Yusuf Khan <yusisamerican@gmail.com>
> > > > wrote:
> > > > > >
> > > > > > In the case that the DMA 64 bit bit mask error check does not fail,
> > > > > > the error check will be done twice, this patch fixed that.
> > > > > >
> > > > > > NOTE: This patch is only for use in the linux-next branch as the
> > > > > > commit that caused this bug happened there.
> > >
> > > Thanks for the patch.
> > > please remove this from the commit message, and fix the title
> > > s/pga/fpga/
> > >
> > > Thanks
> > > Hao
> > >
> > > > > >
> > > > > > Signed-off-by: Yusuf Khan <yusisamerican@gmail.com>
> > > > > > ---
> > > > > > drivers/fpga/dfl-pci.c | 9 +++++----
> > > > > > 1 file changed, 5 insertions(+), 4 deletions(-)
> > > > > >
> > > > > > diff --git a/drivers/fpga/dfl-pci.c b/drivers/fpga/dfl-pci.c
> > > > > > index 717ac9715970..6222f18aed4b 100644
> > > > > > --- a/drivers/fpga/dfl-pci.c
> > > > > > +++ b/drivers/fpga/dfl-pci.c
> > > > > > @@ -356,11 +356,12 @@ int cci_pci_probe(struct pci_dev *pcidev, const
> > > > struct pci_device_id *pcidevid)
> > > > > > pci_set_master(pcidev);
> > > > > >
> > > > > > ret = dma_set_mask_and_coherent(&pcidev->dev,
> > DMA_BIT_MASK(64));
> > > > > > - if (ret)
> > > > > > - ret = dma_set_mask_and_coherent(&pcidev->dev,
> > > > DMA_BIT_MASK(32));
> > > > > > if (ret) {
> > > > > > - dev_err(&pcidev->dev, "No suitable DMA support available.\n");
> > > > > > - goto disable_error_report_exit;
> > > > > > + ret = dma_set_mask_and_coherent(&pcidev->dev,
> > > > DMA_BIT_MASK(32));
> > > > > > + if (ret) {
> > > > > > + dev_err(&pcidev->dev, "No suitable DMA support
> > > > available.\n");
> > > > > > + goto disable_error_report_exit;
> > > > > > + }
> > > >
> > > > Looks good to me.
> > > >
> > > > Acked-by: Xu Yilun <yilun.xu@intel.com>
> > > >
> > > > > > }
> > > > > >
> > > > > > ret = cci_init_drvdata(pcidev);
> > > > > > --
> > > > > > 2.25.1
> > > > > >
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-03-01 3:01 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-22 4:27 [PATCH -next] pga: dfl: pci: Make sure DMA related error check is not done twice Yusuf Khan
2022-02-22 4:39 ` Yusuf Khan
2022-02-25 15:52 ` Xu Yilun
2022-02-28 9:58 ` Wu, Hao
2022-03-01 1:59 ` Yusuf Khan
2022-03-01 2:34 ` Wu, Hao
2022-03-01 2:59 ` Yusuf Khan
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).