If the system cannot/will not assign the necessary resources (which include memory mapped regions, I/O regions, and interrupts) during the PCI plug-and-play process, there is nothing that NVIDIA or the GPU driver can do about that.
You’ll need to see if the P510 has any system BIOS settings that involve mapping of resources, eg. above the 4G boundary. If you study carefully the device manager tabs for the display adapter corresponding to the K40c, you may get an idea of which resource is the problem. Typically it is the large memory BAR region associated with K40m that is often the deal-breaker for system compatibility.
In any event, it’s basically a Lenovo support question if the system will not assign the necessary resources. Be sure to update your P510 if it is not running the latest system BIOS.
Or choose another system. The K40c is not guaranteed by NVIDIA to work in any system you place it in.
I happen to have a K40c plugged into a Dell rack workstation, albeit running linux. Here is the lspci -vvv output:
82:00.0 3D controller: nVidia Corporation Device 1024 (rev a1)
Subsystem: nVidia Corporation Device 0983
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0
Interrupt: pin A routed to IRQ 64
Region 0: Memory at fa000000 (32-bit, non-prefetchable)
Region 1: Memory at 381fe0000000 (64-bit, prefetchable)
Region 3: Memory at 381ff0000000 (64-bit, prefetchable)
Capabilities: <access denied>
Kernel driver in use: nvidia
Kernel modules: nvidia, nvidia-drm, nouveau, nvidiafb
The largest of the 3 memory regions that need to be mapped is only 256M, so I think it’s unlikely to be a mem-BAR mapping issue in your case.
K40m by comparison has a 16G mem-BAR region that needs to be mapped:
04:00.0 3D controller: NVIDIA Corporation GK110BGL [Tesla K40m] (rev a1)
Subsystem: NVIDIA Corporation 12GB Computational Accelerator
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0
Interrupt: pin A routed to IRQ 141
NUMA node: 0
Region 0: Memory at c9000000 (32-bit, non-prefetchable)
Region 1: Memory at 3c0800000000 (64-bit, prefetchable)
Region 3: Memory at 3c0c00000000 (64-bit, prefetchable)
Capabilities: <access denied>
Kernel driver in use: nvidia
Kernel modules: nouveau, nvidia_drm, nvidia