]> git.pld-linux.org Git - packages/vpb-driver.git/blob - kernel-5.18.patch
- rel 10
[packages/vpb-driver.git] / kernel-5.18.patch
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
3 @@ -2414,9 +2414,15 @@
4                         goto hell_3;
5                 }
6  
7 +#if LINUX_VERSION_CODE < KERNEL_VERSION(5,18,0)
8                 card->writeblock = (int *)pci_alloc_consistent(pdev,
9                                                                VT_PCIDMA_BLOCKSIZE,
10                                                                &card->writedma);
11 +#else
12 +               card->writeblock = (int *)dma_alloc_coherent(&pdev->dev,
13 +                                                              VT_PCIDMA_BLOCKSIZE,
14 +                                                              &card->writedma, GFP_ATOMIC);
15 +#endif
16                 if (!card->writeblock){
17                         cardcrit(cardnum, "FAILED to get DMA memory.");
18                         goto hell_3;
19 @@ -2528,8 +2534,13 @@
20         vtopenpci_board_unregister( card );
21      hell_4:
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);
26 +#else
27 +               dma_free_coherent(&pdev->dev, VT_PCIDMA_BLOCKSIZE,
28 +                                   (void*)card->writeblock, card->writedma);
29 +#endif
30         }
31      hell_3:
32         outb(0x00, TJ_CNTL);
33 @@ -2600,8 +2611,13 @@
34                 vtopenpci_board_unregister( card );
35                 outb(0x00, TJ_CNTL);
36  
37 +#if LINUX_VERSION_CODE < KERNEL_VERSION(5,18,0)
38                 pci_free_consistent(pdev, VT_PCIDMA_BLOCKSIZE,
39                                     (void*)card->writeblock, card->writedma);
40 +#else
41 +               dma_free_coherent(&pdev->dev, VT_PCIDMA_BLOCKSIZE,
42 +                                   (void*)card->writeblock, card->writedma);
43 +#endif
44         } else {
45                 //XXX Do we need to do a forceful hangup here too?
46                 if( card->ppdatamask == 0 ) unexport_module_info(card);
This page took 0.122661 seconds and 3 git commands to generate.