IB/mlx4: Replace printk(KERN_yyy...) with pr_yyy(...)
Signed-off-by: Shlomo Pongratz <shlomop@mellanox.com> [ Replace one more printk_once() with pr_info_once(). - Roland ] Signed-off-by: Roland Dreier <roland@purestorage.com>
This commit is contained in:
parent
b3416f4476
commit
987c8f8fc9
5 changed files with 25 additions and 25 deletions
|
@ -50,7 +50,7 @@ static void mlx4_ib_cq_event(struct mlx4_cq *cq, enum mlx4_event type)
|
||||||
struct ib_cq *ibcq;
|
struct ib_cq *ibcq;
|
||||||
|
|
||||||
if (type != MLX4_EVENT_TYPE_CQ_ERROR) {
|
if (type != MLX4_EVENT_TYPE_CQ_ERROR) {
|
||||||
printk(KERN_WARNING "mlx4_ib: Unexpected event type %d "
|
pr_warn("Unexpected event type %d "
|
||||||
"on CQ %06x\n", type, cq->cqn);
|
"on CQ %06x\n", type, cq->cqn);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -463,7 +463,7 @@ static void dump_cqe(void *cqe)
|
||||||
{
|
{
|
||||||
__be32 *buf = cqe;
|
__be32 *buf = cqe;
|
||||||
|
|
||||||
printk(KERN_DEBUG "CQE contents %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
pr_debug("CQE contents %08x %08x %08x %08x %08x %08x %08x %08x\n",
|
||||||
be32_to_cpu(buf[0]), be32_to_cpu(buf[1]), be32_to_cpu(buf[2]),
|
be32_to_cpu(buf[0]), be32_to_cpu(buf[1]), be32_to_cpu(buf[2]),
|
||||||
be32_to_cpu(buf[3]), be32_to_cpu(buf[4]), be32_to_cpu(buf[5]),
|
be32_to_cpu(buf[3]), be32_to_cpu(buf[4]), be32_to_cpu(buf[5]),
|
||||||
be32_to_cpu(buf[6]), be32_to_cpu(buf[7]));
|
be32_to_cpu(buf[6]), be32_to_cpu(buf[7]));
|
||||||
|
@ -473,7 +473,7 @@ static void mlx4_ib_handle_error_cqe(struct mlx4_err_cqe *cqe,
|
||||||
struct ib_wc *wc)
|
struct ib_wc *wc)
|
||||||
{
|
{
|
||||||
if (cqe->syndrome == MLX4_CQE_SYNDROME_LOCAL_QP_OP_ERR) {
|
if (cqe->syndrome == MLX4_CQE_SYNDROME_LOCAL_QP_OP_ERR) {
|
||||||
printk(KERN_DEBUG "local QP operation err "
|
pr_debug("local QP operation err "
|
||||||
"(QPN %06x, WQE index %x, vendor syndrome %02x, "
|
"(QPN %06x, WQE index %x, vendor syndrome %02x, "
|
||||||
"opcode = %02x)\n",
|
"opcode = %02x)\n",
|
||||||
be32_to_cpu(cqe->my_qpn), be16_to_cpu(cqe->wqe_index),
|
be32_to_cpu(cqe->my_qpn), be16_to_cpu(cqe->wqe_index),
|
||||||
|
@ -576,7 +576,7 @@ static int mlx4_ib_poll_one(struct mlx4_ib_cq *cq,
|
||||||
|
|
||||||
if (unlikely((cqe->owner_sr_opcode & MLX4_CQE_OPCODE_MASK) == MLX4_OPCODE_NOP &&
|
if (unlikely((cqe->owner_sr_opcode & MLX4_CQE_OPCODE_MASK) == MLX4_OPCODE_NOP &&
|
||||||
is_send)) {
|
is_send)) {
|
||||||
printk(KERN_WARNING "Completion for NOP opcode detected!\n");
|
pr_warn("Completion for NOP opcode detected!\n");
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -606,7 +606,7 @@ static int mlx4_ib_poll_one(struct mlx4_ib_cq *cq,
|
||||||
mqp = __mlx4_qp_lookup(to_mdev(cq->ibcq.device)->dev,
|
mqp = __mlx4_qp_lookup(to_mdev(cq->ibcq.device)->dev,
|
||||||
be32_to_cpu(cqe->vlan_my_qpn));
|
be32_to_cpu(cqe->vlan_my_qpn));
|
||||||
if (unlikely(!mqp)) {
|
if (unlikely(!mqp)) {
|
||||||
printk(KERN_WARNING "CQ %06x with entry for unknown QPN %06x\n",
|
pr_warn("CQ %06x with entry for unknown QPN %06x\n",
|
||||||
cq->mcq.cqn, be32_to_cpu(cqe->vlan_my_qpn) & MLX4_CQE_QPN_MASK);
|
cq->mcq.cqn, be32_to_cpu(cqe->vlan_my_qpn) & MLX4_CQE_QPN_MASK);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -789,7 +789,7 @@ static int mlx4_ib_mcg_detach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid)
|
||||||
list_del(&ge->list);
|
list_del(&ge->list);
|
||||||
kfree(ge);
|
kfree(ge);
|
||||||
} else
|
} else
|
||||||
printk(KERN_WARNING "could not find mgid entry\n");
|
pr_warn("could not find mgid entry\n");
|
||||||
|
|
||||||
mutex_unlock(&mqp->mutex);
|
mutex_unlock(&mqp->mutex);
|
||||||
|
|
||||||
|
@ -902,7 +902,7 @@ static void update_gids_task(struct work_struct *work)
|
||||||
|
|
||||||
mailbox = mlx4_alloc_cmd_mailbox(dev);
|
mailbox = mlx4_alloc_cmd_mailbox(dev);
|
||||||
if (IS_ERR(mailbox)) {
|
if (IS_ERR(mailbox)) {
|
||||||
printk(KERN_WARNING "update gid table failed %ld\n", PTR_ERR(mailbox));
|
pr_warn("update gid table failed %ld\n", PTR_ERR(mailbox));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -913,7 +913,7 @@ static void update_gids_task(struct work_struct *work)
|
||||||
1, MLX4_CMD_SET_PORT, MLX4_CMD_TIME_CLASS_B,
|
1, MLX4_CMD_SET_PORT, MLX4_CMD_TIME_CLASS_B,
|
||||||
MLX4_CMD_NATIVE);
|
MLX4_CMD_NATIVE);
|
||||||
if (err)
|
if (err)
|
||||||
printk(KERN_WARNING "set port command failed\n");
|
pr_warn("set port command failed\n");
|
||||||
else {
|
else {
|
||||||
memcpy(gw->dev->iboe.gid_table[gw->port - 1], gw->gids, sizeof gw->gids);
|
memcpy(gw->dev->iboe.gid_table[gw->port - 1], gw->gids, sizeof gw->gids);
|
||||||
event.device = &gw->dev->ib_dev;
|
event.device = &gw->dev->ib_dev;
|
||||||
|
@ -1084,10 +1084,10 @@ static void *mlx4_ib_add(struct mlx4_dev *dev)
|
||||||
int err;
|
int err;
|
||||||
struct mlx4_ib_iboe *iboe;
|
struct mlx4_ib_iboe *iboe;
|
||||||
|
|
||||||
printk_once(KERN_INFO "%s", mlx4_ib_version);
|
pr_info_once("%s", mlx4_ib_version);
|
||||||
|
|
||||||
if (mlx4_is_mfunc(dev)) {
|
if (mlx4_is_mfunc(dev)) {
|
||||||
printk(KERN_WARNING "IB not yet supported in SRIOV\n");
|
pr_warn("IB not yet supported in SRIOV\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1253,7 +1253,7 @@ static void *mlx4_ib_add(struct mlx4_dev *dev)
|
||||||
|
|
||||||
err_notif:
|
err_notif:
|
||||||
if (unregister_netdevice_notifier(&ibdev->iboe.nb))
|
if (unregister_netdevice_notifier(&ibdev->iboe.nb))
|
||||||
printk(KERN_WARNING "failure unregistering notifier\n");
|
pr_warn("failure unregistering notifier\n");
|
||||||
flush_workqueue(wq);
|
flush_workqueue(wq);
|
||||||
|
|
||||||
err_reg:
|
err_reg:
|
||||||
|
@ -1288,7 +1288,7 @@ static void mlx4_ib_remove(struct mlx4_dev *dev, void *ibdev_ptr)
|
||||||
ib_unregister_device(&ibdev->ib_dev);
|
ib_unregister_device(&ibdev->ib_dev);
|
||||||
if (ibdev->iboe.nb.notifier_call) {
|
if (ibdev->iboe.nb.notifier_call) {
|
||||||
if (unregister_netdevice_notifier(&ibdev->iboe.nb))
|
if (unregister_netdevice_notifier(&ibdev->iboe.nb))
|
||||||
printk(KERN_WARNING "failure unregistering notifier\n");
|
pr_warn("failure unregistering notifier\n");
|
||||||
ibdev->iboe.nb.notifier_call = NULL;
|
ibdev->iboe.nb.notifier_call = NULL;
|
||||||
}
|
}
|
||||||
iounmap(ibdev->uar_map);
|
iounmap(ibdev->uar_map);
|
||||||
|
|
|
@ -338,7 +338,7 @@ int mlx4_ib_unmap_fmr(struct list_head *fmr_list)
|
||||||
|
|
||||||
err = mlx4_SYNC_TPT(mdev);
|
err = mlx4_SYNC_TPT(mdev);
|
||||||
if (err)
|
if (err)
|
||||||
printk(KERN_WARNING "mlx4_ib: SYNC_TPT error %d when "
|
pr_warn("SYNC_TPT error %d when "
|
||||||
"unmapping FMRs\n", err);
|
"unmapping FMRs\n", err);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -256,7 +256,7 @@ static void mlx4_ib_qp_event(struct mlx4_qp *qp, enum mlx4_event type)
|
||||||
event.event = IB_EVENT_QP_ACCESS_ERR;
|
event.event = IB_EVENT_QP_ACCESS_ERR;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
printk(KERN_WARNING "mlx4_ib: Unexpected event type %d "
|
pr_warn("Unexpected event type %d "
|
||||||
"on QP %06x\n", type, qp->qpn);
|
"on QP %06x\n", type, qp->qpn);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -715,7 +715,7 @@ static void destroy_qp_common(struct mlx4_ib_dev *dev, struct mlx4_ib_qp *qp,
|
||||||
if (qp->state != IB_QPS_RESET)
|
if (qp->state != IB_QPS_RESET)
|
||||||
if (mlx4_qp_modify(dev->dev, NULL, to_mlx4_state(qp->state),
|
if (mlx4_qp_modify(dev->dev, NULL, to_mlx4_state(qp->state),
|
||||||
MLX4_QP_STATE_RST, NULL, 0, 0, &qp->mqp))
|
MLX4_QP_STATE_RST, NULL, 0, 0, &qp->mqp))
|
||||||
printk(KERN_WARNING "mlx4_ib: modify QP %06x to RESET failed.\n",
|
pr_warn("modify QP %06x to RESET failed.\n",
|
||||||
qp->mqp.qpn);
|
qp->mqp.qpn);
|
||||||
|
|
||||||
get_cqs(qp, &send_cq, &recv_cq);
|
get_cqs(qp, &send_cq, &recv_cq);
|
||||||
|
@ -946,7 +946,7 @@ static int mlx4_set_path(struct mlx4_ib_dev *dev, const struct ib_ah_attr *ah,
|
||||||
|
|
||||||
if (ah->ah_flags & IB_AH_GRH) {
|
if (ah->ah_flags & IB_AH_GRH) {
|
||||||
if (ah->grh.sgid_index >= dev->dev->caps.gid_table_len[port]) {
|
if (ah->grh.sgid_index >= dev->dev->caps.gid_table_len[port]) {
|
||||||
printk(KERN_ERR "sgid_index (%u) too large. max is %d\n",
|
pr_err("sgid_index (%u) too large. max is %d\n",
|
||||||
ah->grh.sgid_index, dev->dev->caps.gid_table_len[port] - 1);
|
ah->grh.sgid_index, dev->dev->caps.gid_table_len[port] - 1);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -1050,7 +1050,7 @@ static int __mlx4_ib_modify_qp(struct ib_qp *ibqp,
|
||||||
context->mtu_msgmax = (IB_MTU_4096 << 5) | 12;
|
context->mtu_msgmax = (IB_MTU_4096 << 5) | 12;
|
||||||
} else if (attr_mask & IB_QP_PATH_MTU) {
|
} else if (attr_mask & IB_QP_PATH_MTU) {
|
||||||
if (attr->path_mtu < IB_MTU_256 || attr->path_mtu > IB_MTU_4096) {
|
if (attr->path_mtu < IB_MTU_256 || attr->path_mtu > IB_MTU_4096) {
|
||||||
printk(KERN_ERR "path MTU (%u) is invalid\n",
|
pr_err("path MTU (%u) is invalid\n",
|
||||||
attr->path_mtu);
|
attr->path_mtu);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
@ -1266,7 +1266,7 @@ static int __mlx4_ib_modify_qp(struct ib_qp *ibqp,
|
||||||
if (is_qp0(dev, qp)) {
|
if (is_qp0(dev, qp)) {
|
||||||
if (cur_state != IB_QPS_RTR && new_state == IB_QPS_RTR)
|
if (cur_state != IB_QPS_RTR && new_state == IB_QPS_RTR)
|
||||||
if (mlx4_INIT_PORT(dev->dev, qp->port))
|
if (mlx4_INIT_PORT(dev->dev, qp->port))
|
||||||
printk(KERN_WARNING "INIT_PORT failed for port %d\n",
|
pr_warn("INIT_PORT failed for port %d\n",
|
||||||
qp->port);
|
qp->port);
|
||||||
|
|
||||||
if (cur_state != IB_QPS_RESET && cur_state != IB_QPS_ERR &&
|
if (cur_state != IB_QPS_RESET && cur_state != IB_QPS_ERR &&
|
||||||
|
@ -1460,16 +1460,16 @@ static int build_mlx_header(struct mlx4_ib_sqp *sqp, struct ib_send_wr *wr,
|
||||||
header_size = ib_ud_header_pack(&sqp->ud_header, sqp->header_buf);
|
header_size = ib_ud_header_pack(&sqp->ud_header, sqp->header_buf);
|
||||||
|
|
||||||
if (0) {
|
if (0) {
|
||||||
printk(KERN_ERR "built UD header of size %d:\n", header_size);
|
pr_err("built UD header of size %d:\n", header_size);
|
||||||
for (i = 0; i < header_size / 4; ++i) {
|
for (i = 0; i < header_size / 4; ++i) {
|
||||||
if (i % 8 == 0)
|
if (i % 8 == 0)
|
||||||
printk(" [%02x] ", i * 4);
|
pr_err(" [%02x] ", i * 4);
|
||||||
printk(" %08x",
|
pr_cont(" %08x",
|
||||||
be32_to_cpu(((__be32 *) sqp->header_buf)[i]));
|
be32_to_cpu(((__be32 *) sqp->header_buf)[i]));
|
||||||
if ((i + 1) % 8 == 0)
|
if ((i + 1) % 8 == 0)
|
||||||
printk("\n");
|
pr_cont("\n");
|
||||||
}
|
}
|
||||||
printk("\n");
|
pr_err("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -59,7 +59,7 @@ static void mlx4_ib_srq_event(struct mlx4_srq *srq, enum mlx4_event type)
|
||||||
event.event = IB_EVENT_SRQ_ERR;
|
event.event = IB_EVENT_SRQ_ERR;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
printk(KERN_WARNING "mlx4_ib: Unexpected event type %d "
|
pr_warn("Unexpected event type %d "
|
||||||
"on SRQ %06x\n", type, srq->srqn);
|
"on SRQ %06x\n", type, srq->srqn);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue