diff options
author | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2012-11-13 19:05:18 +0100 |
---|---|---|
committer | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2012-11-13 19:05:18 +0100 |
commit | 4d411e0dd94cea2b71e6c526399ef96cdf3cb364 (patch) | |
tree | 2a54177f794120ae9b3c8df446f560c5f7325b45 /driver | |
parent | 4a39fdf798b4f8f6dadc7109f04587dced12b5a9 (diff) | |
download | pcitool-4d411e0dd94cea2b71e6c526399ef96cdf3cb364.tar.gz pcitool-4d411e0dd94cea2b71e6c526399ef96cdf3cb364.tar.bz2 pcitool-4d411e0dd94cea2b71e6c526399ef96cdf3cb364.tar.xz pcitool-4d411e0dd94cea2b71e6c526399ef96cdf3cb364.zip |
Provide information on device location (bus,device,function)
Diffstat (limited to 'driver')
-rw-r--r-- | driver/ioctl.c | 1 | ||||
-rw-r--r-- | driver/pciDriver.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/driver/ioctl.c b/driver/ioctl.c index 43a3cf7..2d4af73 100644 --- a/driver/ioctl.c +++ b/driver/ioctl.c @@ -150,6 +150,7 @@ static int ioctl_pci_info(pcidriver_privdata_t *privdata, unsigned long arg) pci_info.bus = privdata->pdev->bus->number; pci_info.slot = PCI_SLOT(privdata->pdev->devfn); pci_info.devfn = privdata->pdev->devfn; + pci_info.func = PCI_FUNC(privdata->pdev->devfn); if ((ret = pci_read_config_byte(privdata->pdev, PCI_INTERRUPT_PIN, &(pci_info.interrupt_pin))) != 0) return ret; diff --git a/driver/pciDriver.h b/driver/pciDriver.h index 159f6ad..d548765 100644 --- a/driver/pciDriver.h +++ b/driver/pciDriver.h @@ -170,6 +170,7 @@ typedef struct { unsigned short device_id; unsigned short bus; unsigned short slot; + unsigned short func; unsigned short devfn; unsigned char interrupt_pin; unsigned char interrupt_line; |