changeset 9874:443951628139

6778345 need better error message if "fmadm replaced" finds the original fru is still present. 6826123 Inconsitancy of chassis-id and product-id in fmris 6826128 Allow separate serd n/t parameters for different types of pciex CEs 6579970 eversholt constraints can't access conf properties for path other than "to" or "from" path 6839481 fmd_repair_fru not changed to use fmd_asru_rep_arg_t argument 6839469 checks for replacement of faulty dimm not working on intel systems 6726394 fmd_fmri_replaced should be properly supported for hc-scheme 6844214 typo in pciex.esc can cause eversholt to run slow 6847899 unknown libtopo error when a topo builtin fails to initialise 6847905 memory leak in zfs builtin when injecting repeated DR events 6847910 FMD_XPRT_HC_PRESENT_ONLY not working correctly
author Stephen Hanson <Stephen.Hanson@Sun.COM>
date Tue, 16 Jun 2009 02:49:15 -0700
parents 8ddc892eca6e
children 575a3c22a661
files usr/src/cmd/fm/eversholt/files/common/pciex.esc usr/src/cmd/fm/fmd/common/fmd.c usr/src/cmd/fm/fmd/common/fmd_api.c usr/src/cmd/fm/fmd/common/fmd_asru.c usr/src/cmd/fm/fmd/common/fmd_asru.h usr/src/cmd/fm/fmd/common/fmd_rpc_adm.c usr/src/cmd/fm/fmd/common/fmd_rpc_adm.x usr/src/cmd/fm/fmd/common/fmd_xprt.c usr/src/cmd/fm/modules/common/eversholt/ipath.c usr/src/cmd/fm/modules/common/eversholt/itree.c usr/src/cmd/fm/modules/common/eversholt/itree.h usr/src/lib/fm/libfmd_adm/common/fmd_adm.c usr/src/lib/fm/topo/libtopo/common/hc.c usr/src/lib/fm/topo/libtopo/common/topo_fmri.c usr/src/lib/fm/topo/libtopo/common/topo_mod.c usr/src/lib/fm/topo/libtopo/common/topo_snap.c usr/src/lib/fm/topo/libtopo/common/zfs.c usr/src/lib/fm/topo/modules/i86pc/chip/chip_subr.c
diffstat 18 files changed, 453 insertions(+), 108 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/cmd/fm/eversholt/files/common/pciex.esc	Tue Jun 16 13:11:47 2009 +0530
+++ b/usr/src/cmd/fm/eversholt/files/common/pciex.esc	Tue Jun 16 02:49:15 2009 -0700
@@ -60,6 +60,16 @@
  */
 #define CORRLINK_COUNT 6
 #define CORRLINK_TIME 2h
+#define BTLP_COUNT 6
+#define BTLP_TIME 2h
+#define BDLLP_COUNT 6
+#define BDLLP_TIME 2h
+#define RTO_COUNT 6
+#define RTO_TIME 2h
+#define RNR_COUNT 6
+#define RNR_TIME 2h
+#define RE_COUNT 6
+#define RE_TIME 2h
 #define NONFATAL_DPE_COUNT 3
 #define NONFATAL_DPE_TIME 168h
 
@@ -111,6 +121,14 @@
 engine serd.io.device.nonfatal@PCIEXFN, N=CORRLINK_COUNT, T=CORRLINK_TIME;
 event fault.io.pciex.device-interr-corr@PCIEXFN, FITrate=PCIEX_DEV_FIT,
 	engine=serd.io.device.nonfatal@PCIEXFN;
+engine serd.io.device.nonfatal@PCIEXFN/PCIEXFN,
+	N=CORRLINK_COUNT, T=CORRLINK_TIME;
+event fault.io.pciex.device-interr-corr@PCIEXFN/PCIEXFN, FITrate=PCIEX_DEV_FIT,
+	engine=serd.io.device.nonfatal@PCIEXFN/PCIEXFN;
+engine serd.io.device.nonfatal@pciexrc/PCIEXFN,
+	N=CORRLINK_COUNT, T=CORRLINK_TIME;
+event fault.io.pciex.device-interr-corr@pciexrc/PCIEXFN, FITrate=PCIEX_DEV_FIT,
+	engine=serd.io.device.nonfatal@pciexrc/PCIEXFN;
 
 event fault.io.pciex.device-interr@pciexrc, FITrate=PCIEX_RC_FIT;
 
@@ -136,9 +154,14 @@
 
 event fault.io.pciex.bus-linkerr@PCIEXFN, FITrate=PCIEX_BUS_FIT;
 
-engine serd.io.pciex.corrlink-bus@PCIEXFN, N=CORRLINK_COUNT, T=CORRLINK_TIME;
-event fault.io.pciex.bus-linkerr-corr@PCIEXFN, FITrate=PCIEX_BUS_FIT,
-	engine=serd.io.pciex.corrlink-bus@PCIEXFN;
+engine serd.io.pciex.corrlink-bus@pciexrc/PCIEXFN,
+	N=CORRLINK_COUNT, T=CORRLINK_TIME;
+event fault.io.pciex.bus-linkerr-corr@pciexrc/PCIEXFN, FITrate=PCIEX_BUS_FIT,
+	engine=serd.io.pciex.corrlink-bus@pciexrc/PCIEXFN;
+engine serd.io.pciex.corrlink-bus@PCIEXFN/PCIEXFN,
+	N=CORRLINK_COUNT, T=CORRLINK_TIME;
+event fault.io.pciex.bus-linkerr-corr@PCIEXFN/PCIEXFN, FITrate=PCIEX_BUS_FIT,
+	engine=serd.io.pciex.corrlink-bus@PCIEXFN/PCIEXFN;
 
 /*
  * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@@ -286,12 +309,21 @@
 event error.io.pciex.nr-d@pciexrc/PCIEXFN;
 event error.io.pciex.ca-d@pciexrc/PCIEXFN;
 event error.io.pciex.mtlp-d@pciexrc/PCIEXFN;
-event error.io.pciex.corrlink@pciexrc/pciexbus;
 event error.io.pciex.fatlink@pciexrc/PCIEXFN;
 event error.io.pciex.badreq-d@pciexrc/PCIEXFN;
 event error.io.pciex.nf-poisecrc-d@pciexrc/PCIEXFN;
 event error.io.pciex.f-poisecrc-d@pciexrc/PCIEXFN;
 event error.io.pciex.deg-poisecrc-d@pciexrc/PCIEXFN;
+event ereport.io.pciex.dl.btlp@pciexrc{within(5s)};
+event ereport.io.pciex.dl.bdllp@pciexrc{within(5s)};
+event ereport.io.pciex.dl.rto@pciexrc{within(5s)};
+event ereport.io.pciex.dl.rnr@pciexrc{within(5s)};
+event ereport.io.pciex.pl.re@pciexrc{within(5s)};
+event ereport.io.pciex.dl.btlp@pciexrc/PCIEXFN{within(5s)};
+event ereport.io.pciex.dl.bdllp@pciexrc/PCIEXFN{within(5s)};
+event ereport.io.pciex.dl.rto@pciexrc/PCIEXFN{within(5s)};
+event ereport.io.pciex.dl.rnr@pciexrc/PCIEXFN{within(5s)};
+event ereport.io.pciex.pl.re@pciexrc/PCIEXFN{within(5s)};
 
 prop fault.io.pciex.device-noresp@pciexrc (1)->
     error.io.pciex.nr-d@pciexrc/PCIEXFNHZ;
@@ -299,8 +331,35 @@
 prop fault.io.pciex.device-invreq@pciexrc (1)->
     error.io.pciex.badreq-d@pciexrc/PCIEXFNHZ;
 
-prop fault.io.pciex.device-interr-corr@pciexrc (1)->
-    error.io.pciex.corrlink@pciexrc/pciexbus<> { setserdsuffix("_corr") };
+prop fault.io.pciex.device-interr-corr@pciexrc {
+    payloadprop_defined("detector") && setserdsuffix("_btlp") &&
+    setserdn(BTLP_COUNT) && setserdt(BTLP_TIME) } (0)->
+    ereport.io.pciex.dl.btlp@pciexrc,
+    ereport.io.pciex.dl.btlp@pciexrc/PCIEXFNHZ;
+
+prop fault.io.pciex.device-interr-corr@pciexrc {
+    payloadprop_defined("detector") && setserdsuffix("_bdllp") &&
+    setserdn(BDLLP_COUNT) && setserdt(BDLLP_TIME) } (0)->
+    ereport.io.pciex.dl.bdllp@pciexrc,
+    ereport.io.pciex.dl.bdllp@pciexrc/PCIEXFNHZ;
+
+prop fault.io.pciex.device-interr-corr@pciexrc {
+    payloadprop_defined("detector") && setserdsuffix("_rto") &&
+    setserdn(RTO_COUNT) && setserdt(RTO_TIME) } (0)->
+    ereport.io.pciex.dl.rto@pciexrc,
+    ereport.io.pciex.dl.rto@pciexrc/PCIEXFNHZ;
+
+prop fault.io.pciex.device-interr-corr@pciexrc {
+    payloadprop_defined("detector") && setserdsuffix("_rnr") &&
+    setserdn(RNR_COUNT) && setserdt(RNR_TIME) } (0)->
+    ereport.io.pciex.dl.rnr@pciexrc,
+    ereport.io.pciex.dl.rnr@pciexrc/PCIEXFNHZ;
+
+prop fault.io.pciex.device-interr-corr@pciexrc {
+    payloadprop_defined("detector") && setserdsuffix("_re") &&
+    setserdn(RE_COUNT) && setserdt(RE_TIME) } (0)->
+    ereport.io.pciex.pl.re@pciexrc,
+    ereport.io.pciex.pl.re@pciexrc/PCIEXFNHZ;
 
 prop fault.io.pciex.device-interr-unaf@pciexrc (1)->
     error.io.pciex.nf-poisecrc-d@pciexrc/PCIEXFNHZ;
@@ -340,7 +399,16 @@
 event error.io.pciex.flt-nf-poisecrc-u@PCIEXFN;
 event error.io.pciex.flt-f-poisecrc-u@PCIEXFN;
 event error.io.pciex.flt-deg-poisecrc-u@PCIEXFN;
-event error.io.pciex.corrlink@pciexbus;
+event ereport.io.pciex.dl.btlp@PCIEXFN{within(5s)};
+event ereport.io.pciex.dl.bdllp@PCIEXFN{within(5s)};
+event ereport.io.pciex.dl.rto@PCIEXFN{within(5s)};
+event ereport.io.pciex.dl.rnr@PCIEXFN{within(5s)};
+event ereport.io.pciex.pl.re@PCIEXFN{within(5s)};
+event ereport.io.pciex.dl.btlp@PCIEXFN/PCIEXFN{within(5s)};
+event ereport.io.pciex.dl.bdllp@PCIEXFN/PCIEXFN{within(5s)};
+event ereport.io.pciex.dl.rto@PCIEXFN/PCIEXFN{within(5s)};
+event ereport.io.pciex.dl.rnr@PCIEXFN/PCIEXFN{within(5s)};
+event ereport.io.pciex.pl.re@PCIEXFN/PCIEXFN{within(5s)};
 
 prop fault.io.pciex.device-noresp@PCIEXFN { IS_LF(PCIEXFN) } (1)->
     error.io.pciex.flt-nr-u@PCIEXFN;
@@ -351,16 +419,75 @@
 prop fault.io.pciex.device-invreq@PCIEXFN { IS_LF(PCIEXFN) } (1)->
     error.io.pciex.flt-badreq-u@PCIEXFN;
 
-prop fault.io.pciex.device-interr-corr@PCIEXFN { IS_SU(PCIEXFN) } (1)->
-    error.io.pciex.corrlink@pciexbus { setserdsuffix("_corr") };
+prop fault.io.pciex.device-interr-corr@pciexrc/PCIEXFN {
+    payloadprop_defined("detector") && setserdsuffix("_btlp") &&
+    setserdn(BTLP_COUNT) && setserdt(BTLP_TIME) } (0)->
+    ereport.io.pciex.dl.btlp@pciexrc,
+    ereport.io.pciex.dl.btlp@pciexrc/PCIEXFNHZ;
+
+prop fault.io.pciex.device-interr-corr@pciexrc/PCIEXFN {
+    payloadprop_defined("detector") && setserdsuffix("_bdllp") &&
+    setserdn(BDLLP_COUNT) && setserdt(BDLLP_TIME) } (0)->
+    ereport.io.pciex.dl.bdllp@pciexrc,
+    ereport.io.pciex.dl.bdllp@pciexrc/PCIEXFNHZ;
+
+prop fault.io.pciex.device-interr-corr@pciexrc/PCIEXFN {
+    payloadprop_defined("detector") && setserdsuffix("_rto") &&
+    setserdn(RTO_COUNT) && setserdt(RTO_TIME) } (0)->
+    ereport.io.pciex.dl.rto@pciexrc,
+    ereport.io.pciex.dl.rto@pciexrc/PCIEXFNHZ;
+
+prop fault.io.pciex.device-interr-corr@pciexrc/PCIEXFN {
+    payloadprop_defined("detector") && setserdsuffix("_rnr") &&
+    setserdn(RNR_COUNT) && setserdt(RNR_TIME) } (0)->
+    ereport.io.pciex.dl.rnr@pciexrc,
+    ereport.io.pciex.dl.rnr@pciexrc/PCIEXFNHZ;
+
+prop fault.io.pciex.device-interr-corr@pciexrc/PCIEXFN {
+    payloadprop_defined("detector") && setserdsuffix("_re") &&
+    setserdn(RE_COUNT) && setserdt(RE_TIME) } (0)->
+    ereport.io.pciex.pl.re@pciexrc,
+    ereport.io.pciex.pl.re@pciexrc/PCIEXFNHZ;
+
+prop fault.io.pciex.device-interr-corr@PCIEXFN/PCIEXFN {
+    !IS_SD(PCIEXFN/PCIEXFN) &&
+    payloadprop_defined("detector") && setserdsuffix("_btlp") &&
+    setserdn(BTLP_COUNT) && setserdt(BTLP_TIME) } (0)->
+    ereport.io.pciex.dl.btlp@PCIEXFN,
+    ereport.io.pciex.dl.btlp@PCIEXFN/PCIEXFNHZ;
+
+prop fault.io.pciex.device-interr-corr@PCIEXFN/PCIEXFN {
+    !IS_SD(PCIEXFN/PCIEXFN) &&
+    payloadprop_defined("detector") && setserdsuffix("_bdllp") &&
+    setserdn(BDLLP_COUNT) && setserdt(BDLLP_TIME) } (0)->
+    ereport.io.pciex.dl.bdllp@PCIEXFN,
+    ereport.io.pciex.dl.bdllp@PCIEXFN/PCIEXFNHZ;
+
+prop fault.io.pciex.device-interr-corr@PCIEXFN/PCIEXFN {
+    !IS_SD(PCIEXFN/PCIEXFN) &&
+    payloadprop_defined("detector") && setserdsuffix("_rto") &&
+    setserdn(RTO_COUNT) && setserdt(RTO_TIME) } (0)->
+    ereport.io.pciex.dl.rto@PCIEXFN,
+    ereport.io.pciex.dl.rto@PCIEXFN/PCIEXFNHZ;
+
+prop fault.io.pciex.device-interr-corr@PCIEXFN/PCIEXFN {
+    !IS_SD(PCIEXFN/PCIEXFN) &&
+    payloadprop_defined("detector") && setserdsuffix("_rnr") &&
+    setserdn(RNR_COUNT) && setserdt(RNR_TIME) } (0)->
+    ereport.io.pciex.dl.rnr@PCIEXFN,
+    ereport.io.pciex.dl.rnr@PCIEXFN/PCIEXFNHZ;
+
+prop fault.io.pciex.device-interr-corr@PCIEXFN/PCIEXFN {
+    !IS_SD(PCIEXFN/PCIEXFN) &&
+    payloadprop_defined("detector") && setserdsuffix("_re") &&
+    setserdn(RE_COUNT) && setserdt(RE_TIME) } (0)->
+    ereport.io.pciex.pl.re@PCIEXFN,
+    ereport.io.pciex.pl.re@PCIEXFN/PCIEXFNHZ;
 
 prop fault.io.pciex.device-interr-unaf@PCIEXFN { IS_SU(PCIEXFN) } (1)->
     error.io.pciex.flt-nf-poisecrc-u@PCIEXFN;
 
 prop fault.io.pciex.device-interr-corr@PCIEXFN { IS_LF(PCIEXFN) } (0)->
-    error.io.pciex.corrlink@pciexbus { setserdsuffix("_corr") };
-
-prop fault.io.pciex.device-interr-corr@PCIEXFN { IS_LF(PCIEXFN) } (0)->
     error.io.device.nf-device@PCIEXFN;
 
 prop fault.io.pciex.device-interr-unaf@PCIEXFN { IS_LF(PCIEXFN) } (1)->
@@ -401,7 +528,6 @@
 
 event error.io.pciex.nr-d@PCIEXFN/PCIEXFN;
 event error.io.pciex.ca-d@PCIEXFN/PCIEXFN;
-event error.io.pciex.corrlink@PCIEXFN/pciexbus;
 event error.io.pciex.fatlink@PCIEXFN/PCIEXFN;
 event error.io.pciex.nf-poisecrc-d@PCIEXFN/PCIEXFN;
 event error.io.pciex.f-poisecrc-d@PCIEXFN/PCIEXFN;
@@ -410,8 +536,35 @@
 prop fault.io.pciex.device-noresp@PCIEXFN { IS_SD(PCIEXFN) } (1)->
     error.io.pciex.nr-d@PCIEXFN/PCIEXFNHZ;
 
-prop fault.io.pciex.device-interr-corr@PCIEXFN { IS_SD(PCIEXFN) } (1)->
-    error.io.pciex.corrlink@PCIEXFN/pciexbus<> { setserdsuffix("_corr") };
+prop fault.io.pciex.device-interr-corr@PCIEXFN { IS_SD(PCIEXFN) &&
+    payloadprop_defined("detector") && setserdsuffix("_btlp") &&
+    setserdn(BTLP_COUNT) && setserdt(BTLP_TIME) } (0)->
+    ereport.io.pciex.dl.btlp@PCIEXFN,
+    ereport.io.pciex.dl.btlp@PCIEXFN/PCIEXFNHZ;
+
+prop fault.io.pciex.device-interr-corr@PCIEXFN { IS_SD(PCIEXFN) &&
+    payloadprop_defined("detector") && setserdsuffix("_bdllp") &&
+    setserdn(BDLLP_COUNT) && setserdt(BDLLP_TIME) } (0)->
+    ereport.io.pciex.dl.bdllp@PCIEXFN,
+    ereport.io.pciex.dl.bdllp@PCIEXFN/PCIEXFNHZ;
+
+prop fault.io.pciex.device-interr-corr@PCIEXFN { IS_SD(PCIEXFN) &&
+    payloadprop_defined("detector") && setserdsuffix("_rto") &&
+    setserdn(RTO_COUNT) && setserdt(RTO_TIME) } (0)->
+    ereport.io.pciex.dl.rto@PCIEXFN,
+    ereport.io.pciex.dl.rto@PCIEXFN/PCIEXFNHZ;
+
+prop fault.io.pciex.device-interr-corr@PCIEXFN { IS_SD(PCIEXFN) &&
+    payloadprop_defined("detector") && setserdsuffix("_rnr") &&
+    setserdn(RNR_COUNT) && setserdt(RNR_TIME) } (0)->
+    ereport.io.pciex.dl.rnr@PCIEXFN,
+    ereport.io.pciex.dl.rnr@PCIEXFN/PCIEXFNHZ;
+
+prop fault.io.pciex.device-interr-corr@PCIEXFN { IS_SD(PCIEXFN) &&
+    payloadprop_defined("detector") && setserdsuffix("_re") &&
+    setserdn(RE_COUNT) && setserdt(RE_TIME) } (0)->
+    ereport.io.pciex.pl.re@PCIEXFN,
+    ereport.io.pciex.pl.re@PCIEXFN/PCIEXFNHZ;
 
 prop fault.io.pciex.device-interr-unaf@PCIEXFN { IS_SD(PCIEXFN) } (1)->
     error.io.pciex.nf-poisecrc-d@PCIEXFN/PCIEXFNHZ;
@@ -440,8 +593,70 @@
     error.io.pciex.flt-nr-u@PCIEXFN,
     error.io.pciex.nr-d@PCIEXFN;
 
-prop fault.io.pciex.bus-linkerr-corr@PCIEXFN (0)->
-    error.io.pciex.corrlink@pciexbus;
+prop fault.io.pciex.bus-linkerr-corr@PCIEXFN/PCIEXFN {
+    !IS_SD(PCIEXFN/PCIEXFN) &&
+    payloadprop_defined("detector") && setserdsuffix("_btlp") &&
+    setserdn(BTLP_COUNT) && setserdt(BTLP_TIME) } (0)->
+    ereport.io.pciex.dl.btlp@PCIEXFN,
+    ereport.io.pciex.dl.btlp@PCIEXFN/PCIEXFNHZ;
+
+prop fault.io.pciex.bus-linkerr-corr@PCIEXFN/PCIEXFN {
+    !IS_SD(PCIEXFN/PCIEXFN) &&
+    payloadprop_defined("detector") && setserdsuffix("_bdllp") &&
+    setserdn(BDLLP_COUNT) && setserdt(BDLLP_TIME) } (0)->
+    ereport.io.pciex.dl.bdllp@PCIEXFN,
+    ereport.io.pciex.dl.bdllp@PCIEXFN/PCIEXFNHZ;
+
+prop fault.io.pciex.bus-linkerr-corr@PCIEXFN/PCIEXFN {
+    !IS_SD(PCIEXFN/PCIEXFN) &&
+    payloadprop_defined("detector") && setserdsuffix("_rto") &&
+    setserdn(RTO_COUNT) && setserdt(RTO_TIME) } (0)->
+    ereport.io.pciex.dl.rto@PCIEXFN,
+    ereport.io.pciex.dl.rto@PCIEXFN/PCIEXFNHZ;
+
+prop fault.io.pciex.bus-linkerr-corr@PCIEXFN/PCIEXFN {
+    !IS_SD(PCIEXFN/PCIEXFN) &&
+    payloadprop_defined("detector") && setserdsuffix("_rnr") &&
+    setserdn(RNR_COUNT) && setserdt(RNR_TIME) } (0)->
+    ereport.io.pciex.dl.rnr@PCIEXFN,
+    ereport.io.pciex.dl.rnr@PCIEXFN/PCIEXFNHZ;
+
+prop fault.io.pciex.bus-linkerr-corr@PCIEXFN/PCIEXFN {
+    !IS_SD(PCIEXFN/PCIEXFN) &&
+    payloadprop_defined("detector") && setserdsuffix("_re") &&
+    setserdn(RE_COUNT) && setserdt(RE_TIME) } (0)->
+    ereport.io.pciex.pl.re@PCIEXFN,
+    ereport.io.pciex.pl.re@PCIEXFN/PCIEXFNHZ;
+
+prop fault.io.pciex.bus-linkerr-corr@pciexrc/PCIEXFN {
+    payloadprop_defined("detector") && setserdsuffix("_btlp") &&
+    setserdn(BTLP_COUNT) && setserdt(BTLP_TIME) } (0)->
+    ereport.io.pciex.dl.btlp@pciexrc,
+    ereport.io.pciex.dl.btlp@pciexrc/PCIEXFNHZ;
+
+prop fault.io.pciex.bus-linkerr-corr@pciexrc/PCIEXFN {
+    payloadprop_defined("detector") && setserdsuffix("_bdllp") &&
+    setserdn(BDLLP_COUNT) && setserdt(BDLLP_TIME) } (0)->
+    ereport.io.pciex.dl.bdllp@pciexrc,
+    ereport.io.pciex.dl.bdllp@pciexrc/PCIEXFNHZ;
+
+prop fault.io.pciex.bus-linkerr-corr@pciexrc/PCIEXFN {
+    payloadprop_defined("detector") && setserdsuffix("_rto") &&
+    setserdn(RTO_COUNT) && setserdt(RTO_TIME) } (0)->
+    ereport.io.pciex.dl.rto@pciexrc,
+    ereport.io.pciex.dl.rto@pciexrc/PCIEXFNHZ;
+
+prop fault.io.pciex.bus-linkerr-corr@pciexrc/PCIEXFN {
+    payloadprop_defined("detector") && setserdsuffix("_rnr") &&
+    setserdn(RNR_COUNT) && setserdt(RNR_TIME) } (0)->
+    ereport.io.pciex.dl.rnr@pciexrc,
+    ereport.io.pciex.dl.rnr@pciexrc/PCIEXFNHZ;
+
+prop fault.io.pciex.bus-linkerr-corr@pciexrc/PCIEXFN {
+    payloadprop_defined("detector") && setserdsuffix("_re") &&
+    setserdn(RE_COUNT) && setserdt(RE_TIME) } (0)->
+    ereport.io.pciex.pl.re@pciexrc,
+    ereport.io.pciex.pl.re@pciexrc/PCIEXFNHZ;
 
 prop fault.io.pciex.bus-linkerr@PCIEXFN { !IS_SD(PCIEXFN) } (0)->
     error.io.pciex.fatlink@PCIEXFN;
@@ -494,9 +709,6 @@
     error.io.pci.nr-pw-d@PCIEXFN/PCIFNHZ,
     error.io.pci.nr-drw-d@PCIEXFN/PCIFNHZ;
 
-prop fault.io.pciex.device-interr-corr@PCIEXFN { IS_BG(PCIEXFN) } (1)->
-    error.io.pciex.corrlink@pciexbus { setserdsuffix("_corr") };
-
 prop fault.io.pciex.device-interr-unaf@PCIEXFN { IS_BG(PCIEXFN) } (1)->
     error.io.pciex.flt-nf-poisecrc-u@PCIEXFN,
     error.io.pci.nf-dpe-d@PCIEXFN/PCIFNHZ;
@@ -661,11 +873,6 @@
 event ereport.io.pci.rta@PCIEXFN{within(5s)};
 event ereport.io.pci.sta@PCIEXFN{within(5s)};
 event ereport.io.pciex.dl.dllp@PCIEXFN{within(5s)};
-event ereport.io.pciex.dl.btlp@PCIEXFN{within(5s)};
-event ereport.io.pciex.dl.bdllp@PCIEXFN{within(5s)};
-event ereport.io.pciex.dl.rto@PCIEXFN{within(5s)};
-event ereport.io.pciex.dl.rnr@PCIEXFN{within(5s)};
-event ereport.io.pciex.pl.re@PCIEXFN{within(5s)};
 event ereport.io.pciex.pl.te@PCIEXFN{within(5s)};
 event ereport.io.pciex.tl.fcp@PCIEXFN{within(5s)};
 event ereport.io.pciex.tl.rof@PCIEXFN{within(5s)};
@@ -677,11 +884,6 @@
 event ereport.io.pciex.tl.uc@PCIEXFN{within(5s)};
 event ereport.io.pciex.tl.cto@PCIEXFN{within(5s)};
 event ereport.io.pciex.dl.dllp@pciexrc{within(5s)};
-event ereport.io.pciex.dl.btlp@pciexrc{within(5s)};
-event ereport.io.pciex.dl.bdllp@pciexrc{within(5s)};
-event ereport.io.pciex.dl.rto@pciexrc{within(5s)};
-event ereport.io.pciex.dl.rnr@pciexrc{within(5s)};
-event ereport.io.pciex.pl.re@pciexrc{within(5s)};
 event ereport.io.pciex.pl.te@pciexrc{within(5s)};
 event ereport.io.pciex.tl.fcp@pciexrc{within(5s)};
 event ereport.io.pciex.tl.rof@pciexrc{within(5s)};
@@ -721,7 +923,7 @@
 	SOURCE_ID_MATCHES_BDF };
 
 prop error.io.pciex.fatal@PCIEXFN (0)->
-    ereport.io.pci.sserr@PCIEXFN1;
+    ereport.io.pci.sserr@PCIEXFN;
 
 prop error.io.pciex.fatal@PCIEXFN { is_under(PCIEXFN1, PCIEXFN) } (0)->
     ereport.io.pci.sserr@PCIEXFN1,
@@ -751,27 +953,6 @@
  * can use may propagations here as these ereports are only seen for these
  * faults.
  */
-prop error.io.pciex.corrlink@pciexbus { !IS_SD(PCIEXFN) } (0)->
-    ereport.io.pciex.dl.btlp@PCIEXFN,
-    ereport.io.pciex.dl.bdllp@PCIEXFN,
-    ereport.io.pciex.dl.rto@PCIEXFN,
-    ereport.io.pciex.dl.rnr@PCIEXFN,
-    ereport.io.pciex.pl.re@PCIEXFN;
-
-prop error.io.pciex.corrlink@PCIEXFN/pciexbus { IS_SD(PCIEXFN) } (0)->
-    ereport.io.pciex.dl.btlp@PCIEXFN,
-    ereport.io.pciex.dl.bdllp@PCIEXFN,
-    ereport.io.pciex.dl.rto@PCIEXFN,
-    ereport.io.pciex.dl.rnr@PCIEXFN,
-    ereport.io.pciex.pl.re@PCIEXFN;
-
-prop error.io.pciex.corrlink@pciexrc/pciexbus (0)->
-    ereport.io.pciex.dl.btlp@pciexrc,
-    ereport.io.pciex.dl.bdllp@pciexrc,
-    ereport.io.pciex.dl.rto@pciexrc,
-    ereport.io.pciex.dl.rnr@pciexrc,
-    ereport.io.pciex.pl.re@pciexrc;
-
 prop error.io.pciex.fatlink@PCIEXFN { !IS_SD(PCIEXFN) } (0)->
     error.io.pciex.fatal@PCIEXFN;
 
--- a/usr/src/cmd/fm/fmd/common/fmd.c	Tue Jun 16 13:11:47 2009 +0530
+++ b/usr/src/cmd/fm/fmd/common/fmd.c	Tue Jun 16 02:49:15 2009 -0700
@@ -36,6 +36,7 @@
 #include <signal.h>
 #include <stdlib.h>
 #include <stdio.h>
+#include <ctype.h>
 #include <door.h>
 
 #include <fmd_conf.h>
@@ -319,6 +320,45 @@
 { "topo.drgen", FMD_TYPE_UINT64, "current topology DR generation number" },
 };
 
+/*
+ * SMBIOS serial numbers can contain characters (particularly ':' and ' ')
+ * that are invalid for the authority and can break FMRI parsing.  We translate
+ * any invalid characters to a safe '-', as well as trimming any leading or
+ * trailing whitespace.  Similarly, '/' can be found in some product names
+ * so we translate that to '-'.
+ */
+void
+fmd_cleanup_auth_str(char *buf, const char *begin)
+{
+	const char *end, *cp;
+	char c;
+	int i;
+
+	end = begin + strlen(begin);
+
+	while (begin < end && isspace(*begin))
+		begin++;
+	while (begin < end && isspace(*(end - 1)))
+		end--;
+
+	if (begin >= end)
+		return;
+
+	cp = begin;
+	for (i = 0; i < MAXNAMELEN - 1; i++) {
+		if (cp >= end)
+			break;
+		c = *cp;
+		if (c == ':' || c == '=' || c == '/' || isspace(c) ||
+		    !isprint(c))
+			buf[i] = '-';
+		else
+			buf[i] = c;
+		cp++;
+	}
+	buf[i] = 0;
+}
+
 void
 fmd_create(fmd_t *dp, const char *arg0, const char *root, const char *conf)
 {
@@ -344,15 +384,15 @@
 	if ((shp = smbios_open(NULL, SMB_VERSION, 0, NULL)) != NULL) {
 		if ((id = smbios_info_system(shp, &s1)) != SMB_ERR &&
 		    smbios_info_common(shp, id, &s2) != SMB_ERR) {
-			(void) strlcpy(_fmd_prod, s2.smbi_product, MAXNAMELEN);
-			(void) strlcpy(_fmd_csn, s2.smbi_serial, MAXNAMELEN);
+			fmd_cleanup_auth_str(_fmd_prod, s2.smbi_product);
+			fmd_cleanup_auth_str(_fmd_csn, s2.smbi_serial);
 		}
 		smbios_close(shp);
 	} else if ((rooth = di_init("/", DINFOPROP)) != DI_NODE_NIL &&
 	    (promh = di_prom_init()) != DI_PROM_HANDLE_NIL) {
 		if (di_prom_prop_lookup_bytes(promh, rooth, "chassis-sn",
 		    (unsigned char **)&bufp) != -1) {
-			(void) strlcpy(_fmd_csn, bufp, MAXNAMELEN);
+			fmd_cleanup_auth_str(_fmd_csn, bufp);
 		}
 	}
 
--- a/usr/src/cmd/fm/fmd/common/fmd_api.c	Tue Jun 16 13:11:47 2009 +0530
+++ b/usr/src/cmd/fm/fmd/common/fmd_api.c	Tue Jun 16 02:49:15 2009 -0700
@@ -2194,9 +2194,13 @@
 fmd_repair_fru(fmd_hdl_t *hdl, const char *fmri)
 {
 	int err;
-
+	fmd_asru_rep_arg_t fara;
+
+	fara.fara_reason = FMD_ASRU_REPAIRED;
+	fara.fara_bywhat = FARA_BY_FRU;
+	fara.fara_rval = &err;
 	fmd_asru_hash_apply_by_fru(fmd.d_asrus, (char *)fmri,
-	    fmd_asru_repaired, &err);
+	    fmd_asru_repaired, &fara);
 }
 
 int
--- a/usr/src/cmd/fm/fmd/common/fmd_asru.c	Tue Jun 16 13:11:47 2009 +0530
+++ b/usr/src/cmd/fm/fmd/common/fmd_asru.c	Tue Jun 16 02:49:15 2009 -0700
@@ -1255,13 +1255,16 @@
 		return;
 
 	/*
-	 * For replaced, verify it has been replaced if we have serial number
+	 * For replaced, verify it has been replaced if we have serial number.
+	 * If not set *farap->fara_rval to FARA_ERR_RSRCNOTR.
 	 */
 	if (farap->fara_reason == FMD_ASRU_REPLACED &&
 	    !(alp->al_flags & FMD_ASRU_PROXY_EXTERNAL) &&
 	    fmd_asru_replacement_state(alp->al_event,
 	    (alp->al_flags & FMD_ASRU_PROXY) ? HC_ONLY_TRUE : HC_ONLY_FALSE) ==
 	    FMD_OBJ_STATE_STILL_PRESENT) {
+		if (farap->fara_rval)
+			*farap->fara_rval = FARA_ERR_RSRCNOTR;
 		return;
 	}
 
@@ -1275,7 +1278,16 @@
 	 * when arg is NULL) as the case will be explicitly repaired anyway.
 	 */
 	if (farap->fara_rval) {
-		*farap->fara_rval = 0;
+		/*
+		 * *farap->fara_rval defaults to FARA_ERR_RSRCNOTF (not found).
+		 * If we find a valid cache entry which we repair then we
+		 * set it to FARA_OK. However we don't want to do this if
+		 * we have already set it to FARA_ERR_RSRCNOTR (not replaced)
+		 * in a previous iteration (see above). So only set it to
+		 * FARA_OK if the current value is still FARA_ERR_RSRCNOTF.
+		 */
+		if (*farap->fara_rval == FARA_ERR_RSRCNOTF)
+			*farap->fara_rval = FARA_OK;
 		if (cleared) {
 			if (alp->al_flags & FMD_ASRU_PROXY)
 				fmd_case_xprt_updated(alp->al_case);
--- a/usr/src/cmd/fm/fmd/common/fmd_asru.h	Tue Jun 16 13:11:47 2009 +0530
+++ b/usr/src/cmd/fm/fmd/common/fmd_asru.h	Tue Jun 16 02:49:15 2009 -0700
@@ -177,6 +177,14 @@
 #define	FARA_BY_LABEL	5
 
 /*
+ * Return values for fmd_asru_repaired. May return "ok" or "not replaced".
+ * If no fault is found we will get default value of "not found".
+ */
+#define	FARA_OK 0
+#define	FARA_ERR_RSRCNOTF 1
+#define	FARA_ERR_RSRCNOTR 2
+
+/*
  * The following structures are used to pass arguments to the corresponding
  * function when walking the resource cache by case etc.
  */
--- a/usr/src/cmd/fm/fmd/common/fmd_rpc_adm.c	Tue Jun 16 13:11:47 2009 +0530
+++ b/usr/src/cmd/fm/fmd/common/fmd_rpc_adm.c	Tue Jun 16 02:49:15 2009 -0700
@@ -471,9 +471,10 @@
 		*errp = FMD_ADM_ERR_PERM;
 	else {
 		fmd_asru_rep_arg_t fara;
+		int err = FARA_ERR_RSRCNOTF;
 
 		fara.fara_reason = reason;
-		fara.fara_rval = errp;
+		fara.fara_rval = &err;
 		fara.fara_uuid = uuid;
 		fara.fara_bywhat = FARA_BY_ASRU;
 		fmd_asru_hash_apply_by_asru(fmd.d_asrus, name,
@@ -487,6 +488,10 @@
 		fara.fara_bywhat = FARA_BY_RSRC;
 		fmd_asru_hash_apply_by_rsrc(fmd.d_asrus, name,
 		    fmd_asru_repaired, &fara);
+		if (err == FARA_ERR_RSRCNOTR)
+			*errp = FMD_ADM_ERR_RSRCNOTR;
+		else if (err == FARA_OK)
+			*errp = 0;
 	}
 }
 
--- a/usr/src/cmd/fm/fmd/common/fmd_rpc_adm.x	Tue Jun 16 13:11:47 2009 +0530
+++ b/usr/src/cmd/fm/fmd/common/fmd_rpc_adm.x	Tue Jun 16 02:49:15 2009 -0700
@@ -20,12 +20,10 @@
  */
 
 /*
- * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
-%#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 %#include <fm/fmd_api.h>
 
 enum fmd_adm_error {
@@ -48,7 +46,8 @@
 	FMD_ADM_ERR_CASESRCH,
 	FMD_ADM_ERR_CASEOPEN,
 	FMD_ADM_ERR_XPRTSRCH,
-	FMD_ADM_ERR_CASEXPRT
+	FMD_ADM_ERR_CASEXPRT,
+	FMD_ADM_ERR_RSRCNOTR
 };
 
 struct fmd_rpc_modstat {
--- a/usr/src/cmd/fm/fmd/common/fmd_xprt.c	Tue Jun 16 13:11:47 2009 +0530
+++ b/usr/src/cmd/fm/fmd/common/fmd_xprt.c	Tue Jun 16 02:49:15 2009 -0700
@@ -1233,7 +1233,7 @@
 				got_hc_rsrc = 1;
 				if (xip->xi_flags & FMD_XPRT_EXTERNAL)
 					continue;
-				if (topo_fmri_present(thp, asru, &err) == 0)
+				if (topo_fmri_present(thp, asru, &err) != 0)
 					got_present_rsrc = 1;
 				if (topo_fmri_asru(thp, asru, &asrua[i],
 				    &err) == 0) {
@@ -1249,7 +1249,7 @@
 				got_hc_rsrc = 1;
 				if (xip->xi_flags & FMD_XPRT_EXTERNAL)
 					continue;
-				if (topo_fmri_present(thp, rsrc, &err) == 0)
+				if (topo_fmri_present(thp, rsrc, &err) != 0)
 					got_present_rsrc = 1;
 				if (topo_fmri_asru(thp, rsrc, &asrua[i],
 				    &err) == 0) {
--- a/usr/src/cmd/fm/modules/common/eversholt/ipath.c	Tue Jun 16 13:11:47 2009 +0530
+++ b/usr/src/cmd/fm/modules/common/eversholt/ipath.c	Tue Jun 16 02:49:15 2009 -0700
@@ -19,7 +19,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  *
  * ipath.c -- instanced pathname module
@@ -28,8 +28,6 @@
  * stored in a fairly compact format.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <stdio.h>
 #include <string.h>
 #include "alloc.h"
@@ -136,6 +134,15 @@
 		return (-1);
 }
 
+/*
+ * The following functions are only used in the "itree_create_dummy()" first
+ * pass at itree creation. ipath_dummy() creates paths used in the itree (see
+ * comment above add_event_dummy() for details). ipath_for_usednames() creates
+ * a different set of paths using the full names from the propagations. These
+ * are only used by ipath_dummy_lut() in order to set up the Usednames lut
+ * correctly, which in turn allows conf propteries on any alement in those
+ * names to be used in constraints.
+ */
 struct lut *Usednames;
 
 void
@@ -143,13 +150,13 @@
 {
 	const struct ipath *ipp;
 
-	ipp = arrowp->head->myevent->ipp;
+	ipp = arrowp->head->myevent->ipp_un;
 	while (ipp->s != NULL) {
 		Usednames = lut_add(Usednames, (void *)ipp->s,
 		    (void *)ipp->s, NULL);
 		ipp++;
 	}
-	ipp = arrowp->tail->myevent->ipp;
+	ipp = arrowp->tail->myevent->ipp_un;
 	while (ipp->s != NULL) {
 		Usednames = lut_add(Usednames, (void *)ipp->s,
 		    (void *)ipp->s, NULL);
@@ -183,6 +190,32 @@
 	return (ret);
 }
 
+struct ipath *
+ipath_for_usednames(struct node *np)
+{
+	struct ipath *ret, *ipp;
+	int i = 0;
+	struct node *np2;
+
+	for (np2 = np; np2 != NULL; np2 = np2->u.name.next)
+		i++;
+	ret = MALLOC(sizeof (*ret) * (i + 1));
+	for (i = 0, np2 = np; np2 != NULL; np2 = np2->u.name.next) {
+		ret[i].s = np2->u.name.s;
+		ret[i++].i = 0;
+	}
+	ret[i].s = NULL;
+	if ((ipp = lut_lookup(Ipaths, (void *)ret,
+	    (lut_cmp)ipath_cmp)) != NULL) {
+		FREE(ret);
+		return (ipp);
+	}
+	Ipaths = lut_add(Ipaths, (void *)ret, (void *)ret, (lut_cmp)ipath_cmp);
+	stats_counter_bump(Nipath);
+	stats_counter_add(Nbytes, (i + 1) * sizeof (struct ipath));
+	return (ret);
+}
+
 /*
  * ipath -- find instanced path in cache, or add it if necessary
  */
--- a/usr/src/cmd/fm/modules/common/eversholt/itree.c	Tue Jun 16 13:11:47 2009 +0530
+++ b/usr/src/cmd/fm/modules/common/eversholt/itree.c	Tue Jun 16 02:49:15 2009 -0700
@@ -20,7 +20,7 @@
  */
 
 /*
- * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  *
  * itree.c -- instance tree creation and manipulation
@@ -28,8 +28,6 @@
  * this module provides the instance tree
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <stdio.h>
 #include <ctype.h>
 #include <string.h>
@@ -1303,9 +1301,12 @@
 	struct event *ret;
 	struct event searchevent;	/* just used for searching */
 	extern struct ipath *ipath_dummy(struct node *, struct ipath *);
+	struct ipath *ipp_un;
+	extern struct ipath *ipath_for_usednames(struct node *);
 
 	searchevent.enode = np;
 	searchevent.ipp = ipath_dummy(np->u.event.epname, (struct ipath *)ipp);
+	ipp_un = ipath_for_usednames(np->u.event.epname);
 	if ((ret = lut_lookup(Ninfo.lut, (void *)&searchevent,
 	    (lut_cmp)event_cmp)) != NULL)
 		return (ret);
@@ -1315,6 +1316,7 @@
 	ret->t = np->u.event.ename->u.name.t;
 	ret->enode = np;
 	ret->ipp = searchevent.ipp;
+	ret->ipp_un = ipp_un;
 	Ninfo.lut = lut_add(Ninfo.lut, (void *)ret, (void *)ret,
 	    (lut_cmp)event_cmp);
 	return (ret);
--- a/usr/src/cmd/fm/modules/common/eversholt/itree.h	Tue Jun 16 13:11:47 2009 +0530
+++ b/usr/src/cmd/fm/modules/common/eversholt/itree.h	Tue Jun 16 02:49:15 2009 -0700
@@ -19,7 +19,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  *
  * itree.h -- public definitions for itree module
@@ -29,8 +29,6 @@
 #ifndef	_EFT_ITREE_H
 #define	_EFT_ITREE_H
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #ifdef	__cplusplus
 extern "C" {
 #endif
@@ -82,6 +80,7 @@
 	nvlist_t *nvp;			/* payload nvp for ereports */
 	struct node *enode;		/* event node in parse tree */
 	const struct ipath *ipp;	/* instanced version of event */
+	const struct ipath *ipp_un;	/* full version for Usednames */
 	struct lut *props;		/* instanced version of nvpairs */
 	struct lut *payloadprops;	/* nvpairs for problem payload */
 	struct lut *serdprops;		/* nvpairs for dynamic serd args */
--- a/usr/src/lib/fm/libfmd_adm/common/fmd_adm.c	Tue Jun 16 13:11:47 2009 +0530
+++ b/usr/src/lib/fm/libfmd_adm/common/fmd_adm.c	Tue Jun 16 02:49:15 2009 -0700
@@ -20,12 +20,10 @@
  */
 
 /*
- * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <strings.h>
 #include <stdlib.h>
 #include <netdir.h>
@@ -140,6 +138,8 @@
 		return ("specified transport ID is invalid or has been closed");
 	case FMD_ADM_ERR_CASEXPRT:
 		return ("specified UUID is owned by a different fault manager");
+	case FMD_ADM_ERR_RSRCNOTR:
+		return ("specified resource has not been replaced");
 	default:
 		return ("unknown fault manager error");
 	}
--- a/usr/src/lib/fm/topo/libtopo/common/hc.c	Tue Jun 16 13:11:47 2009 +0530
+++ b/usr/src/lib/fm/topo/libtopo/common/hc.c	Tue Jun 16 02:49:15 2009 -0700
@@ -1732,19 +1732,19 @@
 	topo_version_t ha_method_ver;
 };
 
-static boolean_t
+static int
 hc_auth_changed(nvlist_t *nva, nvlist_t *nvb, const char *propname)
 {
 	char *stra, *strb;
 
 	if (nvlist_lookup_string(nva, propname, &stra) != 0 ||
 	    nvlist_lookup_string(nvb, propname, &strb) != 0)
-		return (B_FALSE);
+		return (FMD_OBJ_STATE_UNKNOWN);
 
 	if (strcmp(stra, strb) != 0)
-		return (B_TRUE);
+		return (FMD_OBJ_STATE_REPLACED);
 	else
-		return (B_FALSE);
+		return (FMD_OBJ_STATE_STILL_PRESENT);
 }
 
 static int
@@ -1781,9 +1781,9 @@
 
 		present = B_TRUE;
 		if (hc_auth_changed(hap->ha_fmri, rsrc,
-		    FM_FMRI_HC_SERIAL_ID) ||
+		    FM_FMRI_HC_SERIAL_ID) == FMD_OBJ_STATE_REPLACED ||
 		    hc_auth_changed(hap->ha_fmri, rsrc,
-		    FM_FMRI_HC_PART)) {
+		    FM_FMRI_HC_PART) == FMD_OBJ_STATE_REPLACED) {
 			present = B_FALSE;
 		}
 		nvlist_free(rsrc);
@@ -1845,6 +1845,8 @@
 	int err;
 	struct hc_args *hap = (struct hc_args *)pdata;
 	uint32_t present = 0;
+	nvlist_t *rsrc;
+	uint32_t rval = FMD_OBJ_STATE_UNKNOWN;
 
 	/*
 	 * check with the enumerator that created this FMRI
@@ -1854,28 +1856,65 @@
 	    TOPO_METH_REPLACED_VERSION, hap->ha_fmri, &hap->ha_nvl,
 	    &err) < 0) {
 		/*
-		 * enumerator didn't provide "replaced" method - so
+		 * If the method exists but failed for some other
+		 * reason, propagate the error as making any decision
+		 * over presence is impossible.
+		 */
+		if (err != ETOPO_METHOD_NOTSUP)
+			return (err);
+
+		/*
+		 * Enumerator didn't provide "replaced" method -
 		 * try "present" method
 		 */
 		if (topo_method_invoke(node, TOPO_METH_PRESENT,
 		    TOPO_METH_PRESENT_VERSION, hap->ha_fmri, &hap->ha_nvl,
 		    &err) < 0) {
-			/* no present method either - assume present */
-			present = 1;
+			/*
+			 * If the method exists but failed for some other
+			 * reason, propagate the error as making any decision
+			 * over presence is impossible.
+			 */
+			if (err != ETOPO_METHOD_NOTSUP)
+				return (err);
+
+			/*
+			 * Enumerator didn't provide "present" method either -
+			 * so check the authority information.  If the part id
+			 * or serial number doesn't match, then it isn't the
+			 * same FMRI. Otherwise, if we have a serial number and
+			 * it hasn't changed, then assume it is the same FMRI.
+			 */
+			if (topo_node_resource(node, &rsrc, &err) != 0)
+				return (err);
+			rval = hc_auth_changed(hap->ha_fmri, rsrc,
+			    FM_FMRI_HC_PART);
+			if (rval != FMD_OBJ_STATE_REPLACED)
+				rval = hc_auth_changed(hap->ha_fmri, rsrc,
+				    FM_FMRI_HC_SERIAL_ID);
+			nvlist_free(rsrc);
 			if (topo_mod_nvalloc(mod, &hap->ha_nvl,
 			    NV_UNIQUE_NAME) != 0)
+				return (EMOD_NOMEM);
+			if (nvlist_add_uint32(hap->ha_nvl,
+			    TOPO_METH_REPLACED_RET, rval) != 0) {
+				nvlist_free(hap->ha_nvl);
+				hap->ha_nvl = NULL;
 				return (ETOPO_PROP_NVL);
+			}
 		} else {
 			(void) nvlist_lookup_uint32(hap->ha_nvl,
 			    TOPO_METH_PRESENT_RET, &present);
 			(void) nvlist_remove(hap->ha_nvl,
 			    TOPO_METH_PRESENT_RET, DATA_TYPE_UINT32);
-		}
-		if (nvlist_add_uint32(hap->ha_nvl, TOPO_METH_REPLACED_RET,
-		    present ? FMD_OBJ_STATE_UNKNOWN :
-		    FMD_OBJ_STATE_NOT_PRESENT) != 0) {
-			nvlist_free(hap->ha_nvl);
-			return (ETOPO_PROP_NVL);
+			if (nvlist_add_uint32(hap->ha_nvl,
+			    TOPO_METH_REPLACED_RET,
+			    present ? FMD_OBJ_STATE_UNKNOWN :
+			    FMD_OBJ_STATE_NOT_PRESENT) != 0) {
+				nvlist_free(hap->ha_nvl);
+				hap->ha_nvl = NULL;
+				return (ETOPO_PROP_NVL);
+			}
 		}
 	}
 	return (0);
--- a/usr/src/lib/fm/topo/libtopo/common/topo_fmri.c	Tue Jun 16 13:11:47 2009 +0530
+++ b/usr/src/lib/fm/topo/libtopo/common/topo_fmri.c	Tue Jun 16 02:49:15 2009 -0700
@@ -20,7 +20,7 @@
  */
 
 /*
- * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -518,6 +518,19 @@
 	nvlist_t *prop = NULL;
 	char *sp;
 
+	/*
+	 * If there is a serial id in the resource fmri, then use that.
+	 * Otherwise fall back to looking for a serial id property in the
+	 * protocol group.
+	 */
+	if (nvlist_lookup_string(nvl, FM_FMRI_HC_SERIAL_ID, &sp) == 0) {
+		if ((*serial = topo_hdl_strdup(thp, sp)) == NULL)
+			return (set_error(thp, ETOPO_PROP_NOMEM, err,
+			    "topo_fmri_serial", prop));
+		else
+			return (0);
+	}
+
 	if (fmri_prop(thp, nvl, TOPO_PGROUP_PROTOCOL, FM_FMRI_HC_SERIAL_ID,
 	    NULL, &prop, err) < 0)
 		return (set_error(thp, *err, err, "topo_fmri_serial", NULL));
--- a/usr/src/lib/fm/topo/libtopo/common/topo_mod.c	Tue Jun 16 13:11:47 2009 +0530
+++ b/usr/src/lib/fm/topo/libtopo/common/topo_mod.c	Tue Jun 16 02:49:15 2009 -0700
@@ -709,7 +709,7 @@
 	char csn[MAXNAMELEN];
 	di_prom_handle_t promh = DI_PROM_HANDLE_NIL;
 	di_node_t rooth = DI_NODE_NIL;
-	char *bufp, *str;
+	char *bufp;
 	smbios_hdl_t *shp;
 	smbios_system_t s1;
 	smbios_info_t s2;
@@ -725,12 +725,6 @@
 		    strcmp(csn, SMB_DEFAULT2) == 0)
 			return (NULL);
 
-		/*
-		 * Terminate CSN at the first white space
-		 */
-		if ((str = strchr(csn, ' ')) != NULL)
-			*str = '\0';
-
 	} else if ((rooth = topo_mod_devinfo(mod)) != DI_NODE_NIL &&
 	    (promh = topo_mod_prominfo(mod)) != DI_PROM_HANDLE_NIL) {
 		if (di_prom_prop_lookup_bytes(promh, rooth, "chassis-sn",
--- a/usr/src/lib/fm/topo/libtopo/common/topo_snap.c	Tue Jun 16 13:11:47 2009 +0530
+++ b/usr/src/lib/fm/topo/libtopo/common/topo_snap.c	Tue Jun 16 02:49:15 2009 -0700
@@ -208,8 +208,7 @@
 		topo_dprintf(thp, TOPO_DBG_ERR,
 		    "failed to load builtin modules: %s\n",
 		    topo_hdl_errmsg(thp));
-		topo_close(thp);
-		return (NULL);
+		return (set_open_errno(thp, errp, topo_hdl_errno(thp)));
 	}
 
 	return (thp);
--- a/usr/src/lib/fm/topo/libtopo/common/zfs.c	Tue Jun 16 13:11:47 2009 +0530
+++ b/usr/src/lib/fm/topo/libtopo/common/zfs.c	Tue Jun 16 02:49:15 2009 -0700
@@ -81,7 +81,8 @@
 		    "%s\n", topo_mod_errmsg(mod));
 		return (-1); /* mod errno already set */
 	}
-	g_zfs = libzfs_init();
+	if (!g_zfs)
+		g_zfs = libzfs_init();
 
 	return (0);
 }
--- a/usr/src/lib/fm/topo/modules/i86pc/chip/chip_subr.c	Tue Jun 16 13:11:47 2009 +0530
+++ b/usr/src/lib/fm/topo/modules/i86pc/chip/chip_subr.c	Tue Jun 16 02:49:15 2009 -0700
@@ -20,7 +20,7 @@
  */
 
 /*
- * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -365,6 +365,7 @@
 fmri_replaced(topo_mod_t *mod, tnode_t *node, nvlist_t *unum, int *errp)
 {
 	tnode_t *dimmnode;
+	nvlist_t *resource;
 	int rc, err;
 	char *old_serial, *curr_serial;
 	fmd_agent_hdl_t *hdl;
@@ -393,9 +394,24 @@
 	/*
 	 * If the current serial number is available for the DIMM that this rank
 	 * belongs to, it will be accessible as a property on the parent (dimm)
-	 * node.
+	 * node. If there is a serial id in the resource fmri, then use that.
+	 * Otherwise fall back to looking for a serial id property in the
+	 * protocol group.
 	 */
 	dimmnode = topo_node_parent(node);
+	if (topo_node_resource(dimmnode, &resource, &err) != -1) {
+		if (nvlist_lookup_string(resource, FM_FMRI_HC_SERIAL_ID,
+		    &curr_serial) == 0) {
+			if (strcmp(old_serial, curr_serial) != 0) {
+				nvlist_free(resource);
+				return (FMD_OBJ_STATE_REPLACED);
+			} else {
+				nvlist_free(resource);
+				return (FMD_OBJ_STATE_STILL_PRESENT);
+			}
+		}
+		nvlist_free(resource);
+	}
 	if (topo_prop_get_string(dimmnode, TOPO_PGROUP_PROTOCOL,
 	    FM_FMRI_HC_SERIAL_ID, &curr_serial, &err) != 0) {
 		if (err == ETOPO_PROP_NOENT) {