Commit 548ddb19 authored by Bharat Potnuri's avatar Bharat Potnuri Committed by Doug Ledford

iw_cxgb4: Remove __func__ parameter from pr_debug()

pr_debug() can be enabled to print function names, So removing the
unwanted __func__ parameters from debug logs.
Realign function parameters.
Signed-off-by: default avatarPotnuri Bharat Teja <bharat@chelsio.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 44596ebf
This diff is collapsed.
...@@ -144,7 +144,7 @@ static int create_cq(struct c4iw_rdev *rdev, struct t4_cq *cq, ...@@ -144,7 +144,7 @@ static int create_cq(struct c4iw_rdev *rdev, struct t4_cq *cq,
ret = c4iw_ofld_send(rdev, skb); ret = c4iw_ofld_send(rdev, skb);
if (ret) if (ret)
goto err4; goto err4;
pr_debug("%s wait_event wr_wait %p\n", __func__, &wr_wait); pr_debug("wait_event wr_wait %p\n", &wr_wait);
ret = c4iw_wait_for_reply(rdev, &wr_wait, 0, 0, __func__); ret = c4iw_wait_for_reply(rdev, &wr_wait, 0, 0, __func__);
if (ret) if (ret)
goto err4; goto err4;
...@@ -178,7 +178,7 @@ static void insert_recv_cqe(struct t4_wq *wq, struct t4_cq *cq) ...@@ -178,7 +178,7 @@ static void insert_recv_cqe(struct t4_wq *wq, struct t4_cq *cq)
{ {
struct t4_cqe cqe; struct t4_cqe cqe;
pr_debug("%s wq %p cq %p sw_cidx %u sw_pidx %u\n", __func__, pr_debug("wq %p cq %p sw_cidx %u sw_pidx %u\n",
wq, cq, cq->sw_cidx, cq->sw_pidx); wq, cq, cq->sw_cidx, cq->sw_pidx);
memset(&cqe, 0, sizeof(cqe)); memset(&cqe, 0, sizeof(cqe));
cqe.header = cpu_to_be32(CQE_STATUS_V(T4_ERR_SWFLUSH) | cqe.header = cpu_to_be32(CQE_STATUS_V(T4_ERR_SWFLUSH) |
...@@ -197,7 +197,7 @@ int c4iw_flush_rq(struct t4_wq *wq, struct t4_cq *cq, int count) ...@@ -197,7 +197,7 @@ int c4iw_flush_rq(struct t4_wq *wq, struct t4_cq *cq, int count)
int in_use = wq->rq.in_use - count; int in_use = wq->rq.in_use - count;
BUG_ON(in_use < 0); BUG_ON(in_use < 0);
pr_debug("%s wq %p cq %p rq.in_use %u skip count %u\n", __func__, pr_debug("wq %p cq %p rq.in_use %u skip count %u\n",
wq, cq, wq->rq.in_use, count); wq, cq, wq->rq.in_use, count);
while (in_use--) { while (in_use--) {
insert_recv_cqe(wq, cq); insert_recv_cqe(wq, cq);
...@@ -211,7 +211,7 @@ static void insert_sq_cqe(struct t4_wq *wq, struct t4_cq *cq, ...@@ -211,7 +211,7 @@ static void insert_sq_cqe(struct t4_wq *wq, struct t4_cq *cq,
{ {
struct t4_cqe cqe; struct t4_cqe cqe;
pr_debug("%s wq %p cq %p sw_cidx %u sw_pidx %u\n", __func__, pr_debug("wq %p cq %p sw_cidx %u sw_pidx %u\n",
wq, cq, cq->sw_cidx, cq->sw_pidx); wq, cq, cq->sw_cidx, cq->sw_pidx);
memset(&cqe, 0, sizeof(cqe)); memset(&cqe, 0, sizeof(cqe));
cqe.header = cpu_to_be32(CQE_STATUS_V(T4_ERR_SWFLUSH) | cqe.header = cpu_to_be32(CQE_STATUS_V(T4_ERR_SWFLUSH) |
...@@ -281,8 +281,8 @@ static void flush_completed_wrs(struct t4_wq *wq, struct t4_cq *cq) ...@@ -281,8 +281,8 @@ static void flush_completed_wrs(struct t4_wq *wq, struct t4_cq *cq)
/* /*
* Insert this completed cqe into the swcq. * Insert this completed cqe into the swcq.
*/ */
pr_debug("%s moving cqe into swcq sq idx %u cq idx %u\n", pr_debug("moving cqe into swcq sq idx %u cq idx %u\n",
__func__, cidx, cq->sw_pidx); cidx, cq->sw_pidx);
swsqe->cqe.header |= htonl(CQE_SWCQE_V(1)); swsqe->cqe.header |= htonl(CQE_SWCQE_V(1));
cq->sw_queue[cq->sw_pidx] = swsqe->cqe; cq->sw_queue[cq->sw_pidx] = swsqe->cqe;
t4_swcq_produce(cq); t4_swcq_produce(cq);
...@@ -337,7 +337,7 @@ void c4iw_flush_hw_cq(struct c4iw_cq *chp) ...@@ -337,7 +337,7 @@ void c4iw_flush_hw_cq(struct c4iw_cq *chp)
struct t4_swsqe *swsqe; struct t4_swsqe *swsqe;
int ret; int ret;
pr_debug("%s cqid 0x%x\n", __func__, chp->cq.cqid); pr_debug("cqid 0x%x\n", chp->cq.cqid);
ret = t4_next_hw_cqe(&chp->cq, &hw_cqe); ret = t4_next_hw_cqe(&chp->cq, &hw_cqe);
/* /*
...@@ -430,7 +430,7 @@ void c4iw_count_rcqes(struct t4_cq *cq, struct t4_wq *wq, int *count) ...@@ -430,7 +430,7 @@ void c4iw_count_rcqes(struct t4_cq *cq, struct t4_wq *wq, int *count)
u32 ptr; u32 ptr;
*count = 0; *count = 0;
pr_debug("%s count zero %d\n", __func__, *count); pr_debug("count zero %d\n", *count);
ptr = cq->sw_cidx; ptr = cq->sw_cidx;
while (ptr != cq->sw_pidx) { while (ptr != cq->sw_pidx) {
cqe = &cq->sw_queue[ptr]; cqe = &cq->sw_queue[ptr];
...@@ -440,7 +440,7 @@ void c4iw_count_rcqes(struct t4_cq *cq, struct t4_wq *wq, int *count) ...@@ -440,7 +440,7 @@ void c4iw_count_rcqes(struct t4_cq *cq, struct t4_wq *wq, int *count)
if (++ptr == cq->size) if (++ptr == cq->size)
ptr = 0; ptr = 0;
} }
pr_debug("%s cq %p count %d\n", __func__, cq, *count); pr_debug("cq %p count %d\n", cq, *count);
} }
/* /*
...@@ -471,8 +471,8 @@ static int poll_cq(struct t4_wq *wq, struct t4_cq *cq, struct t4_cqe *cqe, ...@@ -471,8 +471,8 @@ static int poll_cq(struct t4_wq *wq, struct t4_cq *cq, struct t4_cqe *cqe,
if (ret) if (ret)
return ret; return ret;
pr_debug("%s CQE OVF %u qpid 0x%0x genbit %u type %u status 0x%0x opcode 0x%0x len 0x%0x wrid_hi_stag 0x%x wrid_low_msn 0x%x\n", pr_debug("CQE OVF %u qpid 0x%0x genbit %u type %u status 0x%0x opcode 0x%0x len 0x%0x wrid_hi_stag 0x%x wrid_low_msn 0x%x\n",
__func__, CQE_OVFBIT(hw_cqe), CQE_QPID(hw_cqe), CQE_OVFBIT(hw_cqe), CQE_QPID(hw_cqe),
CQE_GENBIT(hw_cqe), CQE_TYPE(hw_cqe), CQE_STATUS(hw_cqe), CQE_GENBIT(hw_cqe), CQE_TYPE(hw_cqe), CQE_STATUS(hw_cqe),
CQE_OPCODE(hw_cqe), CQE_LEN(hw_cqe), CQE_WRID_HI(hw_cqe), CQE_OPCODE(hw_cqe), CQE_LEN(hw_cqe), CQE_WRID_HI(hw_cqe),
CQE_WRID_LOW(hw_cqe)); CQE_WRID_LOW(hw_cqe));
...@@ -603,8 +603,8 @@ static int poll_cq(struct t4_wq *wq, struct t4_cq *cq, struct t4_cqe *cqe, ...@@ -603,8 +603,8 @@ static int poll_cq(struct t4_wq *wq, struct t4_cq *cq, struct t4_cqe *cqe,
if (!SW_CQE(hw_cqe) && (CQE_WRID_SQ_IDX(hw_cqe) != wq->sq.cidx)) { if (!SW_CQE(hw_cqe) && (CQE_WRID_SQ_IDX(hw_cqe) != wq->sq.cidx)) {
struct t4_swsqe *swsqe; struct t4_swsqe *swsqe;
pr_debug("%s out of order completion going in sw_sq at idx %u\n", pr_debug("out of order completion going in sw_sq at idx %u\n",
__func__, CQE_WRID_SQ_IDX(hw_cqe)); CQE_WRID_SQ_IDX(hw_cqe));
swsqe = &wq->sq.sw_sq[CQE_WRID_SQ_IDX(hw_cqe)]; swsqe = &wq->sq.sw_sq[CQE_WRID_SQ_IDX(hw_cqe)];
swsqe->cqe = *hw_cqe; swsqe->cqe = *hw_cqe;
swsqe->complete = 1; swsqe->complete = 1;
...@@ -638,13 +638,13 @@ static int poll_cq(struct t4_wq *wq, struct t4_cq *cq, struct t4_cqe *cqe, ...@@ -638,13 +638,13 @@ static int poll_cq(struct t4_wq *wq, struct t4_cq *cq, struct t4_cqe *cqe,
BUG_ON(wq->sq.in_use <= 0 && wq->sq.in_use >= wq->sq.size); BUG_ON(wq->sq.in_use <= 0 && wq->sq.in_use >= wq->sq.size);
wq->sq.cidx = (uint16_t)idx; wq->sq.cidx = (uint16_t)idx;
pr_debug("%s completing sq idx %u\n", __func__, wq->sq.cidx); pr_debug("completing sq idx %u\n", wq->sq.cidx);
*cookie = wq->sq.sw_sq[wq->sq.cidx].wr_id; *cookie = wq->sq.sw_sq[wq->sq.cidx].wr_id;
if (c4iw_wr_log) if (c4iw_wr_log)
c4iw_log_wr_stats(wq, hw_cqe); c4iw_log_wr_stats(wq, hw_cqe);
t4_sq_consume(wq); t4_sq_consume(wq);
} else { } else {
pr_debug("%s completing rq idx %u\n", __func__, wq->rq.cidx); pr_debug("completing rq idx %u\n", wq->rq.cidx);
*cookie = wq->rq.sw_rq[wq->rq.cidx].wr_id; *cookie = wq->rq.sw_rq[wq->rq.cidx].wr_id;
BUG_ON(t4_rq_empty(wq)); BUG_ON(t4_rq_empty(wq));
if (c4iw_wr_log) if (c4iw_wr_log)
...@@ -661,12 +661,12 @@ static int poll_cq(struct t4_wq *wq, struct t4_cq *cq, struct t4_cqe *cqe, ...@@ -661,12 +661,12 @@ static int poll_cq(struct t4_wq *wq, struct t4_cq *cq, struct t4_cqe *cqe,
skip_cqe: skip_cqe:
if (SW_CQE(hw_cqe)) { if (SW_CQE(hw_cqe)) {
pr_debug("%s cq %p cqid 0x%x skip sw cqe cidx %u\n", pr_debug("cq %p cqid 0x%x skip sw cqe cidx %u\n",
__func__, cq, cq->cqid, cq->sw_cidx); cq, cq->cqid, cq->sw_cidx);
t4_swcq_consume(cq); t4_swcq_consume(cq);
} else { } else {
pr_debug("%s cq %p cqid 0x%x skip hw cqe cidx %u\n", pr_debug("cq %p cqid 0x%x skip hw cqe cidx %u\n",
__func__, cq, cq->cqid, cq->cidx); cq, cq->cqid, cq->cidx);
t4_hwcq_consume(cq); t4_hwcq_consume(cq);
} }
return ret; return ret;
...@@ -712,8 +712,8 @@ static int c4iw_poll_cq_one(struct c4iw_cq *chp, struct ib_wc *wc) ...@@ -712,8 +712,8 @@ static int c4iw_poll_cq_one(struct c4iw_cq *chp, struct ib_wc *wc)
wc->vendor_err = CQE_STATUS(&cqe); wc->vendor_err = CQE_STATUS(&cqe);
wc->wc_flags = 0; wc->wc_flags = 0;
pr_debug("%s qpid 0x%x type %d opcode %d status 0x%x len %u wrid hi 0x%x lo 0x%x cookie 0x%llx\n", pr_debug("qpid 0x%x type %d opcode %d status 0x%x len %u wrid hi 0x%x lo 0x%x cookie 0x%llx\n",
__func__, CQE_QPID(&cqe), CQE_QPID(&cqe),
CQE_TYPE(&cqe), CQE_OPCODE(&cqe), CQE_TYPE(&cqe), CQE_OPCODE(&cqe),
CQE_STATUS(&cqe), CQE_LEN(&cqe), CQE_STATUS(&cqe), CQE_LEN(&cqe),
CQE_WRID_HI(&cqe), CQE_WRID_LOW(&cqe), CQE_WRID_HI(&cqe), CQE_WRID_LOW(&cqe),
...@@ -857,7 +857,7 @@ int c4iw_destroy_cq(struct ib_cq *ib_cq) ...@@ -857,7 +857,7 @@ int c4iw_destroy_cq(struct ib_cq *ib_cq)
struct c4iw_cq *chp; struct c4iw_cq *chp;
struct c4iw_ucontext *ucontext; struct c4iw_ucontext *ucontext;
pr_debug("%s ib_cq %p\n", __func__, ib_cq); pr_debug("ib_cq %p\n", ib_cq);
chp = to_c4iw_cq(ib_cq); chp = to_c4iw_cq(ib_cq);
remove_handle(chp->rhp, &chp->rhp->cqidr, chp->cq.cqid); remove_handle(chp->rhp, &chp->rhp->cqidr, chp->cq.cqid);
...@@ -889,7 +889,7 @@ struct ib_cq *c4iw_create_cq(struct ib_device *ibdev, ...@@ -889,7 +889,7 @@ struct ib_cq *c4iw_create_cq(struct ib_device *ibdev,
size_t memsize, hwentries; size_t memsize, hwentries;
struct c4iw_mm_entry *mm, *mm2; struct c4iw_mm_entry *mm, *mm2;
pr_debug("%s ib_dev %p entries %d\n", __func__, ibdev, entries); pr_debug("ib_dev %p entries %d\n", ibdev, entries);
if (attr->flags) if (attr->flags)
return ERR_PTR(-EINVAL); return ERR_PTR(-EINVAL);
...@@ -996,8 +996,8 @@ struct ib_cq *c4iw_create_cq(struct ib_device *ibdev, ...@@ -996,8 +996,8 @@ struct ib_cq *c4iw_create_cq(struct ib_device *ibdev,
mm2->len = PAGE_SIZE; mm2->len = PAGE_SIZE;
insert_mmap(ucontext, mm2); insert_mmap(ucontext, mm2);
} }
pr_debug("%s cqid 0x%0x chp %p size %u memsize %zu, dma_addr 0x%0llx\n", pr_debug("cqid 0x%0x chp %p size %u memsize %zu, dma_addr 0x%0llx\n",
__func__, chp->cq.cqid, chp, chp->cq.size, chp->cq.cqid, chp, chp->cq.size,
chp->cq.memsize, (unsigned long long)chp->cq.dma_addr); chp->cq.memsize, (unsigned long long)chp->cq.dma_addr);
return &chp->ibcq; return &chp->ibcq;
err6: err6:
......
...@@ -811,8 +811,8 @@ static int c4iw_rdev_open(struct c4iw_rdev *rdev) ...@@ -811,8 +811,8 @@ static int c4iw_rdev_open(struct c4iw_rdev *rdev)
rdev->qpmask = rdev->lldi.udb_density - 1; rdev->qpmask = rdev->lldi.udb_density - 1;
rdev->cqmask = rdev->lldi.ucq_density - 1; rdev->cqmask = rdev->lldi.ucq_density - 1;
pr_debug("%s dev %s stag start 0x%0x size 0x%0x num stags %d pbl start 0x%0x size 0x%0x rq start 0x%0x size 0x%0x qp qid start %u size %u cq qid start %u size %u\n", pr_debug("dev %s stag start 0x%0x size 0x%0x num stags %d pbl start 0x%0x size 0x%0x rq start 0x%0x size 0x%0x qp qid start %u size %u cq qid start %u size %u\n",
__func__, pci_name(rdev->lldi.pdev), rdev->lldi.vr->stag.start, pci_name(rdev->lldi.pdev), rdev->lldi.vr->stag.start,
rdev->lldi.vr->stag.size, c4iw_num_stags(rdev), rdev->lldi.vr->stag.size, c4iw_num_stags(rdev),
rdev->lldi.vr->pbl.start, rdev->lldi.vr->pbl.start,
rdev->lldi.vr->pbl.size, rdev->lldi.vr->rq.start, rdev->lldi.vr->pbl.size, rdev->lldi.vr->rq.start,
...@@ -935,7 +935,7 @@ static void c4iw_dealloc(struct uld_ctx *ctx) ...@@ -935,7 +935,7 @@ static void c4iw_dealloc(struct uld_ctx *ctx)
static void c4iw_remove(struct uld_ctx *ctx) static void c4iw_remove(struct uld_ctx *ctx)
{ {
pr_debug("%s c4iw_dev %p\n", __func__, ctx->dev); pr_debug("c4iw_dev %p\n", ctx->dev);
c4iw_unregister_device(ctx->dev); c4iw_unregister_device(ctx->dev);
c4iw_dealloc(ctx); c4iw_dealloc(ctx);
} }
...@@ -969,8 +969,8 @@ static struct c4iw_dev *c4iw_alloc(const struct cxgb4_lld_info *infop) ...@@ -969,8 +969,8 @@ static struct c4iw_dev *c4iw_alloc(const struct cxgb4_lld_info *infop)
devp->rdev.lldi = *infop; devp->rdev.lldi = *infop;
/* init various hw-queue params based on lld info */ /* init various hw-queue params based on lld info */
pr_debug("%s: Ing. padding boundary is %d, egrsstatuspagesize = %d\n", pr_debug("Ing. padding boundary is %d, egrsstatuspagesize = %d\n",
__func__, devp->rdev.lldi.sge_ingpadboundary, devp->rdev.lldi.sge_ingpadboundary,
devp->rdev.lldi.sge_egrstatuspagesize); devp->rdev.lldi.sge_egrstatuspagesize);
devp->rdev.hw_queue.t4_eq_status_entries = devp->rdev.hw_queue.t4_eq_status_entries =
...@@ -1069,8 +1069,8 @@ static void *c4iw_uld_add(const struct cxgb4_lld_info *infop) ...@@ -1069,8 +1069,8 @@ static void *c4iw_uld_add(const struct cxgb4_lld_info *infop)
} }
ctx->lldi = *infop; ctx->lldi = *infop;
pr_debug("%s found device %s nchan %u nrxq %u ntxq %u nports %u\n", pr_debug("found device %s nchan %u nrxq %u ntxq %u nports %u\n",
__func__, pci_name(ctx->lldi.pdev), pci_name(ctx->lldi.pdev),
ctx->lldi.nchan, ctx->lldi.nrxq, ctx->lldi.nchan, ctx->lldi.nrxq,
ctx->lldi.ntxq, ctx->lldi.nports); ctx->lldi.ntxq, ctx->lldi.nports);
...@@ -1203,7 +1203,7 @@ static int c4iw_uld_state_change(void *handle, enum cxgb4_state new_state) ...@@ -1203,7 +1203,7 @@ static int c4iw_uld_state_change(void *handle, enum cxgb4_state new_state)
{ {
struct uld_ctx *ctx = handle; struct uld_ctx *ctx = handle;
pr_debug("%s new_state %u\n", __func__, new_state); pr_debug("new_state %u\n", new_state);
switch (new_state) { switch (new_state) {
case CXGB4_STATE_UP: case CXGB4_STATE_UP:
pr_info("%s: Up\n", pci_name(ctx->lldi.pdev)); pr_info("%s: Up\n", pci_name(ctx->lldi.pdev));
......
...@@ -537,8 +537,7 @@ static inline struct c4iw_mm_entry *remove_mmap(struct c4iw_ucontext *ucontext, ...@@ -537,8 +537,7 @@ static inline struct c4iw_mm_entry *remove_mmap(struct c4iw_ucontext *ucontext,
if (mm->key == key && mm->len == len) { if (mm->key == key && mm->len == len) {
list_del_init(&mm->entry); list_del_init(&mm->entry);
spin_unlock(&ucontext->mmap_lock); spin_unlock(&ucontext->mmap_lock);
pr_debug("%s key 0x%x addr 0x%llx len %d\n", pr_debug("key 0x%x addr 0x%llx len %d\n", key,
__func__, key,
(unsigned long long)mm->addr, mm->len); (unsigned long long)mm->addr, mm->len);
return mm; return mm;
} }
...@@ -551,8 +550,8 @@ static inline void insert_mmap(struct c4iw_ucontext *ucontext, ...@@ -551,8 +550,8 @@ static inline void insert_mmap(struct c4iw_ucontext *ucontext,
struct c4iw_mm_entry *mm) struct c4iw_mm_entry *mm)
{ {
spin_lock(&ucontext->mmap_lock); spin_lock(&ucontext->mmap_lock);
pr_debug("%s key 0x%x addr 0x%llx len %d\n", pr_debug("key 0x%x addr 0x%llx len %d\n",
__func__, mm->key, (unsigned long long)mm->addr, mm->len); mm->key, (unsigned long long)mm->addr, mm->len);
list_add_tail(&mm->entry, &ucontext->mmaps); list_add_tail(&mm->entry, &ucontext->mmaps);
spin_unlock(&ucontext->mmap_lock); spin_unlock(&ucontext->mmap_lock);
} }
...@@ -671,16 +670,14 @@ enum c4iw_mmid_state { ...@@ -671,16 +670,14 @@ enum c4iw_mmid_state {
#define MPA_V2_IRD_ORD_MASK 0x3FFF #define MPA_V2_IRD_ORD_MASK 0x3FFF
#define c4iw_put_ep(ep) { \ #define c4iw_put_ep(ep) { \
pr_debug("put_ep (via %s:%u) ep %p refcnt %d\n", \ pr_debug("put_ep ep %p refcnt %d\n", \
__func__, __LINE__, \
ep, kref_read(&((ep)->kref))); \ ep, kref_read(&((ep)->kref))); \
WARN_ON(kref_read(&((ep)->kref)) < 1); \ WARN_ON(kref_read(&((ep)->kref)) < 1); \
kref_put(&((ep)->kref), _c4iw_free_ep); \ kref_put(&((ep)->kref), _c4iw_free_ep); \
} }
#define c4iw_get_ep(ep) { \ #define c4iw_get_ep(ep) { \
pr_debug("get_ep (via %s:%u) ep %p, refcnt %d\n", \ pr_debug("get_ep ep %p, refcnt %d\n", \
__func__, __LINE__, \
ep, kref_read(&((ep)->kref))); \ ep, kref_read(&((ep)->kref))); \
kref_get(&((ep)->kref)); \ kref_get(&((ep)->kref)); \
} }
......
...@@ -124,7 +124,7 @@ static int _c4iw_write_mem_inline(struct c4iw_rdev *rdev, u32 addr, u32 len, ...@@ -124,7 +124,7 @@ static int _c4iw_write_mem_inline(struct c4iw_rdev *rdev, u32 addr, u32 len,
cmd |= cpu_to_be32(T5_ULP_MEMIO_IMM_F); cmd |= cpu_to_be32(T5_ULP_MEMIO_IMM_F);
addr &= 0x7FFFFFF; addr &= 0x7FFFFFF;
pr_debug("%s addr 0x%x len %u\n", __func__, addr, len); pr_debug("addr 0x%x len %u\n", addr, len);
num_wqe = DIV_ROUND_UP(len, C4IW_MAX_INLINE_SIZE); num_wqe = DIV_ROUND_UP(len, C4IW_MAX_INLINE_SIZE);
c4iw_init_wr_wait(&wr_wait); c4iw_init_wr_wait(&wr_wait);
for (i = 0; i < num_wqe; i++) { for (i = 0; i < num_wqe; i++) {
...@@ -285,8 +285,8 @@ static int write_tpt_entry(struct c4iw_rdev *rdev, u32 reset_tpt_entry, ...@@ -285,8 +285,8 @@ static int write_tpt_entry(struct c4iw_rdev *rdev, u32 reset_tpt_entry,
mutex_unlock(&rdev->stats.lock); mutex_unlock(&rdev->stats.lock);
*stag = (stag_idx << 8) | (atomic_inc_return(&key) & 0xff); *stag = (stag_idx << 8) | (atomic_inc_return(&key) & 0xff);
} }
pr_debug("%s stag_state 0x%0x type 0x%0x pdid 0x%0x, stag_idx 0x%x\n", pr_debug("stag_state 0x%0x type 0x%0x pdid 0x%0x, stag_idx 0x%x\n",
__func__, stag_state, type, pdid, stag_idx); stag_state, type, pdid, stag_idx);
/* write TPT entry */ /* write TPT entry */
if (reset_tpt_entry) if (reset_tpt_entry)
...@@ -327,8 +327,8 @@ static int write_pbl(struct c4iw_rdev *rdev, __be64 *pbl, ...@@ -327,8 +327,8 @@ static int write_pbl(struct c4iw_rdev *rdev, __be64 *pbl,
{ {
int err; int err;
pr_debug("%s *pdb_addr 0x%x, pbl_base 0x%x, pbl_size %d\n", pr_debug("*pdb_addr 0x%x, pbl_base 0x%x, pbl_size %d\n",
__func__, pbl_addr, rdev->lldi.vr->pbl.start, pbl_addr, rdev->lldi.vr->pbl.start,
pbl_size); pbl_size);
err = write_adapter_mem(rdev, pbl_addr >> 5, pbl_size << 3, pbl, NULL); err = write_adapter_mem(rdev, pbl_addr >> 5, pbl_size << 3, pbl, NULL);
...@@ -372,7 +372,7 @@ static int finish_mem_reg(struct c4iw_mr *mhp, u32 stag) ...@@ -372,7 +372,7 @@ static int finish_mem_reg(struct c4iw_mr *mhp, u32 stag)
mhp->attr.stag = stag; mhp->attr.stag = stag;
mmid = stag >> 8; mmid = stag >> 8;
mhp->ibmr.rkey = mhp->ibmr.lkey = stag; mhp->ibmr.rkey = mhp->ibmr.lkey = stag;
pr_debug("%s mmid 0x%x mhp %p\n", __func__, mmid, mhp); pr_debug("mmid 0x%x mhp %p\n", mmid, mhp);
return insert_handle(mhp->rhp, &mhp->rhp->mmidr, mhp, mmid); return insert_handle(mhp->rhp, &mhp->rhp->mmidr, mhp, mmid);
} }
...@@ -422,7 +422,7 @@ struct ib_mr *c4iw_get_dma_mr(struct ib_pd *pd, int acc) ...@@ -422,7 +422,7 @@ struct ib_mr *c4iw_get_dma_mr(struct ib_pd *pd, int acc)
int ret; int ret;
u32 stag = T4_STAG_UNSET; u32 stag = T4_STAG_UNSET;
pr_debug("%s ib_pd %p\n", __func__, pd); pr_debug("ib_pd %p\n", pd);
php = to_c4iw_pd(pd); php = to_c4iw_pd(pd);
rhp = php->rhp; rhp = php->rhp;
...@@ -479,7 +479,7 @@ struct ib_mr *c4iw_reg_user_mr(struct ib_pd *pd, u64 start, u64 length, ...@@ -479,7 +479,7 @@ struct ib_mr *c4iw_reg_user_mr(struct ib_pd *pd, u64 start, u64 length,
struct c4iw_pd *php; struct c4iw_pd *php;
struct c4iw_mr *mhp; struct c4iw_mr *mhp;
pr_debug("%s ib_pd %p\n", __func__, pd); pr_debug("ib_pd %p\n", pd);
if (length == ~0ULL) if (length == ~0ULL)
return ERR_PTR(-EINVAL); return ERR_PTR(-EINVAL);
...@@ -616,7 +616,7 @@ struct ib_mw *c4iw_alloc_mw(struct ib_pd *pd, enum ib_mw_type type, ...@@ -616,7 +616,7 @@ struct ib_mw *c4iw_alloc_mw(struct ib_pd *pd, enum ib_mw_type type,
ret = -ENOMEM; ret = -ENOMEM;
goto dealloc_win; goto dealloc_win;
} }
pr_debug("%s mmid 0x%x mhp %p stag 0x%x\n", __func__, mmid, mhp, stag); pr_debug("mmid 0x%x mhp %p stag 0x%x\n", mmid, mhp, stag);
return &(mhp->ibmw); return &(mhp->ibmw);
dealloc_win: dealloc_win:
...@@ -641,7 +641,7 @@ int c4iw_dealloc_mw(struct ib_mw *mw) ...@@ -641,7 +641,7 @@ int c4iw_dealloc_mw(struct ib_mw *mw)
deallocate_window(&rhp->rdev, mhp->attr.stag, mhp->dereg_skb); deallocate_window(&rhp->rdev, mhp->attr.stag, mhp->dereg_skb);
kfree_skb(mhp->dereg_skb); kfree_skb(mhp->dereg_skb);
kfree(mhp); kfree(mhp);
pr_debug("%s ib_mw %p mmid 0x%x ptr %p\n", __func__, mw, mmid, mhp); pr_debug("ib_mw %p mmid 0x%x ptr %p\n", mw, mmid, mhp);
return 0; return 0;
} }
...@@ -699,7 +699,7 @@ struct ib_mr *c4iw_alloc_mr(struct ib_pd *pd, ...@@ -699,7 +699,7 @@ struct ib_mr *c4iw_alloc_mr(struct ib_pd *pd,
goto err3; goto err3;
} }
pr_debug("%s mmid 0x%x mhp %p stag 0x%x\n", __func__, mmid, mhp, stag); pr_debug("mmid 0x%x mhp %p stag 0x%x\n", mmid, mhp, stag);
return &(mhp->ibmr); return &(mhp->ibmr);
err3: err3:
dereg_mem(&rhp->rdev, stag, mhp->attr.pbl_size, dereg_mem(&rhp->rdev, stag, mhp->attr.pbl_size,
...@@ -744,7 +744,7 @@ int c4iw_dereg_mr(struct ib_mr *ib_mr) ...@@ -744,7 +744,7 @@ int c4iw_dereg_mr(struct ib_mr *ib_mr)
struct c4iw_mr *mhp; struct c4iw_mr *mhp;
u32 mmid; u32 mmid;
pr_debug("%s ib_mr %p\n", __func__, ib_mr); pr_debug("ib_mr %p\n", ib_mr);
mhp = to_c4iw_mr(ib_mr); mhp = to_c4iw_mr(ib_mr);
rhp = mhp->rhp; rhp = mhp->rhp;
...@@ -762,7 +762,7 @@ int c4iw_dereg_mr(struct ib_mr *ib_mr) ...@@ -762,7 +762,7 @@ int c4iw_dereg_mr(struct ib_mr *ib_mr)
kfree((void *) (unsigned long) mhp->kva); kfree((void *) (unsigned long) mhp->kva);
if (mhp->umem) if (mhp->umem)
ib_umem_release(mhp->umem); ib_umem_release(mhp->umem);
pr_debug("%s mmid 0x%x ptr %p\n", __func__, mmid, mhp); pr_debug("mmid 0x%x ptr %p\n", mmid, mhp);
kfree(mhp); kfree(mhp);
return 0; return 0;
} }
......
...@@ -102,7 +102,7 @@ void _c4iw_free_ucontext(struct kref *kref) ...@@ -102,7 +102,7 @@ void _c4iw_free_ucontext(struct kref *kref)
ucontext = container_of(kref, struct c4iw_ucontext, kref); ucontext = container_of(kref, struct c4iw_ucontext, kref);
rhp = to_c4iw_dev(ucontext->ibucontext.device); rhp = to_c4iw_dev(ucontext->ibucontext.device);
pr_debug("%s ucontext %p\n", __func__, ucontext); pr_debug("ucontext %p\n", ucontext);
list_for_each_entry_safe(mm, tmp, &ucontext->mmaps, entry) list_for_each_entry_safe(mm, tmp, &ucontext->mmaps, entry)
kfree(mm); kfree(mm);
c4iw_release_dev_ucontext(&rhp->rdev, &ucontext->uctx); c4iw_release_dev_ucontext(&rhp->rdev, &ucontext->uctx);
...@@ -113,7 +113,7 @@ static int c4iw_dealloc_ucontext(struct ib_ucontext *context) ...@@ -113,7 +113,7 @@ static int c4iw_dealloc_ucontext(struct ib_ucontext *context)
{ {
struct c4iw_ucontext *ucontext = to_c4iw_ucontext(context); struct c4iw_ucontext *ucontext = to_c4iw_ucontext(context);
pr_debug("%s context %p\n", __func__, context); pr_debug("context %p\n", context);
c4iw_put_ucontext(ucontext); c4iw_put_ucontext(ucontext);
return 0; return 0;
} }
...@@ -127,7 +127,7 @@ static struct ib_ucontext *c4iw_alloc_ucontext(struct ib_device *ibdev, ...@@ -127,7 +127,7 @@ static struct ib_ucontext *c4iw_alloc_ucontext(struct ib_device *ibdev,
int ret = 0; int ret = 0;
struct c4iw_mm_entry *mm = NULL; struct c4iw_mm_entry *mm = NULL;
pr_debug("%s ibdev %p\n", __func__, ibdev); pr_debug("ibdev %p\n", ibdev);
context = kzalloc(sizeof(*context), GFP_KERNEL); context = kzalloc(sizeof(*context), GFP_KERNEL);
if (!context) { if (!context) {
ret = -ENOMEM; ret = -ENOMEM;
...@@ -185,7 +185,7 @@ static int c4iw_mmap(struct ib_ucontext *context, struct vm_area_struct *vma) ...@@ -185,7 +185,7 @@ static int c4iw_mmap(struct ib_ucontext *context, struct vm_area_struct *vma)
struct c4iw_ucontext *ucontext; struct c4iw_ucontext *ucontext;
u64 addr; u64 addr;
pr_debug("%s pgoff 0x%lx key 0x%x len %d\n", __func__, vma->vm_pgoff, pr_debug("pgoff 0x%lx key 0x%x len %d\n", vma->vm_pgoff,
key, len); key, len);
if (vma->vm_start & (PAGE_SIZE-1)) if (vma->vm_start & (PAGE_SIZE-1))
...@@ -251,7 +251,7 @@ static int c4iw_deallocate_pd(struct ib_pd *pd) ...@@ -251,7 +251,7 @@ static int c4iw_deallocate_pd(struct ib_pd *pd)
php = to_c4iw_pd(pd); php = to_c4iw_pd(pd);
rhp = php->rhp; rhp = php->rhp;
pr_debug("%s ibpd %p pdid 0x%x\n", __func__, pd, php->pdid); pr_debug("ibpd %p pdid 0x%x\n", pd, php->pdid);
c4iw_put_resource(&rhp->rdev.resource.pdid_table, php->pdid); c4iw_put_resource(&rhp->rdev.resource.pdid_table, php->pdid);
mutex_lock(&rhp->rdev.stats.lock); mutex_lock(&rhp->rdev.stats.lock);
rhp->rdev.stats.pd.cur--; rhp->rdev.stats.pd.cur--;
...@@ -268,7 +268,7 @@ static struct ib_pd *c4iw_allocate_pd(struct ib_device *ibdev, ...@@ -268,7 +268,7 @@ static struct ib_pd *c4iw_allocate_pd(struct ib_device *ibdev,
u32 pdid; u32 pdid;
struct c4iw_dev *rhp; struct c4iw_dev *rhp;
pr_debug("%s ibdev %p\n", __func__, ibdev); pr_debug("ibdev %p\n", ibdev);
rhp = (struct c4iw_dev *) ibdev; rhp = (struct c4iw_dev *) ibdev;
pdid = c4iw_get_resource(&rhp->rdev.resource.pdid_table); pdid = c4iw_get_resource(&rhp->rdev.resource.pdid_table);
if (!pdid) if (!pdid)
...@@ -291,14 +291,14 @@ static struct ib_pd *c4iw_allocate_pd(struct ib_device *ibdev, ...@@ -291,14 +291,14 @@ static struct ib_pd *c4iw_allocate_pd(struct ib_device *ibdev,
if (rhp->rdev.stats.pd.cur > rhp->rdev.stats.pd.max) if (rhp->rdev.stats.pd.cur > rhp->rdev.stats.pd.max)
rhp->rdev.stats.pd.max = rhp->rdev.stats.pd.cur; rhp->rdev.stats.pd.max = rhp->rdev.stats.pd.cur;
mutex_unlock(&rhp->rdev.stats.lock); mutex_unlock(&rhp->rdev.stats.lock);
pr_debug("%s pdid 0x%0x ptr 0x%p\n", __func__, pdid, php); pr_debug("pdid 0x%0x ptr 0x%p\n", pdid, php);
return &php->ibpd; return &php->ibpd;
} }
static int c4iw_query_pkey(struct ib_device *ibdev, u8 port, u16 index, static int c4iw_query_pkey(struct ib_device *ibdev, u8 port, u16 index,
u16 *pkey) u16 *pkey)
{ {
pr_debug("%s ibdev %p\n", __func__, ibdev); pr_debug("ibdev %p\n", ibdev);
*pkey = 0; *pkey = 0;
return 0; return 0;
} }
...@@ -308,8 +308,8 @@ static int c4iw_query_gid(struct ib_device *ibdev, u8 port, int index, ...@@ -308,8 +308,8 @@ static int c4iw_query_gid(struct ib_device *ibdev, u8 port, int index,
{ {
struct c4iw_dev *dev; struct c4iw_dev *dev;
pr_debug("%s ibdev %p, port %d, index %d, gid %p\n", pr_debug("ibdev %p, port %d, index %d, gid %p\n",
__func__, ibdev, port, index, gid); ibdev, port, index, gid);
dev = to_c4iw_dev(ibdev); dev = to_c4iw_dev(ibdev);
BUG_ON(port == 0); BUG_ON(port == 0);
memset(&(gid->raw[0]), 0, sizeof(gid->raw)); memset(&(gid->raw[0]), 0, sizeof(gid->raw));
...@@ -323,7 +323,7 @@ static int c4iw_query_device(struct ib_device *ibdev, struct ib_device_attr *pro ...@@ -323,7 +323,7 @@ static int c4iw_query_device(struct ib_device *ibdev, struct ib_device_attr *pro
struct c4iw_dev *dev; struct c4iw_dev *dev;
pr_debug("%s ibdev %p\n", __func__, ibdev); pr_debug("ibdev %p\n", ibdev);
if (uhw->inlen || uhw->outlen) if (uhw->inlen || uhw->outlen)
return -EINVAL; return -EINVAL;
...@@ -364,7 +364,7 @@ static int c4iw_query_port(struct ib_device *ibdev, u8 port, ...@@ -364,7 +364,7 @@ static int c4iw_query_port(struct ib_device *ibdev, u8 port,
struct net_device *netdev; struct net_device *netdev;
struct in_device *inetdev; struct in_device *inetdev;
pr_debug("%s ibdev %p\n", __func__, ibdev); pr_debug("ibdev %p\n", ibdev);
dev = to_c4iw_dev(ibdev); dev = to_c4iw_dev(ibdev);
netdev = dev->rdev.lldi.ports[port-1]; netdev = dev->rdev.lldi.ports[port-1];
...@@ -406,7 +406,7 @@ static ssize_t show_rev(struct device *dev, struct device_attribute *attr, ...@@ -406,7 +406,7 @@ static ssize_t show_rev(struct device *dev, struct device_attribute *attr,
{ {
struct c4iw_dev *c4iw_dev = container_of(dev, struct c4iw_dev, struct c4iw_dev *c4iw_dev = container_of(dev, struct c4iw_dev,
ibdev.dev); ibdev.dev);
pr_debug("%s dev 0x%p\n", __func__, dev); pr_debug("dev 0x%p\n", dev);
return sprintf(buf, "%d\n", return sprintf(buf, "%d\n",
CHELSIO_CHIP_RELEASE(c4iw_dev->rdev.lldi.adapter_type)); CHELSIO_CHIP_RELEASE(c4iw_dev->rdev.lldi.adapter_type));
} }
...@@ -419,7 +419,7 @@ static ssize_t show_hca(struct device *dev, struct device_attribute *attr, ...@@ -419,7 +419,7 @@ static ssize_t show_hca(struct device *dev, struct device_attribute *attr,
struct ethtool_drvinfo info; struct ethtool_drvinfo info;
struct net_device *lldev = c4iw_dev->rdev.lldi.ports[0]; struct net_device *lldev = c4iw_dev->rdev.lldi.ports[0];
pr_debug("%s dev 0x%p\n", __func__, dev); pr_debug("dev 0x%p\n", dev);
lldev->ethtool_ops->get_drvinfo(lldev, &info); lldev->ethtool_ops->get_drvinfo(lldev, &info);
return sprintf(buf, "%s\n", info.driver); return sprintf(buf, "%s\n", info.driver);
} }
...@@ -429,7 +429,7 @@ static ssize_t show_board(struct device *dev, struct device_attribute *attr, ...@@ -429,7 +429,7 @@ static ssize_t show_board(struct device *dev, struct device_attribute *attr,
{ {
struct c4iw_dev *c4iw_dev = container_of(dev, struct c4iw_dev, struct c4iw_dev *c4iw_dev = container_of(dev, struct c4iw_dev,
ibdev.dev); ibdev.dev);
pr_debug("%s dev 0x%p\n", __func__, dev); pr_debug("dev 0x%p\n", dev);
return sprintf(buf, "%x.%x\n", c4iw_dev->rdev.lldi.pdev->vendor, return sprintf(buf, "%x.%x\n", c4iw_dev->rdev.lldi.pdev->vendor,
c4iw_dev->rdev.lldi.pdev->device); c4iw_dev->rdev.lldi.pdev->device);
} }
...@@ -521,7 +521,7 @@ static void get_dev_fw_str(struct ib_device *dev, char *str) ...@@ -521,7 +521,7 @@ static void get_dev_fw_str(struct ib_device *dev, char *str)
{ {
struct c4iw_dev *c4iw_dev = container_of(dev, struct c4iw_dev, struct c4iw_dev *c4iw_dev = container_of(dev, struct c4iw_dev,
ibdev); ibdev);
pr_debug("%s dev 0x%p\n", __func__, dev); pr_debug("dev 0x%p\n", dev);
snprintf(str, IB_FW_VERSION_NAME_MAX, "%u.%u.%u.%u", snprintf(str, IB_FW_VERSION_NAME_MAX, "%u.%u.%u.%u",
FW_HDR_FW_VER_MAJOR_G(c4iw_dev->rdev.lldi.fw_vers), FW_HDR_FW_VER_MAJOR_G(c4iw_dev->rdev.lldi.fw_vers),
...@@ -535,7 +535,7 @@ int c4iw_register_device(struct c4iw_dev *dev) ...@@ -535,7 +535,7 @@ int c4iw_register_device(struct c4iw_dev *dev)
int ret; int ret;
int i; int i;
pr_debug("%s c4iw_dev %p\n", __func__, dev); pr_debug("c4iw_dev %p\n", dev);
BUG_ON(!dev->rdev.lldi.ports[0]); BUG_ON(!dev->rdev.lldi.ports[0]);
strlcpy(dev->ibdev.name, "cxgb4_%d", IB_DEVICE_NAME_MAX); strlcpy(dev->ibdev.name, "cxgb4_%d", IB_DEVICE_NAME_MAX);
memset(&dev->ibdev.node_guid, 0, sizeof(dev->ibdev.node_guid)); memset(&dev->ibdev.node_guid, 0, sizeof(dev->ibdev.node_guid));
...@@ -645,7 +645,7 @@ void c4iw_unregister_device(struct c4iw_dev *dev) ...@@ -645,7 +645,7 @@ void c4iw_unregister_device(struct c4iw_dev *dev)
{ {
int i; int i;
pr_debug("%s c4iw_dev %p\n", __func__, dev); pr_debug("c4iw_dev %p\n", dev);
for (i = 0; i < ARRAY_SIZE(c4iw_class_attributes); ++i) for (i = 0; i < ARRAY_SIZE(c4iw_class_attributes); ++i)
device_remove_file(&dev->ibdev.dev, device_remove_file(&dev->ibdev.dev,
c4iw_class_attributes[i]); c4iw_class_attributes[i]);
......
...@@ -254,8 +254,8 @@ static int create_qp(struct c4iw_rdev *rdev, struct t4_wq *wq, ...@@ -254,8 +254,8 @@ static int create_qp(struct c4iw_rdev *rdev, struct t4_wq *wq,
ret = -ENOMEM; ret = -ENOMEM;
goto free_sq; goto free_sq;
} }
pr_debug("%s sq base va 0x%p pa 0x%llx rq base va 0x%p pa 0x%llx\n", pr_debug("sq base va 0x%p pa 0x%llx rq base va 0x%p pa 0x%llx\n",
__func__, wq->sq.queue, wq->sq.queue,
(unsigned long long)virt_to_phys(wq->sq.queue), (unsigned long long)virt_to_phys(wq->sq.queue),
wq->rq.queue, wq->rq.queue,
(unsigned long long)virt_to_phys(wq->rq.queue)); (unsigned long long)virt_to_phys(wq->rq.queue));
...@@ -361,8 +361,8 @@ static int create_qp(struct c4iw_rdev *rdev, struct t4_wq *wq, ...@@ -361,8 +361,8 @@ static int create_qp(struct c4iw_rdev *rdev, struct t4_wq *wq,
if (ret) if (ret)
goto free_dma; goto free_dma;
pr_debug("%s sqid 0x%x rqid 0x%x kdb 0x%p sq_bar2_addr %p rq_bar2_addr %p\n", pr_debug("sqid 0x%x rqid 0x%x kdb 0x%p sq_bar2_addr %p rq_bar2_addr %p\n",
__func__, wq->sq.qid, wq->rq.qid, wq->db, wq->sq.qid, wq->rq.qid, wq->db,
wq->sq.bar2_va, wq->rq.bar2_va); wq->sq.bar2_va, wq->rq.bar2_va);
return 0; return 0;
...@@ -724,7 +724,7 @@ static void free_qp_work(struct work_struct *work) ...@@ -724,7 +724,7 @@ static void free_qp_work(struct work_struct *work)
ucontext = qhp->ucontext; ucontext = qhp->ucontext;
rhp = qhp->rhp; rhp = qhp->rhp;
pr_debug("%s qhp %p ucontext %p\n", __func__, qhp, ucontext); pr_debug("qhp %p ucontext %p\n", qhp, ucontext);
destroy_qp(&rhp->rdev, &qhp->wq, destroy_qp(&rhp->rdev, &qhp->wq,
ucontext ? &ucontext->uctx : &rhp->rdev.uctx); ucontext ? &ucontext->uctx : &rhp->rdev.uctx);
...@@ -738,19 +738,19 @@ static void queue_qp_free(struct kref *kref) ...@@ -738,19 +738,19 @@ static void queue_qp_free(struct kref *kref)
struct c4iw_qp *qhp; struct c4iw_qp *qhp;
qhp = container_of(kref, struct c4iw_qp, kref); qhp = container_of(kref, struct c4iw_qp, kref);
pr_debug("%s qhp %p\n", __func__, qhp); pr_debug("qhp %p\n", qhp);
queue_work(qhp->rhp->rdev.free_workq, &qhp->free_work); queue_work(qhp->rhp->rdev.free_workq, &qhp->free_work);
} }
void c4iw_qp_add_ref(struct ib_qp *qp) void c4iw_qp_add_ref(struct ib_qp *qp)
{ {
pr_debug("%s ib_qp %p\n", __func__, qp); pr_debug("ib_qp %p\n", qp);
kref_get(&to_c4iw_qp(qp)->kref); kref_get(&to_c4iw_qp(qp)->kref);
} }
void c4iw_qp_rem_ref(struct ib_qp *qp) void c4iw_qp_rem_ref(struct ib_qp *qp)
{ {
pr_debug("%s ib_qp %p\n", __func__, qp); pr_debug("ib_qp %p\n", qp);
kref_put(&to_c4iw_qp(qp)->kref, queue_qp_free); kref_put(&to_c4iw_qp(qp)->kref, queue_qp_free);
} }
...@@ -980,8 +980,7 @@ int c4iw_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr, ...@@ -980,8 +980,7 @@ int c4iw_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
init_wr_hdr(wqe, qhp->wq.sq.pidx, fw_opcode, fw_flags, len16); init_wr_hdr(wqe, qhp->wq.sq.pidx, fw_opcode, fw_flags, len16);
pr_debug("%s cookie 0x%llx pidx 0x%x opcode 0x%x read_len %u\n", pr_debug("cookie 0x%llx pidx 0x%x opcode 0x%x read_len %u\n",
__func__,
(unsigned long long)wr->wr_id, qhp->wq.sq.pidx, (unsigned long long)wr->wr_id, qhp->wq.sq.pidx,
swsqe->opcode, swsqe->read_len); swsqe->opcode, swsqe->read_len);
wr = wr->next; wr = wr->next;
...@@ -1057,8 +1056,7 @@ int c4iw_post_receive(struct ib_qp *ibqp, struct ib_recv_wr *wr, ...@@ -1057,8 +1056,7 @@ int c4iw_post_receive(struct ib_qp *ibqp, struct ib_recv_wr *wr,
wqe->recv.r2[1] = 0; wqe->recv.r2[1] = 0;
wqe->recv.r2[2] = 0; wqe->recv.r2[2] = 0;
wqe->recv.len16 = len16; wqe->recv.len16 = len16;
pr_debug("%s cookie 0x%llx pidx %u\n", pr_debug("cookie 0x%llx pidx %u\n",
__func__,
(unsigned long long)wr->wr_id, qhp->wq.rq.pidx); (unsigned long long)wr->wr_id, qhp->wq.rq.pidx);
t4_rq_produce(&qhp->wq, len16); t4_rq_produce(&qhp->wq, len16);
idx += DIV_ROUND_UP(len16*16, T4_EQ_ENTRY_SIZE); idx += DIV_ROUND_UP(len16*16, T4_EQ_ENTRY_SIZE);
...@@ -1218,7 +1216,7 @@ static void post_terminate(struct c4iw_qp *qhp, struct t4_cqe *err_cqe, ...@@ -1218,7 +1216,7 @@ static void post_terminate(struct c4iw_qp *qhp, struct t4_cqe *err_cqe,
struct sk_buff *skb; struct sk_buff *skb;
struct terminate_message *term; struct terminate_message *term;
pr_debug("%s qhp %p qid 0x%x tid %u\n", __func__, qhp, qhp->wq.sq.qid, pr_debug("qhp %p qid 0x%x tid %u\n", qhp, qhp->wq.sq.qid,
qhp->ep->hwtid); qhp->ep->hwtid);
skb = skb_dequeue(&qhp->ep->com.ep_skb_list); skb = skb_dequeue(&qhp->ep->com.ep_skb_list);
...@@ -1255,7 +1253,7 @@ static void __flush_qp(struct c4iw_qp *qhp, struct c4iw_cq *rchp, ...@@ -1255,7 +1253,7 @@ static void __flush_qp(struct c4iw_qp *qhp, struct c4iw_cq *rchp,
int rq_flushed, sq_flushed; int rq_flushed, sq_flushed;
unsigned long flag; unsigned long flag;
pr_debug("%s qhp %p rchp %p schp %p\n", __func__, qhp, rchp, schp); pr_debug("qhp %p rchp %p schp %p\n", qhp, rchp, schp);
/* locking hierarchy: cq lock first, then qp lock. */ /* locking hierarchy: cq lock first, then qp lock. */
spin_lock_irqsave(&rchp->lock, flag); spin_lock_irqsave(&rchp->lock, flag);
...@@ -1340,8 +1338,7 @@ static int rdma_fini(struct c4iw_dev *rhp, struct c4iw_qp *qhp, ...@@ -1340,8 +1338,7 @@ static int rdma_fini(struct c4iw_dev *rhp, struct c4iw_qp *qhp,
int ret; int ret;
struct sk_buff *skb; struct sk_buff *skb;
pr_debug("%s qhp %p qid 0x%x tid %u\n", __func__, qhp, qhp->wq.sq.qid, pr_debug("qhp %p qid 0x%x tid %u\n", qhp, qhp->wq.sq.qid, ep->hwtid);
ep->hwtid);
skb = skb_dequeue(&ep->com.ep_skb_list); skb = skb_dequeue(&ep->com.ep_skb_list);
if (WARN_ON(!skb)) if (WARN_ON(!skb))
...@@ -1367,13 +1364,13 @@ static int rdma_fini(struct c4iw_dev *rhp, struct c4iw_qp *qhp, ...@@ -1367,13 +1364,13 @@ static int rdma_fini(struct c4iw_dev *rhp, struct c4iw_qp *qhp,
ret = c4iw_wait_for_reply(&rhp->rdev, &ep->com.wr_wait, qhp->ep->hwtid, ret = c4iw_wait_for_reply(&rhp->rdev, &ep->com.wr_wait, qhp->ep->hwtid,
qhp->wq.sq.qid, __func__); qhp->wq.sq.qid, __func__);
out: out:
pr_debug("%s ret %d\n", __func__, ret); pr_debug("ret %d\n", ret);
return ret; return ret;
} }
static void build_rtr_msg(u8 p2p_type, struct fw_ri_init *init) static void build_rtr_msg(u8 p2p_type, struct fw_ri_init *init)
{ {
pr_debug("%s p2p_type = %d\n", __func__, p2p_type); pr_debug("p2p_type = %d\n", p2p_type);
memset(&init->u, 0, sizeof init->u); memset(&init->u, 0, sizeof init->u);
switch (p2p_type) { switch (p2p_type) {
case FW_RI_INIT_P2PTYPE_RDMA_WRITE: case FW_RI_INIT_P2PTYPE_RDMA_WRITE:
...@@ -1402,7 +1399,7 @@ static int rdma_init(struct c4iw_dev *rhp, struct c4iw_qp *qhp) ...@@ -1402,7 +1399,7 @@ static int rdma_init(struct c4iw_dev *rhp, struct c4iw_qp *qhp)
int ret; int ret;
struct sk_buff *skb; struct sk_buff *skb;
pr_debug("%s qhp %p qid 0x%x tid %u ird %u ord %u\n", __func__, qhp, pr_debug("qhp %p qid 0x%x tid %u ird %u ord %u\n", qhp,
qhp->wq.sq.qid, qhp->ep->hwtid, qhp->ep->ird, qhp->ep->ord); qhp->wq.sq.qid, qhp->ep->hwtid, qhp->ep->ird, qhp->ep->ord);
skb = alloc_skb(sizeof *wqe, GFP_KERNEL); skb = alloc_skb(sizeof *wqe, GFP_KERNEL);
...@@ -1475,7 +1472,7 @@ static int rdma_init(struct c4iw_dev *rhp, struct c4iw_qp *qhp) ...@@ -1475,7 +1472,7 @@ static int rdma_init(struct c4iw_dev *rhp, struct c4iw_qp *qhp)
err1: err1:
free_ird(rhp, qhp->attr.max_ird); free_ird(rhp, qhp->attr.max_ird);
out: out:
pr_debug("%s ret %d\n", __func__, ret); pr_debug("ret %d\n", ret);
return ret; return ret;
} }
...@@ -1492,8 +1489,7 @@ int c4iw_modify_qp(struct c4iw_dev *rhp, struct c4iw_qp *qhp, ...@@ -1492,8 +1489,7 @@ int c4iw_modify_qp(struct c4iw_dev *rhp, struct c4iw_qp *qhp,
int free = 0; int free = 0;
struct c4iw_ep *ep = NULL; struct c4iw_ep *ep = NULL;
pr_debug("%s qhp %p sqid 0x%x rqid 0x%x ep %p state %d -> %d\n", pr_debug("qhp %p sqid 0x%x rqid 0x%x ep %p state %d -> %d\n",
__func__,
qhp, qhp->wq.sq.qid, qhp->wq.rq.qid, qhp->ep, qhp->attr.state, qhp, qhp->wq.sq.qid, qhp->wq.rq.qid, qhp->ep, qhp->attr.state,
(mask & C4IW_QP_ATTR_NEXT_STATE) ? attrs->next_state : -1); (mask & C4IW_QP_ATTR_NEXT_STATE) ? attrs->next_state : -1);
...@@ -1680,7 +1676,7 @@ int c4iw_modify_qp(struct c4iw_dev *rhp, struct c4iw_qp *qhp, ...@@ -1680,7 +1676,7 @@ int c4iw_modify_qp(struct c4iw_dev *rhp, struct c4iw_qp *qhp,
} }
goto out; goto out;
err: err:
pr_debug("%s disassociating ep %p qpid 0x%x\n", __func__, qhp->ep, pr_debug("disassociating ep %p qpid 0x%x\n", qhp->ep,
qhp->wq.sq.qid); qhp->wq.sq.qid);
/* disassociate the LLP connection */ /* disassociate the LLP connection */
...@@ -1717,7 +1713,7 @@ int c4iw_modify_qp(struct c4iw_dev *rhp, struct c4iw_qp *qhp, ...@@ -1717,7 +1713,7 @@ int c4iw_modify_qp(struct c4iw_dev *rhp, struct c4iw_qp *qhp,
*/ */
if (free) if (free)
c4iw_put_ep(&ep->com); c4iw_put_ep(&ep->com);
pr_debug("%s exit state %d\n", __func__, qhp->attr.state); pr_debug("exit state %d\n", qhp->attr.state);
return ret; return ret;
} }
...@@ -1747,7 +1743,7 @@ int c4iw_destroy_qp(struct ib_qp *ib_qp) ...@@ -1747,7 +1743,7 @@ int c4iw_destroy_qp(struct ib_qp *ib_qp)
c4iw_qp_rem_ref(ib_qp); c4iw_qp_rem_ref(ib_qp);
pr_debug("%s ib_qp %p qpid 0x%0x\n", __func__, ib_qp, qhp->wq.sq.qid); pr_debug("ib_qp %p qpid 0x%0x\n", ib_qp, qhp->wq.sq.qid);
return 0; return 0;
} }
...@@ -1766,7 +1762,7 @@ struct ib_qp *c4iw_create_qp(struct ib_pd *pd, struct ib_qp_init_attr *attrs, ...@@ -1766,7 +1762,7 @@ struct ib_qp *c4iw_create_qp(struct ib_pd *pd, struct ib_qp_init_attr *attrs,
struct c4iw_mm_entry *sq_key_mm, *rq_key_mm = NULL, *sq_db_key_mm; struct c4iw_mm_entry *sq_key_mm, *rq_key_mm = NULL, *sq_db_key_mm;
struct c4iw_mm_entry *rq_db_key_mm = NULL, *ma_sync_key_mm = NULL; struct c4iw_mm_entry *rq_db_key_mm = NULL, *ma_sync_key_mm = NULL;
pr_debug("%s ib_pd %p\n", __func__, pd); pr_debug("ib_pd %p\n", pd);
if (attrs->qp_type != IB_QPT_RC) if (attrs->qp_type != IB_QPT_RC)
return ERR_PTR(-EINVAL); return ERR_PTR(-EINVAL);
...@@ -1937,8 +1933,7 @@ struct ib_qp *c4iw_create_qp(struct ib_pd *pd, struct ib_qp_init_attr *attrs, ...@@ -1937,8 +1933,7 @@ struct ib_qp *c4iw_create_qp(struct ib_pd *pd, struct ib_qp_init_attr *attrs,
qhp->ibqp.qp_num = qhp->wq.sq.qid; qhp->ibqp.qp_num = qhp->wq.sq.qid;
init_timer(&(qhp->timer)); init_timer(&(qhp->timer));
INIT_LIST_HEAD(&qhp->db_fc_entry); INIT_LIST_HEAD(&qhp->db_fc_entry);
pr_debug("%s sq id %u size %u memsize %zu num_entries %u rq id %u size %u memsize %zu num_entries %u\n", pr_debug("sq id %u size %u memsize %zu num_entries %u rq id %u size %u memsize %zu num_entries %u\n",
__func__,
qhp->wq.sq.qid, qhp->wq.sq.size, qhp->wq.sq.memsize, qhp->wq.sq.qid, qhp->wq.sq.size, qhp->wq.sq.memsize,
attrs->cap.max_send_wr, qhp->wq.rq.qid, qhp->wq.rq.size, attrs->cap.max_send_wr, qhp->wq.rq.qid, qhp->wq.rq.size,
qhp->wq.rq.memsize, attrs->cap.max_recv_wr); qhp->wq.rq.memsize, attrs->cap.max_recv_wr);
...@@ -1971,7 +1966,7 @@ int c4iw_ib_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, ...@@ -1971,7 +1966,7 @@ int c4iw_ib_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
enum c4iw_qp_attr_mask mask = 0; enum c4iw_qp_attr_mask mask = 0;
struct c4iw_qp_attributes attrs; struct c4iw_qp_attributes attrs;
pr_debug("%s ib_qp %p\n", __func__, ibqp); pr_debug("ib_qp %p\n", ibqp);
/* iwarp does not support the RTR state */ /* iwarp does not support the RTR state */
if ((attr_mask & IB_QP_STATE) && (attr->qp_state == IB_QPS_RTR)) if ((attr_mask & IB_QP_STATE) && (attr->qp_state == IB_QPS_RTR))
...@@ -2017,7 +2012,7 @@ int c4iw_ib_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, ...@@ -2017,7 +2012,7 @@ int c4iw_ib_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
struct ib_qp *c4iw_get_qp(struct ib_device *dev, int qpn) struct ib_qp *c4iw_get_qp(struct ib_device *dev, int qpn)
{ {
pr_debug("%s ib_dev %p qpn 0x%x\n", __func__, dev, qpn); pr_debug("ib_dev %p qpn 0x%x\n", dev, qpn);
return (struct ib_qp *)get_qhp(to_c4iw_dev(dev), qpn); return (struct ib_qp *)get_qhp(to_c4iw_dev(dev), qpn);
} }
......
...@@ -90,7 +90,7 @@ u32 c4iw_get_resource(struct c4iw_id_table *id_table) ...@@ -90,7 +90,7 @@ u32 c4iw_get_resource(struct c4iw_id_table *id_table)
void c4iw_put_resource(struct c4iw_id_table *id_table, u32 entry) void c4iw_put_resource(struct c4iw_id_table *id_table, u32 entry)
{ {
pr_debug("%s entry 0x%x\n", __func__, entry); pr_debug("entry 0x%x\n", entry);
c4iw_id_free(id_table, entry); c4iw_id_free(id_table, entry);
} }
...@@ -141,7 +141,7 @@ u32 c4iw_get_cqid(struct c4iw_rdev *rdev, struct c4iw_dev_ucontext *uctx) ...@@ -141,7 +141,7 @@ u32 c4iw_get_cqid(struct c4iw_rdev *rdev, struct c4iw_dev_ucontext *uctx)
} }
out: out:
mutex_unlock(&uctx->lock); mutex_unlock(&uctx->lock);
pr_debug("%s qid 0x%x\n", __func__, qid); pr_debug("qid 0x%x\n", qid);
mutex_lock(&rdev->stats.lock); mutex_lock(&rdev->stats.lock);
if (rdev->stats.qid.cur > rdev->stats.qid.max) if (rdev->stats.qid.cur > rdev->stats.qid.max)
rdev->stats.qid.max = rdev->stats.qid.cur; rdev->stats.qid.max = rdev->stats.qid.cur;
...@@ -157,7 +157,7 @@ void c4iw_put_cqid(struct c4iw_rdev *rdev, u32 qid, ...@@ -157,7 +157,7 @@ void c4iw_put_cqid(struct c4iw_rdev *rdev, u32 qid,
entry = kmalloc(sizeof *entry, GFP_KERNEL); entry = kmalloc(sizeof *entry, GFP_KERNEL);
if (!entry) if (!entry)
return; return;
pr_debug("%s qid 0x%x\n", __func__, qid); pr_debug("qid 0x%x\n", qid);
entry->qid = qid; entry->qid = qid;
mutex_lock(&uctx->lock); mutex_lock(&uctx->lock);
list_add_tail(&entry->entry, &uctx->cqids); list_add_tail(&entry->entry, &uctx->cqids);
...@@ -215,7 +215,7 @@ u32 c4iw_get_qpid(struct c4iw_rdev *rdev, struct c4iw_dev_ucontext *uctx) ...@@ -215,7 +215,7 @@ u32 c4iw_get_qpid(struct c4iw_rdev *rdev, struct c4iw_dev_ucontext *uctx)
} }
out: out:
mutex_unlock(&uctx->lock); mutex_unlock(&uctx->lock);
pr_debug("%s qid 0x%x\n", __func__, qid); pr_debug("qid 0x%x\n", qid);
mutex_lock(&rdev->stats.lock); mutex_lock(&rdev->stats.lock);
if (rdev->stats.qid.cur > rdev->stats.qid.max) if (rdev->stats.qid.cur > rdev->stats.qid.max)
rdev->stats.qid.max = rdev->stats.qid.cur; rdev->stats.qid.max = rdev->stats.qid.cur;
...@@ -231,7 +231,7 @@ void c4iw_put_qpid(struct c4iw_rdev *rdev, u32 qid, ...@@ -231,7 +231,7 @@ void c4iw_put_qpid(struct c4iw_rdev *rdev, u32 qid,
entry = kmalloc(sizeof *entry, GFP_KERNEL); entry = kmalloc(sizeof *entry, GFP_KERNEL);
if (!entry) if (!entry)
return; return;
pr_debug("%s qid 0x%x\n", __func__, qid); pr_debug("qid 0x%x\n", qid);
entry->qid = qid; entry->qid = qid;
mutex_lock(&uctx->lock); mutex_lock(&uctx->lock);
list_add_tail(&entry->entry, &uctx->qpids); list_add_tail(&entry->entry, &uctx->qpids);
...@@ -254,7 +254,7 @@ void c4iw_destroy_resource(struct c4iw_resource *rscp) ...@@ -254,7 +254,7 @@ void c4iw_destroy_resource(struct c4iw_resource *rscp)
u32 c4iw_pblpool_alloc(struct c4iw_rdev *rdev, int size) u32 c4iw_pblpool_alloc(struct c4iw_rdev *rdev, int size)
{ {
unsigned long addr = gen_pool_alloc(rdev->pbl_pool, size); unsigned long addr = gen_pool_alloc(rdev->pbl_pool, size);
pr_debug("%s addr 0x%x size %d\n", __func__, (u32)addr, size); pr_debug("addr 0x%x size %d\n", (u32)addr, size);
mutex_lock(&rdev->stats.lock); mutex_lock(&rdev->stats.lock);
if (addr) { if (addr) {
rdev->stats.pbl.cur += roundup(size, 1 << MIN_PBL_SHIFT); rdev->stats.pbl.cur += roundup(size, 1 << MIN_PBL_SHIFT);
...@@ -268,7 +268,7 @@ u32 c4iw_pblpool_alloc(struct c4iw_rdev *rdev, int size) ...@@ -268,7 +268,7 @@ u32 c4iw_pblpool_alloc(struct c4iw_rdev *rdev, int size)
void c4iw_pblpool_free(struct c4iw_rdev *rdev, u32 addr, int size) void c4iw_pblpool_free(struct c4iw_rdev *rdev, u32 addr, int size)
{ {
pr_debug("%s addr 0x%x size %d\n", __func__, addr, size); pr_debug("addr 0x%x size %d\n", addr, size);
mutex_lock(&rdev->stats.lock); mutex_lock(&rdev->stats.lock);
rdev->stats.pbl.cur -= roundup(size, 1 << MIN_PBL_SHIFT); rdev->stats.pbl.cur -= roundup(size, 1 << MIN_PBL_SHIFT);
mutex_unlock(&rdev->stats.lock); mutex_unlock(&rdev->stats.lock);
...@@ -290,8 +290,8 @@ int c4iw_pblpool_create(struct c4iw_rdev *rdev) ...@@ -290,8 +290,8 @@ int c4iw_pblpool_create(struct c4iw_rdev *rdev)
while (pbl_start < pbl_top) { while (pbl_start < pbl_top) {
pbl_chunk = min(pbl_top - pbl_start + 1, pbl_chunk); pbl_chunk = min(pbl_top - pbl_start + 1, pbl_chunk);
if (gen_pool_add(rdev->pbl_pool, pbl_start, pbl_chunk, -1)) { if (gen_pool_add(rdev->pbl_pool, pbl_start, pbl_chunk, -1)) {
pr_debug("%s failed to add PBL chunk (%x/%x)\n", pr_debug("failed to add PBL chunk (%x/%x)\n",
__func__, pbl_start, pbl_chunk); pbl_start, pbl_chunk);
if (pbl_chunk <= 1024 << MIN_PBL_SHIFT) { if (pbl_chunk <= 1024 << MIN_PBL_SHIFT) {
pr_warn("Failed to add all PBL chunks (%x/%x)\n", pr_warn("Failed to add all PBL chunks (%x/%x)\n",
pbl_start, pbl_top - pbl_start); pbl_start, pbl_top - pbl_start);
...@@ -299,8 +299,8 @@ int c4iw_pblpool_create(struct c4iw_rdev *rdev) ...@@ -299,8 +299,8 @@ int c4iw_pblpool_create(struct c4iw_rdev *rdev)
} }
pbl_chunk >>= 1; pbl_chunk >>= 1;
} else { } else {
pr_debug("%s added PBL chunk (%x/%x)\n", pr_debug("added PBL chunk (%x/%x)\n",
__func__, pbl_start, pbl_chunk); pbl_start, pbl_chunk);
pbl_start += pbl_chunk; pbl_start += pbl_chunk;
} }
} }
...@@ -322,7 +322,7 @@ void c4iw_pblpool_destroy(struct c4iw_rdev *rdev) ...@@ -322,7 +322,7 @@ void c4iw_pblpool_destroy(struct c4iw_rdev *rdev)
u32 c4iw_rqtpool_alloc(struct c4iw_rdev *rdev, int size) u32 c4iw_rqtpool_alloc(struct c4iw_rdev *rdev, int size)
{ {
unsigned long addr = gen_pool_alloc(rdev->rqt_pool, size << 6); unsigned long addr = gen_pool_alloc(rdev->rqt_pool, size << 6);
pr_debug("%s addr 0x%x size %d\n", __func__, (u32)addr, size << 6); pr_debug("addr 0x%x size %d\n", (u32)addr, size << 6);
if (!addr) if (!addr)
pr_warn_ratelimited("%s: Out of RQT memory\n", pr_warn_ratelimited("%s: Out of RQT memory\n",
pci_name(rdev->lldi.pdev)); pci_name(rdev->lldi.pdev));
...@@ -339,7 +339,7 @@ u32 c4iw_rqtpool_alloc(struct c4iw_rdev *rdev, int size) ...@@ -339,7 +339,7 @@ u32 c4iw_rqtpool_alloc(struct c4iw_rdev *rdev, int size)
void c4iw_rqtpool_free(struct c4iw_rdev *rdev, u32 addr, int size) void c4iw_rqtpool_free(struct c4iw_rdev *rdev, u32 addr, int size)
{ {
pr_debug("%s addr 0x%x size %d\n", __func__, addr, size << 6); pr_debug("addr 0x%x size %d\n", addr, size << 6);
mutex_lock(&rdev->stats.lock); mutex_lock(&rdev->stats.lock);
rdev->stats.rqt.cur -= roundup(size << 6, 1 << MIN_RQT_SHIFT); rdev->stats.rqt.cur -= roundup(size << 6, 1 << MIN_RQT_SHIFT);
mutex_unlock(&rdev->stats.lock); mutex_unlock(&rdev->stats.lock);
...@@ -361,8 +361,8 @@ int c4iw_rqtpool_create(struct c4iw_rdev *rdev) ...@@ -361,8 +361,8 @@ int c4iw_rqtpool_create(struct c4iw_rdev *rdev)
while (rqt_start < rqt_top) { while (rqt_start < rqt_top) {
rqt_chunk = min(rqt_top - rqt_start + 1, rqt_chunk); rqt_chunk = min(rqt_top - rqt_start + 1, rqt_chunk);
if (gen_pool_add(rdev->rqt_pool, rqt_start, rqt_chunk, -1)) { if (gen_pool_add(rdev->rqt_pool, rqt_start, rqt_chunk, -1)) {
pr_debug("%s failed to add RQT chunk (%x/%x)\n", pr_debug("failed to add RQT chunk (%x/%x)\n",
__func__, rqt_start, rqt_chunk); rqt_start, rqt_chunk);
if (rqt_chunk <= 1024 << MIN_RQT_SHIFT) { if (rqt_chunk <= 1024 << MIN_RQT_SHIFT) {
pr_warn("Failed to add all RQT chunks (%x/%x)\n", pr_warn("Failed to add all RQT chunks (%x/%x)\n",
rqt_start, rqt_top - rqt_start); rqt_start, rqt_top - rqt_start);
...@@ -370,8 +370,8 @@ int c4iw_rqtpool_create(struct c4iw_rdev *rdev) ...@@ -370,8 +370,8 @@ int c4iw_rqtpool_create(struct c4iw_rdev *rdev)
} }
rqt_chunk >>= 1; rqt_chunk >>= 1;
} else { } else {
pr_debug("%s added RQT chunk (%x/%x)\n", pr_debug("added RQT chunk (%x/%x)\n",
__func__, rqt_start, rqt_chunk); rqt_start, rqt_chunk);
rqt_start += rqt_chunk; rqt_start += rqt_chunk;
} }
} }
...@@ -391,7 +391,7 @@ void c4iw_rqtpool_destroy(struct c4iw_rdev *rdev) ...@@ -391,7 +391,7 @@ void c4iw_rqtpool_destroy(struct c4iw_rdev *rdev)
u32 c4iw_ocqp_pool_alloc(struct c4iw_rdev *rdev, int size) u32 c4iw_ocqp_pool_alloc(struct c4iw_rdev *rdev, int size)
{ {
unsigned long addr = gen_pool_alloc(rdev->ocqp_pool, size); unsigned long addr = gen_pool_alloc(rdev->ocqp_pool, size);
pr_debug("%s addr 0x%x size %d\n", __func__, (u32)addr, size); pr_debug("addr 0x%x size %d\n", (u32)addr, size);
if (addr) { if (addr) {
mutex_lock(&rdev->stats.lock); mutex_lock(&rdev->stats.lock);
rdev->stats.ocqp.cur += roundup(size, 1 << MIN_OCQP_SHIFT); rdev->stats.ocqp.cur += roundup(size, 1 << MIN_OCQP_SHIFT);
...@@ -404,7 +404,7 @@ u32 c4iw_ocqp_pool_alloc(struct c4iw_rdev *rdev, int size) ...@@ -404,7 +404,7 @@ u32 c4iw_ocqp_pool_alloc(struct c4iw_rdev *rdev, int size)
void c4iw_ocqp_pool_free(struct c4iw_rdev *rdev, u32 addr, int size) void c4iw_ocqp_pool_free(struct c4iw_rdev *rdev, u32 addr, int size)
{ {
pr_debug("%s addr 0x%x size %d\n", __func__, addr, size); pr_debug("addr 0x%x size %d\n", addr, size);
mutex_lock(&rdev->stats.lock); mutex_lock(&rdev->stats.lock);
rdev->stats.ocqp.cur -= roundup(size, 1 << MIN_OCQP_SHIFT); rdev->stats.ocqp.cur -= roundup(size, 1 << MIN_OCQP_SHIFT);
mutex_unlock(&rdev->stats.lock); mutex_unlock(&rdev->stats.lock);
...@@ -426,8 +426,8 @@ int c4iw_ocqp_pool_create(struct c4iw_rdev *rdev) ...@@ -426,8 +426,8 @@ int c4iw_ocqp_pool_create(struct c4iw_rdev *rdev)
while (start < top) { while (start < top) {
chunk = min(top - start + 1, chunk); chunk = min(top - start + 1, chunk);
if (gen_pool_add(rdev->ocqp_pool, start, chunk, -1)) { if (gen_pool_add(rdev->ocqp_pool, start, chunk, -1)) {
pr_debug("%s failed to add OCQP chunk (%x/%x)\n", pr_debug("failed to add OCQP chunk (%x/%x)\n",
__func__, start, chunk); start, chunk);
if (chunk <= 1024 << MIN_OCQP_SHIFT) { if (chunk <= 1024 << MIN_OCQP_SHIFT) {
pr_warn("Failed to add all OCQP chunks (%x/%x)\n", pr_warn("Failed to add all OCQP chunks (%x/%x)\n",
start, top - start); start, top - start);
...@@ -435,8 +435,8 @@ int c4iw_ocqp_pool_create(struct c4iw_rdev *rdev) ...@@ -435,8 +435,8 @@ int c4iw_ocqp_pool_create(struct c4iw_rdev *rdev)
} }
chunk >>= 1; chunk >>= 1;
} else { } else {
pr_debug("%s added OCQP chunk (%x/%x)\n", pr_debug("added OCQP chunk (%x/%x)\n",
__func__, start, chunk); start, chunk);
start += chunk; start += chunk;
} }
} }
......
...@@ -466,14 +466,12 @@ static inline void t4_ring_sq_db(struct t4_wq *wq, u16 inc, union t4_wr *wqe) ...@@ -466,14 +466,12 @@ static inline void t4_ring_sq_db(struct t4_wq *wq, u16 inc, union t4_wr *wqe)
wmb(); wmb();
if (wq->sq.bar2_va) { if (wq->sq.bar2_va) {
if (inc == 1 && wq->sq.bar2_qid == 0 && wqe) { if (inc == 1 && wq->sq.bar2_qid == 0 && wqe) {
pr_debug("%s: WC wq->sq.pidx = %d\n", pr_debug("WC wq->sq.pidx = %d\n", wq->sq.pidx);
__func__, wq->sq.pidx);
pio_copy((u64 __iomem *) pio_copy((u64 __iomem *)
(wq->sq.bar2_va + SGE_UDB_WCDOORBELL), (wq->sq.bar2_va + SGE_UDB_WCDOORBELL),
(u64 *)wqe); (u64 *)wqe);
} else { } else {
pr_debug("%s: DB wq->sq.pidx = %d\n", pr_debug("DB wq->sq.pidx = %d\n", wq->sq.pidx);
__func__, wq->sq.pidx);
writel(PIDX_T5_V(inc) | QID_V(wq->sq.bar2_qid), writel(PIDX_T5_V(inc) | QID_V(wq->sq.bar2_qid),
wq->sq.bar2_va + SGE_UDB_KDOORBELL); wq->sq.bar2_va + SGE_UDB_KDOORBELL);
} }
...@@ -493,14 +491,12 @@ static inline void t4_ring_rq_db(struct t4_wq *wq, u16 inc, ...@@ -493,14 +491,12 @@ static inline void t4_ring_rq_db(struct t4_wq *wq, u16 inc,
wmb(); wmb();
if (wq->rq.bar2_va) { if (wq->rq.bar2_va) {
if (inc == 1 && wq->rq.bar2_qid == 0 && wqe) { if (inc == 1 && wq->rq.bar2_qid == 0 && wqe) {
pr_debug("%s: WC wq->rq.pidx = %d\n", pr_debug("WC wq->rq.pidx = %d\n", wq->rq.pidx);
__func__, wq->rq.pidx);
pio_copy((u64 __iomem *) pio_copy((u64 __iomem *)
(wq->rq.bar2_va + SGE_UDB_WCDOORBELL), (wq->rq.bar2_va + SGE_UDB_WCDOORBELL),
(void *)wqe); (void *)wqe);
} else { } else {
pr_debug("%s: DB wq->rq.pidx = %d\n", pr_debug("DB wq->rq.pidx = %d\n", wq->rq.pidx);
__func__, wq->rq.pidx);
writel(PIDX_T5_V(inc) | QID_V(wq->rq.bar2_qid), writel(PIDX_T5_V(inc) | QID_V(wq->rq.bar2_qid),
wq->rq.bar2_va + SGE_UDB_KDOORBELL); wq->rq.bar2_va + SGE_UDB_KDOORBELL);
} }
......
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