Re: [External] : [PATCH v2 1/2] dmaengine: dw-edma: Add AMD MDB Endpoint Support

From: Bjorn Helgaas
Date: Tue Sep 16 2025 - 11:12:49 EST


On Tue, Sep 16, 2025 at 04:25:49PM +0530, ALOK TIWARI wrote:
>
>
> On 9/16/2025 4:13 PM, Devendra K Verma wrote:
> > + /*
> > + * Synopsys and AMD (Xilinx) use the same VSEC ID for the purpose
> > + * of map, channel counts, etc.
> > + */
> > + if (vendor != PCI_VENDOR_ID_SYNOPSYS ||
> > + vendor != PCI_VENDOR_ID_XILINX)
> > + return;
>
> if, vendor == PCI_VENDOR_ID_XILINX condition will true
>
> should not be if (vendor != PCI_VENDOR_ID_SYNOPSYS && vendor !=
> PCI_VENDOR_ID_XILINX) ?

Good catch, I mistakenly said this part was correct, but you're right;
it's obviously broken.

The alternate structure I suggested would avoid this problem.

> > +
> > + cap = DW_PCIE_VSEC_DMA_ID;
> > + if (vendor == PCI_VENDOR_ID_XILINX)
> > + cap = DW_PCIE_XILINX_MDB_VSEC_ID;
> > +
> > + vsec = pci_find_vsec_capability(pdev, vendor, cap);
> > if (!vsec)
>
>
> Thanks,
> Alok