summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorsetje <none@none>2007-05-04 14:25:21 -0700
committersetje <none@none>2007-05-04 14:25:21 -0700
commita9ddc71cf44cc99898f13a788230a7f50977d628 (patch)
treebbbbf51d195b58ab6119c0fb96b75170a3ea6b80 /usr/src
parentfee38f6fd6a6fbebea04db28cf9e4d351fb48311 (diff)
downloadillumos-gate-a9ddc71cf44cc99898f13a788230a7f50977d628.tar.gz
6490981 netstrategy continues to report empty strings for dhcp'd interfaces even after a driver is added
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/uts/common/io/strplumb.c9
-rw-r--r--usr/src/uts/common/syscall/systeminfo.c14
-rw-r--r--usr/src/uts/sparc/ml/modstubs.s1
-rw-r--r--usr/src/uts/sun/sys/bootconf.h2
4 files changed, 24 insertions, 2 deletions
diff --git a/usr/src/uts/common/io/strplumb.c b/usr/src/uts/common/io/strplumb.c
index 7da86a44bb..0c7d6d50f2 100644
--- a/usr/src/uts/common/io/strplumb.c
+++ b/usr/src/uts/common/io/strplumb.c
@@ -667,9 +667,12 @@ int dl_bind(ldi_handle_t lh, uint_t sap, uint_t max_conn,
uint_t service, uint_t conn_mgmt);
int dl_phys_addr(ldi_handle_t lh, struct ether_addr *eaddr);
+#endif /* !__sparc */
+
char *
strplumb_get_netdev_path(void)
{
+#ifndef __sparc
char *macstr, *devpath = NULL;
uchar_t *bootp;
uint_t bootp_len, len;
@@ -710,8 +713,14 @@ strplumb_get_netdev_path(void)
ddi_walk_devs(ddi_root_node(), matchmac, (void *)&devpath);
return (devpath);
+
+#else
+ return (NULL);
+#endif /* !__sparc */
}
+#ifndef __sparc
+
/*
* Get boot path from the boot_mac address
*/
diff --git a/usr/src/uts/common/syscall/systeminfo.c b/usr/src/uts/common/syscall/systeminfo.c
index 6d7d5ae40f..dd3dade3c5 100644
--- a/usr/src/uts/common/syscall/systeminfo.c
+++ b/usr/src/uts/common/syscall/systeminfo.c
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -147,10 +147,20 @@ systeminfo(int command, char *buf, long count)
strcnt = 0;
} else {
/*
+ * If the interface didn't have a name (bindable
+ * driver) to begin with, it might have one now.
+ * So, re-run strplumb_get_netdev_path() to see
+ * if one can be established at this time.
+ */
+ if (netdev_path == NULL || netdev_path[0] == '\0') {
+ netdev_path = strplumb_get_netdev_path();
+ }
+ /*
* If the interface name has not yet been resolved
* (first IFNAMSIZ bytes of dhcack[]) and a valid
* netdev_path[] was stashed by loadrootmodules in
- * swapgeneric.c, resolve the interface name now.
+ * swapgeneric.c, or established above, resolve
+ * the interface name now.
*/
if (dhcack[0] == '\0' &&
netdev_path != NULL && netdev_path[0] != '\0') {
diff --git a/usr/src/uts/sparc/ml/modstubs.s b/usr/src/uts/sparc/ml/modstubs.s
index f90032f9e9..857732e31e 100644
--- a/usr/src/uts/sparc/ml/modstubs.s
+++ b/usr/src/uts/sparc/ml/modstubs.s
@@ -731,6 +731,7 @@ stubs_base:
MODULE(strplumb,misc);
STUB(strplumb, strplumb, 0);
STUB(strplumb, strplumb_load, 0);
+ STUB(strplumb, strplumb_get_netdev_path, 0)
END_MODULE(strplumb);
#endif
diff --git a/usr/src/uts/sun/sys/bootconf.h b/usr/src/uts/sun/sys/bootconf.h
index 2387d44d0d..beaa49a17c 100644
--- a/usr/src/uts/sun/sys/bootconf.h
+++ b/usr/src/uts/sun/sys/bootconf.h
@@ -245,6 +245,8 @@ extern char *default_path;
extern char *dhcack;
extern char *netdev_path;
+extern char *strplumb_get_netdev_path(void);
+
#endif /* _KERNEL && !_BOOT */
#ifdef __cplusplus