Hello,
SaHpiResourceFailedRemove() API removes the failed resource entry (rpt,
rdr) on user request.
This API (src/safhpi.c +596) checks the FRU capability and tries to get
the hotswap state. If the resource supports simplified hotswap model,
then FRU capability will be set and MANAGED_HOTSWAP capability will not
be set. So, the get_hotswap() abi will fail for these resources.
Hence, saHpiResourceFailedRemove() fails for resources which supports
simplified hotswap model.
The attached patch resolves this issue.
This problem is tracked in openhpi tracker as bug #2188639.
Regards,
PG
--- safhpi.c. 2008-10-23 11:51:06.000000000 +0530
+++ safhpi.c 2008-10-23 11:51:16.000000000 +0530
@@ -632,16 +632,19 @@
saved_res = *rpte;
OH_HANDLER_GET(d, ResourceId, h);
oh_release_domain(d);
- get_hotswap_state = h ? h->abi->get_hotswap_state : NULL;
- if (!get_hotswap_state) {
- oh_release_handler(h);
- return SA_ERR_HPI_INTERNAL_ERROR;
- }
-
- error = get_hotswap_state(h->hnd, ResourceId, &hsstate);
hid = h->id;
- oh_release_handler(h);
- if (error) return error;
+ if (rpte->ResourceCapabilities & SAHPI_CAPABILITY_MANAGED_HOTSWAP) {
+ get_hotswap_state = h ? h->abi->get_hotswap_state : NULL;
+ if (!get_hotswap_state) {
+ oh_release_handler(h);
+ return SA_ERR_HPI_INTERNAL_ERROR;
+ }
+
+ error = get_hotswap_state(h->hnd, ResourceId, &hsstate);
+ oh_release_handler(h);
+ if (error) return error;
+ } else
+ hsstate = SAHPI_HS_STATE_ACTIVE;
e = g_malloc0(sizeof(struct oh_event));
e->hid = hid;
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Openhpi-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openhpi-devel