diff -Naur openhpi-repo/src/plugin.c openhpi-repo-res_fail/src/plugin.c
--- openhpi-repo/src/plugin.c	2008-10-29 23:42:09.000000000 +0530
+++ openhpi-repo-res_fail/src/plugin.c	2008-10-29 23:50:37.000000000 +0530
@@ -745,6 +745,8 @@
                                                 "oh_set_resource_tag");
         (*abi)->set_resource_severity     = lt_dlsym(plugin->dl_handle,
                                                 "oh_set_resource_severity");
+        (*abi)->resource_failed_remove    = lt_dlsym(plugin->dl_handle,
+                                                "oh_set_resource_failed_remove");
         (*abi)->get_el_info               = lt_dlsym(plugin->dl_handle,
                                                 "oh_get_el_info");
         (*abi)->get_el_caps               = lt_dlsym(plugin->dl_handle,
diff -Naur openhpi-repo/src/safhpi.c openhpi-repo-res_fail/src/safhpi.c
--- openhpi-repo/src/safhpi.c	2008-10-29 23:54:05.000000000 +0530
+++ openhpi-repo-res_fail/src/safhpi.c	2008-10-29 23:53:13.000000000 +0530
@@ -608,6 +608,8 @@
         SaHpiHsStateT hsstate;
         SaErrorT (*get_hotswap_state)(void *hnd, SaHpiResourceIdT rid,
                                       SaHpiHsStateT *state);
+        SaErrorT (*resource_failed_remove)(void *hnd, SaHpiResourceIdT rid);
+                                     
 
         OH_CHECK_INIT_STATE(SessionId);
         OH_GET_DID(SessionId, did);
@@ -633,6 +635,16 @@
         OH_HANDLER_GET(d, ResourceId, h);        
         oh_release_domain(d);
         hid = h->id;
+
+       	resource_failed_remove = h ? h->abi->resource_failed_remove : NULL;
+        if (resource_failed_remove) {
+	        error = resource_failed_remove(h->hnd, ResourceId);
+       	        oh_release_handler(h);
+	        return error;
+       	}
+
+	/* If the resource_failed_remove ABI is not defined, then remove the
+	 * resource from rptcache */
         if (rpte->ResourceCapabilities & SAHPI_CAPABILITY_MANAGED_HOTSWAP) {
         	get_hotswap_state = h ? h->abi->get_hotswap_state : NULL;
 	        if (!get_hotswap_state) {
