Mercurial > illumos > illumos-gate
changeset 12827:3cc06341886c
6967395 x86pi bay enumerator prevents static topologies
author | Vuong Nguyen <Vuong.Nguyen@Sun.COM> |
---|---|
date | Tue, 13 Jul 2010 12:06:07 -0700 |
parents | a9d2cf624271 |
children | 2ad74dc35297 |
files | usr/src/lib/fm/topo/modules/i86pc/x86pi/x86pi.c |
diffstat | 1 files changed, 15 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/lib/fm/topo/modules/i86pc/x86pi/x86pi.c Tue Jul 13 11:12:24 2010 -0700 +++ b/usr/src/lib/fm/topo/modules/i86pc/x86pi/x86pi.c Tue Jul 13 12:06:07 2010 -0700 @@ -309,14 +309,22 @@ smbc->type = SUN_OEM_EXT_PORT; x86pi_smb_strcnt(shp, smbc); - /* enumerate direct attached SATA disks */ - rv = topo_node_range_create(mod, chassis_node, BAY, 0, - smbc->count + 1); - if (rv != 0) { + /* + * enumerate direct attached SATA disks if we found a + * SUN_OEM_EXT_PORT record. + */ + if (smbc->count > 0) { + rv = topo_node_range_create(mod, chassis_node, BAY, 0, + smbc->count + 1); + if (rv != 0) { + topo_mod_dprintf(mod, + "%s: Failed to create %s range: %s\n", + f, BAY, topo_mod_errmsg(mod)); + continue; + } + } else { topo_mod_dprintf(mod, - "%s: Failed to create %s range: %s\n", - f, BAY, topo_mod_errmsg(mod)); - continue; + "Skipping disk bay enumeration\n"); } for (i = 0; i < smbc->count; i++) {