Commit 33718363 authored by Harvey Harrison's avatar Harvey Harrison Committed by Roland Dreier

IB: Replace remaining __FUNCTION__ occurrences with __func__

__FUNCTION__ is gcc-specific, use __func__ instead.
Signed-off-by: default avatarHarvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent e8e91f6b
...@@ -61,7 +61,7 @@ static int c2_convert_cm_status(u32 c2_status) ...@@ -61,7 +61,7 @@ static int c2_convert_cm_status(u32 c2_status)
default: default:
printk(KERN_ERR PFX printk(KERN_ERR PFX
"%s - Unable to convert CM status: %d\n", "%s - Unable to convert CM status: %d\n",
__FUNCTION__, c2_status); __func__, c2_status);
return -EIO; return -EIO;
} }
} }
...@@ -193,7 +193,7 @@ void c2_ae_event(struct c2_dev *c2dev, u32 mq_index) ...@@ -193,7 +193,7 @@ void c2_ae_event(struct c2_dev *c2dev, u32 mq_index)
pr_debug("%s: event = %s, user_context=%llx, " pr_debug("%s: event = %s, user_context=%llx, "
"resource_type=%x, " "resource_type=%x, "
"resource=%x, qp_state=%s\n", "resource=%x, qp_state=%s\n",
__FUNCTION__, __func__,
to_event_str(event_id), to_event_str(event_id),
(unsigned long long) wr->ae.ae_generic.user_context, (unsigned long long) wr->ae.ae_generic.user_context,
be32_to_cpu(wr->ae.ae_generic.resource_type), be32_to_cpu(wr->ae.ae_generic.resource_type),
...@@ -259,7 +259,7 @@ void c2_ae_event(struct c2_dev *c2dev, u32 mq_index) ...@@ -259,7 +259,7 @@ void c2_ae_event(struct c2_dev *c2dev, u32 mq_index)
BUG_ON(1); BUG_ON(1);
pr_debug("%s:%d Unexpected event_id=%d on QP=%p, " pr_debug("%s:%d Unexpected event_id=%d on QP=%p, "
"CM_ID=%p\n", "CM_ID=%p\n",
__FUNCTION__, __LINE__, __func__, __LINE__,
event_id, qp, cm_id); event_id, qp, cm_id);
break; break;
} }
...@@ -276,7 +276,7 @@ void c2_ae_event(struct c2_dev *c2dev, u32 mq_index) ...@@ -276,7 +276,7 @@ void c2_ae_event(struct c2_dev *c2dev, u32 mq_index)
pr_debug("C2_RES_IND_EP event_id=%d\n", event_id); pr_debug("C2_RES_IND_EP event_id=%d\n", event_id);
if (event_id != CCAE_CONNECTION_REQUEST) { if (event_id != CCAE_CONNECTION_REQUEST) {
pr_debug("%s: Invalid event_id: %d\n", pr_debug("%s: Invalid event_id: %d\n",
__FUNCTION__, event_id); __func__, event_id);
break; break;
} }
cm_event.event = IW_CM_EVENT_CONNECT_REQUEST; cm_event.event = IW_CM_EVENT_CONNECT_REQUEST;
......
...@@ -113,7 +113,7 @@ __be16 *c2_alloc_mqsp(struct c2_dev *c2dev, struct sp_chunk *head, ...@@ -113,7 +113,7 @@ __be16 *c2_alloc_mqsp(struct c2_dev *c2dev, struct sp_chunk *head,
*dma_addr = head->dma_addr + *dma_addr = head->dma_addr +
((unsigned long) &(head->shared_ptr[mqsp]) - ((unsigned long) &(head->shared_ptr[mqsp]) -
(unsigned long) head); (unsigned long) head);
pr_debug("%s addr %p dma_addr %llx\n", __FUNCTION__, pr_debug("%s addr %p dma_addr %llx\n", __func__,
&(head->shared_ptr[mqsp]), (unsigned long long) *dma_addr); &(head->shared_ptr[mqsp]), (unsigned long long) *dma_addr);
return (__force __be16 *) &(head->shared_ptr[mqsp]); return (__force __be16 *) &(head->shared_ptr[mqsp]);
} }
......
...@@ -121,7 +121,7 @@ void c2_set_qp_state(struct c2_qp *qp, int c2_state) ...@@ -121,7 +121,7 @@ void c2_set_qp_state(struct c2_qp *qp, int c2_state)
int new_state = to_ib_state(c2_state); int new_state = to_ib_state(c2_state);
pr_debug("%s: qp[%p] state modify %s --> %s\n", pr_debug("%s: qp[%p] state modify %s --> %s\n",
__FUNCTION__, __func__,
qp, qp,
to_ib_state_str(qp->state), to_ib_state_str(qp->state),
to_ib_state_str(new_state)); to_ib_state_str(new_state));
...@@ -141,7 +141,7 @@ int c2_qp_modify(struct c2_dev *c2dev, struct c2_qp *qp, ...@@ -141,7 +141,7 @@ int c2_qp_modify(struct c2_dev *c2dev, struct c2_qp *qp,
int err; int err;
pr_debug("%s:%d qp=%p, %s --> %s\n", pr_debug("%s:%d qp=%p, %s --> %s\n",
__FUNCTION__, __LINE__, __func__, __LINE__,
qp, qp,
to_ib_state_str(qp->state), to_ib_state_str(qp->state),
to_ib_state_str(attr->qp_state)); to_ib_state_str(attr->qp_state));
...@@ -224,7 +224,7 @@ int c2_qp_modify(struct c2_dev *c2dev, struct c2_qp *qp, ...@@ -224,7 +224,7 @@ int c2_qp_modify(struct c2_dev *c2dev, struct c2_qp *qp,
qp->state = next_state; qp->state = next_state;
#ifdef DEBUG #ifdef DEBUG
else else
pr_debug("%s: c2_errno=%d\n", __FUNCTION__, err); pr_debug("%s: c2_errno=%d\n", __func__, err);
#endif #endif
/* /*
* If we're going to error and generating the event here, then * If we're going to error and generating the event here, then
...@@ -243,7 +243,7 @@ int c2_qp_modify(struct c2_dev *c2dev, struct c2_qp *qp, ...@@ -243,7 +243,7 @@ int c2_qp_modify(struct c2_dev *c2dev, struct c2_qp *qp,
vq_req_free(c2dev, vq_req); vq_req_free(c2dev, vq_req);
pr_debug("%s:%d qp=%p, cur_state=%s\n", pr_debug("%s:%d qp=%p, cur_state=%s\n",
__FUNCTION__, __LINE__, __func__, __LINE__,
qp, qp,
to_ib_state_str(qp->state)); to_ib_state_str(qp->state));
return err; return err;
......
...@@ -524,7 +524,7 @@ int __devinit c2_rnic_init(struct c2_dev *c2dev) ...@@ -524,7 +524,7 @@ int __devinit c2_rnic_init(struct c2_dev *c2dev)
goto bail1; goto bail1;
} }
pci_unmap_addr_set(&c2dev->rep_vq, mapping, c2dev->rep_vq.host_dma); pci_unmap_addr_set(&c2dev->rep_vq, mapping, c2dev->rep_vq.host_dma);
pr_debug("%s rep_vq va %p dma %llx\n", __FUNCTION__, q1_pages, pr_debug("%s rep_vq va %p dma %llx\n", __func__, q1_pages,
(unsigned long long) c2dev->rep_vq.host_dma); (unsigned long long) c2dev->rep_vq.host_dma);
c2_mq_rep_init(&c2dev->rep_vq, c2_mq_rep_init(&c2dev->rep_vq,
1, 1,
...@@ -545,7 +545,7 @@ int __devinit c2_rnic_init(struct c2_dev *c2dev) ...@@ -545,7 +545,7 @@ int __devinit c2_rnic_init(struct c2_dev *c2dev)
goto bail2; goto bail2;
} }
pci_unmap_addr_set(&c2dev->aeq, mapping, c2dev->aeq.host_dma); pci_unmap_addr_set(&c2dev->aeq, mapping, c2dev->aeq.host_dma);
pr_debug("%s aeq va %p dma %llx\n", __FUNCTION__, q2_pages, pr_debug("%s aeq va %p dma %llx\n", __func__, q2_pages,
(unsigned long long) c2dev->aeq.host_dma); (unsigned long long) c2dev->aeq.host_dma);
c2_mq_rep_init(&c2dev->aeq, c2_mq_rep_init(&c2dev->aeq,
2, 2,
......
...@@ -197,7 +197,7 @@ int vq_send_wr(struct c2_dev *c2dev, union c2wr *wr) ...@@ -197,7 +197,7 @@ int vq_send_wr(struct c2_dev *c2dev, union c2wr *wr)
*/ */
while (msg == NULL) { while (msg == NULL) {
pr_debug("%s:%d no available msg in VQ, waiting...\n", pr_debug("%s:%d no available msg in VQ, waiting...\n",
__FUNCTION__, __LINE__); __func__, __LINE__);
init_waitqueue_entry(&__wait, current); init_waitqueue_entry(&__wait, current);
add_wait_queue(&c2dev->req_vq_wo, &__wait); add_wait_queue(&c2dev->req_vq_wo, &__wait);
spin_unlock(&c2dev->vqlock); spin_unlock(&c2dev->vqlock);
......
...@@ -45,16 +45,16 @@ void cxio_dump_tpt(struct cxio_rdev *rdev, u32 stag) ...@@ -45,16 +45,16 @@ void cxio_dump_tpt(struct cxio_rdev *rdev, u32 stag)
m = kmalloc(sizeof(*m) + size, GFP_ATOMIC); m = kmalloc(sizeof(*m) + size, GFP_ATOMIC);
if (!m) { if (!m) {
PDBG("%s couldn't allocate memory.\n", __FUNCTION__); PDBG("%s couldn't allocate memory.\n", __func__);
return; return;
} }
m->mem_id = MEM_PMRX; m->mem_id = MEM_PMRX;
m->addr = (stag>>8) * 32 + rdev->rnic_info.tpt_base; m->addr = (stag>>8) * 32 + rdev->rnic_info.tpt_base;
m->len = size; m->len = size;
PDBG("%s TPT addr 0x%x len %d\n", __FUNCTION__, m->addr, m->len); PDBG("%s TPT addr 0x%x len %d\n", __func__, m->addr, m->len);
rc = rdev->t3cdev_p->ctl(rdev->t3cdev_p, RDMA_GET_MEM, m); rc = rdev->t3cdev_p->ctl(rdev->t3cdev_p, RDMA_GET_MEM, m);
if (rc) { if (rc) {
PDBG("%s toectl returned error %d\n", __FUNCTION__, rc); PDBG("%s toectl returned error %d\n", __func__, rc);
kfree(m); kfree(m);
return; return;
} }
...@@ -82,17 +82,17 @@ void cxio_dump_pbl(struct cxio_rdev *rdev, u32 pbl_addr, uint len, u8 shift) ...@@ -82,17 +82,17 @@ void cxio_dump_pbl(struct cxio_rdev *rdev, u32 pbl_addr, uint len, u8 shift)
m = kmalloc(sizeof(*m) + size, GFP_ATOMIC); m = kmalloc(sizeof(*m) + size, GFP_ATOMIC);
if (!m) { if (!m) {
PDBG("%s couldn't allocate memory.\n", __FUNCTION__); PDBG("%s couldn't allocate memory.\n", __func__);
return; return;
} }
m->mem_id = MEM_PMRX; m->mem_id = MEM_PMRX;
m->addr = pbl_addr; m->addr = pbl_addr;
m->len = size; m->len = size;
PDBG("%s PBL addr 0x%x len %d depth %d\n", PDBG("%s PBL addr 0x%x len %d depth %d\n",
__FUNCTION__, m->addr, m->len, npages); __func__, m->addr, m->len, npages);
rc = rdev->t3cdev_p->ctl(rdev->t3cdev_p, RDMA_GET_MEM, m); rc = rdev->t3cdev_p->ctl(rdev->t3cdev_p, RDMA_GET_MEM, m);
if (rc) { if (rc) {
PDBG("%s toectl returned error %d\n", __FUNCTION__, rc); PDBG("%s toectl returned error %d\n", __func__, rc);
kfree(m); kfree(m);
return; return;
} }
...@@ -144,16 +144,16 @@ void cxio_dump_rqt(struct cxio_rdev *rdev, u32 hwtid, int nents) ...@@ -144,16 +144,16 @@ void cxio_dump_rqt(struct cxio_rdev *rdev, u32 hwtid, int nents)
m = kmalloc(sizeof(*m) + size, GFP_ATOMIC); m = kmalloc(sizeof(*m) + size, GFP_ATOMIC);
if (!m) { if (!m) {
PDBG("%s couldn't allocate memory.\n", __FUNCTION__); PDBG("%s couldn't allocate memory.\n", __func__);
return; return;
} }
m->mem_id = MEM_PMRX; m->mem_id = MEM_PMRX;
m->addr = ((hwtid)<<10) + rdev->rnic_info.rqt_base; m->addr = ((hwtid)<<10) + rdev->rnic_info.rqt_base;
m->len = size; m->len = size;
PDBG("%s RQT addr 0x%x len %d\n", __FUNCTION__, m->addr, m->len); PDBG("%s RQT addr 0x%x len %d\n", __func__, m->addr, m->len);
rc = rdev->t3cdev_p->ctl(rdev->t3cdev_p, RDMA_GET_MEM, m); rc = rdev->t3cdev_p->ctl(rdev->t3cdev_p, RDMA_GET_MEM, m);
if (rc) { if (rc) {
PDBG("%s toectl returned error %d\n", __FUNCTION__, rc); PDBG("%s toectl returned error %d\n", __func__, rc);
kfree(m); kfree(m);
return; return;
} }
...@@ -177,16 +177,16 @@ void cxio_dump_tcb(struct cxio_rdev *rdev, u32 hwtid) ...@@ -177,16 +177,16 @@ void cxio_dump_tcb(struct cxio_rdev *rdev, u32 hwtid)
m = kmalloc(sizeof(*m) + size, GFP_ATOMIC); m = kmalloc(sizeof(*m) + size, GFP_ATOMIC);
if (!m) { if (!m) {
PDBG("%s couldn't allocate memory.\n", __FUNCTION__); PDBG("%s couldn't allocate memory.\n", __func__);
return; return;
} }
m->mem_id = MEM_CM; m->mem_id = MEM_CM;
m->addr = hwtid * size; m->addr = hwtid * size;
m->len = size; m->len = size;
PDBG("%s TCB %d len %d\n", __FUNCTION__, m->addr, m->len); PDBG("%s TCB %d len %d\n", __func__, m->addr, m->len);
rc = rdev->t3cdev_p->ctl(rdev->t3cdev_p, RDMA_GET_MEM, m); rc = rdev->t3cdev_p->ctl(rdev->t3cdev_p, RDMA_GET_MEM, m);
if (rc) { if (rc) {
PDBG("%s toectl returned error %d\n", __FUNCTION__, rc); PDBG("%s toectl returned error %d\n", __func__, rc);
kfree(m); kfree(m);
return; return;
} }
......
This diff is collapsed.
...@@ -206,13 +206,13 @@ void cxio_hal_put_stag(struct cxio_hal_resource *rscp, u32 stag) ...@@ -206,13 +206,13 @@ void cxio_hal_put_stag(struct cxio_hal_resource *rscp, u32 stag)
u32 cxio_hal_get_qpid(struct cxio_hal_resource *rscp) u32 cxio_hal_get_qpid(struct cxio_hal_resource *rscp)
{ {
u32 qpid = cxio_hal_get_resource(rscp->qpid_fifo); u32 qpid = cxio_hal_get_resource(rscp->qpid_fifo);
PDBG("%s qpid 0x%x\n", __FUNCTION__, qpid); PDBG("%s qpid 0x%x\n", __func__, qpid);
return qpid; return qpid;
} }
void cxio_hal_put_qpid(struct cxio_hal_resource *rscp, u32 qpid) void cxio_hal_put_qpid(struct cxio_hal_resource *rscp, u32 qpid)
{ {
PDBG("%s qpid 0x%x\n", __FUNCTION__, qpid); PDBG("%s qpid 0x%x\n", __func__, qpid);
cxio_hal_put_resource(rscp->qpid_fifo, qpid); cxio_hal_put_resource(rscp->qpid_fifo, qpid);
} }
...@@ -255,13 +255,13 @@ void cxio_hal_destroy_resource(struct cxio_hal_resource *rscp) ...@@ -255,13 +255,13 @@ void cxio_hal_destroy_resource(struct cxio_hal_resource *rscp)
u32 cxio_hal_pblpool_alloc(struct cxio_rdev *rdev_p, int size) u32 cxio_hal_pblpool_alloc(struct cxio_rdev *rdev_p, int size)
{ {
unsigned long addr = gen_pool_alloc(rdev_p->pbl_pool, size); unsigned long addr = gen_pool_alloc(rdev_p->pbl_pool, size);
PDBG("%s addr 0x%x size %d\n", __FUNCTION__, (u32)addr, size); PDBG("%s addr 0x%x size %d\n", __func__, (u32)addr, size);
return (u32)addr; return (u32)addr;
} }
void cxio_hal_pblpool_free(struct cxio_rdev *rdev_p, u32 addr, int size) void cxio_hal_pblpool_free(struct cxio_rdev *rdev_p, u32 addr, int size)
{ {
PDBG("%s addr 0x%x size %d\n", __FUNCTION__, addr, size); PDBG("%s addr 0x%x size %d\n", __func__, addr, size);
gen_pool_free(rdev_p->pbl_pool, (unsigned long)addr, size); gen_pool_free(rdev_p->pbl_pool, (unsigned long)addr, size);
} }
...@@ -292,13 +292,13 @@ void cxio_hal_pblpool_destroy(struct cxio_rdev *rdev_p) ...@@ -292,13 +292,13 @@ void cxio_hal_pblpool_destroy(struct cxio_rdev *rdev_p)
u32 cxio_hal_rqtpool_alloc(struct cxio_rdev *rdev_p, int size) u32 cxio_hal_rqtpool_alloc(struct cxio_rdev *rdev_p, int size)
{ {
unsigned long addr = gen_pool_alloc(rdev_p->rqt_pool, size << 6); unsigned long addr = gen_pool_alloc(rdev_p->rqt_pool, size << 6);
PDBG("%s addr 0x%x size %d\n", __FUNCTION__, (u32)addr, size << 6); PDBG("%s addr 0x%x size %d\n", __func__, (u32)addr, size << 6);
return (u32)addr; return (u32)addr;
} }
void cxio_hal_rqtpool_free(struct cxio_rdev *rdev_p, u32 addr, int size) void cxio_hal_rqtpool_free(struct cxio_rdev *rdev_p, u32 addr, int size)
{ {
PDBG("%s addr 0x%x size %d\n", __FUNCTION__, addr, size << 6); PDBG("%s addr 0x%x size %d\n", __func__, addr, size << 6);
gen_pool_free(rdev_p->rqt_pool, (unsigned long)addr, size << 6); gen_pool_free(rdev_p->rqt_pool, (unsigned long)addr, size << 6);
} }
......
...@@ -65,7 +65,7 @@ static DEFINE_MUTEX(dev_mutex); ...@@ -65,7 +65,7 @@ static DEFINE_MUTEX(dev_mutex);
static void rnic_init(struct iwch_dev *rnicp) static void rnic_init(struct iwch_dev *rnicp)
{ {
PDBG("%s iwch_dev %p\n", __FUNCTION__, rnicp); PDBG("%s iwch_dev %p\n", __func__, rnicp);
idr_init(&rnicp->cqidr); idr_init(&rnicp->cqidr);
idr_init(&rnicp->qpidr); idr_init(&rnicp->qpidr);
idr_init(&rnicp->mmidr); idr_init(&rnicp->mmidr);
...@@ -106,7 +106,7 @@ static void open_rnic_dev(struct t3cdev *tdev) ...@@ -106,7 +106,7 @@ static void open_rnic_dev(struct t3cdev *tdev)
struct iwch_dev *rnicp; struct iwch_dev *rnicp;
static int vers_printed; static int vers_printed;
PDBG("%s t3cdev %p\n", __FUNCTION__, tdev); PDBG("%s t3cdev %p\n", __func__, tdev);
if (!vers_printed++) if (!vers_printed++)
printk(KERN_INFO MOD "Chelsio T3 RDMA Driver - version %s\n", printk(KERN_INFO MOD "Chelsio T3 RDMA Driver - version %s\n",
DRV_VERSION); DRV_VERSION);
...@@ -144,7 +144,7 @@ static void open_rnic_dev(struct t3cdev *tdev) ...@@ -144,7 +144,7 @@ static void open_rnic_dev(struct t3cdev *tdev)
static void close_rnic_dev(struct t3cdev *tdev) static void close_rnic_dev(struct t3cdev *tdev)
{ {
struct iwch_dev *dev, *tmp; struct iwch_dev *dev, *tmp;
PDBG("%s t3cdev %p\n", __FUNCTION__, tdev); PDBG("%s t3cdev %p\n", __func__, tdev);
mutex_lock(&dev_mutex); mutex_lock(&dev_mutex);
list_for_each_entry_safe(dev, tmp, &dev_list, entry) { list_for_each_entry_safe(dev, tmp, &dev_list, entry) {
if (dev->rdev.t3cdev_p == tdev) { if (dev->rdev.t3cdev_p == tdev) {
......
This diff is collapsed.
...@@ -54,13 +54,13 @@ ...@@ -54,13 +54,13 @@
#define MPA_FLAGS_MASK 0xE0 #define MPA_FLAGS_MASK 0xE0
#define put_ep(ep) { \ #define put_ep(ep) { \
PDBG("put_ep (via %s:%u) ep %p refcnt %d\n", __FUNCTION__, __LINE__, \ PDBG("put_ep (via %s:%u) ep %p refcnt %d\n", __func__, __LINE__, \
ep, atomic_read(&((ep)->kref.refcount))); \ ep, atomic_read(&((ep)->kref.refcount))); \
kref_put(&((ep)->kref), __free_ep); \ kref_put(&((ep)->kref), __free_ep); \
} }
#define get_ep(ep) { \ #define get_ep(ep) { \
PDBG("get_ep (via %s:%u) ep %p, refcnt %d\n", __FUNCTION__, __LINE__, \ PDBG("get_ep (via %s:%u) ep %p, refcnt %d\n", __func__, __LINE__, \
ep, atomic_read(&((ep)->kref.refcount))); \ ep, atomic_read(&((ep)->kref.refcount))); \
kref_get(&((ep)->kref)); \ kref_get(&((ep)->kref)); \
} }
......
...@@ -67,7 +67,7 @@ static int iwch_poll_cq_one(struct iwch_dev *rhp, struct iwch_cq *chp, ...@@ -67,7 +67,7 @@ static int iwch_poll_cq_one(struct iwch_dev *rhp, struct iwch_cq *chp,
ret = cxio_poll_cq(wq, &(chp->cq), &cqe, &cqe_flushed, &cookie, ret = cxio_poll_cq(wq, &(chp->cq), &cqe, &cqe_flushed, &cookie,
&credit); &credit);
if (t3a_device(chp->rhp) && credit) { if (t3a_device(chp->rhp) && credit) {
PDBG("%s updating %d cq credits on id %d\n", __FUNCTION__, PDBG("%s updating %d cq credits on id %d\n", __func__,
credit, chp->cq.cqid); credit, chp->cq.cqid);
cxio_hal_cq_op(&rhp->rdev, &chp->cq, CQ_CREDIT_UPDATE, credit); cxio_hal_cq_op(&rhp->rdev, &chp->cq, CQ_CREDIT_UPDATE, credit);
} }
...@@ -83,7 +83,7 @@ static int iwch_poll_cq_one(struct iwch_dev *rhp, struct iwch_cq *chp, ...@@ -83,7 +83,7 @@ static int iwch_poll_cq_one(struct iwch_dev *rhp, struct iwch_cq *chp,
wc->vendor_err = CQE_STATUS(cqe); wc->vendor_err = CQE_STATUS(cqe);
PDBG("%s qpid 0x%x type %d opcode %d status 0x%x wrid hi 0x%x " PDBG("%s qpid 0x%x type %d opcode %d status 0x%x wrid hi 0x%x "
"lo 0x%x cookie 0x%llx\n", __FUNCTION__, "lo 0x%x cookie 0x%llx\n", __func__,
CQE_QPID(cqe), CQE_TYPE(cqe), CQE_QPID(cqe), CQE_TYPE(cqe),
CQE_OPCODE(cqe), CQE_STATUS(cqe), CQE_WRID_HI(cqe), CQE_OPCODE(cqe), CQE_STATUS(cqe), CQE_WRID_HI(cqe),
CQE_WRID_LOW(cqe), (unsigned long long) cookie); CQE_WRID_LOW(cqe), (unsigned long long) cookie);
......
...@@ -52,7 +52,7 @@ static void post_qp_event(struct iwch_dev *rnicp, struct iwch_cq *chp, ...@@ -52,7 +52,7 @@ static void post_qp_event(struct iwch_dev *rnicp, struct iwch_cq *chp,
if (!qhp) { if (!qhp) {
printk(KERN_ERR "%s unaffiliated error 0x%x qpid 0x%x\n", printk(KERN_ERR "%s unaffiliated error 0x%x qpid 0x%x\n",
__FUNCTION__, CQE_STATUS(rsp_msg->cqe), __func__, CQE_STATUS(rsp_msg->cqe),
CQE_QPID(rsp_msg->cqe)); CQE_QPID(rsp_msg->cqe));
spin_unlock(&rnicp->lock); spin_unlock(&rnicp->lock);
return; return;
...@@ -61,14 +61,14 @@ static void post_qp_event(struct iwch_dev *rnicp, struct iwch_cq *chp, ...@@ -61,14 +61,14 @@ static void post_qp_event(struct iwch_dev *rnicp, struct iwch_cq *chp,
if ((qhp->attr.state == IWCH_QP_STATE_ERROR) || if ((qhp->attr.state == IWCH_QP_STATE_ERROR) ||
(qhp->attr.state == IWCH_QP_STATE_TERMINATE)) { (qhp->attr.state == IWCH_QP_STATE_TERMINATE)) {
PDBG("%s AE received after RTS - " PDBG("%s AE received after RTS - "
"qp state %d qpid 0x%x status 0x%x\n", __FUNCTION__, "qp state %d qpid 0x%x status 0x%x\n", __func__,
qhp->attr.state, qhp->wq.qpid, CQE_STATUS(rsp_msg->cqe)); qhp->attr.state, qhp->wq.qpid, CQE_STATUS(rsp_msg->cqe));
spin_unlock(&rnicp->lock); spin_unlock(&rnicp->lock);
return; return;
} }
printk(KERN_ERR "%s - AE qpid 0x%x opcode %d status 0x%x " printk(KERN_ERR "%s - AE qpid 0x%x opcode %d status 0x%x "
"type %d wrid.hi 0x%x wrid.lo 0x%x \n", __FUNCTION__, "type %d wrid.hi 0x%x wrid.lo 0x%x \n", __func__,
CQE_QPID(rsp_msg->cqe), CQE_OPCODE(rsp_msg->cqe), CQE_QPID(rsp_msg->cqe), CQE_OPCODE(rsp_msg->cqe),
CQE_STATUS(rsp_msg->cqe), CQE_TYPE(rsp_msg->cqe), CQE_STATUS(rsp_msg->cqe), CQE_TYPE(rsp_msg->cqe),
CQE_WRID_HI(rsp_msg->cqe), CQE_WRID_LOW(rsp_msg->cqe)); CQE_WRID_HI(rsp_msg->cqe), CQE_WRID_LOW(rsp_msg->cqe));
...@@ -132,10 +132,10 @@ void iwch_ev_dispatch(struct cxio_rdev *rdev_p, struct sk_buff *skb) ...@@ -132,10 +132,10 @@ void iwch_ev_dispatch(struct cxio_rdev *rdev_p, struct sk_buff *skb)
(CQE_STATUS(rsp_msg->cqe) == 0)) { (CQE_STATUS(rsp_msg->cqe) == 0)) {
if (SQ_TYPE(rsp_msg->cqe)) { if (SQ_TYPE(rsp_msg->cqe)) {
PDBG("%s QPID 0x%x ep %p disconnecting\n", PDBG("%s QPID 0x%x ep %p disconnecting\n",
__FUNCTION__, qhp->wq.qpid, qhp->ep); __func__, qhp->wq.qpid, qhp->ep);
iwch_ep_disconnect(qhp->ep, 0, GFP_ATOMIC); iwch_ep_disconnect(qhp->ep, 0, GFP_ATOMIC);
} else { } else {
PDBG("%s post REQ_ERR AE QPID 0x%x\n", __FUNCTION__, PDBG("%s post REQ_ERR AE QPID 0x%x\n", __func__,
qhp->wq.qpid); qhp->wq.qpid);
post_qp_event(rnicp, chp, rsp_msg, post_qp_event(rnicp, chp, rsp_msg,
IB_EVENT_QP_REQ_ERR, 0); IB_EVENT_QP_REQ_ERR, 0);
...@@ -180,7 +180,7 @@ void iwch_ev_dispatch(struct cxio_rdev *rdev_p, struct sk_buff *skb) ...@@ -180,7 +180,7 @@ void iwch_ev_dispatch(struct cxio_rdev *rdev_p, struct sk_buff *skb)
case TPT_ERR_INVALIDATE_SHARED_MR: case TPT_ERR_INVALIDATE_SHARED_MR:
case TPT_ERR_INVALIDATE_MR_WITH_MW_BOUND: case TPT_ERR_INVALIDATE_MR_WITH_MW_BOUND:
printk(KERN_ERR "%s - CQE Err qpid 0x%x opcode %d status 0x%x " printk(KERN_ERR "%s - CQE Err qpid 0x%x opcode %d status 0x%x "
"type %d wrid.hi 0x%x wrid.lo 0x%x \n", __FUNCTION__, "type %d wrid.hi 0x%x wrid.lo 0x%x \n", __func__,
CQE_QPID(rsp_msg->cqe), CQE_OPCODE(rsp_msg->cqe), CQE_QPID(rsp_msg->cqe), CQE_OPCODE(rsp_msg->cqe),
CQE_STATUS(rsp_msg->cqe), CQE_TYPE(rsp_msg->cqe), CQE_STATUS(rsp_msg->cqe), CQE_TYPE(rsp_msg->cqe),
CQE_WRID_HI(rsp_msg->cqe), CQE_WRID_LOW(rsp_msg->cqe)); CQE_WRID_HI(rsp_msg->cqe), CQE_WRID_LOW(rsp_msg->cqe));
......
...@@ -62,7 +62,7 @@ int iwch_register_mem(struct iwch_dev *rhp, struct iwch_pd *php, ...@@ -62,7 +62,7 @@ int iwch_register_mem(struct iwch_dev *rhp, struct iwch_pd *php,
mmid = stag >> 8; mmid = stag >> 8;
mhp->ibmr.rkey = mhp->ibmr.lkey = stag; mhp->ibmr.rkey = mhp->ibmr.lkey = stag;
insert_handle(rhp, &rhp->mmidr, mhp, mmid); insert_handle(rhp, &rhp->mmidr, mhp, mmid);
PDBG("%s mmid 0x%x mhp %p\n", __FUNCTION__, mmid, mhp); PDBG("%s mmid 0x%x mhp %p\n", __func__, mmid, mhp);
return 0; return 0;
} }
...@@ -96,7 +96,7 @@ int iwch_reregister_mem(struct iwch_dev *rhp, struct iwch_pd *php, ...@@ -96,7 +96,7 @@ int iwch_reregister_mem(struct iwch_dev *rhp, struct iwch_pd *php,
mmid = stag >> 8; mmid = stag >> 8;
mhp->ibmr.rkey = mhp->ibmr.lkey = stag; mhp->ibmr.rkey = mhp->ibmr.lkey = stag;
insert_handle(rhp, &rhp->mmidr, mhp, mmid); insert_handle(rhp, &rhp->mmidr, mhp, mmid);
PDBG("%s mmid 0x%x mhp %p\n", __FUNCTION__, mmid, mhp); PDBG("%s mmid 0x%x mhp %p\n", __func__, mmid, mhp);
return 0; return 0;
} }
...@@ -163,7 +163,7 @@ int build_phys_page_list(struct ib_phys_buf *buffer_list, ...@@ -163,7 +163,7 @@ int build_phys_page_list(struct ib_phys_buf *buffer_list,
((u64) j << *shift)); ((u64) j << *shift));
PDBG("%s va 0x%llx mask 0x%llx shift %d len %lld pbl_size %d\n", PDBG("%s va 0x%llx mask 0x%llx shift %d len %lld pbl_size %d\n",
__FUNCTION__, (unsigned long long) *iova_start, __func__, (unsigned long long) *iova_start,
(unsigned long long) mask, *shift, (unsigned long long) *total_size, (unsigned long long) mask, *shift, (unsigned long long) *total_size,
*npages); *npages);
......
This diff is collapsed.
...@@ -213,7 +213,7 @@ static inline struct iwch_mm_entry *remove_mmap(struct iwch_ucontext *ucontext, ...@@ -213,7 +213,7 @@ static inline struct iwch_mm_entry *remove_mmap(struct iwch_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);
PDBG("%s key 0x%x addr 0x%llx len %d\n", __FUNCTION__, PDBG("%s key 0x%x addr 0x%llx len %d\n", __func__,
key, (unsigned long long) mm->addr, mm->len); key, (unsigned long long) mm->addr, mm->len);
return mm; return mm;
} }
...@@ -226,7 +226,7 @@ static inline void insert_mmap(struct iwch_ucontext *ucontext, ...@@ -226,7 +226,7 @@ static inline void insert_mmap(struct iwch_ucontext *ucontext,
struct iwch_mm_entry *mm) struct iwch_mm_entry *mm)
{ {
spin_lock(&ucontext->mmap_lock); spin_lock(&ucontext->mmap_lock);
PDBG("%s key 0x%x addr 0x%llx len %d\n", __FUNCTION__, PDBG("%s 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);
......
...@@ -168,30 +168,30 @@ static int iwch_sgl2pbl_map(struct iwch_dev *rhp, struct ib_sge *sg_list, ...@@ -168,30 +168,30 @@ static int iwch_sgl2pbl_map(struct iwch_dev *rhp, struct ib_sge *sg_list,
mhp = get_mhp(rhp, (sg_list[i].lkey) >> 8); mhp = get_mhp(rhp, (sg_list[i].lkey) >> 8);
if (!mhp) { if (!mhp) {
PDBG("%s %d\n", __FUNCTION__, __LINE__); PDBG("%s %d\n", __func__, __LINE__);
return -EIO; return -EIO;
} }
if (!mhp->attr.state) { if (!mhp->attr.state) {
PDBG("%s %d\n", __FUNCTION__, __LINE__); PDBG("%s %d\n", __func__, __LINE__);
return -EIO; return -EIO;
} }
if (mhp->attr.zbva) { if (mhp->attr.zbva) {
PDBG("%s %d\n", __FUNCTION__, __LINE__); PDBG("%s %d\n", __func__, __LINE__);
return -EIO; return -EIO;
} }
if (sg_list[i].addr < mhp->attr.va_fbo) { if (sg_list[i].addr < mhp->attr.va_fbo) {
PDBG("%s %d\n", __FUNCTION__, __LINE__); PDBG("%s %d\n", __func__, __LINE__);
return -EINVAL; return -EINVAL;
} }
if (sg_list[i].addr + ((u64) sg_list[i].length) < if (sg_list[i].addr + ((u64) sg_list[i].length) <
sg_list[i].addr) { sg_list[i].addr) {
PDBG("%s %d\n", __FUNCTION__, __LINE__); PDBG("%s %d\n", __func__, __LINE__);
return -EINVAL; return -EINVAL;
} }
if (sg_list[i].addr + ((u64) sg_list[i].length) > if (sg_list[i].addr + ((u64) sg_list[i].length) >
mhp->attr.va_fbo + ((u64) mhp->attr.len)) { mhp->attr.va_fbo + ((u64) mhp->attr.len)) {
PDBG("%s %d\n", __FUNCTION__, __LINE__); PDBG("%s %d\n", __func__, __LINE__);
return -EINVAL; return -EINVAL;
} }
offset = sg_list[i].addr - mhp->attr.va_fbo; offset = sg_list[i].addr - mhp->attr.va_fbo;
...@@ -290,7 +290,7 @@ int iwch_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr, ...@@ -290,7 +290,7 @@ int iwch_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
qhp->wq.oldest_read = sqp; qhp->wq.oldest_read = sqp;
break; break;
default: default:
PDBG("%s post of type=%d TBD!\n", __FUNCTION__, PDBG("%s post of type=%d TBD!\n", __func__,
wr->opcode); wr->opcode);
err = -EINVAL; err = -EINVAL;
} }
...@@ -309,7 +309,7 @@ int iwch_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr, ...@@ -309,7 +309,7 @@ int iwch_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
Q_GENBIT(qhp->wq.wptr, qhp->wq.size_log2), Q_GENBIT(qhp->wq.wptr, qhp->wq.size_log2),
0, t3_wr_flit_cnt); 0, t3_wr_flit_cnt);
PDBG("%s cookie 0x%llx wq idx 0x%x swsq idx %ld opcode %d\n", PDBG("%s cookie 0x%llx wq idx 0x%x swsq idx %ld opcode %d\n",
__FUNCTION__, (unsigned long long) wr->wr_id, idx, __func__, (unsigned long long) wr->wr_id, idx,
Q_PTR2IDX(qhp->wq.sq_wptr, qhp->wq.sq_size_log2), Q_PTR2IDX(qhp->wq.sq_wptr, qhp->wq.sq_size_log2),
sqp->opcode); sqp->opcode);
wr = wr->next; wr = wr->next;
...@@ -361,7 +361,7 @@ int iwch_post_receive(struct ib_qp *ibqp, struct ib_recv_wr *wr, ...@@ -361,7 +361,7 @@ int iwch_post_receive(struct ib_qp *ibqp, struct ib_recv_wr *wr,
Q_GENBIT(qhp->wq.wptr, qhp->wq.size_log2), Q_GENBIT(qhp->wq.wptr, qhp->wq.size_log2),
0, sizeof(struct t3_receive_wr) >> 3); 0, sizeof(struct t3_receive_wr) >> 3);
PDBG("%s cookie 0x%llx idx 0x%x rq_wptr 0x%x rw_rptr 0x%x " PDBG("%s cookie 0x%llx idx 0x%x rq_wptr 0x%x rw_rptr 0x%x "
"wqe %p \n", __FUNCTION__, (unsigned long long) wr->wr_id, "wqe %p \n", __func__, (unsigned long long) wr->wr_id,
idx, qhp->wq.rq_wptr, qhp->wq.rq_rptr, wqe); idx, qhp->wq.rq_wptr, qhp->wq.rq_rptr, wqe);
++(qhp->wq.rq_wptr); ++(qhp->wq.rq_wptr);
++(qhp->wq.wptr); ++(qhp->wq.wptr);
...@@ -407,7 +407,7 @@ int iwch_bind_mw(struct ib_qp *qp, ...@@ -407,7 +407,7 @@ int iwch_bind_mw(struct ib_qp *qp,
return -ENOMEM; return -ENOMEM;
} }
idx = Q_PTR2IDX(qhp->wq.wptr, qhp->wq.size_log2); idx = Q_PTR2IDX(qhp->wq.wptr, qhp->wq.size_log2);
PDBG("%s: idx 0x%0x, mw 0x%p, mw_bind 0x%p\n", __FUNCTION__, idx, PDBG("%s: idx 0x%0x, mw 0x%p, mw_bind 0x%p\n", __func__, idx,
mw, mw_bind); mw, mw_bind);
wqe = (union t3_wr *) (qhp->wq.queue + idx); wqe = (union t3_wr *) (qhp->wq.queue + idx);
...@@ -595,10 +595,10 @@ int iwch_post_terminate(struct iwch_qp *qhp, struct respQ_msg_t *rsp_msg) ...@@ -595,10 +595,10 @@ int iwch_post_terminate(struct iwch_qp *qhp, struct respQ_msg_t *rsp_msg)
struct terminate_message *term; struct terminate_message *term;
struct sk_buff *skb; struct sk_buff *skb;
PDBG("%s %d\n", __FUNCTION__, __LINE__); PDBG("%s %d\n", __func__, __LINE__);
skb = alloc_skb(40, GFP_ATOMIC); skb = alloc_skb(40, GFP_ATOMIC);
if (!skb) { if (!skb) {
printk(KERN_ERR "%s cannot send TERMINATE!\n", __FUNCTION__); printk(KERN_ERR "%s cannot send TERMINATE!\n", __func__);
return -ENOMEM; return -ENOMEM;
} }
wqe = (union t3_wr *)skb_put(skb, 40); wqe = (union t3_wr *)skb_put(skb, 40);
...@@ -629,7 +629,7 @@ static void __flush_qp(struct iwch_qp *qhp, unsigned long *flag) ...@@ -629,7 +629,7 @@ static void __flush_qp(struct iwch_qp *qhp, unsigned long *flag)
rchp = get_chp(qhp->rhp, qhp->attr.rcq); rchp = get_chp(qhp->rhp, qhp->attr.rcq);
schp = get_chp(qhp->rhp, qhp->attr.scq); schp = get_chp(qhp->rhp, qhp->attr.scq);
PDBG("%s qhp %p rchp %p schp %p\n", __FUNCTION__, qhp, rchp, schp); PDBG("%s qhp %p rchp %p schp %p\n", __func__, qhp, rchp, schp);
/* take a ref on the qhp since we must release the lock */ /* take a ref on the qhp since we must release the lock */
atomic_inc(&qhp->refcnt); atomic_inc(&qhp->refcnt);
spin_unlock_irqrestore(&qhp->lock, *flag); spin_unlock_irqrestore(&qhp->lock, *flag);
...@@ -720,11 +720,11 @@ static int rdma_init(struct iwch_dev *rhp, struct iwch_qp *qhp, ...@@ -720,11 +720,11 @@ static int rdma_init(struct iwch_dev *rhp, struct iwch_qp *qhp,
init_attr.flags |= capable(CAP_NET_BIND_SERVICE) ? PRIV_QP : 0; init_attr.flags |= capable(CAP_NET_BIND_SERVICE) ? PRIV_QP : 0;
init_attr.irs = qhp->ep->rcv_seq; init_attr.irs = qhp->ep->rcv_seq;
PDBG("%s init_attr.rq_addr 0x%x init_attr.rq_size = %d " PDBG("%s init_attr.rq_addr 0x%x init_attr.rq_size = %d "
"flags 0x%x qpcaps 0x%x\n", __FUNCTION__, "flags 0x%x qpcaps 0x%x\n", __func__,
init_attr.rq_addr, init_attr.rq_size, init_attr.rq_addr, init_attr.rq_size,
init_attr.flags, init_attr.qpcaps); init_attr.flags, init_attr.qpcaps);
ret = cxio_rdma_init(&rhp->rdev, &init_attr); ret = cxio_rdma_init(&rhp->rdev, &init_attr);
PDBG("%s ret %d\n", __FUNCTION__, ret); PDBG("%s ret %d\n", __func__, ret);
return ret; return ret;
} }
...@@ -742,7 +742,7 @@ int iwch_modify_qp(struct iwch_dev *rhp, struct iwch_qp *qhp, ...@@ -742,7 +742,7 @@ int iwch_modify_qp(struct iwch_dev *rhp, struct iwch_qp *qhp,
int free = 0; int free = 0;
struct iwch_ep *ep = NULL; struct iwch_ep *ep = NULL;
PDBG("%s qhp %p qpid 0x%x ep %p state %d -> %d\n", __FUNCTION__, PDBG("%s qhp %p qpid 0x%x ep %p state %d -> %d\n", __func__,
qhp, qhp->wq.qpid, qhp->ep, qhp->attr.state, qhp, qhp->wq.qpid, qhp->ep, qhp->attr.state,
(mask & IWCH_QP_ATTR_NEXT_STATE) ? attrs->next_state : -1); (mask & IWCH_QP_ATTR_NEXT_STATE) ? attrs->next_state : -1);
...@@ -899,14 +899,14 @@ int iwch_modify_qp(struct iwch_dev *rhp, struct iwch_qp *qhp, ...@@ -899,14 +899,14 @@ int iwch_modify_qp(struct iwch_dev *rhp, struct iwch_qp *qhp,
break; break;
default: default:
printk(KERN_ERR "%s in a bad state %d\n", printk(KERN_ERR "%s in a bad state %d\n",
__FUNCTION__, qhp->attr.state); __func__, qhp->attr.state);
ret = -EINVAL; ret = -EINVAL;
goto err; goto err;
break; break;
} }
goto out; goto out;
err: err:
PDBG("%s disassociating ep %p qpid 0x%x\n", __FUNCTION__, qhp->ep, PDBG("%s disassociating ep %p qpid 0x%x\n", __func__, qhp->ep,
qhp->wq.qpid); qhp->wq.qpid);
/* disassociate the LLP connection */ /* disassociate the LLP connection */
...@@ -939,7 +939,7 @@ int iwch_modify_qp(struct iwch_dev *rhp, struct iwch_qp *qhp, ...@@ -939,7 +939,7 @@ int iwch_modify_qp(struct iwch_dev *rhp, struct iwch_qp *qhp,
if (free) if (free)
put_ep(&ep->com); put_ep(&ep->com);
PDBG("%s exit state %d\n", __FUNCTION__, qhp->attr.state); PDBG("%s exit state %d\n", __func__, qhp->attr.state);
return ret; return ret;
} }
......
...@@ -73,37 +73,37 @@ extern int ehca_debug_level; ...@@ -73,37 +73,37 @@ extern int ehca_debug_level;
if (unlikely(ehca_debug_level)) \ if (unlikely(ehca_debug_level)) \
dev_printk(KERN_DEBUG, (ib_dev)->dma_device, \ dev_printk(KERN_DEBUG, (ib_dev)->dma_device, \
"PU%04x EHCA_DBG:%s " format "\n", \ "PU%04x EHCA_DBG:%s " format "\n", \
raw_smp_processor_id(), __FUNCTION__, \ raw_smp_processor_id(), __func__, \
## arg); \ ## arg); \
} while (0) } while (0)
#define ehca_info(ib_dev, format, arg...) \ #define ehca_info(ib_dev, format, arg...) \
dev_info((ib_dev)->dma_device, "PU%04x EHCA_INFO:%s " format "\n", \ dev_info((ib_dev)->dma_device, "PU%04x EHCA_INFO:%s " format "\n", \
raw_smp_processor_id(), __FUNCTION__, ## arg) raw_smp_processor_id(), __func__, ## arg)
#define ehca_warn(ib_dev, format, arg...) \ #define ehca_warn(ib_dev, format, arg...) \
dev_warn((ib_dev)->dma_device, "PU%04x EHCA_WARN:%s " format "\n", \ dev_warn((ib_dev)->dma_device, "PU%04x EHCA_WARN:%s " format "\n", \
raw_smp_processor_id(), __FUNCTION__, ## arg) raw_smp_processor_id(), __func__, ## arg)
#define ehca_err(ib_dev, format, arg...) \ #define ehca_err(ib_dev, format, arg...) \
dev_err((ib_dev)->dma_device, "PU%04x EHCA_ERR:%s " format "\n", \ dev_err((ib_dev)->dma_device, "PU%04x EHCA_ERR:%s " format "\n", \
raw_smp_processor_id(), __FUNCTION__, ## arg) raw_smp_processor_id(), __func__, ## arg)
/* use this one only if no ib_dev available */ /* use this one only if no ib_dev available */
#define ehca_gen_dbg(format, arg...) \ #define ehca_gen_dbg(format, arg...) \
do { \ do { \
if (unlikely(ehca_debug_level)) \ if (unlikely(ehca_debug_level)) \
printk(KERN_DEBUG "PU%04x EHCA_DBG:%s " format "\n", \ printk(KERN_DEBUG "PU%04x EHCA_DBG:%s " format "\n", \
raw_smp_processor_id(), __FUNCTION__, ## arg); \ raw_smp_processor_id(), __func__, ## arg); \
} while (0) } while (0)
#define ehca_gen_warn(format, arg...) \ #define ehca_gen_warn(format, arg...) \
printk(KERN_INFO "PU%04x EHCA_WARN:%s " format "\n", \ printk(KERN_INFO "PU%04x EHCA_WARN:%s " format "\n", \
raw_smp_processor_id(), __FUNCTION__, ## arg) raw_smp_processor_id(), __func__, ## arg)
#define ehca_gen_err(format, arg...) \ #define ehca_gen_err(format, arg...) \
printk(KERN_ERR "PU%04x EHCA_ERR:%s " format "\n", \ printk(KERN_ERR "PU%04x EHCA_ERR:%s " format "\n", \
raw_smp_processor_id(), __FUNCTION__, ## arg) raw_smp_processor_id(), __func__, ## arg)
/** /**
* ehca_dmp - printk a memory block, whose length is n*8 bytes. * ehca_dmp - printk a memory block, whose length is n*8 bytes.
...@@ -118,7 +118,7 @@ extern int ehca_debug_level; ...@@ -118,7 +118,7 @@ extern int ehca_debug_level;
for (x = 0; x < l; x += 16) { \ for (x = 0; x < l; x += 16) { \
printk(KERN_INFO "EHCA_DMP:%s " format \ printk(KERN_INFO "EHCA_DMP:%s " format \
" adr=%p ofs=%04x %016lx %016lx\n", \ " adr=%p ofs=%04x %016lx %016lx\n", \
__FUNCTION__, ##args, deb, x, \ __func__, ##args, deb, x, \
*((u64 *)&deb[0]), *((u64 *)&deb[8])); \ *((u64 *)&deb[0]), *((u64 *)&deb[8])); \
deb += 16; \ deb += 16; \
} \ } \
......
...@@ -303,7 +303,7 @@ void nes_rem_ref(struct ib_qp *ibqp) ...@@ -303,7 +303,7 @@ void nes_rem_ref(struct ib_qp *ibqp)
if (atomic_read(&nesqp->refcount) == 0) { if (atomic_read(&nesqp->refcount) == 0) {
printk(KERN_INFO PFX "%s: Reference count already 0 for QP%d, last aeq = 0x%04X.\n", printk(KERN_INFO PFX "%s: Reference count already 0 for QP%d, last aeq = 0x%04X.\n",
__FUNCTION__, ibqp->qp_num, nesqp->last_aeq); __func__, ibqp->qp_num, nesqp->last_aeq);
BUG(); BUG();
} }
......
...@@ -143,12 +143,12 @@ ...@@ -143,12 +143,12 @@
#ifdef CONFIG_INFINIBAND_NES_DEBUG #ifdef CONFIG_INFINIBAND_NES_DEBUG
#define nes_debug(level, fmt, args...) \ #define nes_debug(level, fmt, args...) \
if (level & nes_debug_level) \ if (level & nes_debug_level) \
printk(KERN_ERR PFX "%s[%u]: " fmt, __FUNCTION__, __LINE__, ##args) printk(KERN_ERR PFX "%s[%u]: " fmt, __func__, __LINE__, ##args)
#define assert(expr) \ #define assert(expr) \
if (!(expr)) { \ if (!(expr)) { \
printk(KERN_ERR PFX "Assertion failed! %s, %s, %s, line %d\n", \ printk(KERN_ERR PFX "Assertion failed! %s, %s, %s, line %d\n", \
#expr, __FILE__, __FUNCTION__, __LINE__); \ #expr, __FILE__, __func__, __LINE__); \
} }
#define NES_EVENT_TIMEOUT 1200000 #define NES_EVENT_TIMEOUT 1200000
...@@ -399,7 +399,7 @@ static inline int nes_alloc_resource(struct nes_adapter *nesadapter, ...@@ -399,7 +399,7 @@ static inline int nes_alloc_resource(struct nes_adapter *nesadapter,
if (resource_num >= max_resources) { if (resource_num >= max_resources) {
resource_num = find_first_zero_bit(resource_array, max_resources); resource_num = find_first_zero_bit(resource_array, max_resources);
if (resource_num >= max_resources) { if (resource_num >= max_resources) {
printk(KERN_ERR PFX "%s: No available resourcess.\n", __FUNCTION__); printk(KERN_ERR PFX "%s: No available resourcess.\n", __func__);
spin_unlock_irqrestore(&nesadapter->resource_lock, flags); spin_unlock_irqrestore(&nesadapter->resource_lock, flags);
return -EMFILE; return -EMFILE;
} }
......
...@@ -1038,7 +1038,7 @@ static void nes_addr_send_arp(u32 dst_ip) ...@@ -1038,7 +1038,7 @@ static void nes_addr_send_arp(u32 dst_ip)
fl.nl_u.ip4_u.daddr = htonl(dst_ip); fl.nl_u.ip4_u.daddr = htonl(dst_ip);
if (ip_route_output_key(&init_net, &rt, &fl)) { if (ip_route_output_key(&init_net, &rt, &fl)) {
printk("%s: ip_route_output_key failed for 0x%08X\n", printk("%s: ip_route_output_key failed for 0x%08X\n",
__FUNCTION__, dst_ip); __func__, dst_ip);
return; return;
} }
...@@ -1263,7 +1263,7 @@ static int process_options(struct nes_cm_node *cm_node, u8 *optionsloc, u32 opti ...@@ -1263,7 +1263,7 @@ static int process_options(struct nes_cm_node *cm_node, u8 *optionsloc, u32 opti
continue; continue;
case OPTION_NUMBER_MSS: case OPTION_NUMBER_MSS:
nes_debug(NES_DBG_CM, "%s: MSS Length: %d Offset: %d Size: %d\n", nes_debug(NES_DBG_CM, "%s: MSS Length: %d Offset: %d Size: %d\n",
__FUNCTION__, __func__,
all_options->as_mss.length, offset, optionsize); all_options->as_mss.length, offset, optionsize);
got_mss_option = 1; got_mss_option = 1;
if (all_options->as_mss.length != 4) { if (all_options->as_mss.length != 4) {
...@@ -1384,7 +1384,7 @@ static int process_packet(struct nes_cm_node *cm_node, struct sk_buff *skb, ...@@ -1384,7 +1384,7 @@ static int process_packet(struct nes_cm_node *cm_node, struct sk_buff *skb,
if (optionsize) { if (optionsize) {
u8 *optionsloc = (u8 *)&tcph[1]; u8 *optionsloc = (u8 *)&tcph[1];
if (process_options(cm_node, optionsloc, optionsize, (u32)tcph->syn)) { if (process_options(cm_node, optionsloc, optionsize, (u32)tcph->syn)) {
nes_debug(NES_DBG_CM, "%s: Node %p, Sending RESET\n", __FUNCTION__, cm_node); nes_debug(NES_DBG_CM, "%s: Node %p, Sending RESET\n", __func__, cm_node);
send_reset(cm_node); send_reset(cm_node);
if (cm_node->state != NES_CM_STATE_SYN_SENT) if (cm_node->state != NES_CM_STATE_SYN_SENT)
rem_ref_cm_node(cm_core, cm_node); rem_ref_cm_node(cm_core, cm_node);
...@@ -2507,7 +2507,7 @@ int nes_accept(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param) ...@@ -2507,7 +2507,7 @@ int nes_accept(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
} }
if (ret) if (ret)
printk("%s[%u] OFA CM event_handler returned, ret=%d\n", printk("%s[%u] OFA CM event_handler returned, ret=%d\n",
__FUNCTION__, __LINE__, ret); __func__, __LINE__, ret);
return 0; return 0;
} }
...@@ -2675,7 +2675,7 @@ int nes_create_listen(struct iw_cm_id *cm_id, int backlog) ...@@ -2675,7 +2675,7 @@ int nes_create_listen(struct iw_cm_id *cm_id, int backlog)
cm_node = g_cm_core->api->listen(g_cm_core, nesvnic, &cm_info); cm_node = g_cm_core->api->listen(g_cm_core, nesvnic, &cm_info);
if (!cm_node) { if (!cm_node) {
printk("%s[%u] Error returned from listen API call\n", printk("%s[%u] Error returned from listen API call\n",
__FUNCTION__, __LINE__); __func__, __LINE__);
return -ENOMEM; return -ENOMEM;
} }
...@@ -2889,7 +2889,7 @@ static void cm_event_connected(struct nes_cm_event *event) ...@@ -2889,7 +2889,7 @@ static void cm_event_connected(struct nes_cm_event *event)
if (ret) if (ret)
printk("%s[%u] OFA CM event_handler returned, ret=%d\n", printk("%s[%u] OFA CM event_handler returned, ret=%d\n",
__FUNCTION__, __LINE__, ret); __func__, __LINE__, ret);
nes_debug(NES_DBG_CM, "Exiting connect thread for QP%u. jiffies = %lu\n", nes_debug(NES_DBG_CM, "Exiting connect thread for QP%u. jiffies = %lu\n",
nesqp->hwqp.qp_id, jiffies ); nesqp->hwqp.qp_id, jiffies );
...@@ -2944,7 +2944,7 @@ static void cm_event_connect_error(struct nes_cm_event *event) ...@@ -2944,7 +2944,7 @@ static void cm_event_connect_error(struct nes_cm_event *event)
nes_debug(NES_DBG_CM, "OFA CM event_handler returned, ret=%d\n", ret); nes_debug(NES_DBG_CM, "OFA CM event_handler returned, ret=%d\n", ret);
if (ret) if (ret)
printk("%s[%u] OFA CM event_handler returned, ret=%d\n", printk("%s[%u] OFA CM event_handler returned, ret=%d\n",
__FUNCTION__, __LINE__, ret); __func__, __LINE__, ret);
nes_rem_ref(&nesqp->ibqp); nes_rem_ref(&nesqp->ibqp);
cm_id->rem_ref(cm_id); cm_id->rem_ref(cm_id);
...@@ -3032,7 +3032,7 @@ static void cm_event_mpa_req(struct nes_cm_event *event) ...@@ -3032,7 +3032,7 @@ static void cm_event_mpa_req(struct nes_cm_event *event)
ret = cm_id->event_handler(cm_id, &cm_event); ret = cm_id->event_handler(cm_id, &cm_event);
if (ret) if (ret)
printk("%s[%u] OFA CM event_handler returned, ret=%d\n", printk("%s[%u] OFA CM event_handler returned, ret=%d\n",
__FUNCTION__, __LINE__, ret); __func__, __LINE__, ret);
return; return;
} }
......
...@@ -381,7 +381,7 @@ struct nes_adapter *nes_init_adapter(struct nes_device *nesdev, u8 hw_rev) { ...@@ -381,7 +381,7 @@ struct nes_adapter *nes_init_adapter(struct nes_device *nesdev, u8 hw_rev) {
nesadapter->et_use_adaptive_rx_coalesce = 1; nesadapter->et_use_adaptive_rx_coalesce = 1;
nesadapter->timer_int_limit = NES_TIMER_INT_LIMIT_DYNAMIC; nesadapter->timer_int_limit = NES_TIMER_INT_LIMIT_DYNAMIC;
nesadapter->et_rx_coalesce_usecs_irq = 0; nesadapter->et_rx_coalesce_usecs_irq = 0;
printk(PFX "%s: Using Adaptive Interrupt Moderation\n", __FUNCTION__); printk(PFX "%s: Using Adaptive Interrupt Moderation\n", __func__);
} }
/* Setup and enable the periodic timer */ /* Setup and enable the periodic timer */
if (nesadapter->et_rx_coalesce_usecs_irq) if (nesadapter->et_rx_coalesce_usecs_irq)
...@@ -583,7 +583,7 @@ struct nes_adapter *nes_init_adapter(struct nes_device *nesdev, u8 hw_rev) { ...@@ -583,7 +583,7 @@ struct nes_adapter *nes_init_adapter(struct nes_device *nesdev, u8 hw_rev) {
if (vendor_id == 0xffff) if (vendor_id == 0xffff)
break; break;
} }
nes_debug(NES_DBG_INIT, "%s %d functions found for %s.\n", __FUNCTION__, nes_debug(NES_DBG_INIT, "%s %d functions found for %s.\n", __func__,
func_index, pci_name(nesdev->pcidev)); func_index, pci_name(nesdev->pcidev));
nesadapter->adapter_fcn_count = func_index; nesadapter->adapter_fcn_count = func_index;
...@@ -751,7 +751,7 @@ static int nes_init_serdes(struct nes_device *nesdev, u8 hw_rev, u8 port_count, ...@@ -751,7 +751,7 @@ static int nes_init_serdes(struct nes_device *nesdev, u8 hw_rev, u8 port_count,
& 0x0000000f)) != 0x0000000f) && (i++ < 5000)) & 0x0000000f)) != 0x0000000f) && (i++ < 5000))
mdelay(1); mdelay(1);
if (i >= 5000) { if (i >= 5000) {
printk("%s: Init: serdes 1 not ready, status=%x\n", __FUNCTION__, u32temp); printk("%s: Init: serdes 1 not ready, status=%x\n", __func__, u32temp);
/* return 1; */ /* return 1; */
} }
nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_TX_EMP1, 0x000bdef7); nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_TX_EMP1, 0x000bdef7);
...@@ -1216,7 +1216,7 @@ int nes_init_phy(struct nes_device *nesdev) ...@@ -1216,7 +1216,7 @@ int nes_init_phy(struct nes_device *nesdev)
if (nesadapter->OneG_Mode) { if (nesadapter->OneG_Mode) {
nes_debug(NES_DBG_PHY, "1G PHY, mac_index = %d.\n", mac_index); nes_debug(NES_DBG_PHY, "1G PHY, mac_index = %d.\n", mac_index);
if (nesadapter->phy_type[mac_index] == NES_PHY_TYPE_1G) { if (nesadapter->phy_type[mac_index] == NES_PHY_TYPE_1G) {
printk(PFX "%s: Programming mdc config for 1G\n", __FUNCTION__); printk(PFX "%s: Programming mdc config for 1G\n", __func__);
tx_config = nes_read_indexed(nesdev, NES_IDX_MAC_TX_CONFIG); tx_config = nes_read_indexed(nesdev, NES_IDX_MAC_TX_CONFIG);
tx_config |= 0x04; tx_config |= 0x04;
nes_write_indexed(nesdev, NES_IDX_MAC_TX_CONFIG, tx_config); nes_write_indexed(nesdev, NES_IDX_MAC_TX_CONFIG, tx_config);
...@@ -1370,7 +1370,7 @@ static void nes_replenish_nic_rq(struct nes_vnic *nesvnic) ...@@ -1370,7 +1370,7 @@ static void nes_replenish_nic_rq(struct nes_vnic *nesvnic)
static void nes_rq_wqes_timeout(unsigned long parm) static void nes_rq_wqes_timeout(unsigned long parm)
{ {
struct nes_vnic *nesvnic = (struct nes_vnic *)parm; struct nes_vnic *nesvnic = (struct nes_vnic *)parm;
printk("%s: Timer fired.\n", __FUNCTION__); printk("%s: Timer fired.\n", __func__);
atomic_set(&nesvnic->rx_skb_timer_running, 0); atomic_set(&nesvnic->rx_skb_timer_running, 0);
if (atomic_read(&nesvnic->rx_skbs_needed)) if (atomic_read(&nesvnic->rx_skbs_needed))
nes_replenish_nic_rq(nesvnic); nes_replenish_nic_rq(nesvnic);
...@@ -2175,7 +2175,7 @@ static void nes_process_mac_intr(struct nes_device *nesdev, u32 mac_number) ...@@ -2175,7 +2175,7 @@ static void nes_process_mac_intr(struct nes_device *nesdev, u32 mac_number)
temp_phy_data = phy_data; temp_phy_data = phy_data;
} while (1); } while (1);
nes_debug(NES_DBG_PHY, "%s: Phy data = 0x%04X, link was %s.\n", nes_debug(NES_DBG_PHY, "%s: Phy data = 0x%04X, link was %s.\n",
__FUNCTION__, phy_data, nesadapter->mac_link_down ? "DOWN" : "UP"); __func__, phy_data, nesadapter->mac_link_down ? "DOWN" : "UP");
} else { } else {
phy_data = (0x0f0f0000 == (pcs_control_status & 0x0f1f0000)) ? 4 : 0; phy_data = (0x0f0f0000 == (pcs_control_status & 0x0f1f0000)) ? 4 : 0;
...@@ -2832,7 +2832,7 @@ static void nes_process_iwarp_aeqe(struct nes_device *nesdev, ...@@ -2832,7 +2832,7 @@ static void nes_process_iwarp_aeqe(struct nes_device *nesdev,
le32_to_cpu(aeqe->aeqe_words[NES_AEQE_COMP_QP_CQ_ID_IDX])); le32_to_cpu(aeqe->aeqe_words[NES_AEQE_COMP_QP_CQ_ID_IDX]));
if (resource_allocated) { if (resource_allocated) {
printk(KERN_ERR PFX "%s: Processing an NES_AEQE_AEID_CQ_OPERATION_ERROR event on CQ%u\n", printk(KERN_ERR PFX "%s: Processing an NES_AEQE_AEID_CQ_OPERATION_ERROR event on CQ%u\n",
__FUNCTION__, le32_to_cpu(aeqe->aeqe_words[NES_AEQE_COMP_QP_CQ_ID_IDX])); __func__, le32_to_cpu(aeqe->aeqe_words[NES_AEQE_COMP_QP_CQ_ID_IDX]));
} }
break; break;
case NES_AEQE_AEID_DDP_UBE_DDP_MESSAGE_TOO_LONG_FOR_AVAILABLE_BUFFER: case NES_AEQE_AEID_DDP_UBE_DDP_MESSAGE_TOO_LONG_FOR_AVAILABLE_BUFFER:
......
...@@ -802,7 +802,7 @@ static int nes_netdev_set_mac_address(struct net_device *netdev, void *p) ...@@ -802,7 +802,7 @@ static int nes_netdev_set_mac_address(struct net_device *netdev, void *p)
memcpy(netdev->dev_addr, mac_addr->sa_data, netdev->addr_len); memcpy(netdev->dev_addr, mac_addr->sa_data, netdev->addr_len);
printk(PFX "%s: Address length = %d, Address = %02X%02X%02X%02X%02X%02X..\n", printk(PFX "%s: Address length = %d, Address = %02X%02X%02X%02X%02X%02X..\n",
__FUNCTION__, netdev->addr_len, __func__, netdev->addr_len,
mac_addr->sa_data[0], mac_addr->sa_data[1], mac_addr->sa_data[0], mac_addr->sa_data[1],
mac_addr->sa_data[2], mac_addr->sa_data[3], mac_addr->sa_data[2], mac_addr->sa_data[3],
mac_addr->sa_data[4], mac_addr->sa_data[5]); mac_addr->sa_data[4], mac_addr->sa_data[5]);
......
...@@ -566,7 +566,7 @@ struct nes_cqp_request *nes_get_cqp_request(struct nes_device *nesdev) ...@@ -566,7 +566,7 @@ struct nes_cqp_request *nes_get_cqp_request(struct nes_device *nesdev)
cqp_request); cqp_request);
} else } else
printk(KERN_ERR PFX "%s: Could not allocated a CQP request.\n", printk(KERN_ERR PFX "%s: Could not allocated a CQP request.\n",
__FUNCTION__); __func__);
return cqp_request; return cqp_request;
} }
......
...@@ -1909,13 +1909,13 @@ static int nes_destroy_cq(struct ib_cq *ib_cq) ...@@ -1909,13 +1909,13 @@ static int nes_destroy_cq(struct ib_cq *ib_cq)
nesadapter->free_256pbl++; nesadapter->free_256pbl++;
if (nesadapter->free_256pbl > nesadapter->max_256pbl) { if (nesadapter->free_256pbl > nesadapter->max_256pbl) {
printk(KERN_ERR PFX "%s: free 256B PBLs(%u) has exceeded the max(%u)\n", printk(KERN_ERR PFX "%s: free 256B PBLs(%u) has exceeded the max(%u)\n",
__FUNCTION__, nesadapter->free_256pbl, nesadapter->max_256pbl); __func__, nesadapter->free_256pbl, nesadapter->max_256pbl);
} }
} else if (nescq->virtual_cq == 2) { } else if (nescq->virtual_cq == 2) {
nesadapter->free_4kpbl++; nesadapter->free_4kpbl++;
if (nesadapter->free_4kpbl > nesadapter->max_4kpbl) { if (nesadapter->free_4kpbl > nesadapter->max_4kpbl) {
printk(KERN_ERR PFX "%s: free 4K PBLs(%u) has exceeded the max(%u)\n", printk(KERN_ERR PFX "%s: free 4K PBLs(%u) has exceeded the max(%u)\n",
__FUNCTION__, nesadapter->free_4kpbl, nesadapter->max_4kpbl); __func__, nesadapter->free_4kpbl, nesadapter->max_4kpbl);
} }
opcode |= NES_CQP_CQ_4KB_CHUNK; opcode |= NES_CQP_CQ_4KB_CHUNK;
} }
......
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