Open FrancescoRestelli opened 2 years ago
hi i think you are looking in the wrong place. Here : https://github.com/tbsdtv/linux_media/blob/latest/drivers/media/pci/tbsecp3/tbsecp3-core.c
static int tbsecp3_probe(struct pci_dev pdev, const struct pci_device_id id)
{
struct tbsecp3_dev *dev;
.....
if(pci_set_dma_mask(pdev, DMA_BIT_MASK(64)))
if(pci_set_dma_mask(pdev, DMA_BIT_MASK(32)))
{
dev_err(&pdev->dev, "64/32-bit PCI DMA not supported\n");
goto err0;
}
.....
}
it already support the 64 bit DMA.
hi,
i am trying to get the 6904se card to run on a raspberry pi 4 WITHOUT using the dtoverlay=pcie-32bit-dma patch (since that breaks the ahci driver)
i noticed that the high byte of the address is hardcoded to 0 which should be the issues https://github.com/tbsdtv/linux_media/blob/b782005ea1e34a0b69ea123db3d43ead033149d4/drivers/media/pci/tbsecp3/tbsecp3-dma.c#L113
so i added some debug prints to tbsecp3-dma.c that output the adapter->dma.dma_addr which result in DMAAddr: 0x4 1ac8 0000 DMAAddr: 0x4 1ad0 0000 DMAAddr: 0x4 1ad8 0000 DMAAddr: 0x4 1ae0 0000 WITH the 32-bit dma overlay patch the 0x4 high byte is gone and the card streams fine, so i did a quick test and hardcoded
tbs_write(adapter->dma.base, TBSECP3_DMA_ADDRH, (u32) 4);
but unfortunatelly it did not help.
what i find strange is, that the card still streams with dtoverlay=pcie-32bit-dma as if the firmware of the card is simply ignoring the TBSECP3_DMA_ADDRH
i also tried to read it but that leads to which seems a different endianess, but my 4 made it? 0x1ac8000004000000
i am not a C developer so i am not sure if i made a mistake or its the cards firmware,could anyone give me a hand on this?