Get rid of the broken 5.18 patch. 5.18 RC users can reportedly use the latest 510 series driver as is.
parent
14718bb2a3
commit
420b64bc83
@ -1,101 +0,0 @@
|
||||
diff --git a/kernel-dkms/nvidia/nv.c b/kernel-dkms/nvidia/nv.c
|
||||
--- a/kernel-dkms/nvidia/nv.c
|
||||
+++ b/kernel-dkms/nvidia/nv.c
|
||||
@@ -22,6 +22,7 @@
|
||||
*/
|
||||
|
||||
#include "nvmisc.h"
|
||||
+#include "linux/dma-mapping.h"
|
||||
#include "os-interface.h"
|
||||
#include "nv-linux.h"
|
||||
#include "nv-p2p.h"
|
||||
@@ -2765,13 +2766,13 @@
|
||||
*/
|
||||
if (!nvl->tce_bypass_enabled)
|
||||
{
|
||||
- pci_set_dma_mask(nvl->pci_dev, new_mask);
|
||||
+ dma_set_mask(&nvl->pci_dev->dev, new_mask);
|
||||
/* Certain kernels have a bug which causes pci_set_consistent_dma_mask
|
||||
* to call GPL sme_active symbol, this bug has already been fixed in a
|
||||
* minor release update but detect the failure scenario here to prevent
|
||||
* an installation regression */
|
||||
#if !NV_IS_EXPORT_SYMBOL_GPL_sme_active
|
||||
- pci_set_consistent_dma_mask(nvl->pci_dev, new_mask);
|
||||
+ dma_set_coherent_mask(&nvl->pci_dev->dev, new_mask);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
diff --git a/kernel-dkms/nvidia/linux_nvswitch.c b/kernel-dkms/nvidia/linux_nvswitch.c
|
||||
--- a/kernel-dkms/nvidia/linux_nvswitch.c
|
||||
+++ b/kernel-dkms/nvidia/linux_nvswitch.c
|
||||
@@ -24,6 +24,7 @@
|
||||
|
||||
#include <linux/version.h>
|
||||
|
||||
+#include "linux/dma-direction.h"
|
||||
#include "conftest.h"
|
||||
#include "nvlink_errors.h"
|
||||
#include "nvlink_linux.h"
|
||||
@@ -2140,11 +2139,11 @@
|
||||
)
|
||||
{
|
||||
if (direction == NVSWITCH_DMA_DIR_TO_SYSMEM)
|
||||
- return PCI_DMA_FROMDEVICE;
|
||||
+ return DMA_FROM_DEVICE;
|
||||
else if (direction == NVSWITCH_DMA_DIR_FROM_SYSMEM)
|
||||
- return PCI_DMA_TODEVICE;
|
||||
+ return DMA_TO_DEVICE;
|
||||
else
|
||||
- return PCI_DMA_BIDIRECTIONAL;
|
||||
+ return DMA_BIDIRECTIONAL;
|
||||
}
|
||||
|
||||
NvlStatus
|
||||
@@ -2165,9 +2164,9 @@
|
||||
|
||||
dma_dir = _nvswitch_to_pci_dma_direction(direction);
|
||||
|
||||
- *dma_handle = (NvU64)pci_map_single(pdev, cpu_addr, size, dma_dir);
|
||||
+ *dma_handle = (NvU64)dma_map_single(&pdev->dev, cpu_addr, size, (enum dma_data_direction) dma_dir);
|
||||
|
||||
- if (pci_dma_mapping_error(pdev, *dma_handle))
|
||||
+ if (dma_mapping_error(&pdev->dev, *dma_handle))
|
||||
{
|
||||
pr_err("nvidia-nvswitch: unable to create PCI DMA mapping\n");
|
||||
return -NVL_ERR_GENERIC;
|
||||
@@ -2194,7 +2193,7 @@
|
||||
|
||||
dma_dir = _nvswitch_to_pci_dma_direction(direction);
|
||||
|
||||
- pci_unmap_single(pdev, dma_handle, size, dma_dir);
|
||||
+ dma_unmap_single(&pdev->dev, dma_handle, size, (enum dma_data_direction) dma_dir);
|
||||
|
||||
return NVL_SUCCESS;
|
||||
}
|
||||
@@ -2211,7 +2210,7 @@
|
||||
if (!pdev)
|
||||
return -NVL_BAD_ARGS;
|
||||
|
||||
- if (pci_set_dma_mask(pdev, DMA_BIT_MASK(dma_addr_width)))
|
||||
+ if (dma_set_mask(&pdev->dev, DMA_BIT_MASK(dma_addr_width)))
|
||||
return -NVL_ERR_GENERIC;
|
||||
|
||||
return NVL_SUCCESS;
|
||||
@@ -2234,7 +2233,7 @@
|
||||
|
||||
dma_dir = _nvswitch_to_pci_dma_direction(direction);
|
||||
|
||||
- pci_dma_sync_single_for_cpu(pdev, dma_handle, size, dma_dir);
|
||||
+ dma_sync_single_for_cpu(&pdev->dev, dma_handle, size, dma_dir);
|
||||
|
||||
return NVL_SUCCESS;
|
||||
}
|
||||
@@ -2256,7 +2255,7 @@
|
||||
|
||||
dma_dir = _nvswitch_to_pci_dma_direction(direction);
|
||||
|
||||
- pci_dma_sync_single_for_device(pdev, dma_handle, size, dma_dir);
|
||||
+ dma_sync_single_for_device(&pdev->dev, dma_handle, size, (enum dma_data_direction)dma_dir);
|
||||
|
||||
return NVL_SUCCESS;
|
||||
}
|
Loading…
Reference in New Issue