From 6563803287822469bd05869e8cc4c20e170c1f5e Mon Sep 17 00:00:00 2001
From: Martin Michlmayr vmk_PCIGetDeviceName
.
struct pci_dev *linuxDev;
.
A definition of pci_dev
is found in
vmkdrivers/src_92/include/linux/pci.h
(which
- is #include
'd above) reads:
+ is #include
'd above) reads:
+
struct pci_dev { [...] @@ -329,7 +330,7 @@ truct pci_driver { u8 revision; /* PCI revision, low byte of class word */ #endif /* defined(__VMKLNX__) */ }; -+
These structures, and based on those from Linux itself
(a
@@ -342,7 +343,7 @@ truct pci_driver {
and VMware's vmware/linux_pci.c
is very tightly coupled and
interdependent.
VMKAPI_MODULE_CALL_VOID
macro calls driver's codeVMKAPI_MODULE_CALL_VOID
macro calls driver's codeThe
file BLD/build/HEADERS/vmkapi-current-all-public/vmkernel64/release/base/vmkapi_module.h
@@ -352,7 +353,7 @@ truct pci_driver {
#define VMKAPI_MODULE_CALL_VOID(moduleID, function, args...) \
do { \
vmk_ModInfoStack modStack; \
- vmk_ModulePushId(moduleID, function, &modStack); \
+ vmk_ModulePushId(moduleID, function, &modStack); \
(function)(args); \
) \
vmk_ModulePopId(); \
@@ -372,13 +373,13 @@ do { \
VMware includes a file vmkdrivers/src_9/drivers/net/tg3/tg3.c
in their source release. This file appears to be Linux's tg3 driver. It
includes a definition of the struct pci_dev
for this device,
- which reads:
+ which reads:
static struct pci_driver tg3_driver = { [...] .remove = __devexit_p(tg3_remove_one),-
Therefore, when the code in LinuxPCIDeviceRemoved()
calls linuxDev->driver->remove(linuxDev)
, the code ultimately