--- zzzz-none-000/linux-2.6.19.2/drivers/infiniband/hw/ehca/ehca_irq.c 2007-01-10 19:10:37.000000000 +0000 +++ davinci-8020-5504/linux-2.6.19.2/drivers/infiniband/hw/ehca/ehca_irq.c 2007-01-11 07:38:19.000000000 +0000 @@ -45,7 +45,6 @@ #include "ehca_tools.h" #include "hcp_if.h" #include "hipz_fns.h" -#include "ipz_pt_fn.h" #define EQE_COMPLETION_EVENT EHCA_BMASK_IBM(1,1) #define EQE_CQ_QP_NUMBER EHCA_BMASK_IBM(8,31) @@ -138,36 +137,38 @@ u64 *rblock; unsigned long block_count; - rblock = ehca_alloc_fw_ctrlblock(); + rblock = kzalloc(H_CB_ALIGNMENT, GFP_KERNEL); if (!rblock) { ehca_err(&shca->ib_device, "Cannot allocate rblock memory."); ret = -ENOMEM; goto error_data1; } - /* rblock must be 4K aligned and should be 4K large */ ret = hipz_h_error_data(shca->ipz_hca_handle, resource, rblock, &block_count); - if (ret == H_R_STATE) + if (ret == H_R_STATE) { ehca_err(&shca->ib_device, "No error data is available: %lx.", resource); + } else if (ret == H_SUCCESS) { int length; length = EHCA_BMASK_GET(ERROR_DATA_LENGTH, rblock[0]); - if (length > EHCA_PAGESIZE) - length = EHCA_PAGESIZE; + if (length > PAGE_SIZE) + length = PAGE_SIZE; print_error_data(shca, data, rblock, length); - } else + } + else { ehca_err(&shca->ib_device, "Error data could not be fetched: %lx", resource); + } - ehca_free_fw_ctrlblock(rblock); + kfree(rblock); error_data1: return ret;