enjoy-digital / litepcie

Small footprint and configurable PCIe core
Other
449 stars 110 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 1 year ago

trabucayre commented 1 year ago

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

sjkelly commented 1 year ago

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

trabucayre commented 1 year 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 1 year ago

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