ehea: Use the standard logging functions
Remove ehea_error, ehea_info and ehea_debug macros. Use pr_fmt, pr_<level>, netdev_<level> and netif_<level> as appropriate. Fix messages to use trailing "\n", some messages had an extra one as the old ehea_<level> macros added a trailing "\n". Coalesced long format strings. Uncompiled/untested. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Breno Leitao<leitao@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
7903264402
commit
539995d186
|
@ -130,19 +130,6 @@
|
||||||
|
|
||||||
/* utility functions */
|
/* utility functions */
|
||||||
|
|
||||||
#define ehea_info(fmt, args...) \
|
|
||||||
printk(KERN_INFO DRV_NAME ": " fmt "\n", ## args)
|
|
||||||
|
|
||||||
#define ehea_error(fmt, args...) \
|
|
||||||
printk(KERN_ERR DRV_NAME ": Error in %s: " fmt "\n", __func__, ## args)
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
#define ehea_debug(fmt, args...) \
|
|
||||||
printk(KERN_DEBUG DRV_NAME ": " fmt, ## args)
|
|
||||||
#else
|
|
||||||
#define ehea_debug(fmt, args...) do {} while (0)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void ehea_dump(void *adr, int len, char *msg);
|
void ehea_dump(void *adr, int len, char *msg);
|
||||||
|
|
||||||
#define EHEA_BMASK(pos, length) (((pos) << 16) + (length))
|
#define EHEA_BMASK(pos, length) (((pos) << 16) + (length))
|
||||||
|
|
|
@ -26,6 +26,8 @@
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||||
|
|
||||||
#include "ehea.h"
|
#include "ehea.h"
|
||||||
#include "ehea_phyp.h"
|
#include "ehea_phyp.h"
|
||||||
|
|
||||||
|
@ -118,10 +120,10 @@ doit:
|
||||||
ret = ehea_set_portspeed(port, sp);
|
ret = ehea_set_portspeed(port, sp);
|
||||||
|
|
||||||
if (!ret)
|
if (!ret)
|
||||||
ehea_info("%s: Port speed successfully set: %dMbps "
|
netdev_info(dev,
|
||||||
"%s Duplex",
|
"Port speed successfully set: %dMbps %s Duplex\n",
|
||||||
port->netdev->name, port->port_speed,
|
port->port_speed,
|
||||||
port->full_duplex == 1 ? "Full" : "Half");
|
port->full_duplex == 1 ? "Full" : "Half");
|
||||||
out:
|
out:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -134,10 +136,10 @@ static int ehea_nway_reset(struct net_device *dev)
|
||||||
ret = ehea_set_portspeed(port, EHEA_SPEED_AUTONEG);
|
ret = ehea_set_portspeed(port, EHEA_SPEED_AUTONEG);
|
||||||
|
|
||||||
if (!ret)
|
if (!ret)
|
||||||
ehea_info("%s: Port speed successfully set: %dMbps "
|
netdev_info(port->netdev,
|
||||||
"%s Duplex",
|
"Port speed successfully set: %dMbps %s Duplex\n",
|
||||||
port->netdev->name, port->port_speed,
|
port->port_speed,
|
||||||
port->full_duplex == 1 ? "Full" : "Half");
|
port->full_duplex == 1 ? "Full" : "Half");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -26,6 +26,8 @@
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||||
|
|
||||||
#include "ehea_phyp.h"
|
#include "ehea_phyp.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -67,12 +69,11 @@ static long ehea_plpar_hcall_norets(unsigned long opcode,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ret < H_SUCCESS)
|
if (ret < H_SUCCESS)
|
||||||
ehea_error("opcode=%lx ret=%lx"
|
pr_err("opcode=%lx ret=%lx"
|
||||||
" arg1=%lx arg2=%lx arg3=%lx arg4=%lx"
|
" arg1=%lx arg2=%lx arg3=%lx arg4=%lx"
|
||||||
" arg5=%lx arg6=%lx arg7=%lx ",
|
" arg5=%lx arg6=%lx arg7=%lx\n",
|
||||||
opcode, ret,
|
opcode, ret,
|
||||||
arg1, arg2, arg3, arg4, arg5,
|
arg1, arg2, arg3, arg4, arg5, arg6, arg7);
|
||||||
arg6, arg7);
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -114,19 +115,18 @@ static long ehea_plpar_hcall9(unsigned long opcode,
|
||||||
&& (((cb_cat == H_PORT_CB4) && ((arg3 == H_PORT_CB4_JUMBO)
|
&& (((cb_cat == H_PORT_CB4) && ((arg3 == H_PORT_CB4_JUMBO)
|
||||||
|| (arg3 == H_PORT_CB4_SPEED))) || ((cb_cat == H_PORT_CB7)
|
|| (arg3 == H_PORT_CB4_SPEED))) || ((cb_cat == H_PORT_CB7)
|
||||||
&& (arg3 == H_PORT_CB7_DUCQPN)))))
|
&& (arg3 == H_PORT_CB7_DUCQPN)))))
|
||||||
ehea_error("opcode=%lx ret=%lx"
|
pr_err("opcode=%lx ret=%lx"
|
||||||
" arg1=%lx arg2=%lx arg3=%lx arg4=%lx"
|
" arg1=%lx arg2=%lx arg3=%lx arg4=%lx"
|
||||||
" arg5=%lx arg6=%lx arg7=%lx arg8=%lx"
|
" arg5=%lx arg6=%lx arg7=%lx arg8=%lx"
|
||||||
" arg9=%lx"
|
" arg9=%lx"
|
||||||
" out1=%lx out2=%lx out3=%lx out4=%lx"
|
" out1=%lx out2=%lx out3=%lx out4=%lx"
|
||||||
" out5=%lx out6=%lx out7=%lx out8=%lx"
|
" out5=%lx out6=%lx out7=%lx out8=%lx"
|
||||||
" out9=%lx",
|
" out9=%lx\n",
|
||||||
opcode, ret,
|
opcode, ret,
|
||||||
arg1, arg2, arg3, arg4, arg5,
|
arg1, arg2, arg3, arg4, arg5,
|
||||||
arg6, arg7, arg8, arg9,
|
arg6, arg7, arg8, arg9,
|
||||||
outs[0], outs[1], outs[2], outs[3],
|
outs[0], outs[1], outs[2], outs[3], outs[4],
|
||||||
outs[4], outs[5], outs[6], outs[7],
|
outs[5], outs[6], outs[7], outs[8]);
|
||||||
outs[8]);
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -515,7 +515,7 @@ u64 ehea_h_register_rpage_mr(const u64 adapter_handle, const u64 mr_handle,
|
||||||
const u64 log_pageaddr, const u64 count)
|
const u64 log_pageaddr, const u64 count)
|
||||||
{
|
{
|
||||||
if ((count > 1) && (log_pageaddr & ~PAGE_MASK)) {
|
if ((count > 1) && (log_pageaddr & ~PAGE_MASK)) {
|
||||||
ehea_error("not on pageboundary");
|
pr_err("not on pageboundary\n");
|
||||||
return H_PARAMETER;
|
return H_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,8 @@
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||||
|
|
||||||
#include <linux/mm.h>
|
#include <linux/mm.h>
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
#include "ehea.h"
|
#include "ehea.h"
|
||||||
|
@ -45,7 +47,7 @@ static void *hw_qpageit_get_inc(struct hw_queue *queue)
|
||||||
queue->current_q_offset -= queue->pagesize;
|
queue->current_q_offset -= queue->pagesize;
|
||||||
retvalue = NULL;
|
retvalue = NULL;
|
||||||
} else if (((u64) retvalue) & (EHEA_PAGESIZE-1)) {
|
} else if (((u64) retvalue) & (EHEA_PAGESIZE-1)) {
|
||||||
ehea_error("not on pageboundary");
|
pr_err("not on pageboundary\n");
|
||||||
retvalue = NULL;
|
retvalue = NULL;
|
||||||
}
|
}
|
||||||
return retvalue;
|
return retvalue;
|
||||||
|
@ -58,15 +60,15 @@ static int hw_queue_ctor(struct hw_queue *queue, const u32 nr_of_pages,
|
||||||
int i, k;
|
int i, k;
|
||||||
|
|
||||||
if ((pagesize > PAGE_SIZE) || (!pages_per_kpage)) {
|
if ((pagesize > PAGE_SIZE) || (!pages_per_kpage)) {
|
||||||
ehea_error("pagesize conflict! kernel pagesize=%d, "
|
pr_err("pagesize conflict! kernel pagesize=%d, ehea pagesize=%d\n",
|
||||||
"ehea pagesize=%d", (int)PAGE_SIZE, (int)pagesize);
|
(int)PAGE_SIZE, (int)pagesize);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
queue->queue_length = nr_of_pages * pagesize;
|
queue->queue_length = nr_of_pages * pagesize;
|
||||||
queue->queue_pages = kmalloc(nr_of_pages * sizeof(void *), GFP_KERNEL);
|
queue->queue_pages = kmalloc(nr_of_pages * sizeof(void *), GFP_KERNEL);
|
||||||
if (!queue->queue_pages) {
|
if (!queue->queue_pages) {
|
||||||
ehea_error("no mem for queue_pages");
|
pr_err("no mem for queue_pages\n");
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -130,7 +132,7 @@ struct ehea_cq *ehea_create_cq(struct ehea_adapter *adapter,
|
||||||
|
|
||||||
cq = kzalloc(sizeof(*cq), GFP_KERNEL);
|
cq = kzalloc(sizeof(*cq), GFP_KERNEL);
|
||||||
if (!cq) {
|
if (!cq) {
|
||||||
ehea_error("no mem for cq");
|
pr_err("no mem for cq\n");
|
||||||
goto out_nomem;
|
goto out_nomem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -147,7 +149,7 @@ struct ehea_cq *ehea_create_cq(struct ehea_adapter *adapter,
|
||||||
hret = ehea_h_alloc_resource_cq(adapter->handle, &cq->attr,
|
hret = ehea_h_alloc_resource_cq(adapter->handle, &cq->attr,
|
||||||
&cq->fw_handle, &cq->epas);
|
&cq->fw_handle, &cq->epas);
|
||||||
if (hret != H_SUCCESS) {
|
if (hret != H_SUCCESS) {
|
||||||
ehea_error("alloc_resource_cq failed");
|
pr_err("alloc_resource_cq failed\n");
|
||||||
goto out_freemem;
|
goto out_freemem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -159,7 +161,7 @@ struct ehea_cq *ehea_create_cq(struct ehea_adapter *adapter,
|
||||||
for (counter = 0; counter < cq->attr.nr_pages; counter++) {
|
for (counter = 0; counter < cq->attr.nr_pages; counter++) {
|
||||||
vpage = hw_qpageit_get_inc(&cq->hw_queue);
|
vpage = hw_qpageit_get_inc(&cq->hw_queue);
|
||||||
if (!vpage) {
|
if (!vpage) {
|
||||||
ehea_error("hw_qpageit_get_inc failed");
|
pr_err("hw_qpageit_get_inc failed\n");
|
||||||
goto out_kill_hwq;
|
goto out_kill_hwq;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -168,9 +170,8 @@ struct ehea_cq *ehea_create_cq(struct ehea_adapter *adapter,
|
||||||
0, EHEA_CQ_REGISTER_ORIG,
|
0, EHEA_CQ_REGISTER_ORIG,
|
||||||
cq->fw_handle, rpage, 1);
|
cq->fw_handle, rpage, 1);
|
||||||
if (hret < H_SUCCESS) {
|
if (hret < H_SUCCESS) {
|
||||||
ehea_error("register_rpage_cq failed ehea_cq=%p "
|
pr_err("register_rpage_cq failed ehea_cq=%p hret=%llx counter=%i act_pages=%i\n",
|
||||||
"hret=%llx counter=%i act_pages=%i",
|
cq, hret, counter, cq->attr.nr_pages);
|
||||||
cq, hret, counter, cq->attr.nr_pages);
|
|
||||||
goto out_kill_hwq;
|
goto out_kill_hwq;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -178,14 +179,14 @@ struct ehea_cq *ehea_create_cq(struct ehea_adapter *adapter,
|
||||||
vpage = hw_qpageit_get_inc(&cq->hw_queue);
|
vpage = hw_qpageit_get_inc(&cq->hw_queue);
|
||||||
|
|
||||||
if ((hret != H_SUCCESS) || (vpage)) {
|
if ((hret != H_SUCCESS) || (vpage)) {
|
||||||
ehea_error("registration of pages not "
|
pr_err("registration of pages not complete hret=%llx\n",
|
||||||
"complete hret=%llx\n", hret);
|
hret);
|
||||||
goto out_kill_hwq;
|
goto out_kill_hwq;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (hret != H_PAGE_REGISTERED) {
|
if (hret != H_PAGE_REGISTERED) {
|
||||||
ehea_error("CQ: registration of page failed "
|
pr_err("CQ: registration of page failed hret=%llx\n",
|
||||||
"hret=%llx\n", hret);
|
hret);
|
||||||
goto out_kill_hwq;
|
goto out_kill_hwq;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -241,7 +242,7 @@ int ehea_destroy_cq(struct ehea_cq *cq)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hret != H_SUCCESS) {
|
if (hret != H_SUCCESS) {
|
||||||
ehea_error("destroy CQ failed");
|
pr_err("destroy CQ failed\n");
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -259,7 +260,7 @@ struct ehea_eq *ehea_create_eq(struct ehea_adapter *adapter,
|
||||||
|
|
||||||
eq = kzalloc(sizeof(*eq), GFP_KERNEL);
|
eq = kzalloc(sizeof(*eq), GFP_KERNEL);
|
||||||
if (!eq) {
|
if (!eq) {
|
||||||
ehea_error("no mem for eq");
|
pr_err("no mem for eq\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -272,21 +273,21 @@ struct ehea_eq *ehea_create_eq(struct ehea_adapter *adapter,
|
||||||
hret = ehea_h_alloc_resource_eq(adapter->handle,
|
hret = ehea_h_alloc_resource_eq(adapter->handle,
|
||||||
&eq->attr, &eq->fw_handle);
|
&eq->attr, &eq->fw_handle);
|
||||||
if (hret != H_SUCCESS) {
|
if (hret != H_SUCCESS) {
|
||||||
ehea_error("alloc_resource_eq failed");
|
pr_err("alloc_resource_eq failed\n");
|
||||||
goto out_freemem;
|
goto out_freemem;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = hw_queue_ctor(&eq->hw_queue, eq->attr.nr_pages,
|
ret = hw_queue_ctor(&eq->hw_queue, eq->attr.nr_pages,
|
||||||
EHEA_PAGESIZE, sizeof(struct ehea_eqe));
|
EHEA_PAGESIZE, sizeof(struct ehea_eqe));
|
||||||
if (ret) {
|
if (ret) {
|
||||||
ehea_error("can't allocate eq pages");
|
pr_err("can't allocate eq pages\n");
|
||||||
goto out_freeres;
|
goto out_freeres;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < eq->attr.nr_pages; i++) {
|
for (i = 0; i < eq->attr.nr_pages; i++) {
|
||||||
vpage = hw_qpageit_get_inc(&eq->hw_queue);
|
vpage = hw_qpageit_get_inc(&eq->hw_queue);
|
||||||
if (!vpage) {
|
if (!vpage) {
|
||||||
ehea_error("hw_qpageit_get_inc failed");
|
pr_err("hw_qpageit_get_inc failed\n");
|
||||||
hret = H_RESOURCE;
|
hret = H_RESOURCE;
|
||||||
goto out_kill_hwq;
|
goto out_kill_hwq;
|
||||||
}
|
}
|
||||||
|
@ -370,7 +371,7 @@ int ehea_destroy_eq(struct ehea_eq *eq)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hret != H_SUCCESS) {
|
if (hret != H_SUCCESS) {
|
||||||
ehea_error("destroy EQ failed");
|
pr_err("destroy EQ failed\n");
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -395,7 +396,7 @@ int ehea_qp_alloc_register(struct ehea_qp *qp, struct hw_queue *hw_queue,
|
||||||
for (cnt = 0; cnt < nr_pages; cnt++) {
|
for (cnt = 0; cnt < nr_pages; cnt++) {
|
||||||
vpage = hw_qpageit_get_inc(hw_queue);
|
vpage = hw_qpageit_get_inc(hw_queue);
|
||||||
if (!vpage) {
|
if (!vpage) {
|
||||||
ehea_error("hw_qpageit_get_inc failed");
|
pr_err("hw_qpageit_get_inc failed\n");
|
||||||
goto out_kill_hwq;
|
goto out_kill_hwq;
|
||||||
}
|
}
|
||||||
rpage = virt_to_abs(vpage);
|
rpage = virt_to_abs(vpage);
|
||||||
|
@ -403,7 +404,7 @@ int ehea_qp_alloc_register(struct ehea_qp *qp, struct hw_queue *hw_queue,
|
||||||
0, h_call_q_selector,
|
0, h_call_q_selector,
|
||||||
qp->fw_handle, rpage, 1);
|
qp->fw_handle, rpage, 1);
|
||||||
if (hret < H_SUCCESS) {
|
if (hret < H_SUCCESS) {
|
||||||
ehea_error("register_rpage_qp failed");
|
pr_err("register_rpage_qp failed\n");
|
||||||
goto out_kill_hwq;
|
goto out_kill_hwq;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -432,7 +433,7 @@ struct ehea_qp *ehea_create_qp(struct ehea_adapter *adapter,
|
||||||
|
|
||||||
qp = kzalloc(sizeof(*qp), GFP_KERNEL);
|
qp = kzalloc(sizeof(*qp), GFP_KERNEL);
|
||||||
if (!qp) {
|
if (!qp) {
|
||||||
ehea_error("no mem for qp");
|
pr_err("no mem for qp\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -441,7 +442,7 @@ struct ehea_qp *ehea_create_qp(struct ehea_adapter *adapter,
|
||||||
hret = ehea_h_alloc_resource_qp(adapter->handle, init_attr, pd,
|
hret = ehea_h_alloc_resource_qp(adapter->handle, init_attr, pd,
|
||||||
&qp->fw_handle, &qp->epas);
|
&qp->fw_handle, &qp->epas);
|
||||||
if (hret != H_SUCCESS) {
|
if (hret != H_SUCCESS) {
|
||||||
ehea_error("ehea_h_alloc_resource_qp failed");
|
pr_err("ehea_h_alloc_resource_qp failed\n");
|
||||||
goto out_freemem;
|
goto out_freemem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -455,7 +456,7 @@ struct ehea_qp *ehea_create_qp(struct ehea_adapter *adapter,
|
||||||
init_attr->act_wqe_size_enc_sq, adapter,
|
init_attr->act_wqe_size_enc_sq, adapter,
|
||||||
0);
|
0);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
ehea_error("can't register for sq ret=%x", ret);
|
pr_err("can't register for sq ret=%x\n", ret);
|
||||||
goto out_freeres;
|
goto out_freeres;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -465,7 +466,7 @@ struct ehea_qp *ehea_create_qp(struct ehea_adapter *adapter,
|
||||||
init_attr->act_wqe_size_enc_rq1,
|
init_attr->act_wqe_size_enc_rq1,
|
||||||
adapter, 1);
|
adapter, 1);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
ehea_error("can't register for rq1 ret=%x", ret);
|
pr_err("can't register for rq1 ret=%x\n", ret);
|
||||||
goto out_kill_hwsq;
|
goto out_kill_hwsq;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -476,7 +477,7 @@ struct ehea_qp *ehea_create_qp(struct ehea_adapter *adapter,
|
||||||
init_attr->act_wqe_size_enc_rq2,
|
init_attr->act_wqe_size_enc_rq2,
|
||||||
adapter, 2);
|
adapter, 2);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
ehea_error("can't register for rq2 ret=%x", ret);
|
pr_err("can't register for rq2 ret=%x\n", ret);
|
||||||
goto out_kill_hwr1q;
|
goto out_kill_hwr1q;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -488,7 +489,7 @@ struct ehea_qp *ehea_create_qp(struct ehea_adapter *adapter,
|
||||||
init_attr->act_wqe_size_enc_rq3,
|
init_attr->act_wqe_size_enc_rq3,
|
||||||
adapter, 3);
|
adapter, 3);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
ehea_error("can't register for rq3 ret=%x", ret);
|
pr_err("can't register for rq3 ret=%x\n", ret);
|
||||||
goto out_kill_hwr2q;
|
goto out_kill_hwr2q;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -553,7 +554,7 @@ int ehea_destroy_qp(struct ehea_qp *qp)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hret != H_SUCCESS) {
|
if (hret != H_SUCCESS) {
|
||||||
ehea_error("destroy QP failed");
|
pr_err("destroy QP failed\n");
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -842,7 +843,7 @@ static u64 ehea_reg_mr_section(int top, int dir, int idx, u64 *pt,
|
||||||
(hret != H_PAGE_REGISTERED)) {
|
(hret != H_PAGE_REGISTERED)) {
|
||||||
ehea_h_free_resource(adapter->handle, mr->handle,
|
ehea_h_free_resource(adapter->handle, mr->handle,
|
||||||
FORCE_FREE);
|
FORCE_FREE);
|
||||||
ehea_error("register_rpage_mr failed");
|
pr_err("register_rpage_mr failed\n");
|
||||||
return hret;
|
return hret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -896,7 +897,7 @@ int ehea_reg_kernel_mr(struct ehea_adapter *adapter, struct ehea_mr *mr)
|
||||||
|
|
||||||
pt = (void *)get_zeroed_page(GFP_KERNEL);
|
pt = (void *)get_zeroed_page(GFP_KERNEL);
|
||||||
if (!pt) {
|
if (!pt) {
|
||||||
ehea_error("no mem");
|
pr_err("no mem\n");
|
||||||
ret = -ENOMEM;
|
ret = -ENOMEM;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
@ -906,14 +907,14 @@ int ehea_reg_kernel_mr(struct ehea_adapter *adapter, struct ehea_mr *mr)
|
||||||
&mr->handle, &mr->lkey);
|
&mr->handle, &mr->lkey);
|
||||||
|
|
||||||
if (hret != H_SUCCESS) {
|
if (hret != H_SUCCESS) {
|
||||||
ehea_error("alloc_resource_mr failed");
|
pr_err("alloc_resource_mr failed\n");
|
||||||
ret = -EIO;
|
ret = -EIO;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ehea_bmap) {
|
if (!ehea_bmap) {
|
||||||
ehea_h_free_resource(adapter->handle, mr->handle, FORCE_FREE);
|
ehea_h_free_resource(adapter->handle, mr->handle, FORCE_FREE);
|
||||||
ehea_error("no busmap available");
|
pr_err("no busmap available\n");
|
||||||
ret = -EIO;
|
ret = -EIO;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
@ -929,7 +930,7 @@ int ehea_reg_kernel_mr(struct ehea_adapter *adapter, struct ehea_mr *mr)
|
||||||
|
|
||||||
if (hret != H_SUCCESS) {
|
if (hret != H_SUCCESS) {
|
||||||
ehea_h_free_resource(adapter->handle, mr->handle, FORCE_FREE);
|
ehea_h_free_resource(adapter->handle, mr->handle, FORCE_FREE);
|
||||||
ehea_error("registering mr failed");
|
pr_err("registering mr failed\n");
|
||||||
ret = -EIO;
|
ret = -EIO;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
@ -952,7 +953,7 @@ int ehea_rem_mr(struct ehea_mr *mr)
|
||||||
hret = ehea_h_free_resource(mr->adapter->handle, mr->handle,
|
hret = ehea_h_free_resource(mr->adapter->handle, mr->handle,
|
||||||
FORCE_FREE);
|
FORCE_FREE);
|
||||||
if (hret != H_SUCCESS) {
|
if (hret != H_SUCCESS) {
|
||||||
ehea_error("destroy MR failed");
|
pr_err("destroy MR failed\n");
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -987,14 +988,14 @@ void print_error_data(u64 *data)
|
||||||
length = EHEA_PAGESIZE;
|
length = EHEA_PAGESIZE;
|
||||||
|
|
||||||
if (type == EHEA_AER_RESTYPE_QP)
|
if (type == EHEA_AER_RESTYPE_QP)
|
||||||
ehea_error("QP (resource=%llX) state: AER=0x%llX, AERR=0x%llX, "
|
pr_err("QP (resource=%llX) state: AER=0x%llX, AERR=0x%llX, port=%llX\n",
|
||||||
"port=%llX", resource, data[6], data[12], data[22]);
|
resource, data[6], data[12], data[22]);
|
||||||
else if (type == EHEA_AER_RESTYPE_CQ)
|
else if (type == EHEA_AER_RESTYPE_CQ)
|
||||||
ehea_error("CQ (resource=%llX) state: AER=0x%llX", resource,
|
pr_err("CQ (resource=%llX) state: AER=0x%llX\n",
|
||||||
data[6]);
|
resource, data[6]);
|
||||||
else if (type == EHEA_AER_RESTYPE_EQ)
|
else if (type == EHEA_AER_RESTYPE_EQ)
|
||||||
ehea_error("EQ (resource=%llX) state: AER=0x%llX", resource,
|
pr_err("EQ (resource=%llX) state: AER=0x%llX\n",
|
||||||
data[6]);
|
resource, data[6]);
|
||||||
|
|
||||||
ehea_dump(data, length, "error data");
|
ehea_dump(data, length, "error data");
|
||||||
}
|
}
|
||||||
|
@ -1008,7 +1009,7 @@ u64 ehea_error_data(struct ehea_adapter *adapter, u64 res_handle,
|
||||||
|
|
||||||
rblock = (void *)get_zeroed_page(GFP_KERNEL);
|
rblock = (void *)get_zeroed_page(GFP_KERNEL);
|
||||||
if (!rblock) {
|
if (!rblock) {
|
||||||
ehea_error("Cannot allocate rblock memory.");
|
pr_err("Cannot allocate rblock memory\n");
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1020,9 +1021,9 @@ u64 ehea_error_data(struct ehea_adapter *adapter, u64 res_handle,
|
||||||
*aerr = rblock[12];
|
*aerr = rblock[12];
|
||||||
print_error_data(rblock);
|
print_error_data(rblock);
|
||||||
} else if (ret == H_R_STATE) {
|
} else if (ret == H_R_STATE) {
|
||||||
ehea_error("No error data available: %llX.", res_handle);
|
pr_err("No error data available: %llX\n", res_handle);
|
||||||
} else
|
} else
|
||||||
ehea_error("Error data could not be fetched: %llX", res_handle);
|
pr_err("Error data could not be fetched: %llX\n", res_handle);
|
||||||
|
|
||||||
free_page((unsigned long)rblock);
|
free_page((unsigned long)rblock);
|
||||||
out:
|
out:
|
||||||
|
|
Loading…
Reference in New Issue