--- a/usr/src/uts/common/os/devcfg.c Mon Mar 23 06:46:46 2009 -0700
+++ b/usr/src/uts/common/os/devcfg.c Mon Mar 23 09:03:34 2009 -0700
@@ -3709,9 +3709,9 @@
* the ioc, look for minor node dhcp. If not found, pass ":dhcp"
* to ioc's bus_config entry point.
*/
-static int
-parse_pathname(char *pathname,
- dev_info_t **dipp, dev_t *devtp, int *spectypep, dev_info_t **pci_dipp)
+int
+resolve_pathname(char *pathname,
+ dev_info_t **dipp, dev_t *devtp, int *spectypep)
{
int error;
dev_info_t *parent, *child;
@@ -3724,9 +3724,6 @@
struct ddi_minor_data *dmn;
int circ;
- if (pci_dipp)
- *pci_dipp = NULL;
-
if (*pathname != '/')
return (EINVAL);
parent = ddi_root_node(); /* Begin at the top of the tree */
@@ -3769,10 +3766,6 @@
pn_free(&pn);
kmem_free(component, MAXNAMELEN);
kmem_free(config_name, MAXNAMELEN);
- if (pci_dipp && *pci_dipp) {
- ndi_rele_devi(*pci_dipp);
- *pci_dipp = NULL;
- }
return (-1);
}
@@ -3780,15 +3773,6 @@
ndi_rele_devi(parent);
parent = child;
pn_skipslash(&pn);
- if (pci_dipp) {
- if (ddi_is_pci_dip(child)) {
- ndi_hold_devi(child);
- if (*pci_dipp != NULL) {
- ndi_rele_devi(*pci_dipp);
- }
- *pci_dipp = child;
- }
- }
}
/*
@@ -3806,10 +3790,6 @@
kmem_free(config_name, MAXNAMELEN);
NDI_CONFIG_DEBUG((CE_NOTE,
"%s: minor node not found\n", pathname));
- if (pci_dipp && *pci_dipp) {
- ndi_rele_devi(*pci_dipp);
- *pci_dipp = NULL;
- }
return (-1);
}
minorname = NULL; /* look for default minor */
@@ -3868,7 +3848,7 @@
*/
if (dipp != NULL)
*dipp = parent;
- else if (pci_dipp == NULL) {
+ else {
/*
* We should really keep the ref count to keep the node from
* detaching but ddi_pathname_to_dev_t() specifies a NULL dipp,
@@ -3884,9 +3864,6 @@
* In addition, the callers of this new interfaces would then
* need to call ndi_rele_devi when the reference is complete.
*
- * NOTE: If pci_dipp is non-NULL we are only interested
- * in the PCI parent which is returned held. No need to hold
- * the leaf dip.
*/
(void) ddi_prop_update_int(DDI_DEV_T_NONE, parent,
DDI_NO_AUTODETACH, 1);
@@ -3896,19 +3873,6 @@
return (0);
}
-int
-resolve_pathname(char *pathname,
- dev_info_t **dipp, dev_t *devtp, int *spectypep)
-{
- return (parse_pathname(pathname, dipp, devtp, spectypep, NULL));
-}
-
-int
-ddi_find_pci_parent(char *pathname, dev_info_t **pci_dipp)
-{
- return (parse_pathname(pathname, NULL, NULL, NULL, pci_dipp));
-}
-
/*
* Given the pathname of a device, return the dev_t of the corresponding
* device. Returns NODEV on failure.
--- a/usr/src/uts/common/sys/ddi_implfuncs.h Mon Mar 23 06:46:46 2009 -0700
+++ b/usr/src/uts/common/sys/ddi_implfuncs.h Mon Mar 23 09:03:34 2009 -0700
@@ -248,7 +248,6 @@
int i_ddi_attach_hw_nodes(char *);
int i_ddi_devs_attached(major_t);
int i_ddi_minor_node_count(dev_info_t *, const char *);
-int ddi_find_pci_parent(char *pathname, dev_info_t **pci_dipp);
int ddi_is_pci_dip(dev_info_t *dip);
/* non-DDI functions: wrapper around mod_hold/rele_dev_by_major() */