|
@@ -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)
|
|
|
|
|
|
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",
|
|
|
|
- qp);
|
|
|
|
|
|
+ "FP: Adding to SQ Flush list = %p\n", 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)
|
|
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",
|
|
|
|
- qp);
|
|
|
|
|
|
+ "FP: Adding to RQ Flush list = %p\n", 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,
|
|
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,
|
|
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)
|
|
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",
|
|
|
|
- type);
|
|
|
|
|
|
+ "cqn - type 0x%x not handled\n", 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)
|
|
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)
|
|
break;
|
|
break;
|
|
default:
|
|
default:
|
|
dev_warn(&nq->pdev->dev,
|
|
dev_warn(&nq->pdev->dev,
|
|
- "QPLIB: nqe with type = 0x%x not handled",
|
|
|
|
- type);
|
|
|
|
|
|
+ "nqe with type = 0x%x not handled\n", 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,
|
|
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,
|
|
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,
|
|
|
|
|
|
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!",
|
|
|
|
- srq->id);
|
|
|
|
|
|
+ dev_err(&srq_hwq->pdev->dev,
|
|
|
|
+ "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)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
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,
|
|
|
|
|
|
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,
|
|
/* 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 @@ done:
|
|
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,
|
|
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",
|
|
|
|
- __func__);
|
|
|
|
|
|
+ "%s: Error QP. Scheduling for poll_cq\n", __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 @@ queue_err:
|
|
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)
|
|
|
|
|
|
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,
|
|
* 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,
|
|
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,
|
|
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,
|
|
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 ");
|
|
|
|
- dev_err(&cq->hwq.pdev->dev,
|
|
|
|
- "QPLIB: sq_cons_idx 0x%x which exceeded max 0x%x",
|
|
|
|
|
|
+ "FP: CQ Process req reported sq_cons_idx 0x%x which exceeded max 0x%x\n",
|
|
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,
|
|
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 ");
|
|
|
|
- dev_err(&cq->hwq.pdev->dev,
|
|
|
|
- "QPLIB: wr_id[%d] = 0x%llx with status 0x%x",
|
|
|
|
|
|
+ "FP: CQ Processed Req wr_id[%d] = 0x%llx with status 0x%x\n",
|
|
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,
|
|
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,
|
|
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 ");
|
|
|
|
- dev_err(&cq->hwq.pdev->dev,
|
|
|
|
- "QPLIB: wr_id idx 0x%x exceeded SRQ max 0x%x",
|
|
|
|
|
|
+ "FP: CQ Process RC wr_id idx 0x%x exceeded SRQ max 0x%x\n",
|
|
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,
|
|
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 ");
|
|
|
|
- dev_err(&cq->hwq.pdev->dev,
|
|
|
|
- "QPLIB: wr_id idx 0x%x exceeded RQ max 0x%x",
|
|
|
|
|
|
+ "FP: CQ Process RC wr_id idx 0x%x exceeded RQ max 0x%x\n",
|
|
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,
|
|
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,
|
|
|
|
|
|
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 ");
|
|
|
|
- dev_err(&cq->hwq.pdev->dev,
|
|
|
|
- "QPLIB: wr_id idx 0x%x exceeded SRQ max 0x%x",
|
|
|
|
|
|
+ "FP: CQ Process UD wr_id idx 0x%x exceeded SRQ max 0x%x\n",
|
|
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,
|
|
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 ");
|
|
|
|
- dev_err(&cq->hwq.pdev->dev,
|
|
|
|
- "QPLIB: wr_id idx 0x%x exceeded RQ max 0x%x",
|
|
|
|
|
|
+ "FP: CQ Process UD wr_id idx 0x%x exceeded RQ max 0x%x\n",
|
|
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,
|
|
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 Raw/QP1 qp is NULL");
|
|
|
|
|
|
+ dev_err(&cq->hwq.pdev->dev, "process_cq Raw/QP1 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;
|
|
@@ -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 ");
|
|
|
|
- dev_err(&cq->hwq.pdev->dev,
|
|
|
|
- "QPLIB: wr_id idx 0x%x exceeded SRQ max 0x%x",
|
|
|
|
|
|
+ "FP: CQ Process Raw/QP1 wr_id idx 0x%x exceeded SRQ max 0x%x\n",
|
|
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,
|
|
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 ");
|
|
|
|
- dev_err(&cq->hwq.pdev->dev,
|
|
|
|
- "QPLIB: ix 0x%x exceeded RQ max 0x%x",
|
|
|
|
|
|
+ "FP: CQ Process Raw/QP1 RQ wr_id idx 0x%x exceeded RQ max 0x%x\n",
|
|
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,
|
|
/* 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,
|
|
|
|
|
|
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 ");
|
|
|
|
- dev_err(&cq->hwq.pdev->dev,
|
|
|
|
- "QPLIB: sq_cons_idx 0x%x which exceeded max 0x%x",
|
|
|
|
|
|
+ "FP: CQ Process terminal reported sq_cons_idx 0x%x which exceeded max 0x%x\n",
|
|
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 @@ do_rq:
|
|
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 ");
|
|
|
|
- dev_err(&cq->hwq.pdev->dev,
|
|
|
|
- "QPLIB: reported rq_cons_idx 0x%x exceeds max 0x%x",
|
|
|
|
|
|
+ "FP: CQ Processed terminal reported rq_cons_idx 0x%x exceeds max 0x%x\n",
|
|
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,
|
|
/* 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,
|
|
|
|
|
|
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,
|
|
|
|
- "QPLIB: FP: Flushing SQ QP= %p",
|
|
|
|
- qp);
|
|
|
|
|
|
+ dev_dbg(&cq->hwq.pdev->dev, "FP: Flushing SQ QP= %p\n", 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,
|
|
|
|
- "QPLIB: FP: Flushing RQ QP= %p",
|
|
|
|
- qp);
|
|
|
|
|
|
+ dev_dbg(&cq->hwq.pdev->dev, "FP: Flushing RQ QP= %p\n", 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,
|
|
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,
|
|
* 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++;
|
|
}
|
|
}
|