summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2016-05-10 03:42:18 +0000
committerjhb <jhb@FreeBSD.org>2016-05-10 03:42:18 +0000
commitbbbec9298fca2d2cc57250970838872a38d28386 (patch)
tree067e2d03d040a84a18436b4e7ef3b19984f1c0c9
parentdf98d2f966a592419c5b33dace6e83fdebb57c2f (diff)
downloadFreeBSD-src-bbbec9298fca2d2cc57250970838872a38d28386.zip
FreeBSD-src-bbbec9298fca2d2cc57250970838872a38d28386.tar.gz
MFC 299205: Restore name=value format of PCI location strings.
When devctl was added, the location string for PCI devices was changed to use the PCI "selector" that pciconf and devctl accept. However, devd assumes that location strings are formatted as a list of name=value pairs. As a result, devd is no longer parsing any of the values out of PCI device events. Restore the previous format of the PCI location strings to restore the location and slot keywords in case any devd scripts are using this. Add the "selector" as a new 'dbsf' location variable.
-rw-r--r--sys/dev/pci/pci.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c
index bf41b8e..a1e0ac8 100644
--- a/sys/dev/pci/pci.c
+++ b/sys/dev/pci/pci.c
@@ -4925,7 +4925,8 @@ pci_child_location_str_method(device_t dev, device_t child, char *buf,
size_t buflen)
{
- snprintf(buf, buflen, "pci%d:%d:%d:%d", pci_get_domain(child),
+ snprintf(buf, buflen, "slot=%d function=%d dbsf=pci%d:%d:%d:%d",
+ pci_get_slot(child), pci_get_function(child), pci_get_domain(child),
pci_get_bus(child), pci_get_slot(child), pci_get_function(child));
return (0);
}
OpenPOWER on IntegriCloud