Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

please help running 6904se with 64bit DMA address space #273

Open
FrancescoRestelli opened this issue Jan 27, 2022 · 1 comment
Open

please help running 6904se with 64bit DMA address space #273

FrancescoRestelli opened this issue Jan 27, 2022 · 1 comment

Comments

@FrancescoRestelli
Copy link

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

tbs_write(adapter->dma.base, TBSECP3_DMA_ADDRH, 0);

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?

@Davin622
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants