Hello, I have a capture card I use under Slackware-current, however it seems the 5.18 kernel no longer allows me to build the capture cards driver because PCI_SET_DMA_MASK() was changed to DMA_SET_MASK().
(Full source code here for the device driver (/src/sources/avstream/capture.c):
http://www.magewell.com/files/driver...ux_4236.tar.gz)
The issue appears to occur here:
Code:
//Line 290:
if ((sizeof(dma_addr_t) > 4) &&
!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
xi_debug(1, "dma 64 OK!\n");
} else {
xi_debug(1, "dma 64 not OK!\n");
if ((pci_set_dma_mask(pdev, DMA_BIT_MASK(64)) < 0) &&
(pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) < 0) {
xi_debug(0, "DMA configuration failed\n");
goto disable_pci;
}
}
It throws the following error:
Code:
/root/driver/ProCaptureForLinux_4236/mwcap_build/sources/avstream/capture.c:291:14: error: implicit declaration of function ‘pci_set_dma_mask’ [-Werror=implicit-function-declaration]
291 | !pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
| ^~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:289: /root/driver/ProCaptureForLinux_4236/mwcap_build/sources/avstream/capture.o] Error 1
make[1]: *** [Makefile:1838: /root/driver/ProCaptureForLinux_4236/mwcap_build] Error 2
make[1]: Leaving directory '/usr/src/linux-5.18.17'
make: *** [Makefile:33: all] Error 2
make: Leaving directory '/root/driver/ProCaptureForLinux_4236/mwcap_build'
ERROR: Failed to build module!
I tried changed pci_set_dma_mask() to dma_set_mask(), but I get this error:
Code:
root/driver/ProCaptureForLinux_4236/mwcap_build/sources/avstream/capture.c:295:27: error: passing argument 1 of ‘dma_set_mask’ from incompatible pointer type [-Werror=incompatible-pointer-types]
295 | if ((dma_set_mask(pdev, DMA_BIT_MASK(64)) < 0) &&
My C is very poor and limited. I've contacted the device manufacturer asking for an update to resolve this, but in the mean time I was hoping someone who is knowledgable with this could help me fix this as it just seems to be a change of renaming a function and arguments. Would someone please help me fix this module compile issue?