From 4d411e0dd94cea2b71e6c526399ef96cdf3cb364 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Tue, 13 Nov 2012 19:05:18 +0100 Subject: Provide information on device location (bus,device,function) --- driver/ioctl.c | 1 + driver/pciDriver.h | 1 + 2 files changed, 2 insertions(+) (limited to 'driver') 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; -- cgit v1.2.3