Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 May 2016 03:42:19 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r299311 - stable/10/sys/dev/pci
Message-ID:  <201605100342.u4A3gJD2053117@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Tue May 10 03:42:18 2016
New Revision: 299311
URL: https://svnweb.freebsd.org/changeset/base/299311

Log:
  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.

Modified:
  stable/10/sys/dev/pci/pci.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/pci/pci.c
==============================================================================
--- stable/10/sys/dev/pci/pci.c	Tue May 10 03:34:20 2016	(r299310)
+++ stable/10/sys/dev/pci/pci.c	Tue May 10 03:42:18 2016	(r299311)
@@ -4925,7 +4925,8 @@ pci_child_location_str_method(device_t d
     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);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605100342.u4A3gJD2053117>