Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153827098
D34248.id102659.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D34248.id102659.diff
View Options
diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h
--- a/sys/compat/linuxkpi/common/include/linux/pci.h
+++ b/sys/compat/linuxkpi/common/include/linux/pci.h
@@ -261,6 +261,7 @@
struct pci_driver *pdrv;
struct pci_bus *bus;
struct pci_dev *root;
+ char *path_name;
uint16_t device;
uint16_t vendor;
uint16_t subsystem_vendor;
@@ -378,8 +379,7 @@
static inline const char *
pci_name(struct pci_dev *d)
{
-
- return device_get_desc(d->dev.bsddev);
+ return d->path_name;
}
static inline void *
diff --git a/sys/compat/linuxkpi/common/src/linux_pci.c b/sys/compat/linuxkpi/common/src/linux_pci.c
--- a/sys/compat/linuxkpi/common/src/linux_pci.c
+++ b/sys/compat/linuxkpi/common/src/linux_pci.c
@@ -277,6 +277,8 @@
pdev->subsystem_device = pci_get_subdevice(dev);
pdev->class = pci_get_class(dev);
pdev->revision = pci_get_revid(dev);
+ pdev->path_name = kasprintf(GFP_KERNEL, "%04d:%d:%d.%d",
+ pci_get_domain(dev), pci_get_bus(dev), pci_get_slot(dev), pci_get_function(dev));
pdev->bus = malloc(sizeof(*pdev->bus), M_DEVBUF, M_WAITOK | M_ZERO);
pdev->bus->self = pdev;
pdev->bus->number = pci_get_bus(dev);
@@ -302,6 +304,7 @@
if (pdev->root != NULL)
pci_dev_put(pdev->root);
free(pdev->bus, M_DEVBUF);
+ kfree(pdev->path_name);
free(pdev, M_DEVBUF);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Apr 25, 1:43 AM (12 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32103680
Default Alt Text
D34248.id102659.diff (1 KB)
Attached To
Mode
D34248: LinuxKPI: return an address string in pci_name
Attached
Detach File
Event Timeline
Log In to Comment