1 --- vpb-driver-4.2.58/src/vtcore/vtopenpci.c~ 2014-09-28 20:02:28.000000000 +0200
2 +++ vpb-driver-4.2.58/src/vtcore/vtopenpci.c 2022-05-26 06:49:21.913308375 +0200
7 +#if LINUX_VERSION_CODE < KERNEL_VERSION(5,18,0)
8 card->writeblock = (int *)pci_alloc_consistent(pdev,
12 + card->writeblock = (int *)dma_alloc_coherent(&pdev->dev,
13 + VT_PCIDMA_BLOCKSIZE,
14 + &card->writedma, GFP_ATOMIC);
16 if (!card->writeblock){
17 cardcrit(cardnum, "FAILED to get DMA memory.");
19 @@ -2528,8 +2534,13 @@
20 vtopenpci_board_unregister( card );
22 if (card->writeblock){
23 +#if LINUX_VERSION_CODE < KERNEL_VERSION(5,18,0)
24 pci_free_consistent(pdev, VT_PCIDMA_BLOCKSIZE,
25 (void*)card->writeblock, card->writedma);
27 + dma_free_coherent(&pdev->dev, VT_PCIDMA_BLOCKSIZE,
28 + (void*)card->writeblock, card->writedma);
33 @@ -2600,8 +2611,13 @@
34 vtopenpci_board_unregister( card );
37 +#if LINUX_VERSION_CODE < KERNEL_VERSION(5,18,0)
38 pci_free_consistent(pdev, VT_PCIDMA_BLOCKSIZE,
39 (void*)card->writeblock, card->writedma);
41 + dma_free_coherent(&pdev->dev, VT_PCIDMA_BLOCKSIZE,
42 + (void*)card->writeblock, card->writedma);
45 //XXX Do we need to do a forceful hangup here too?
46 if( card->ppdatamask == 0 ) unexport_module_info(card);