[RFC 6/6] [!UPSTREAM] nova-core: test configuration routine.

Zhi Wang posted 6 patches 2 months, 1 week ago
There is a newer version of this series
[RFC 6/6] [!UPSTREAM] nova-core: test configuration routine.
Posted by Zhi Wang 2 months, 1 week ago
Signed-off-by: Zhi Wang <zhiw@nvidia.com>
---
 drivers/gpu/nova-core/driver.rs | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/nova-core/driver.rs b/drivers/gpu/nova-core/driver.rs
index 1380b47617f7..605d9146113c 100644
--- a/drivers/gpu/nova-core/driver.rs
+++ b/drivers/gpu/nova-core/driver.rs
@@ -44,6 +44,10 @@ fn probe(pdev: &pci::Device<Core>, _info: &Self::IdInfo) -> Result<Pin<KBox<Self
         let bar_clone = Arc::clone(&devres_bar);
         let bar = bar_clone.access(pdev.as_ref())?;
 
+        let config = pci::ConfigSpace::<{bindings::PCI_CFG_SPACE_EXP_SIZE as usize}>::new(pdev)?;
+
+        dev_info!(pdev.as_ref(), "Nova Core GPU driver read pci {:x}.\n", config.read16(0));
+
         let this = KBox::pin_init(
             try_pin_init!(Self {
                 gpu <- Gpu::new(pdev, devres_bar, bar),
-- 
2.47.3