Message ID | 1498316097.31581.85.camel@kernel.crashing.org |
---|---|
State | Accepted |
Headers | show |
Benjamin Herrenschmidt <benh@kernel.crashing.org> writes: > When the LID is absent, we fail early with an error from > start_preload_resource. In that case, capp_ucode_info.load_result > isn't set properly causing a subsequent capp_lid_download() to > call wait_for_resource_loaded() on something that isn't being > loaded, thus hanging. > > Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> > --- > hw/capp.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) This bug has probably existed forever... and it doesn't help that my ZZ system isn't exactly in the mood for behaving (ever) :( Merged to master as of 8019007766da1a09b0280d37ab9e5aa4df396e7f-- Stewart Smith OPAL Architect, IBM.
diff --git a/hw/capp.c b/hw/capp.c index 28a0a4e..eeaa4ac 100644 --- a/hw/capp.c +++ b/hw/capp.c @@ -100,8 +100,10 @@ int preload_capp_ucode(void) capp_ucode_info.lid, &capp_ucode_info.size); - if (ret != OPAL_SUCCESS) + if (ret != OPAL_SUCCESS) { prerror("CAPI: Failed to preload resource %d\n", ret); + capp_ucode_info.load_result = ret; + } end: return ret;
When the LID is absent, we fail early with an error from start_preload_resource. In that case, capp_ucode_info.load_result isn't set properly causing a subsequent capp_lid_download() to call wait_for_resource_loaded() on something that isn't being loaded, thus hanging. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> --- hw/capp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)