Page MenuHomeFreeBSD

Restore name=value format of PCI location strings.
ClosedPublic

Authored by jhb on May 6 2016, 8:37 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 25, 1:59 AM
Unknown Object (File)
Nov 16 2024, 7:19 AM
Unknown Object (File)
Nov 15 2024, 12:16 AM
Unknown Object (File)
Nov 11 2024, 7:00 AM
Unknown Object (File)
Oct 27 2024, 11:18 AM
Unknown Object (File)
Sep 21 2024, 5:18 AM
Unknown Object (File)
Sep 17 2024, 11:01 AM
Unknown Object (File)
Sep 8 2024, 7:42 PM
Subscribers
None

Details

Summary

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.

Alternatively we could choose another name. One thing I would really
like is to have a way that a program using libdevctl can query a
device for it's "bus name". One way we could implement this would be to
pick a specific location name as the "bus name" that can be used
with devctl requests. I would be fine with just using "handle" for
this (which is what ACPI already uses for the ACPI handle). I would
then extend libdevctl to have a 'devctl_lookup_handle()' that grabbed
the location string and parsed the handle out of it.

One other thing we might consider is adding methods to libdevinfo that
parse the name=value tuples out of the location and pnpinfo strings,
perhaps into an nvlist (since we have libnv in the base system now).
devd could eventually use these methods to avoid duplicating the logic.
It might be useful for other utilities that want to query device info
(things like control-center widgets in GUIs).

Test Plan
  • Use a devd script to autoload if_ral for a ral expresscard card on insertion.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jhb retitled this revision from to Restore name=value format of PCI location strings..
jhb updated this object.
jhb edited the test plan for this revision. (Show Details)
jhb added a reviewer: imp.
imp edited edge metadata.
This revision is now accepted and ready to land.May 6 2016, 10:47 PM
This revision was automatically updated to reflect the committed changes.