enjoy-digital / litepcie

Small footprint and configurable PCIe core
Other
487 stars 119 forks source link

litepcie/software/kernel/main.c: fix build with kernel >= 5.18 (pci_set_dma_mask -> dma_set_mask) #106

Closed trabucayre closed 2 years ago

trabucayre commented 2 years ago

Since kernel 5.18 pci_set_dma_mask is more available and must be recplaced by dma_set_mask.

sjkelly commented 2 years ago

Looks good to me. We have tested the same fix locally on Linux 6.0.

trabucayre commented 2 years ago

I use 6.0 too, but using exact kernel version allows user with a kernel prior to 5.18 to use pci_set_dma_mask and users with a kernel 5.18 and greater to use dma_set_mask.

enjoy-digital commented 2 years ago

Thanks @trabucayre! (and @sjkelly for the feedback). This is merged.