Commit 08920b8f authored by Joe Perches's avatar Joe Perches Committed by Jason Gunthorpe

RDMA/bnxt_re: QPLIB: Add and use #define dev_fmt(fmt) "QPLIB: " fmt

Consistently use the "QPLIB: " prefix for dev_<level> logging.

Miscellanea:

o Add missing newlines to avoid possible message interleaving
o Coalesce consecutive dev_<level> uses that emit a message header to
  avoid < 80 column lengths and mistakenly output on multiple lines
o Reflow modified lines to use 80 columns where appropriate
o Consistently use "%s: " where __func__ is output
o QPLIB: is now always output immediately after the dev_<level> header
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Acked-by: default avatarSelvin Xavier <selvin.xavier@broadcom.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent af68ccbc
...@@ -36,6 +36,8 @@ ...@@ -36,6 +36,8 @@
* Description: Fast Path Operators * Description: Fast Path Operators
*/ */
#define dev_fmt(fmt) "QPLIB: " fmt
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/sched.h> #include <linux/sched.h>
...@@ -71,8 +73,7 @@ static void __bnxt_qplib_add_flush_qp(struct bnxt_qplib_qp *qp) ...@@ -71,8 +73,7 @@ static void __bnxt_qplib_add_flush_qp(struct bnxt_qplib_qp *qp)
if (!qp->sq.flushed) { if (!qp->sq.flushed) {
dev_dbg(&scq->hwq.pdev->dev, dev_dbg(&scq->hwq.pdev->dev,
"QPLIB: FP: Adding to SQ Flush list = %p", "FP: Adding to SQ Flush list = %p\n", qp);
qp);
bnxt_qplib_cancel_phantom_processing(qp); bnxt_qplib_cancel_phantom_processing(qp);
list_add_tail(&qp->sq_flush, &scq->sqf_head); list_add_tail(&qp->sq_flush, &scq->sqf_head);
qp->sq.flushed = true; qp->sq.flushed = true;
...@@ -80,8 +81,7 @@ static void __bnxt_qplib_add_flush_qp(struct bnxt_qplib_qp *qp) ...@@ -80,8 +81,7 @@ static void __bnxt_qplib_add_flush_qp(struct bnxt_qplib_qp *qp)
if (!qp->srq) { if (!qp->srq) {
if (!qp->rq.flushed) { if (!qp->rq.flushed) {
dev_dbg(&rcq->hwq.pdev->dev, dev_dbg(&rcq->hwq.pdev->dev,
"QPLIB: FP: Adding to RQ Flush list = %p", "FP: Adding to RQ Flush list = %p\n", qp);
qp);
list_add_tail(&qp->rq_flush, &rcq->rqf_head); list_add_tail(&qp->rq_flush, &rcq->rqf_head);
qp->rq.flushed = true; qp->rq.flushed = true;
} }
...@@ -207,7 +207,7 @@ static int bnxt_qplib_alloc_qp_hdr_buf(struct bnxt_qplib_res *res, ...@@ -207,7 +207,7 @@ static int bnxt_qplib_alloc_qp_hdr_buf(struct bnxt_qplib_res *res,
if (!qp->sq_hdr_buf) { if (!qp->sq_hdr_buf) {
rc = -ENOMEM; rc = -ENOMEM;
dev_err(&res->pdev->dev, dev_err(&res->pdev->dev,
"QPLIB: Failed to create sq_hdr_buf"); "Failed to create sq_hdr_buf\n");
goto fail; goto fail;
} }
} }
...@@ -221,7 +221,7 @@ static int bnxt_qplib_alloc_qp_hdr_buf(struct bnxt_qplib_res *res, ...@@ -221,7 +221,7 @@ static int bnxt_qplib_alloc_qp_hdr_buf(struct bnxt_qplib_res *res,
if (!qp->rq_hdr_buf) { if (!qp->rq_hdr_buf) {
rc = -ENOMEM; rc = -ENOMEM;
dev_err(&res->pdev->dev, dev_err(&res->pdev->dev,
"QPLIB: Failed to create rq_hdr_buf"); "Failed to create rq_hdr_buf\n");
goto fail; goto fail;
} }
} }
...@@ -277,8 +277,7 @@ static void bnxt_qplib_service_nq(unsigned long data) ...@@ -277,8 +277,7 @@ static void bnxt_qplib_service_nq(unsigned long data)
num_cqne_processed++; num_cqne_processed++;
else else
dev_warn(&nq->pdev->dev, dev_warn(&nq->pdev->dev,
"QPLIB: cqn - type 0x%x not handled", "cqn - type 0x%x not handled\n", type);
type);
spin_unlock_bh(&cq->compl_lock); spin_unlock_bh(&cq->compl_lock);
break; break;
} }
...@@ -298,7 +297,7 @@ static void bnxt_qplib_service_nq(unsigned long data) ...@@ -298,7 +297,7 @@ static void bnxt_qplib_service_nq(unsigned long data)
num_srqne_processed++; num_srqne_processed++;
else else
dev_warn(&nq->pdev->dev, dev_warn(&nq->pdev->dev,
"QPLIB: SRQ event 0x%x not handled", "SRQ event 0x%x not handled\n",
nqsrqe->event); nqsrqe->event);
break; break;
} }
...@@ -306,8 +305,7 @@ static void bnxt_qplib_service_nq(unsigned long data) ...@@ -306,8 +305,7 @@ static void bnxt_qplib_service_nq(unsigned long data)
break; break;
default: default:
dev_warn(&nq->pdev->dev, dev_warn(&nq->pdev->dev,
"QPLIB: nqe with type = 0x%x not handled", "nqe with type = 0x%x not handled\n", type);
type);
break; break;
} }
raw_cons++; raw_cons++;
...@@ -396,7 +394,7 @@ int bnxt_qplib_nq_start_irq(struct bnxt_qplib_nq *nq, int nq_indx, ...@@ -396,7 +394,7 @@ int bnxt_qplib_nq_start_irq(struct bnxt_qplib_nq *nq, int nq_indx,
rc = irq_set_affinity_hint(nq->vector, &nq->mask); rc = irq_set_affinity_hint(nq->vector, &nq->mask);
if (rc) { if (rc) {
dev_warn(&nq->pdev->dev, dev_warn(&nq->pdev->dev,
"QPLIB: set affinity failed; vector: %d nq_idx: %d\n", "set affinity failed; vector: %d nq_idx: %d\n",
nq->vector, nq_indx); nq->vector, nq_indx);
} }
nq->requested = true; nq->requested = true;
...@@ -443,7 +441,7 @@ int bnxt_qplib_enable_nq(struct pci_dev *pdev, struct bnxt_qplib_nq *nq, ...@@ -443,7 +441,7 @@ int bnxt_qplib_enable_nq(struct pci_dev *pdev, struct bnxt_qplib_nq *nq,
rc = bnxt_qplib_nq_start_irq(nq, nq_idx, msix_vector, true); rc = bnxt_qplib_nq_start_irq(nq, nq_idx, msix_vector, true);
if (rc) { if (rc) {
dev_err(&nq->pdev->dev, dev_err(&nq->pdev->dev,
"QPLIB: Failed to request irq for nq-idx %d", nq_idx); "Failed to request irq for nq-idx %d\n", nq_idx);
goto fail; goto fail;
} }
...@@ -662,8 +660,8 @@ int bnxt_qplib_post_srq_recv(struct bnxt_qplib_srq *srq, ...@@ -662,8 +660,8 @@ int bnxt_qplib_post_srq_recv(struct bnxt_qplib_srq *srq,
spin_lock(&srq_hwq->lock); spin_lock(&srq_hwq->lock);
if (srq->start_idx == srq->last_idx) { if (srq->start_idx == srq->last_idx) {
dev_err(&srq_hwq->pdev->dev, "QPLIB: FP: SRQ (0x%x) is full!", dev_err(&srq_hwq->pdev->dev,
srq->id); "FP: SRQ (0x%x) is full!\n", srq->id);
rc = -EINVAL; rc = -EINVAL;
spin_unlock(&srq_hwq->lock); spin_unlock(&srq_hwq->lock);
goto done; goto done;
...@@ -1324,7 +1322,7 @@ int bnxt_qplib_query_qp(struct bnxt_qplib_res *res, struct bnxt_qplib_qp *qp) ...@@ -1324,7 +1322,7 @@ int bnxt_qplib_query_qp(struct bnxt_qplib_res *res, struct bnxt_qplib_qp *qp)
} }
} }
if (i == res->sgid_tbl.max) if (i == res->sgid_tbl.max)
dev_warn(&res->pdev->dev, "QPLIB: SGID not found??"); dev_warn(&res->pdev->dev, "SGID not found??\n");
qp->ah.hop_limit = sb->hop_limit; qp->ah.hop_limit = sb->hop_limit;
qp->ah.traffic_class = sb->traffic_class; qp->ah.traffic_class = sb->traffic_class;
...@@ -1536,7 +1534,7 @@ int bnxt_qplib_post_send(struct bnxt_qplib_qp *qp, ...@@ -1536,7 +1534,7 @@ int bnxt_qplib_post_send(struct bnxt_qplib_qp *qp,
if (bnxt_qplib_queue_full(sq)) { if (bnxt_qplib_queue_full(sq)) {
dev_err(&sq->hwq.pdev->dev, dev_err(&sq->hwq.pdev->dev,
"QPLIB: prod = %#x cons = %#x qdepth = %#x delta = %#x", "prod = %#x cons = %#x qdepth = %#x delta = %#x\n",
sq->hwq.prod, sq->hwq.cons, sq->hwq.max_elements, sq->hwq.prod, sq->hwq.cons, sq->hwq.max_elements,
sq->q_full_delta); sq->q_full_delta);
rc = -ENOMEM; rc = -ENOMEM;
...@@ -1561,7 +1559,7 @@ int bnxt_qplib_post_send(struct bnxt_qplib_qp *qp, ...@@ -1561,7 +1559,7 @@ int bnxt_qplib_post_send(struct bnxt_qplib_qp *qp,
/* Copy the inline data */ /* Copy the inline data */
if (wqe->inline_len > BNXT_QPLIB_SWQE_MAX_INLINE_LENGTH) { if (wqe->inline_len > BNXT_QPLIB_SWQE_MAX_INLINE_LENGTH) {
dev_warn(&sq->hwq.pdev->dev, dev_warn(&sq->hwq.pdev->dev,
"QPLIB: Inline data length > 96 detected"); "Inline data length > 96 detected\n");
data_len = BNXT_QPLIB_SWQE_MAX_INLINE_LENGTH; data_len = BNXT_QPLIB_SWQE_MAX_INLINE_LENGTH;
} else { } else {
data_len = wqe->inline_len; data_len = wqe->inline_len;
...@@ -1776,7 +1774,7 @@ int bnxt_qplib_post_send(struct bnxt_qplib_qp *qp, ...@@ -1776,7 +1774,7 @@ int bnxt_qplib_post_send(struct bnxt_qplib_qp *qp,
queue_work(qp->scq->nq->cqn_wq, &nq_work->work); queue_work(qp->scq->nq->cqn_wq, &nq_work->work);
} else { } else {
dev_err(&sq->hwq.pdev->dev, dev_err(&sq->hwq.pdev->dev,
"QPLIB: FP: Failed to allocate SQ nq_work!"); "FP: Failed to allocate SQ nq_work!\n");
rc = -ENOMEM; rc = -ENOMEM;
} }
} }
...@@ -1815,13 +1813,12 @@ int bnxt_qplib_post_recv(struct bnxt_qplib_qp *qp, ...@@ -1815,13 +1813,12 @@ int bnxt_qplib_post_recv(struct bnxt_qplib_qp *qp,
if (qp->state == CMDQ_MODIFY_QP_NEW_STATE_ERR) { if (qp->state == CMDQ_MODIFY_QP_NEW_STATE_ERR) {
sch_handler = true; sch_handler = true;
dev_dbg(&rq->hwq.pdev->dev, dev_dbg(&rq->hwq.pdev->dev,
"%s Error QP. Scheduling for poll_cq\n", "%s: Error QP. Scheduling for poll_cq\n", __func__);
__func__);
goto queue_err; goto queue_err;
} }
if (bnxt_qplib_queue_full(rq)) { if (bnxt_qplib_queue_full(rq)) {
dev_err(&rq->hwq.pdev->dev, dev_err(&rq->hwq.pdev->dev,
"QPLIB: FP: QP (0x%x) RQ is full!", qp->id); "FP: QP (0x%x) RQ is full!\n", qp->id);
rc = -EINVAL; rc = -EINVAL;
goto done; goto done;
} }
...@@ -1870,7 +1867,7 @@ int bnxt_qplib_post_recv(struct bnxt_qplib_qp *qp, ...@@ -1870,7 +1867,7 @@ int bnxt_qplib_post_recv(struct bnxt_qplib_qp *qp,
queue_work(qp->rcq->nq->cqn_wq, &nq_work->work); queue_work(qp->rcq->nq->cqn_wq, &nq_work->work);
} else { } else {
dev_err(&rq->hwq.pdev->dev, dev_err(&rq->hwq.pdev->dev,
"QPLIB: FP: Failed to allocate RQ nq_work!"); "FP: Failed to allocate RQ nq_work!\n");
rc = -ENOMEM; rc = -ENOMEM;
} }
} }
...@@ -1932,7 +1929,7 @@ int bnxt_qplib_create_cq(struct bnxt_qplib_res *res, struct bnxt_qplib_cq *cq) ...@@ -1932,7 +1929,7 @@ int bnxt_qplib_create_cq(struct bnxt_qplib_res *res, struct bnxt_qplib_cq *cq)
if (!cq->dpi) { if (!cq->dpi) {
dev_err(&rcfw->pdev->dev, dev_err(&rcfw->pdev->dev,
"QPLIB: FP: CREATE_CQ failed due to NULL DPI"); "FP: CREATE_CQ failed due to NULL DPI\n");
return -EINVAL; return -EINVAL;
} }
req.dpi = cpu_to_le32(cq->dpi->dpi); req.dpi = cpu_to_le32(cq->dpi->dpi);
...@@ -2172,7 +2169,7 @@ static int do_wa9060(struct bnxt_qplib_qp *qp, struct bnxt_qplib_cq *cq, ...@@ -2172,7 +2169,7 @@ static int do_wa9060(struct bnxt_qplib_qp *qp, struct bnxt_qplib_cq *cq,
* comes back * comes back
*/ */
dev_dbg(&cq->hwq.pdev->dev, dev_dbg(&cq->hwq.pdev->dev,
"FP:Got Phantom CQE"); "FP: Got Phantom CQE\n");
sq->condition = false; sq->condition = false;
sq->single = true; sq->single = true;
rc = 0; rc = 0;
...@@ -2189,7 +2186,7 @@ static int do_wa9060(struct bnxt_qplib_qp *qp, struct bnxt_qplib_cq *cq, ...@@ -2189,7 +2186,7 @@ static int do_wa9060(struct bnxt_qplib_qp *qp, struct bnxt_qplib_cq *cq,
peek_raw_cq_cons++; peek_raw_cq_cons++;
} }
dev_err(&cq->hwq.pdev->dev, dev_err(&cq->hwq.pdev->dev,
"Should not have come here! cq_cons=0x%x qp=0x%x sq cons sw=0x%x hw=0x%x", "Should not have come here! cq_cons=0x%x qp=0x%x sq cons sw=0x%x hw=0x%x\n",
cq_cons, qp->id, sw_sq_cons, cqe_sq_cons); cq_cons, qp->id, sw_sq_cons, cqe_sq_cons);
rc = -EINVAL; rc = -EINVAL;
} }
...@@ -2213,7 +2210,7 @@ static int bnxt_qplib_cq_process_req(struct bnxt_qplib_cq *cq, ...@@ -2213,7 +2210,7 @@ static int bnxt_qplib_cq_process_req(struct bnxt_qplib_cq *cq,
le64_to_cpu(hwcqe->qp_handle)); le64_to_cpu(hwcqe->qp_handle));
if (!qp) { if (!qp) {
dev_err(&cq->hwq.pdev->dev, dev_err(&cq->hwq.pdev->dev,
"QPLIB: FP: Process Req qp is NULL"); "FP: Process Req qp is NULL\n");
return -EINVAL; return -EINVAL;
} }
sq = &qp->sq; sq = &qp->sq;
...@@ -2221,16 +2218,14 @@ static int bnxt_qplib_cq_process_req(struct bnxt_qplib_cq *cq, ...@@ -2221,16 +2218,14 @@ static int bnxt_qplib_cq_process_req(struct bnxt_qplib_cq *cq,
cqe_sq_cons = HWQ_CMP(le16_to_cpu(hwcqe->sq_cons_idx), &sq->hwq); cqe_sq_cons = HWQ_CMP(le16_to_cpu(hwcqe->sq_cons_idx), &sq->hwq);
if (cqe_sq_cons > sq->hwq.max_elements) { if (cqe_sq_cons > sq->hwq.max_elements) {
dev_err(&cq->hwq.pdev->dev, dev_err(&cq->hwq.pdev->dev,
"QPLIB: FP: CQ Process req reported "); "FP: CQ Process req reported sq_cons_idx 0x%x which exceeded max 0x%x\n",
dev_err(&cq->hwq.pdev->dev,
"QPLIB: sq_cons_idx 0x%x which exceeded max 0x%x",
cqe_sq_cons, sq->hwq.max_elements); cqe_sq_cons, sq->hwq.max_elements);
return -EINVAL; return -EINVAL;
} }
if (qp->sq.flushed) { if (qp->sq.flushed) {
dev_dbg(&cq->hwq.pdev->dev, dev_dbg(&cq->hwq.pdev->dev,
"%s: QPLIB: QP in Flush QP = %p\n", __func__, qp); "%s: QP in Flush QP = %p\n", __func__, qp);
goto done; goto done;
} }
/* Require to walk the sq's swq to fabricate CQEs for all previously /* Require to walk the sq's swq to fabricate CQEs for all previously
...@@ -2262,9 +2257,7 @@ static int bnxt_qplib_cq_process_req(struct bnxt_qplib_cq *cq, ...@@ -2262,9 +2257,7 @@ static int bnxt_qplib_cq_process_req(struct bnxt_qplib_cq *cq,
hwcqe->status != CQ_REQ_STATUS_OK) { hwcqe->status != CQ_REQ_STATUS_OK) {
cqe->status = hwcqe->status; cqe->status = hwcqe->status;
dev_err(&cq->hwq.pdev->dev, dev_err(&cq->hwq.pdev->dev,
"QPLIB: FP: CQ Processed Req "); "FP: CQ Processed Req wr_id[%d] = 0x%llx with status 0x%x\n",
dev_err(&cq->hwq.pdev->dev,
"QPLIB: wr_id[%d] = 0x%llx with status 0x%x",
sw_sq_cons, cqe->wr_id, cqe->status); sw_sq_cons, cqe->wr_id, cqe->status);
cqe++; cqe++;
(*budget)--; (*budget)--;
...@@ -2330,12 +2323,12 @@ static int bnxt_qplib_cq_process_res_rc(struct bnxt_qplib_cq *cq, ...@@ -2330,12 +2323,12 @@ static int bnxt_qplib_cq_process_res_rc(struct bnxt_qplib_cq *cq,
qp = (struct bnxt_qplib_qp *)((unsigned long) qp = (struct bnxt_qplib_qp *)((unsigned long)
le64_to_cpu(hwcqe->qp_handle)); le64_to_cpu(hwcqe->qp_handle));
if (!qp) { if (!qp) {
dev_err(&cq->hwq.pdev->dev, "QPLIB: process_cq RC qp is NULL"); dev_err(&cq->hwq.pdev->dev, "process_cq RC qp is NULL\n");
return -EINVAL; return -EINVAL;
} }
if (qp->rq.flushed) { if (qp->rq.flushed) {
dev_dbg(&cq->hwq.pdev->dev, dev_dbg(&cq->hwq.pdev->dev,
"%s: QPLIB: QP in Flush QP = %p\n", __func__, qp); "%s: QP in Flush QP = %p\n", __func__, qp);
goto done; goto done;
} }
...@@ -2356,9 +2349,7 @@ static int bnxt_qplib_cq_process_res_rc(struct bnxt_qplib_cq *cq, ...@@ -2356,9 +2349,7 @@ static int bnxt_qplib_cq_process_res_rc(struct bnxt_qplib_cq *cq,
return -EINVAL; return -EINVAL;
if (wr_id_idx >= srq->hwq.max_elements) { if (wr_id_idx >= srq->hwq.max_elements) {
dev_err(&cq->hwq.pdev->dev, dev_err(&cq->hwq.pdev->dev,
"QPLIB: FP: CQ Process RC "); "FP: CQ Process RC wr_id idx 0x%x exceeded SRQ max 0x%x\n",
dev_err(&cq->hwq.pdev->dev,
"QPLIB: wr_id idx 0x%x exceeded SRQ max 0x%x",
wr_id_idx, srq->hwq.max_elements); wr_id_idx, srq->hwq.max_elements);
return -EINVAL; return -EINVAL;
} }
...@@ -2371,9 +2362,7 @@ static int bnxt_qplib_cq_process_res_rc(struct bnxt_qplib_cq *cq, ...@@ -2371,9 +2362,7 @@ static int bnxt_qplib_cq_process_res_rc(struct bnxt_qplib_cq *cq,
rq = &qp->rq; rq = &qp->rq;
if (wr_id_idx >= rq->hwq.max_elements) { if (wr_id_idx >= rq->hwq.max_elements) {
dev_err(&cq->hwq.pdev->dev, dev_err(&cq->hwq.pdev->dev,
"QPLIB: FP: CQ Process RC "); "FP: CQ Process RC wr_id idx 0x%x exceeded RQ max 0x%x\n",
dev_err(&cq->hwq.pdev->dev,
"QPLIB: wr_id idx 0x%x exceeded RQ max 0x%x",
wr_id_idx, rq->hwq.max_elements); wr_id_idx, rq->hwq.max_elements);
return -EINVAL; return -EINVAL;
} }
...@@ -2409,12 +2398,12 @@ static int bnxt_qplib_cq_process_res_ud(struct bnxt_qplib_cq *cq, ...@@ -2409,12 +2398,12 @@ static int bnxt_qplib_cq_process_res_ud(struct bnxt_qplib_cq *cq,
qp = (struct bnxt_qplib_qp *)((unsigned long) qp = (struct bnxt_qplib_qp *)((unsigned long)
le64_to_cpu(hwcqe->qp_handle)); le64_to_cpu(hwcqe->qp_handle));
if (!qp) { if (!qp) {
dev_err(&cq->hwq.pdev->dev, "QPLIB: process_cq UD qp is NULL"); dev_err(&cq->hwq.pdev->dev, "process_cq UD qp is NULL\n");
return -EINVAL; return -EINVAL;
} }
if (qp->rq.flushed) { if (qp->rq.flushed) {
dev_dbg(&cq->hwq.pdev->dev, dev_dbg(&cq->hwq.pdev->dev,
"%s: QPLIB: QP in Flush QP = %p\n", __func__, qp); "%s: QP in Flush QP = %p\n", __func__, qp);
goto done; goto done;
} }
cqe = *pcqe; cqe = *pcqe;
...@@ -2439,9 +2428,7 @@ static int bnxt_qplib_cq_process_res_ud(struct bnxt_qplib_cq *cq, ...@@ -2439,9 +2428,7 @@ static int bnxt_qplib_cq_process_res_ud(struct bnxt_qplib_cq *cq,
if (wr_id_idx >= srq->hwq.max_elements) { if (wr_id_idx >= srq->hwq.max_elements) {
dev_err(&cq->hwq.pdev->dev, dev_err(&cq->hwq.pdev->dev,
"QPLIB: FP: CQ Process UD "); "FP: CQ Process UD wr_id idx 0x%x exceeded SRQ max 0x%x\n",
dev_err(&cq->hwq.pdev->dev,
"QPLIB: wr_id idx 0x%x exceeded SRQ max 0x%x",
wr_id_idx, srq->hwq.max_elements); wr_id_idx, srq->hwq.max_elements);
return -EINVAL; return -EINVAL;
} }
...@@ -2454,9 +2441,7 @@ static int bnxt_qplib_cq_process_res_ud(struct bnxt_qplib_cq *cq, ...@@ -2454,9 +2441,7 @@ static int bnxt_qplib_cq_process_res_ud(struct bnxt_qplib_cq *cq,
rq = &qp->rq; rq = &qp->rq;
if (wr_id_idx >= rq->hwq.max_elements) { if (wr_id_idx >= rq->hwq.max_elements) {
dev_err(&cq->hwq.pdev->dev, dev_err(&cq->hwq.pdev->dev,
"QPLIB: FP: CQ Process UD "); "FP: CQ Process UD wr_id idx 0x%x exceeded RQ max 0x%x\n",
dev_err(&cq->hwq.pdev->dev,
"QPLIB: wr_id idx 0x%x exceeded RQ max 0x%x",
wr_id_idx, rq->hwq.max_elements); wr_id_idx, rq->hwq.max_elements);
return -EINVAL; return -EINVAL;
} }
...@@ -2508,13 +2493,12 @@ static int bnxt_qplib_cq_process_res_raweth_qp1(struct bnxt_qplib_cq *cq, ...@@ -2508,13 +2493,12 @@ static int bnxt_qplib_cq_process_res_raweth_qp1(struct bnxt_qplib_cq *cq,
qp = (struct bnxt_qplib_qp *)((unsigned long) qp = (struct bnxt_qplib_qp *)((unsigned long)
le64_to_cpu(hwcqe->qp_handle)); le64_to_cpu(hwcqe->qp_handle));
if (!qp) { if (!qp) {
dev_err(&cq->hwq.pdev->dev, dev_err(&cq->hwq.pdev->dev, "process_cq Raw/QP1 qp is NULL\n");
"QPLIB: process_cq Raw/QP1 qp is NULL");
return -EINVAL; return -EINVAL;
} }
if (qp->rq.flushed) { if (qp->rq.flushed) {
dev_dbg(&cq->hwq.pdev->dev, dev_dbg(&cq->hwq.pdev->dev,
"%s: QPLIB: QP in Flush QP = %p\n", __func__, qp); "%s: QP in Flush QP = %p\n", __func__, qp);
goto done; goto done;
} }
cqe = *pcqe; cqe = *pcqe;
...@@ -2543,14 +2527,12 @@ static int bnxt_qplib_cq_process_res_raweth_qp1(struct bnxt_qplib_cq *cq, ...@@ -2543,14 +2527,12 @@ static int bnxt_qplib_cq_process_res_raweth_qp1(struct bnxt_qplib_cq *cq,
srq = qp->srq; srq = qp->srq;
if (!srq) { if (!srq) {
dev_err(&cq->hwq.pdev->dev, dev_err(&cq->hwq.pdev->dev,
"QPLIB: FP: SRQ used but not defined??"); "FP: SRQ used but not defined??\n");
return -EINVAL; return -EINVAL;
} }
if (wr_id_idx >= srq->hwq.max_elements) { if (wr_id_idx >= srq->hwq.max_elements) {
dev_err(&cq->hwq.pdev->dev, dev_err(&cq->hwq.pdev->dev,
"QPLIB: FP: CQ Process Raw/QP1 "); "FP: CQ Process Raw/QP1 wr_id idx 0x%x exceeded SRQ max 0x%x\n",
dev_err(&cq->hwq.pdev->dev,
"QPLIB: wr_id idx 0x%x exceeded SRQ max 0x%x",
wr_id_idx, srq->hwq.max_elements); wr_id_idx, srq->hwq.max_elements);
return -EINVAL; return -EINVAL;
} }
...@@ -2563,9 +2545,7 @@ static int bnxt_qplib_cq_process_res_raweth_qp1(struct bnxt_qplib_cq *cq, ...@@ -2563,9 +2545,7 @@ static int bnxt_qplib_cq_process_res_raweth_qp1(struct bnxt_qplib_cq *cq,
rq = &qp->rq; rq = &qp->rq;
if (wr_id_idx >= rq->hwq.max_elements) { if (wr_id_idx >= rq->hwq.max_elements) {
dev_err(&cq->hwq.pdev->dev, dev_err(&cq->hwq.pdev->dev,
"QPLIB: FP: CQ Process Raw/QP1 RQ wr_id "); "FP: CQ Process Raw/QP1 RQ wr_id idx 0x%x exceeded RQ max 0x%x\n",
dev_err(&cq->hwq.pdev->dev,
"QPLIB: ix 0x%x exceeded RQ max 0x%x",
wr_id_idx, rq->hwq.max_elements); wr_id_idx, rq->hwq.max_elements);
return -EINVAL; return -EINVAL;
} }
...@@ -2600,14 +2580,14 @@ static int bnxt_qplib_cq_process_terminal(struct bnxt_qplib_cq *cq, ...@@ -2600,14 +2580,14 @@ static int bnxt_qplib_cq_process_terminal(struct bnxt_qplib_cq *cq,
/* Check the Status */ /* Check the Status */
if (hwcqe->status != CQ_TERMINAL_STATUS_OK) if (hwcqe->status != CQ_TERMINAL_STATUS_OK)
dev_warn(&cq->hwq.pdev->dev, dev_warn(&cq->hwq.pdev->dev,
"QPLIB: FP: CQ Process Terminal Error status = 0x%x", "FP: CQ Process Terminal Error status = 0x%x\n",
hwcqe->status); hwcqe->status);
qp = (struct bnxt_qplib_qp *)((unsigned long) qp = (struct bnxt_qplib_qp *)((unsigned long)
le64_to_cpu(hwcqe->qp_handle)); le64_to_cpu(hwcqe->qp_handle));
if (!qp) { if (!qp) {
dev_err(&cq->hwq.pdev->dev, dev_err(&cq->hwq.pdev->dev,
"QPLIB: FP: CQ Process terminal qp is NULL"); "FP: CQ Process terminal qp is NULL\n");
return -EINVAL; return -EINVAL;
} }
...@@ -2623,16 +2603,14 @@ static int bnxt_qplib_cq_process_terminal(struct bnxt_qplib_cq *cq, ...@@ -2623,16 +2603,14 @@ static int bnxt_qplib_cq_process_terminal(struct bnxt_qplib_cq *cq,
if (cqe_cons > sq->hwq.max_elements) { if (cqe_cons > sq->hwq.max_elements) {
dev_err(&cq->hwq.pdev->dev, dev_err(&cq->hwq.pdev->dev,
"QPLIB: FP: CQ Process terminal reported "); "FP: CQ Process terminal reported sq_cons_idx 0x%x which exceeded max 0x%x\n",
dev_err(&cq->hwq.pdev->dev,
"QPLIB: sq_cons_idx 0x%x which exceeded max 0x%x",
cqe_cons, sq->hwq.max_elements); cqe_cons, sq->hwq.max_elements);
goto do_rq; goto do_rq;
} }
if (qp->sq.flushed) { if (qp->sq.flushed) {
dev_dbg(&cq->hwq.pdev->dev, dev_dbg(&cq->hwq.pdev->dev,
"%s: QPLIB: QP in Flush QP = %p\n", __func__, qp); "%s: QP in Flush QP = %p\n", __func__, qp);
goto sq_done; goto sq_done;
} }
...@@ -2673,16 +2651,14 @@ static int bnxt_qplib_cq_process_terminal(struct bnxt_qplib_cq *cq, ...@@ -2673,16 +2651,14 @@ static int bnxt_qplib_cq_process_terminal(struct bnxt_qplib_cq *cq,
goto done; goto done;
} else if (cqe_cons > rq->hwq.max_elements) { } else if (cqe_cons > rq->hwq.max_elements) {
dev_err(&cq->hwq.pdev->dev, dev_err(&cq->hwq.pdev->dev,
"QPLIB: FP: CQ Processed terminal "); "FP: CQ Processed terminal reported rq_cons_idx 0x%x exceeds max 0x%x\n",
dev_err(&cq->hwq.pdev->dev,
"QPLIB: reported rq_cons_idx 0x%x exceeds max 0x%x",
cqe_cons, rq->hwq.max_elements); cqe_cons, rq->hwq.max_elements);
goto done; goto done;
} }
if (qp->rq.flushed) { if (qp->rq.flushed) {
dev_dbg(&cq->hwq.pdev->dev, dev_dbg(&cq->hwq.pdev->dev,
"%s: QPLIB: QP in Flush QP = %p\n", __func__, qp); "%s: QP in Flush QP = %p\n", __func__, qp);
rc = 0; rc = 0;
goto done; goto done;
} }
...@@ -2704,7 +2680,7 @@ static int bnxt_qplib_cq_process_cutoff(struct bnxt_qplib_cq *cq, ...@@ -2704,7 +2680,7 @@ static int bnxt_qplib_cq_process_cutoff(struct bnxt_qplib_cq *cq,
/* Check the Status */ /* Check the Status */
if (hwcqe->status != CQ_CUTOFF_STATUS_OK) { if (hwcqe->status != CQ_CUTOFF_STATUS_OK) {
dev_err(&cq->hwq.pdev->dev, dev_err(&cq->hwq.pdev->dev,
"QPLIB: FP: CQ Process Cutoff Error status = 0x%x", "FP: CQ Process Cutoff Error status = 0x%x\n",
hwcqe->status); hwcqe->status);
return -EINVAL; return -EINVAL;
} }
...@@ -2724,16 +2700,12 @@ int bnxt_qplib_process_flush_list(struct bnxt_qplib_cq *cq, ...@@ -2724,16 +2700,12 @@ int bnxt_qplib_process_flush_list(struct bnxt_qplib_cq *cq,
spin_lock_irqsave(&cq->flush_lock, flags); spin_lock_irqsave(&cq->flush_lock, flags);
list_for_each_entry(qp, &cq->sqf_head, sq_flush) { list_for_each_entry(qp, &cq->sqf_head, sq_flush) {
dev_dbg(&cq->hwq.pdev->dev, dev_dbg(&cq->hwq.pdev->dev, "FP: Flushing SQ QP= %p\n", qp);
"QPLIB: FP: Flushing SQ QP= %p",
qp);
__flush_sq(&qp->sq, qp, &cqe, &budget); __flush_sq(&qp->sq, qp, &cqe, &budget);
} }
list_for_each_entry(qp, &cq->rqf_head, rq_flush) { list_for_each_entry(qp, &cq->rqf_head, rq_flush) {
dev_dbg(&cq->hwq.pdev->dev, dev_dbg(&cq->hwq.pdev->dev, "FP: Flushing RQ QP= %p\n", qp);
"QPLIB: FP: Flushing RQ QP= %p",
qp);
__flush_rq(&qp->rq, qp, &cqe, &budget); __flush_rq(&qp->rq, qp, &cqe, &budget);
} }
spin_unlock_irqrestore(&cq->flush_lock, flags); spin_unlock_irqrestore(&cq->flush_lock, flags);
...@@ -2801,7 +2773,7 @@ int bnxt_qplib_poll_cq(struct bnxt_qplib_cq *cq, struct bnxt_qplib_cqe *cqe, ...@@ -2801,7 +2773,7 @@ int bnxt_qplib_poll_cq(struct bnxt_qplib_cq *cq, struct bnxt_qplib_cqe *cqe,
goto exit; goto exit;
default: default:
dev_err(&cq->hwq.pdev->dev, dev_err(&cq->hwq.pdev->dev,
"QPLIB: process_cq unknown type 0x%lx", "process_cq unknown type 0x%lx\n",
hw_cqe->cqe_type_toggle & hw_cqe->cqe_type_toggle &
CQ_BASE_CQE_TYPE_MASK); CQ_BASE_CQE_TYPE_MASK);
rc = -EINVAL; rc = -EINVAL;
...@@ -2814,7 +2786,7 @@ int bnxt_qplib_poll_cq(struct bnxt_qplib_cq *cq, struct bnxt_qplib_cqe *cqe, ...@@ -2814,7 +2786,7 @@ int bnxt_qplib_poll_cq(struct bnxt_qplib_cq *cq, struct bnxt_qplib_cqe *cqe,
* next one * next one
*/ */
dev_err(&cq->hwq.pdev->dev, dev_err(&cq->hwq.pdev->dev,
"QPLIB: process_cqe error rc = 0x%x", rc); "process_cqe error rc = 0x%x\n", rc);
} }
raw_cons++; raw_cons++;
} }
......
...@@ -35,6 +35,9 @@ ...@@ -35,6 +35,9 @@
* *
* Description: RDMA Controller HW interface * Description: RDMA Controller HW interface
*/ */
#define dev_fmt(fmt) "QPLIB: " fmt
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/pci.h> #include <linux/pci.h>
...@@ -96,14 +99,13 @@ static int __send_message(struct bnxt_qplib_rcfw *rcfw, struct cmdq_base *req, ...@@ -96,14 +99,13 @@ static int __send_message(struct bnxt_qplib_rcfw *rcfw, struct cmdq_base *req,
opcode != CMDQ_BASE_OPCODE_INITIALIZE_FW && opcode != CMDQ_BASE_OPCODE_INITIALIZE_FW &&
opcode != CMDQ_BASE_OPCODE_QUERY_VERSION)) { opcode != CMDQ_BASE_OPCODE_QUERY_VERSION)) {
dev_err(&rcfw->pdev->dev, dev_err(&rcfw->pdev->dev,
"QPLIB: RCFW not initialized, reject opcode 0x%x", "RCFW not initialized, reject opcode 0x%x\n", opcode);
opcode);
return -EINVAL; return -EINVAL;
} }
if (test_bit(FIRMWARE_INITIALIZED_FLAG, &rcfw->flags) && if (test_bit(FIRMWARE_INITIALIZED_FLAG, &rcfw->flags) &&
opcode == CMDQ_BASE_OPCODE_INITIALIZE_FW) { opcode == CMDQ_BASE_OPCODE_INITIALIZE_FW) {
dev_err(&rcfw->pdev->dev, "QPLIB: RCFW already initialized!"); dev_err(&rcfw->pdev->dev, "RCFW already initialized!\n");
return -EINVAL; return -EINVAL;
} }
...@@ -115,7 +117,7 @@ static int __send_message(struct bnxt_qplib_rcfw *rcfw, struct cmdq_base *req, ...@@ -115,7 +117,7 @@ static int __send_message(struct bnxt_qplib_rcfw *rcfw, struct cmdq_base *req,
*/ */
spin_lock_irqsave(&cmdq->lock, flags); spin_lock_irqsave(&cmdq->lock, flags);
if (req->cmd_size >= HWQ_FREE_SLOTS(cmdq)) { if (req->cmd_size >= HWQ_FREE_SLOTS(cmdq)) {
dev_err(&rcfw->pdev->dev, "QPLIB: RCFW: CMDQ is full!"); dev_err(&rcfw->pdev->dev, "RCFW: CMDQ is full!\n");
spin_unlock_irqrestore(&cmdq->lock, flags); spin_unlock_irqrestore(&cmdq->lock, flags);
return -EAGAIN; return -EAGAIN;
} }
...@@ -154,7 +156,7 @@ static int __send_message(struct bnxt_qplib_rcfw *rcfw, struct cmdq_base *req, ...@@ -154,7 +156,7 @@ static int __send_message(struct bnxt_qplib_rcfw *rcfw, struct cmdq_base *req,
cmdqe = &cmdq_ptr[get_cmdq_pg(sw_prod)][get_cmdq_idx(sw_prod)]; cmdqe = &cmdq_ptr[get_cmdq_pg(sw_prod)][get_cmdq_idx(sw_prod)];
if (!cmdqe) { if (!cmdqe) {
dev_err(&rcfw->pdev->dev, dev_err(&rcfw->pdev->dev,
"QPLIB: RCFW request failed with no cmdqe!"); "RCFW request failed with no cmdqe!\n");
goto done; goto done;
} }
/* Copy a segment of the req cmd to the cmdq */ /* Copy a segment of the req cmd to the cmdq */
...@@ -210,7 +212,7 @@ int bnxt_qplib_rcfw_send_message(struct bnxt_qplib_rcfw *rcfw, ...@@ -210,7 +212,7 @@ int bnxt_qplib_rcfw_send_message(struct bnxt_qplib_rcfw *rcfw,
if (!retry_cnt || (rc != -EAGAIN && rc != -EBUSY)) { if (!retry_cnt || (rc != -EAGAIN && rc != -EBUSY)) {
/* send failed */ /* send failed */
dev_err(&rcfw->pdev->dev, "QPLIB: cmdq[%#x]=%#x send failed", dev_err(&rcfw->pdev->dev, "cmdq[%#x]=%#x send failed\n",
cookie, opcode); cookie, opcode);
return rc; return rc;
} }
...@@ -224,7 +226,7 @@ int bnxt_qplib_rcfw_send_message(struct bnxt_qplib_rcfw *rcfw, ...@@ -224,7 +226,7 @@ int bnxt_qplib_rcfw_send_message(struct bnxt_qplib_rcfw *rcfw,
rc = __wait_for_resp(rcfw, cookie); rc = __wait_for_resp(rcfw, cookie);
if (rc) { if (rc) {
/* timed out */ /* timed out */
dev_err(&rcfw->pdev->dev, "QPLIB: cmdq[%#x]=%#x timedout (%d)msec", dev_err(&rcfw->pdev->dev, "cmdq[%#x]=%#x timedout (%d)msec\n",
cookie, opcode, RCFW_CMD_WAIT_TIME_MS); cookie, opcode, RCFW_CMD_WAIT_TIME_MS);
set_bit(FIRMWARE_TIMED_OUT, &rcfw->flags); set_bit(FIRMWARE_TIMED_OUT, &rcfw->flags);
return rc; return rc;
...@@ -232,7 +234,7 @@ int bnxt_qplib_rcfw_send_message(struct bnxt_qplib_rcfw *rcfw, ...@@ -232,7 +234,7 @@ int bnxt_qplib_rcfw_send_message(struct bnxt_qplib_rcfw *rcfw,
if (evnt->status) { if (evnt->status) {
/* failed with status */ /* failed with status */
dev_err(&rcfw->pdev->dev, "QPLIB: cmdq[%#x]=%#x status %#x", dev_err(&rcfw->pdev->dev, "cmdq[%#x]=%#x status %#x\n",
cookie, opcode, evnt->status); cookie, opcode, evnt->status);
rc = -EFAULT; rc = -EFAULT;
} }
...@@ -298,9 +300,9 @@ static int bnxt_qplib_process_qp_event(struct bnxt_qplib_rcfw *rcfw, ...@@ -298,9 +300,9 @@ static int bnxt_qplib_process_qp_event(struct bnxt_qplib_rcfw *rcfw,
qp_id = le32_to_cpu(err_event->xid); qp_id = le32_to_cpu(err_event->xid);
qp = rcfw->qp_tbl[qp_id].qp_handle; qp = rcfw->qp_tbl[qp_id].qp_handle;
dev_dbg(&rcfw->pdev->dev, dev_dbg(&rcfw->pdev->dev,
"QPLIB: Received QP error notification"); "Received QP error notification\n");
dev_dbg(&rcfw->pdev->dev, dev_dbg(&rcfw->pdev->dev,
"QPLIB: qpid 0x%x, req_err=0x%x, resp_err=0x%x\n", "qpid 0x%x, req_err=0x%x, resp_err=0x%x\n",
qp_id, err_event->req_err_state_reason, qp_id, err_event->req_err_state_reason,
err_event->res_err_state_reason); err_event->res_err_state_reason);
if (!qp) if (!qp)
...@@ -323,13 +325,13 @@ static int bnxt_qplib_process_qp_event(struct bnxt_qplib_rcfw *rcfw, ...@@ -323,13 +325,13 @@ static int bnxt_qplib_process_qp_event(struct bnxt_qplib_rcfw *rcfw,
crsqe->resp = NULL; crsqe->resp = NULL;
} else { } else {
dev_err(&rcfw->pdev->dev, dev_err(&rcfw->pdev->dev,
"QPLIB: CMD %s resp->cookie = %#x, evnt->cookie = %#x", "CMD %s resp->cookie = %#x, evnt->cookie = %#x\n",
crsqe->resp ? "mismatch" : "collision", crsqe->resp ? "mismatch" : "collision",
crsqe->resp ? crsqe->resp->cookie : 0, mcookie); crsqe->resp ? crsqe->resp->cookie : 0, mcookie);
} }
if (!test_and_clear_bit(cbit, rcfw->cmdq_bitmap)) if (!test_and_clear_bit(cbit, rcfw->cmdq_bitmap))
dev_warn(&rcfw->pdev->dev, dev_warn(&rcfw->pdev->dev,
"QPLIB: CMD bit %d was not requested", cbit); "CMD bit %d was not requested\n", cbit);
cmdq->cons += crsqe->req_size; cmdq->cons += crsqe->req_size;
crsqe->req_size = 0; crsqe->req_size = 0;
...@@ -376,14 +378,13 @@ static void bnxt_qplib_service_creq(unsigned long data) ...@@ -376,14 +378,13 @@ static void bnxt_qplib_service_creq(unsigned long data)
(rcfw, (struct creq_func_event *)creqe)) (rcfw, (struct creq_func_event *)creqe))
rcfw->creq_func_event_processed++; rcfw->creq_func_event_processed++;
else else
dev_warn dev_warn(&rcfw->pdev->dev,
(&rcfw->pdev->dev, "QPLIB:aeqe:%#x Not handled", "aeqe:%#x Not handled\n", type);
type);
break; break;
default: default:
dev_warn(&rcfw->pdev->dev, "QPLIB: creqe with ");
dev_warn(&rcfw->pdev->dev, dev_warn(&rcfw->pdev->dev,
"QPLIB: op_event = 0x%x not handled", type); "creqe with op_event = 0x%x not handled\n",
type);
break; break;
} }
raw_cons++; raw_cons++;
...@@ -551,7 +552,7 @@ int bnxt_qplib_alloc_rcfw_channel(struct pci_dev *pdev, ...@@ -551,7 +552,7 @@ int bnxt_qplib_alloc_rcfw_channel(struct pci_dev *pdev,
BNXT_QPLIB_CREQE_UNITS, 0, PAGE_SIZE, BNXT_QPLIB_CREQE_UNITS, 0, PAGE_SIZE,
HWQ_TYPE_L2_CMPL)) { HWQ_TYPE_L2_CMPL)) {
dev_err(&rcfw->pdev->dev, dev_err(&rcfw->pdev->dev,
"QPLIB: HW channel CREQ allocation failed"); "HW channel CREQ allocation failed\n");
goto fail; goto fail;
} }
rcfw->cmdq.max_elements = BNXT_QPLIB_CMDQE_MAX_CNT; rcfw->cmdq.max_elements = BNXT_QPLIB_CMDQE_MAX_CNT;
...@@ -560,7 +561,7 @@ int bnxt_qplib_alloc_rcfw_channel(struct pci_dev *pdev, ...@@ -560,7 +561,7 @@ int bnxt_qplib_alloc_rcfw_channel(struct pci_dev *pdev,
BNXT_QPLIB_CMDQE_UNITS, 0, PAGE_SIZE, BNXT_QPLIB_CMDQE_UNITS, 0, PAGE_SIZE,
HWQ_TYPE_CTX)) { HWQ_TYPE_CTX)) {
dev_err(&rcfw->pdev->dev, dev_err(&rcfw->pdev->dev,
"QPLIB: HW channel CMDQ allocation failed"); "HW channel CMDQ allocation failed\n");
goto fail; goto fail;
} }
...@@ -616,7 +617,7 @@ void bnxt_qplib_disable_rcfw_channel(struct bnxt_qplib_rcfw *rcfw) ...@@ -616,7 +617,7 @@ void bnxt_qplib_disable_rcfw_channel(struct bnxt_qplib_rcfw *rcfw)
indx = find_first_bit(rcfw->cmdq_bitmap, rcfw->bmap_size); indx = find_first_bit(rcfw->cmdq_bitmap, rcfw->bmap_size);
if (indx != rcfw->bmap_size) if (indx != rcfw->bmap_size)
dev_err(&rcfw->pdev->dev, dev_err(&rcfw->pdev->dev,
"QPLIB: disabling RCFW with pending cmd-bit %lx", indx); "disabling RCFW with pending cmd-bit %lx\n", indx);
kfree(rcfw->cmdq_bitmap); kfree(rcfw->cmdq_bitmap);
rcfw->bmap_size = 0; rcfw->bmap_size = 0;
...@@ -681,8 +682,7 @@ int bnxt_qplib_enable_rcfw_channel(struct pci_dev *pdev, ...@@ -681,8 +682,7 @@ int bnxt_qplib_enable_rcfw_channel(struct pci_dev *pdev,
RCFW_COMM_BASE_OFFSET, RCFW_COMM_BASE_OFFSET,
RCFW_COMM_SIZE); RCFW_COMM_SIZE);
if (!rcfw->cmdq_bar_reg_iomem) { if (!rcfw->cmdq_bar_reg_iomem) {
dev_err(&rcfw->pdev->dev, dev_err(&rcfw->pdev->dev, "CMDQ BAR region %d mapping failed\n",
"QPLIB: CMDQ BAR region %d mapping failed",
rcfw->cmdq_bar_reg); rcfw->cmdq_bar_reg);
return -ENOMEM; return -ENOMEM;
} }
...@@ -697,13 +697,12 @@ int bnxt_qplib_enable_rcfw_channel(struct pci_dev *pdev, ...@@ -697,13 +697,12 @@ int bnxt_qplib_enable_rcfw_channel(struct pci_dev *pdev,
res_base = pci_resource_start(pdev, rcfw->creq_bar_reg); res_base = pci_resource_start(pdev, rcfw->creq_bar_reg);
if (!res_base) if (!res_base)
dev_err(&rcfw->pdev->dev, dev_err(&rcfw->pdev->dev,
"QPLIB: CREQ BAR region %d resc start is 0!", "CREQ BAR region %d resc start is 0!\n",
rcfw->creq_bar_reg); rcfw->creq_bar_reg);
rcfw->creq_bar_reg_iomem = ioremap_nocache(res_base + cp_bar_reg_off, rcfw->creq_bar_reg_iomem = ioremap_nocache(res_base + cp_bar_reg_off,
4); 4);
if (!rcfw->creq_bar_reg_iomem) { if (!rcfw->creq_bar_reg_iomem) {
dev_err(&rcfw->pdev->dev, dev_err(&rcfw->pdev->dev, "CREQ BAR region %d mapping failed\n",
"QPLIB: CREQ BAR region %d mapping failed",
rcfw->creq_bar_reg); rcfw->creq_bar_reg);
return -ENOMEM; return -ENOMEM;
} }
...@@ -717,7 +716,7 @@ int bnxt_qplib_enable_rcfw_channel(struct pci_dev *pdev, ...@@ -717,7 +716,7 @@ int bnxt_qplib_enable_rcfw_channel(struct pci_dev *pdev,
rc = bnxt_qplib_rcfw_start_irq(rcfw, msix_vector, true); rc = bnxt_qplib_rcfw_start_irq(rcfw, msix_vector, true);
if (rc) { if (rc) {
dev_err(&rcfw->pdev->dev, dev_err(&rcfw->pdev->dev,
"QPLIB: Failed to request IRQ for CREQ rc = 0x%x", rc); "Failed to request IRQ for CREQ rc = 0x%x\n", rc);
bnxt_qplib_disable_rcfw_channel(rcfw); bnxt_qplib_disable_rcfw_channel(rcfw);
return rc; return rc;
} }
......
...@@ -36,6 +36,8 @@ ...@@ -36,6 +36,8 @@
* Description: QPLib resource manager * Description: QPLib resource manager
*/ */
#define dev_fmt(fmt) "QPLIB: " fmt
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
...@@ -68,8 +70,7 @@ static void __free_pbl(struct pci_dev *pdev, struct bnxt_qplib_pbl *pbl, ...@@ -68,8 +70,7 @@ static void __free_pbl(struct pci_dev *pdev, struct bnxt_qplib_pbl *pbl,
pbl->pg_map_arr[i]); pbl->pg_map_arr[i]);
else else
dev_warn(&pdev->dev, dev_warn(&pdev->dev,
"QPLIB: PBL free pg_arr[%d] empty?!", "PBL free pg_arr[%d] empty?!\n", i);
i);
pbl->pg_arr[i] = NULL; pbl->pg_arr[i] = NULL;
} }
} }
...@@ -537,7 +538,7 @@ static void bnxt_qplib_free_pkey_tbl(struct bnxt_qplib_res *res, ...@@ -537,7 +538,7 @@ static void bnxt_qplib_free_pkey_tbl(struct bnxt_qplib_res *res,
struct bnxt_qplib_pkey_tbl *pkey_tbl) struct bnxt_qplib_pkey_tbl *pkey_tbl)
{ {
if (!pkey_tbl->tbl) if (!pkey_tbl->tbl)
dev_dbg(&res->pdev->dev, "QPLIB: PKEY tbl not present"); dev_dbg(&res->pdev->dev, "PKEY tbl not present\n");
else else
kfree(pkey_tbl->tbl); kfree(pkey_tbl->tbl);
...@@ -578,7 +579,7 @@ int bnxt_qplib_dealloc_pd(struct bnxt_qplib_res *res, ...@@ -578,7 +579,7 @@ int bnxt_qplib_dealloc_pd(struct bnxt_qplib_res *res,
struct bnxt_qplib_pd *pd) struct bnxt_qplib_pd *pd)
{ {
if (test_and_set_bit(pd->id, pdt->tbl)) { if (test_and_set_bit(pd->id, pdt->tbl)) {
dev_warn(&res->pdev->dev, "Freeing an unused PD? pdn = %d", dev_warn(&res->pdev->dev, "Freeing an unused PD? pdn = %d\n",
pd->id); pd->id);
return -EINVAL; return -EINVAL;
} }
...@@ -639,11 +640,11 @@ int bnxt_qplib_dealloc_dpi(struct bnxt_qplib_res *res, ...@@ -639,11 +640,11 @@ int bnxt_qplib_dealloc_dpi(struct bnxt_qplib_res *res,
struct bnxt_qplib_dpi *dpi) struct bnxt_qplib_dpi *dpi)
{ {
if (dpi->dpi >= dpit->max) { if (dpi->dpi >= dpit->max) {
dev_warn(&res->pdev->dev, "Invalid DPI? dpi = %d", dpi->dpi); dev_warn(&res->pdev->dev, "Invalid DPI? dpi = %d\n", dpi->dpi);
return -EINVAL; return -EINVAL;
} }
if (test_and_set_bit(dpi->dpi, dpit->tbl)) { if (test_and_set_bit(dpi->dpi, dpit->tbl)) {
dev_warn(&res->pdev->dev, "Freeing an unused DPI? dpi = %d", dev_warn(&res->pdev->dev, "Freeing an unused DPI? dpi = %d\n",
dpi->dpi); dpi->dpi);
return -EINVAL; return -EINVAL;
} }
...@@ -673,22 +674,21 @@ static int bnxt_qplib_alloc_dpi_tbl(struct bnxt_qplib_res *res, ...@@ -673,22 +674,21 @@ static int bnxt_qplib_alloc_dpi_tbl(struct bnxt_qplib_res *res,
u32 dbr_len, bytes; u32 dbr_len, bytes;
if (dpit->dbr_bar_reg_iomem) { if (dpit->dbr_bar_reg_iomem) {
dev_err(&res->pdev->dev, dev_err(&res->pdev->dev, "DBR BAR region %d already mapped\n",
"QPLIB: DBR BAR region %d already mapped", dbr_bar_reg); dbr_bar_reg);
return -EALREADY; return -EALREADY;
} }
bar_reg_base = pci_resource_start(res->pdev, dbr_bar_reg); bar_reg_base = pci_resource_start(res->pdev, dbr_bar_reg);
if (!bar_reg_base) { if (!bar_reg_base) {
dev_err(&res->pdev->dev, dev_err(&res->pdev->dev, "BAR region %d resc start failed\n",
"QPLIB: BAR region %d resc start failed", dbr_bar_reg); dbr_bar_reg);
return -ENOMEM; return -ENOMEM;
} }
dbr_len = pci_resource_len(res->pdev, dbr_bar_reg) - dbr_offset; dbr_len = pci_resource_len(res->pdev, dbr_bar_reg) - dbr_offset;
if (!dbr_len || ((dbr_len & (PAGE_SIZE - 1)) != 0)) { if (!dbr_len || ((dbr_len & (PAGE_SIZE - 1)) != 0)) {
dev_err(&res->pdev->dev, "QPLIB: Invalid DBR length %d", dev_err(&res->pdev->dev, "Invalid DBR length %d\n", dbr_len);
dbr_len);
return -ENOMEM; return -ENOMEM;
} }
...@@ -696,8 +696,7 @@ static int bnxt_qplib_alloc_dpi_tbl(struct bnxt_qplib_res *res, ...@@ -696,8 +696,7 @@ static int bnxt_qplib_alloc_dpi_tbl(struct bnxt_qplib_res *res,
dbr_len); dbr_len);
if (!dpit->dbr_bar_reg_iomem) { if (!dpit->dbr_bar_reg_iomem) {
dev_err(&res->pdev->dev, dev_err(&res->pdev->dev,
"QPLIB: FP: DBR BAR region %d mapping failed", "FP: DBR BAR region %d mapping failed\n", dbr_bar_reg);
dbr_bar_reg);
return -ENOMEM; return -ENOMEM;
} }
...@@ -767,7 +766,7 @@ static int bnxt_qplib_alloc_stats_ctx(struct pci_dev *pdev, ...@@ -767,7 +766,7 @@ static int bnxt_qplib_alloc_stats_ctx(struct pci_dev *pdev,
stats->dma = dma_alloc_coherent(&pdev->dev, stats->size, stats->dma = dma_alloc_coherent(&pdev->dev, stats->size,
&stats->dma_map, GFP_KERNEL); &stats->dma_map, GFP_KERNEL);
if (!stats->dma) { if (!stats->dma) {
dev_err(&pdev->dev, "QPLIB: Stats DMA allocation failed"); dev_err(&pdev->dev, "Stats DMA allocation failed\n");
return -ENOMEM; return -ENOMEM;
} }
return 0; return 0;
......
...@@ -36,6 +36,8 @@ ...@@ -36,6 +36,8 @@
* Description: Slow Path Operators * Description: Slow Path Operators
*/ */
#define dev_fmt(fmt) "QPLIB: " fmt
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/sched.h> #include <linux/sched.h>
...@@ -89,7 +91,7 @@ int bnxt_qplib_get_dev_attr(struct bnxt_qplib_rcfw *rcfw, ...@@ -89,7 +91,7 @@ int bnxt_qplib_get_dev_attr(struct bnxt_qplib_rcfw *rcfw,
sbuf = bnxt_qplib_rcfw_alloc_sbuf(rcfw, sizeof(*sb)); sbuf = bnxt_qplib_rcfw_alloc_sbuf(rcfw, sizeof(*sb));
if (!sbuf) { if (!sbuf) {
dev_err(&rcfw->pdev->dev, dev_err(&rcfw->pdev->dev,
"QPLIB: SP: QUERY_FUNC alloc side buffer failed"); "SP: QUERY_FUNC alloc side buffer failed\n");
return -ENOMEM; return -ENOMEM;
} }
...@@ -186,8 +188,7 @@ int bnxt_qplib_set_func_resources(struct bnxt_qplib_res *res, ...@@ -186,8 +188,7 @@ int bnxt_qplib_set_func_resources(struct bnxt_qplib_res *res,
(void *)&resp, (void *)&resp,
NULL, 0); NULL, 0);
if (rc) { if (rc) {
dev_err(&res->pdev->dev, dev_err(&res->pdev->dev, "Failed to set function resources\n");
"QPLIB: Failed to set function resources");
} }
return rc; return rc;
} }
...@@ -199,7 +200,7 @@ int bnxt_qplib_get_sgid(struct bnxt_qplib_res *res, ...@@ -199,7 +200,7 @@ int bnxt_qplib_get_sgid(struct bnxt_qplib_res *res,
{ {
if (index >= sgid_tbl->max) { if (index >= sgid_tbl->max) {
dev_err(&res->pdev->dev, dev_err(&res->pdev->dev,
"QPLIB: Index %d exceeded SGID table max (%d)", "Index %d exceeded SGID table max (%d)\n",
index, sgid_tbl->max); index, sgid_tbl->max);
return -EINVAL; return -EINVAL;
} }
...@@ -217,13 +218,12 @@ int bnxt_qplib_del_sgid(struct bnxt_qplib_sgid_tbl *sgid_tbl, ...@@ -217,13 +218,12 @@ int bnxt_qplib_del_sgid(struct bnxt_qplib_sgid_tbl *sgid_tbl,
int index; int index;
if (!sgid_tbl) { if (!sgid_tbl) {
dev_err(&res->pdev->dev, "QPLIB: SGID table not allocated"); dev_err(&res->pdev->dev, "SGID table not allocated\n");
return -EINVAL; return -EINVAL;
} }
/* Do we need a sgid_lock here? */ /* Do we need a sgid_lock here? */
if (!sgid_tbl->active) { if (!sgid_tbl->active) {
dev_err(&res->pdev->dev, dev_err(&res->pdev->dev, "SGID table has no active entries\n");
"QPLIB: SGID table has no active entries");
return -ENOMEM; return -ENOMEM;
} }
for (index = 0; index < sgid_tbl->max; index++) { for (index = 0; index < sgid_tbl->max; index++) {
...@@ -231,7 +231,7 @@ int bnxt_qplib_del_sgid(struct bnxt_qplib_sgid_tbl *sgid_tbl, ...@@ -231,7 +231,7 @@ int bnxt_qplib_del_sgid(struct bnxt_qplib_sgid_tbl *sgid_tbl,
break; break;
} }
if (index == sgid_tbl->max) { if (index == sgid_tbl->max) {
dev_warn(&res->pdev->dev, "GID not found in the SGID table"); dev_warn(&res->pdev->dev, "GID not found in the SGID table\n");
return 0; return 0;
} }
/* Remove GID from the SGID table */ /* Remove GID from the SGID table */
...@@ -244,7 +244,7 @@ int bnxt_qplib_del_sgid(struct bnxt_qplib_sgid_tbl *sgid_tbl, ...@@ -244,7 +244,7 @@ int bnxt_qplib_del_sgid(struct bnxt_qplib_sgid_tbl *sgid_tbl,
RCFW_CMD_PREP(req, DELETE_GID, cmd_flags); RCFW_CMD_PREP(req, DELETE_GID, cmd_flags);
if (sgid_tbl->hw_id[index] == 0xFFFF) { if (sgid_tbl->hw_id[index] == 0xFFFF) {
dev_err(&res->pdev->dev, dev_err(&res->pdev->dev,
"QPLIB: GID entry contains an invalid HW id"); "GID entry contains an invalid HW id\n");
return -EINVAL; return -EINVAL;
} }
req.gid_index = cpu_to_le16(sgid_tbl->hw_id[index]); req.gid_index = cpu_to_le16(sgid_tbl->hw_id[index]);
...@@ -258,7 +258,7 @@ int bnxt_qplib_del_sgid(struct bnxt_qplib_sgid_tbl *sgid_tbl, ...@@ -258,7 +258,7 @@ int bnxt_qplib_del_sgid(struct bnxt_qplib_sgid_tbl *sgid_tbl,
sgid_tbl->vlan[index] = 0; sgid_tbl->vlan[index] = 0;
sgid_tbl->active--; sgid_tbl->active--;
dev_dbg(&res->pdev->dev, dev_dbg(&res->pdev->dev,
"QPLIB: SGID deleted hw_id[0x%x] = 0x%x active = 0x%x", "SGID deleted hw_id[0x%x] = 0x%x active = 0x%x\n",
index, sgid_tbl->hw_id[index], sgid_tbl->active); index, sgid_tbl->hw_id[index], sgid_tbl->active);
sgid_tbl->hw_id[index] = (u16)-1; sgid_tbl->hw_id[index] = (u16)-1;
...@@ -277,20 +277,19 @@ int bnxt_qplib_add_sgid(struct bnxt_qplib_sgid_tbl *sgid_tbl, ...@@ -277,20 +277,19 @@ int bnxt_qplib_add_sgid(struct bnxt_qplib_sgid_tbl *sgid_tbl,
int i, free_idx; int i, free_idx;
if (!sgid_tbl) { if (!sgid_tbl) {
dev_err(&res->pdev->dev, "QPLIB: SGID table not allocated"); dev_err(&res->pdev->dev, "SGID table not allocated\n");
return -EINVAL; return -EINVAL;
} }
/* Do we need a sgid_lock here? */ /* Do we need a sgid_lock here? */
if (sgid_tbl->active == sgid_tbl->max) { if (sgid_tbl->active == sgid_tbl->max) {
dev_err(&res->pdev->dev, "QPLIB: SGID table is full"); dev_err(&res->pdev->dev, "SGID table is full\n");
return -ENOMEM; return -ENOMEM;
} }
free_idx = sgid_tbl->max; free_idx = sgid_tbl->max;
for (i = 0; i < sgid_tbl->max; i++) { for (i = 0; i < sgid_tbl->max; i++) {
if (!memcmp(&sgid_tbl->tbl[i], gid, sizeof(*gid))) { if (!memcmp(&sgid_tbl->tbl[i], gid, sizeof(*gid))) {
dev_dbg(&res->pdev->dev, dev_dbg(&res->pdev->dev,
"QPLIB: SGID entry already exist in entry %d!", "SGID entry already exist in entry %d!\n", i);
i);
*index = i; *index = i;
return -EALREADY; return -EALREADY;
} else if (!memcmp(&sgid_tbl->tbl[i], &bnxt_qplib_gid_zero, } else if (!memcmp(&sgid_tbl->tbl[i], &bnxt_qplib_gid_zero,
...@@ -301,7 +300,7 @@ int bnxt_qplib_add_sgid(struct bnxt_qplib_sgid_tbl *sgid_tbl, ...@@ -301,7 +300,7 @@ int bnxt_qplib_add_sgid(struct bnxt_qplib_sgid_tbl *sgid_tbl,
} }
if (free_idx == sgid_tbl->max) { if (free_idx == sgid_tbl->max) {
dev_err(&res->pdev->dev, dev_err(&res->pdev->dev,
"QPLIB: SGID table is FULL but count is not MAX??"); "SGID table is FULL but count is not MAX??\n");
return -ENOMEM; return -ENOMEM;
} }
if (update) { if (update) {
...@@ -348,7 +347,7 @@ int bnxt_qplib_add_sgid(struct bnxt_qplib_sgid_tbl *sgid_tbl, ...@@ -348,7 +347,7 @@ int bnxt_qplib_add_sgid(struct bnxt_qplib_sgid_tbl *sgid_tbl,
sgid_tbl->vlan[free_idx] = 1; sgid_tbl->vlan[free_idx] = 1;
dev_dbg(&res->pdev->dev, dev_dbg(&res->pdev->dev,
"QPLIB: SGID added hw_id[0x%x] = 0x%x active = 0x%x", "SGID added hw_id[0x%x] = 0x%x active = 0x%x\n",
free_idx, sgid_tbl->hw_id[free_idx], sgid_tbl->active); free_idx, sgid_tbl->hw_id[free_idx], sgid_tbl->active);
*index = free_idx; *index = free_idx;
...@@ -404,7 +403,7 @@ int bnxt_qplib_get_pkey(struct bnxt_qplib_res *res, ...@@ -404,7 +403,7 @@ int bnxt_qplib_get_pkey(struct bnxt_qplib_res *res,
} }
if (index >= pkey_tbl->max) { if (index >= pkey_tbl->max) {
dev_err(&res->pdev->dev, dev_err(&res->pdev->dev,
"QPLIB: Index %d exceeded PKEY table max (%d)", "Index %d exceeded PKEY table max (%d)\n",
index, pkey_tbl->max); index, pkey_tbl->max);
return -EINVAL; return -EINVAL;
} }
...@@ -419,14 +418,13 @@ int bnxt_qplib_del_pkey(struct bnxt_qplib_res *res, ...@@ -419,14 +418,13 @@ int bnxt_qplib_del_pkey(struct bnxt_qplib_res *res,
int i, rc = 0; int i, rc = 0;
if (!pkey_tbl) { if (!pkey_tbl) {
dev_err(&res->pdev->dev, "QPLIB: PKEY table not allocated"); dev_err(&res->pdev->dev, "PKEY table not allocated\n");
return -EINVAL; return -EINVAL;
} }
/* Do we need a pkey_lock here? */ /* Do we need a pkey_lock here? */
if (!pkey_tbl->active) { if (!pkey_tbl->active) {
dev_err(&res->pdev->dev, dev_err(&res->pdev->dev, "PKEY table has no active entries\n");
"QPLIB: PKEY table has no active entries");
return -ENOMEM; return -ENOMEM;
} }
for (i = 0; i < pkey_tbl->max; i++) { for (i = 0; i < pkey_tbl->max; i++) {
...@@ -435,8 +433,7 @@ int bnxt_qplib_del_pkey(struct bnxt_qplib_res *res, ...@@ -435,8 +433,7 @@ int bnxt_qplib_del_pkey(struct bnxt_qplib_res *res,
} }
if (i == pkey_tbl->max) { if (i == pkey_tbl->max) {
dev_err(&res->pdev->dev, dev_err(&res->pdev->dev,
"QPLIB: PKEY 0x%04x not found in the pkey table", "PKEY 0x%04x not found in the pkey table\n", *pkey);
*pkey);
return -ENOMEM; return -ENOMEM;
} }
memset(&pkey_tbl->tbl[i], 0, sizeof(*pkey)); memset(&pkey_tbl->tbl[i], 0, sizeof(*pkey));
...@@ -453,13 +450,13 @@ int bnxt_qplib_add_pkey(struct bnxt_qplib_res *res, ...@@ -453,13 +450,13 @@ int bnxt_qplib_add_pkey(struct bnxt_qplib_res *res,
int i, free_idx, rc = 0; int i, free_idx, rc = 0;
if (!pkey_tbl) { if (!pkey_tbl) {
dev_err(&res->pdev->dev, "QPLIB: PKEY table not allocated"); dev_err(&res->pdev->dev, "PKEY table not allocated\n");
return -EINVAL; return -EINVAL;
} }
/* Do we need a pkey_lock here? */ /* Do we need a pkey_lock here? */
if (pkey_tbl->active == pkey_tbl->max) { if (pkey_tbl->active == pkey_tbl->max) {
dev_err(&res->pdev->dev, "QPLIB: PKEY table is full"); dev_err(&res->pdev->dev, "PKEY table is full\n");
return -ENOMEM; return -ENOMEM;
} }
free_idx = pkey_tbl->max; free_idx = pkey_tbl->max;
...@@ -471,7 +468,7 @@ int bnxt_qplib_add_pkey(struct bnxt_qplib_res *res, ...@@ -471,7 +468,7 @@ int bnxt_qplib_add_pkey(struct bnxt_qplib_res *res,
} }
if (free_idx == pkey_tbl->max) { if (free_idx == pkey_tbl->max) {
dev_err(&res->pdev->dev, dev_err(&res->pdev->dev,
"QPLIB: PKEY table is FULL but count is not MAX??"); "PKEY table is FULL but count is not MAX??\n");
return -ENOMEM; return -ENOMEM;
} }
/* Add PKEY to the pkey_tbl */ /* Add PKEY to the pkey_tbl */
...@@ -555,8 +552,7 @@ int bnxt_qplib_free_mrw(struct bnxt_qplib_res *res, struct bnxt_qplib_mrw *mrw) ...@@ -555,8 +552,7 @@ int bnxt_qplib_free_mrw(struct bnxt_qplib_res *res, struct bnxt_qplib_mrw *mrw)
int rc; int rc;
if (mrw->lkey == 0xFFFFFFFF) { if (mrw->lkey == 0xFFFFFFFF) {
dev_info(&res->pdev->dev, dev_info(&res->pdev->dev, "SP: Free a reserved lkey MRW\n");
"QPLIB: SP: Free a reserved lkey MRW");
return 0; return 0;
} }
...@@ -666,9 +662,8 @@ int bnxt_qplib_reg_mr(struct bnxt_qplib_res *res, struct bnxt_qplib_mrw *mr, ...@@ -666,9 +662,8 @@ int bnxt_qplib_reg_mr(struct bnxt_qplib_res *res, struct bnxt_qplib_mrw *mr,
pages++; pages++;
if (pages > MAX_PBL_LVL_1_PGS) { if (pages > MAX_PBL_LVL_1_PGS) {
dev_err(&res->pdev->dev, "QPLIB: SP: Reg MR pages ");
dev_err(&res->pdev->dev, dev_err(&res->pdev->dev,
"requested (0x%x) exceeded max (0x%x)", "SP: Reg MR pages requested (0x%x) exceeded max (0x%x)\n",
pages, MAX_PBL_LVL_1_PGS); pages, MAX_PBL_LVL_1_PGS);
return -ENOMEM; return -ENOMEM;
} }
...@@ -684,7 +679,7 @@ int bnxt_qplib_reg_mr(struct bnxt_qplib_res *res, struct bnxt_qplib_mrw *mr, ...@@ -684,7 +679,7 @@ int bnxt_qplib_reg_mr(struct bnxt_qplib_res *res, struct bnxt_qplib_mrw *mr,
HWQ_TYPE_CTX); HWQ_TYPE_CTX);
if (rc) { if (rc) {
dev_err(&res->pdev->dev, dev_err(&res->pdev->dev,
"SP: Reg MR memory allocation failed"); "SP: Reg MR memory allocation failed\n");
return -ENOMEM; return -ENOMEM;
} }
/* Write to the hwq */ /* Write to the hwq */
...@@ -795,7 +790,7 @@ int bnxt_qplib_get_roce_stats(struct bnxt_qplib_rcfw *rcfw, ...@@ -795,7 +790,7 @@ int bnxt_qplib_get_roce_stats(struct bnxt_qplib_rcfw *rcfw,
sbuf = bnxt_qplib_rcfw_alloc_sbuf(rcfw, sizeof(*sb)); sbuf = bnxt_qplib_rcfw_alloc_sbuf(rcfw, sizeof(*sb));
if (!sbuf) { if (!sbuf) {
dev_err(&rcfw->pdev->dev, dev_err(&rcfw->pdev->dev,
"QPLIB: SP: QUERY_ROCE_STATS alloc side buffer failed"); "SP: QUERY_ROCE_STATS alloc side buffer failed\n");
return -ENOMEM; return -ENOMEM;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment