Page MenuHomeFreeBSD

D34248.diff
No OneTemporary

D34248.diff

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
@@ -334,6 +334,7 @@
phys_addr_t rom;
size_t romlen;
struct msi_desc **msi_desc;
+ char *path_name;
TAILQ_HEAD(, pci_mmio_region) mmio;
};
@@ -454,8 +455,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
@@ -307,6 +307,9 @@
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:%02d:%02d.%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);
/*
* This should be the upstream bridge; pci_upstream_bridge()
@@ -350,6 +353,7 @@
free(pdev->msi_desc[i], M_DEVBUF);
free(pdev->msi_desc, M_DEVBUF);
}
+ kfree(pdev->path_name);
free(pdev, M_DEVBUF);
}

File Metadata

Mime Type
text/plain
Expires
Thu, Jan 23, 3:24 PM (21 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16057069
Default Alt Text
D34248.diff (1 KB)

Event Timeline