[PATCH 0/2] PCI: endpoint: pci-epf-{v}ntb: A couple of fixes

Manivannan Sadhasivam posted 2 patches 2 months, 2 weeks ago
drivers/pci/endpoint/functions/pci-epf-ntb.c  | 15 +++++++++------
drivers/pci/endpoint/functions/pci-epf-vntb.c |  9 +++------
2 files changed, 12 insertions(+), 12 deletions(-)
[PATCH 0/2] PCI: endpoint: pci-epf-{v}ntb: A couple of fixes
Posted by Manivannan Sadhasivam 2 months, 2 weeks ago
Hi,

These two fixes are flagged by Sashiko during the review of doorbell series:
https://sashiko.dev/#/patchset/20260406155717.880246-1-den%40valinux.co.jp

Manivannan Sadhasivam (2):
  PCI: endpoint: pci-epf-vntb: Add check to detect 'db_count' value of 0
  PCI: endpoint: pci-epf-ntb: Add check to detect 'db_count' value of 0

 drivers/pci/endpoint/functions/pci-epf-ntb.c  | 15 +++++++++------
 drivers/pci/endpoint/functions/pci-epf-vntb.c |  9 +++------
 2 files changed, 12 insertions(+), 12 deletions(-)

-- 
2.51.0
Re: [PATCH 0/2] PCI: endpoint: pci-epf-{v}ntb: A couple of fixes
Posted by Krzysztof Wilczyński 3 weeks, 3 days ago
Hello,

> These two fixes are flagged by Sashiko during the review of doorbell series:
> https://sashiko.dev/#/patchset/20260406155717.880246-1-den%40valinux.co.jp
> 
> Manivannan Sadhasivam (2):
>   PCI: endpoint: pci-epf-vntb: Add check to detect 'db_count' value of 0
>   PCI: endpoint: pci-epf-ntb: Add check to detect 'db_count' value of 0

Looks good!  Nice clean-up.

For the entire series:

	Reviewed-by: Krzysztof Wilczyński <kwilczynski@kernel.org>

Also, apologies for being late here...

Thank you!

	Krzysztof
Re: [PATCH 0/2] PCI: endpoint: pci-epf-{v}ntb: A couple of fixes
Posted by Manivannan Sadhasivam 3 weeks, 3 days ago
On Tue, 07 Apr 2026 18:14:19 +0530, Manivannan Sadhasivam wrote:
> These two fixes are flagged by Sashiko during the review of doorbell series:
> https://sashiko.dev/#/patchset/20260406155717.880246-1-den%40valinux.co.jp
> 
> Manivannan Sadhasivam (2):
>   PCI: endpoint: pci-epf-vntb: Add check to detect 'db_count' value of 0
>   PCI: endpoint: pci-epf-ntb: Add check to detect 'db_count' value of 0
> 
> [...]

Applied, thanks!

[1/2] PCI: endpoint: pci-epf-vntb: Add check to detect 'db_count' value of 0
      commit: dfd986796037ce31af73d8be416d98944ec84551
[2/2] PCI: endpoint: pci-epf-ntb: Add check to detect 'db_count' value of 0
      commit: d2942f5fc787c5e327ede76e0aea2cf41949e500

Best regards,
-- 
Manivannan Sadhasivam <mani@kernel.org>
Re: [PATCH 0/2] PCI: endpoint: pci-epf-{v}ntb: A couple of fixes
Posted by Krzysztof Wilczyński 1 month, 1 week ago
Hello,

> These two fixes are flagged by Sashiko during the review of doorbell series:
> https://sashiko.dev/#/patchset/20260406155717.880246-1-den%40valinux.co.jp
> 
> Manivannan Sadhasivam (2):
>   PCI: endpoint: pci-epf-vntb: Add check to detect 'db_count' value of 0
>   PCI: endpoint: pci-epf-ntb: Add check to detect 'db_count' value of 0
> 
>  drivers/pci/endpoint/functions/pci-epf-ntb.c  | 15 +++++++++------
>  drivers/pci/endpoint/functions/pci-epf-vntb.c |  9 +++------
>  2 files changed, 12 insertions(+), 12 deletions(-)

Might be out of scope, but since we removed one redundant "db_count"
variable already, perhaps we could also drop this one, too.  Just to add
a small clean-up since we are touching this code already...  Thoughts?

Looking at epf_ntb_db_mw_bar_init():

  (...)

  db_count = ntb->db_count;

  for (bar = BAR_DB_MW1, i = 0; i < num_mws; bar++, i++) {
        if (bar == BAR_DB_MW1) {
                align = align ? align : 4;
                size = db_count * align;
                size = ALIGN(size, ntb->mws_size[i]);
                ctrl = ntb_epc->reg;
                ctrl->mw1_offset = size;
                size += ntb->mws_size[i];
        } else {
                size = ntb->mws_size[i];
        }

        (...)
  }

Thank you!

	Krzysztof
Re: [PATCH 0/2] PCI: endpoint: pci-epf-{v}ntb: A couple of fixes
Posted by Manivannan Sadhasivam 3 weeks, 3 days ago
On Tue, May 12, 2026 at 02:34:53PM +0900, Krzysztof Wilczyński wrote:
> Hello,
> 
> > These two fixes are flagged by Sashiko during the review of doorbell series:
> > https://sashiko.dev/#/patchset/20260406155717.880246-1-den%40valinux.co.jp
> > 
> > Manivannan Sadhasivam (2):
> >   PCI: endpoint: pci-epf-vntb: Add check to detect 'db_count' value of 0
> >   PCI: endpoint: pci-epf-ntb: Add check to detect 'db_count' value of 0
> > 
> >  drivers/pci/endpoint/functions/pci-epf-ntb.c  | 15 +++++++++------
> >  drivers/pci/endpoint/functions/pci-epf-vntb.c |  9 +++------
> >  2 files changed, 12 insertions(+), 12 deletions(-)
> 
> Might be out of scope, but since we removed one redundant "db_count"
> variable already, perhaps we could also drop this one, too.  Just to add
> a small clean-up since we are touching this code already...  Thoughts?
> 

Why not? Please send a patch :)

- Mani

-- 
மணிவண்ணன் சதாசிவம்