Commit 46b2d4e8 authored by Joe Perches's avatar Joe Perches Committed by Doug Ledford

cxgb3: Use more common logging style

Convert printks to pr_<level>

Miscellanea:

o Coalesce formats
o Realign arguments
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Reviewed-by: default avatarSteve Wise <swise@opengridcomputing.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent cd565b4b
...@@ -110,8 +110,7 @@ int cxio_hal_cq_op(struct cxio_rdev *rdev_p, struct t3_cq *cq, ...@@ -110,8 +110,7 @@ int cxio_hal_cq_op(struct cxio_rdev *rdev_p, struct t3_cq *cq,
while (!CQ_VLD_ENTRY(rptr, cq->size_log2, cqe)) { while (!CQ_VLD_ENTRY(rptr, cq->size_log2, cqe)) {
udelay(1); udelay(1);
if (i++ > 1000000) { if (i++ > 1000000) {
printk(KERN_ERR "%s: stalled rnic\n", pr_err("%s: stalled rnic\n", rdev_p->dev_name);
rdev_p->dev_name);
return -EIO; return -EIO;
} }
} }
...@@ -949,13 +948,12 @@ int cxio_rdev_open(struct cxio_rdev *rdev_p) ...@@ -949,13 +948,12 @@ int cxio_rdev_open(struct cxio_rdev *rdev_p)
err = rdev_p->t3cdev_p->ctl(rdev_p->t3cdev_p, GET_EMBEDDED_INFO, err = rdev_p->t3cdev_p->ctl(rdev_p->t3cdev_p, GET_EMBEDDED_INFO,
&(rdev_p->fw_info)); &(rdev_p->fw_info));
if (err) { if (err) {
printk(KERN_ERR "%s t3cdev_p(%p)->ctl returned error %d.\n", pr_err("%s t3cdev_p(%p)->ctl returned error %d\n",
__func__, rdev_p->t3cdev_p, err); __func__, rdev_p->t3cdev_p, err);
goto err1; goto err1;
} }
if (G_FW_VERSION_MAJOR(rdev_p->fw_info.fw_vers) != CXIO_FW_MAJ) { if (G_FW_VERSION_MAJOR(rdev_p->fw_info.fw_vers) != CXIO_FW_MAJ) {
printk(KERN_ERR MOD "fatal firmware version mismatch: " pr_err("fatal firmware version mismatch: need version %u but adapter has version %u\n",
"need version %u but adapter has version %u\n",
CXIO_FW_MAJ, CXIO_FW_MAJ,
G_FW_VERSION_MAJOR(rdev_p->fw_info.fw_vers)); G_FW_VERSION_MAJOR(rdev_p->fw_info.fw_vers));
err = -EINVAL; err = -EINVAL;
...@@ -965,14 +963,14 @@ int cxio_rdev_open(struct cxio_rdev *rdev_p) ...@@ -965,14 +963,14 @@ int cxio_rdev_open(struct cxio_rdev *rdev_p)
err = rdev_p->t3cdev_p->ctl(rdev_p->t3cdev_p, RDMA_GET_PARAMS, err = rdev_p->t3cdev_p->ctl(rdev_p->t3cdev_p, RDMA_GET_PARAMS,
&(rdev_p->rnic_info)); &(rdev_p->rnic_info));
if (err) { if (err) {
printk(KERN_ERR "%s t3cdev_p(%p)->ctl returned error %d.\n", pr_err("%s t3cdev_p(%p)->ctl returned error %d\n",
__func__, rdev_p->t3cdev_p, err); __func__, rdev_p->t3cdev_p, err);
goto err1; goto err1;
} }
err = rdev_p->t3cdev_p->ctl(rdev_p->t3cdev_p, GET_PORTS, err = rdev_p->t3cdev_p->ctl(rdev_p->t3cdev_p, GET_PORTS,
&(rdev_p->port_info)); &(rdev_p->port_info));
if (err) { if (err) {
printk(KERN_ERR "%s t3cdev_p(%p)->ctl returned error %d.\n", pr_err("%s t3cdev_p(%p)->ctl returned error %d\n",
__func__, rdev_p->t3cdev_p, err); __func__, rdev_p->t3cdev_p, err);
goto err1; goto err1;
} }
...@@ -1003,27 +1001,26 @@ int cxio_rdev_open(struct cxio_rdev *rdev_p) ...@@ -1003,27 +1001,26 @@ int cxio_rdev_open(struct cxio_rdev *rdev_p)
err = cxio_hal_init_ctrl_qp(rdev_p); err = cxio_hal_init_ctrl_qp(rdev_p);
if (err) { if (err) {
printk(KERN_ERR "%s error %d initializing ctrl_qp.\n", pr_err("%s error %d initializing ctrl_qp\n", __func__, err);
__func__, err);
goto err1; goto err1;
} }
err = cxio_hal_init_resource(rdev_p, cxio_num_stags(rdev_p), 0, err = cxio_hal_init_resource(rdev_p, cxio_num_stags(rdev_p), 0,
0, T3_MAX_NUM_QP, T3_MAX_NUM_CQ, 0, T3_MAX_NUM_QP, T3_MAX_NUM_CQ,
T3_MAX_NUM_PD); T3_MAX_NUM_PD);
if (err) { if (err) {
printk(KERN_ERR "%s error %d initializing hal resources.\n", pr_err("%s error %d initializing hal resources\n",
__func__, err); __func__, err);
goto err2; goto err2;
} }
err = cxio_hal_pblpool_create(rdev_p); err = cxio_hal_pblpool_create(rdev_p);
if (err) { if (err) {
printk(KERN_ERR "%s error %d initializing pbl mem pool.\n", pr_err("%s error %d initializing pbl mem pool\n",
__func__, err); __func__, err);
goto err3; goto err3;
} }
err = cxio_hal_rqtpool_create(rdev_p); err = cxio_hal_rqtpool_create(rdev_p);
if (err) { if (err) {
printk(KERN_ERR "%s error %d initializing rqt mem pool.\n", pr_err("%s error %d initializing rqt mem pool\n",
__func__, err); __func__, err);
goto err4; goto err4;
} }
......
...@@ -196,8 +196,13 @@ int cxio_poll_cq(struct t3_wq *wq, struct t3_cq *cq, struct t3_cqe *cqe, ...@@ -196,8 +196,13 @@ int cxio_poll_cq(struct t3_wq *wq, struct t3_cq *cq, struct t3_cqe *cqe,
u8 *cqe_flushed, u64 *cookie, u32 *credit); u8 *cqe_flushed, u64 *cookie, u32 *credit);
int iwch_cxgb3_ofld_send(struct t3cdev *tdev, struct sk_buff *skb); int iwch_cxgb3_ofld_send(struct t3cdev *tdev, struct sk_buff *skb);
#define MOD "iw_cxgb3: " #ifdef pr_fmt
#define PDBG(fmt, args...) pr_debug(MOD fmt, ## args) #undef pr_fmt
#endif
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#define PDBG(fmt, args...) pr_debug(fmt, ## args)
#ifdef DEBUG #ifdef DEBUG
void cxio_dump_tpt(struct cxio_rdev *rev, u32 stag); void cxio_dump_tpt(struct cxio_rdev *rev, u32 stag);
......
...@@ -285,8 +285,9 @@ int cxio_hal_pblpool_create(struct cxio_rdev *rdev_p) ...@@ -285,8 +285,9 @@ int cxio_hal_pblpool_create(struct cxio_rdev *rdev_p)
PDBG("%s failed to add PBL chunk (%x/%x)\n", PDBG("%s failed to add PBL chunk (%x/%x)\n",
__func__, pbl_start, pbl_chunk); __func__, pbl_start, pbl_chunk);
if (pbl_chunk <= 1024 << MIN_PBL_SHIFT) { if (pbl_chunk <= 1024 << MIN_PBL_SHIFT) {
printk(KERN_WARNING MOD "%s: Failed to add all PBL chunks (%x/%x)\n", pr_warn("%s: Failed to add all PBL chunks (%x/%x)\n",
__func__, pbl_start, rdev_p->rnic_info.pbl_top - pbl_start); __func__, pbl_start,
rdev_p->rnic_info.pbl_top - pbl_start);
return 0; return 0;
} }
pbl_chunk >>= 1; pbl_chunk >>= 1;
......
...@@ -146,11 +146,10 @@ static void open_rnic_dev(struct t3cdev *tdev) ...@@ -146,11 +146,10 @@ static void open_rnic_dev(struct t3cdev *tdev)
struct iwch_dev *rnicp; struct iwch_dev *rnicp;
PDBG("%s t3cdev %p\n", __func__, tdev); PDBG("%s t3cdev %p\n", __func__, tdev);
printk_once(KERN_INFO MOD "Chelsio T3 RDMA Driver - version %s\n", pr_info_once("Chelsio T3 RDMA Driver - version %s\n", DRV_VERSION);
DRV_VERSION);
rnicp = (struct iwch_dev *)ib_alloc_device(sizeof(*rnicp)); rnicp = (struct iwch_dev *)ib_alloc_device(sizeof(*rnicp));
if (!rnicp) { if (!rnicp) {
printk(KERN_ERR MOD "Cannot allocate ib device\n"); pr_err("Cannot allocate ib device\n");
return; return;
} }
rnicp->rdev.ulp = rnicp; rnicp->rdev.ulp = rnicp;
...@@ -160,7 +159,7 @@ static void open_rnic_dev(struct t3cdev *tdev) ...@@ -160,7 +159,7 @@ static void open_rnic_dev(struct t3cdev *tdev)
if (cxio_rdev_open(&rnicp->rdev)) { if (cxio_rdev_open(&rnicp->rdev)) {
mutex_unlock(&dev_mutex); mutex_unlock(&dev_mutex);
printk(KERN_ERR MOD "Unable to open CXIO rdev\n"); pr_err("Unable to open CXIO rdev\n");
ib_dealloc_device(&rnicp->ibdev); ib_dealloc_device(&rnicp->ibdev);
return; return;
} }
...@@ -171,10 +170,10 @@ static void open_rnic_dev(struct t3cdev *tdev) ...@@ -171,10 +170,10 @@ static void open_rnic_dev(struct t3cdev *tdev)
mutex_unlock(&dev_mutex); mutex_unlock(&dev_mutex);
if (iwch_register_device(rnicp)) { if (iwch_register_device(rnicp)) {
printk(KERN_ERR MOD "Unable to register device\n"); pr_err("Unable to register device\n");
close_rnic_dev(tdev); close_rnic_dev(tdev);
} }
printk(KERN_INFO MOD "Initialized device %s\n", pr_info("Initialized device %s\n",
pci_name(rnicp->rdev.rnic_info.pdev)); pci_name(rnicp->rdev.rnic_info.pdev));
return; return;
} }
......
...@@ -367,7 +367,7 @@ static void arp_failure_discard(struct t3cdev *dev, struct sk_buff *skb) ...@@ -367,7 +367,7 @@ static void arp_failure_discard(struct t3cdev *dev, struct sk_buff *skb)
*/ */
static void act_open_req_arp_failure(struct t3cdev *dev, struct sk_buff *skb) static void act_open_req_arp_failure(struct t3cdev *dev, struct sk_buff *skb)
{ {
printk(KERN_ERR MOD "ARP failure during connect\n"); pr_err("ARP failure during connect\n");
kfree_skb(skb); kfree_skb(skb);
} }
...@@ -392,7 +392,7 @@ static int send_halfclose(struct iwch_ep *ep, gfp_t gfp) ...@@ -392,7 +392,7 @@ static int send_halfclose(struct iwch_ep *ep, gfp_t gfp)
PDBG("%s ep %p\n", __func__, ep); PDBG("%s ep %p\n", __func__, ep);
skb = get_skb(NULL, sizeof(*req), gfp); skb = get_skb(NULL, sizeof(*req), gfp);
if (!skb) { if (!skb) {
printk(KERN_ERR MOD "%s - failed to alloc skb\n", __func__); pr_err("%s - failed to alloc skb\n", __func__);
return -ENOMEM; return -ENOMEM;
} }
skb->priority = CPL_PRIORITY_DATA; skb->priority = CPL_PRIORITY_DATA;
...@@ -411,8 +411,7 @@ static int send_abort(struct iwch_ep *ep, struct sk_buff *skb, gfp_t gfp) ...@@ -411,8 +411,7 @@ static int send_abort(struct iwch_ep *ep, struct sk_buff *skb, gfp_t gfp)
PDBG("%s ep %p\n", __func__, ep); PDBG("%s ep %p\n", __func__, ep);
skb = get_skb(skb, sizeof(*req), gfp); skb = get_skb(skb, sizeof(*req), gfp);
if (!skb) { if (!skb) {
printk(KERN_ERR MOD "%s - failed to alloc skb.\n", pr_err("%s - failed to alloc skb\n", __func__);
__func__);
return -ENOMEM; return -ENOMEM;
} }
skb->priority = CPL_PRIORITY_DATA; skb->priority = CPL_PRIORITY_DATA;
...@@ -438,8 +437,7 @@ static int send_connect(struct iwch_ep *ep) ...@@ -438,8 +437,7 @@ static int send_connect(struct iwch_ep *ep)
skb = get_skb(NULL, sizeof(*req), GFP_KERNEL); skb = get_skb(NULL, sizeof(*req), GFP_KERNEL);
if (!skb) { if (!skb) {
printk(KERN_ERR MOD "%s - failed to alloc skb.\n", pr_err("%s - failed to alloc skb\n", __func__);
__func__);
return -ENOMEM; return -ENOMEM;
} }
mtu_idx = find_best_mtu(T3C_DATA(ep->com.tdev), dst_mtu(ep->dst)); mtu_idx = find_best_mtu(T3C_DATA(ep->com.tdev), dst_mtu(ep->dst));
...@@ -544,7 +542,7 @@ static int send_mpa_reject(struct iwch_ep *ep, const void *pdata, u8 plen) ...@@ -544,7 +542,7 @@ static int send_mpa_reject(struct iwch_ep *ep, const void *pdata, u8 plen)
skb = get_skb(NULL, mpalen + sizeof(*req), GFP_KERNEL); skb = get_skb(NULL, mpalen + sizeof(*req), GFP_KERNEL);
if (!skb) { if (!skb) {
printk(KERN_ERR MOD "%s - cannot alloc skb!\n", __func__); pr_err("%s - cannot alloc skb!\n", __func__);
return -ENOMEM; return -ENOMEM;
} }
skb_reserve(skb, sizeof(*req)); skb_reserve(skb, sizeof(*req));
...@@ -593,7 +591,7 @@ static int send_mpa_reply(struct iwch_ep *ep, const void *pdata, u8 plen) ...@@ -593,7 +591,7 @@ static int send_mpa_reply(struct iwch_ep *ep, const void *pdata, u8 plen)
skb = get_skb(NULL, mpalen + sizeof(*req), GFP_KERNEL); skb = get_skb(NULL, mpalen + sizeof(*req), GFP_KERNEL);
if (!skb) { if (!skb) {
printk(KERN_ERR MOD "%s - cannot alloc skb!\n", __func__); pr_err("%s - cannot alloc skb!\n", __func__);
return -ENOMEM; return -ENOMEM;
} }
skb->priority = CPL_PRIORITY_DATA; skb->priority = CPL_PRIORITY_DATA;
...@@ -798,7 +796,7 @@ static int update_rx_credits(struct iwch_ep *ep, u32 credits) ...@@ -798,7 +796,7 @@ static int update_rx_credits(struct iwch_ep *ep, u32 credits)
PDBG("%s ep %p credits %u\n", __func__, ep, credits); PDBG("%s ep %p credits %u\n", __func__, ep, credits);
skb = get_skb(NULL, sizeof(*req), GFP_KERNEL); skb = get_skb(NULL, sizeof(*req), GFP_KERNEL);
if (!skb) { if (!skb) {
printk(KERN_ERR MOD "update_rx_credits - cannot alloc skb!\n"); pr_err("update_rx_credits - cannot alloc skb!\n");
return 0; return 0;
} }
...@@ -1065,8 +1063,7 @@ static int rx_data(struct t3cdev *tdev, struct sk_buff *skb, void *ctx) ...@@ -1065,8 +1063,7 @@ static int rx_data(struct t3cdev *tdev, struct sk_buff *skb, void *ctx)
case MPA_REP_SENT: case MPA_REP_SENT:
break; break;
default: default:
printk(KERN_ERR MOD "%s Unexpected streaming data." pr_err("%s Unexpected streaming data. ep %p state %d tid %d\n",
" ep %p state %d tid %d\n",
__func__, ep, state_read(&ep->com), ep->hwtid); __func__, ep, state_read(&ep->com), ep->hwtid);
/* /*
...@@ -1159,8 +1156,7 @@ static int abort_rpl(struct t3cdev *tdev, struct sk_buff *skb, void *ctx) ...@@ -1159,8 +1156,7 @@ static int abort_rpl(struct t3cdev *tdev, struct sk_buff *skb, void *ctx)
release = 1; release = 1;
break; break;
default: default:
printk(KERN_ERR "%s ep %p state %d\n", pr_err("%s ep %p state %d\n", __func__, ep, ep->com.state);
__func__, ep, ep->com.state);
break; break;
} }
spin_unlock_irqrestore(&ep->com.lock, flags); spin_unlock_irqrestore(&ep->com.lock, flags);
...@@ -1205,7 +1201,7 @@ static int listen_start(struct iwch_listen_ep *ep) ...@@ -1205,7 +1201,7 @@ static int listen_start(struct iwch_listen_ep *ep)
PDBG("%s ep %p\n", __func__, ep); PDBG("%s ep %p\n", __func__, ep);
skb = get_skb(NULL, sizeof(*req), GFP_KERNEL); skb = get_skb(NULL, sizeof(*req), GFP_KERNEL);
if (!skb) { if (!skb) {
printk(KERN_ERR MOD "t3c_listen_start failed to alloc skb!\n"); pr_err("t3c_listen_start failed to alloc skb!\n");
return -ENOMEM; return -ENOMEM;
} }
...@@ -1247,7 +1243,7 @@ static int listen_stop(struct iwch_listen_ep *ep) ...@@ -1247,7 +1243,7 @@ static int listen_stop(struct iwch_listen_ep *ep)
PDBG("%s ep %p\n", __func__, ep); PDBG("%s ep %p\n", __func__, ep);
skb = get_skb(NULL, sizeof(*req), GFP_KERNEL); skb = get_skb(NULL, sizeof(*req), GFP_KERNEL);
if (!skb) { if (!skb) {
printk(KERN_ERR MOD "%s - failed to alloc skb\n", __func__); pr_err("%s - failed to alloc skb\n", __func__);
return -ENOMEM; return -ENOMEM;
} }
req = (struct cpl_close_listserv_req *) skb_put(skb, sizeof(*req)); req = (struct cpl_close_listserv_req *) skb_put(skb, sizeof(*req));
...@@ -1350,8 +1346,7 @@ static int pass_accept_req(struct t3cdev *tdev, struct sk_buff *skb, void *ctx) ...@@ -1350,8 +1346,7 @@ static int pass_accept_req(struct t3cdev *tdev, struct sk_buff *skb, void *ctx)
PDBG("%s parent ep %p tid %u\n", __func__, parent_ep, hwtid); PDBG("%s parent ep %p tid %u\n", __func__, parent_ep, hwtid);
if (state_read(&parent_ep->com) != LISTEN) { if (state_read(&parent_ep->com) != LISTEN) {
printk(KERN_ERR "%s - listening ep not in LISTEN\n", pr_err("%s - listening ep not in LISTEN\n", __func__);
__func__);
goto reject; goto reject;
} }
...@@ -1361,8 +1356,7 @@ static int pass_accept_req(struct t3cdev *tdev, struct sk_buff *skb, void *ctx) ...@@ -1361,8 +1356,7 @@ static int pass_accept_req(struct t3cdev *tdev, struct sk_buff *skb, void *ctx)
tim.mac_addr = req->dst_mac; tim.mac_addr = req->dst_mac;
tim.vlan_tag = ntohs(req->vlan_tag); tim.vlan_tag = ntohs(req->vlan_tag);
if (tdev->ctl(tdev, GET_IFF_FROM_MAC, &tim) < 0 || !tim.dev) { if (tdev->ctl(tdev, GET_IFF_FROM_MAC, &tim) < 0 || !tim.dev) {
printk(KERN_ERR "%s bad dst mac %pM\n", pr_err("%s bad dst mac %pM\n", __func__, req->dst_mac);
__func__, req->dst_mac);
goto reject; goto reject;
} }
...@@ -1373,22 +1367,19 @@ static int pass_accept_req(struct t3cdev *tdev, struct sk_buff *skb, void *ctx) ...@@ -1373,22 +1367,19 @@ static int pass_accept_req(struct t3cdev *tdev, struct sk_buff *skb, void *ctx)
req->local_port, req->local_port,
req->peer_port, G_PASS_OPEN_TOS(ntohl(req->tos_tid))); req->peer_port, G_PASS_OPEN_TOS(ntohl(req->tos_tid)));
if (!rt) { if (!rt) {
printk(KERN_ERR MOD "%s - failed to find dst entry!\n", pr_err("%s - failed to find dst entry!\n", __func__);
__func__);
goto reject; goto reject;
} }
dst = &rt->dst; dst = &rt->dst;
l2t = t3_l2t_get(tdev, dst, NULL, &req->peer_ip); l2t = t3_l2t_get(tdev, dst, NULL, &req->peer_ip);
if (!l2t) { if (!l2t) {
printk(KERN_ERR MOD "%s - failed to allocate l2t entry!\n", pr_err("%s - failed to allocate l2t entry!\n", __func__);
__func__);
dst_release(dst); dst_release(dst);
goto reject; goto reject;
} }
child_ep = alloc_ep(sizeof(*child_ep), GFP_KERNEL); child_ep = alloc_ep(sizeof(*child_ep), GFP_KERNEL);
if (!child_ep) { if (!child_ep) {
printk(KERN_ERR MOD "%s - failed to allocate ep entry!\n", pr_err("%s - failed to allocate ep entry!\n", __func__);
__func__);
l2t_release(tdev, l2t); l2t_release(tdev, l2t);
dst_release(dst); dst_release(dst);
goto reject; goto reject;
...@@ -1595,9 +1586,7 @@ static int peer_abort(struct t3cdev *tdev, struct sk_buff *skb, void *ctx) ...@@ -1595,9 +1586,7 @@ static int peer_abort(struct t3cdev *tdev, struct sk_buff *skb, void *ctx)
ep->com.qp, IWCH_QP_ATTR_NEXT_STATE, ep->com.qp, IWCH_QP_ATTR_NEXT_STATE,
&attrs, 1); &attrs, 1);
if (ret) if (ret)
printk(KERN_ERR MOD pr_err("%s - qp <- error failed!\n", __func__);
"%s - qp <- error failed!\n",
__func__);
} }
peer_abort_upcall(ep); peer_abort_upcall(ep);
break; break;
...@@ -1620,8 +1609,7 @@ static int peer_abort(struct t3cdev *tdev, struct sk_buff *skb, void *ctx) ...@@ -1620,8 +1609,7 @@ static int peer_abort(struct t3cdev *tdev, struct sk_buff *skb, void *ctx)
rpl_skb = get_skb(skb, sizeof(*rpl), GFP_KERNEL); rpl_skb = get_skb(skb, sizeof(*rpl), GFP_KERNEL);
if (!rpl_skb) { if (!rpl_skb) {
printk(KERN_ERR MOD "%s - cannot allocate skb!\n", pr_err("%s - cannot allocate skb!\n", __func__);
__func__);
release = 1; release = 1;
goto out; goto out;
} }
...@@ -1719,7 +1707,7 @@ static int ec_status(struct t3cdev *tdev, struct sk_buff *skb, void *ctx) ...@@ -1719,7 +1707,7 @@ static int ec_status(struct t3cdev *tdev, struct sk_buff *skb, void *ctx)
if (rep->status) { if (rep->status) {
struct iwch_qp_attributes attrs; struct iwch_qp_attributes attrs;
printk(KERN_ERR MOD "%s BAD CLOSE - Aborting tid %u\n", pr_err("%s BAD CLOSE - Aborting tid %u\n",
__func__, ep->hwtid); __func__, ep->hwtid);
stop_ep_timer(ep); stop_ep_timer(ep);
attrs.next_state = IWCH_QP_STATE_ERROR; attrs.next_state = IWCH_QP_STATE_ERROR;
...@@ -1907,7 +1895,7 @@ int iwch_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param) ...@@ -1907,7 +1895,7 @@ int iwch_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
ep = alloc_ep(sizeof(*ep), GFP_KERNEL); ep = alloc_ep(sizeof(*ep), GFP_KERNEL);
if (!ep) { if (!ep) {
printk(KERN_ERR MOD "%s - cannot alloc ep.\n", __func__); pr_err("%s - cannot alloc ep\n", __func__);
err = -ENOMEM; err = -ENOMEM;
goto out; goto out;
} }
...@@ -1936,7 +1924,7 @@ int iwch_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param) ...@@ -1936,7 +1924,7 @@ int iwch_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
*/ */
ep->atid = cxgb3_alloc_atid(h->rdev.t3cdev_p, &t3c_client, ep); ep->atid = cxgb3_alloc_atid(h->rdev.t3cdev_p, &t3c_client, ep);
if (ep->atid == -1) { if (ep->atid == -1) {
printk(KERN_ERR MOD "%s - cannot alloc atid.\n", __func__); pr_err("%s - cannot alloc atid\n", __func__);
err = -ENOMEM; err = -ENOMEM;
goto fail2; goto fail2;
} }
...@@ -1946,7 +1934,7 @@ int iwch_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param) ...@@ -1946,7 +1934,7 @@ int iwch_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
raddr->sin_addr.s_addr, laddr->sin_port, raddr->sin_addr.s_addr, laddr->sin_port,
raddr->sin_port, IPTOS_LOWDELAY); raddr->sin_port, IPTOS_LOWDELAY);
if (!rt) { if (!rt) {
printk(KERN_ERR MOD "%s - cannot find route.\n", __func__); pr_err("%s - cannot find route\n", __func__);
err = -EHOSTUNREACH; err = -EHOSTUNREACH;
goto fail3; goto fail3;
} }
...@@ -1954,7 +1942,7 @@ int iwch_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param) ...@@ -1954,7 +1942,7 @@ int iwch_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
ep->l2t = t3_l2t_get(ep->com.tdev, ep->dst, NULL, ep->l2t = t3_l2t_get(ep->com.tdev, ep->dst, NULL,
&raddr->sin_addr.s_addr); &raddr->sin_addr.s_addr);
if (!ep->l2t) { if (!ep->l2t) {
printk(KERN_ERR MOD "%s - cannot alloc l2e.\n", __func__); pr_err("%s - cannot alloc l2e\n", __func__);
err = -ENOMEM; err = -ENOMEM;
goto fail4; goto fail4;
} }
...@@ -1999,7 +1987,7 @@ int iwch_create_listen(struct iw_cm_id *cm_id, int backlog) ...@@ -1999,7 +1987,7 @@ int iwch_create_listen(struct iw_cm_id *cm_id, int backlog)
ep = alloc_ep(sizeof(*ep), GFP_KERNEL); ep = alloc_ep(sizeof(*ep), GFP_KERNEL);
if (!ep) { if (!ep) {
printk(KERN_ERR MOD "%s - cannot alloc ep.\n", __func__); pr_err("%s - cannot alloc ep\n", __func__);
err = -ENOMEM; err = -ENOMEM;
goto fail1; goto fail1;
} }
...@@ -2016,7 +2004,7 @@ int iwch_create_listen(struct iw_cm_id *cm_id, int backlog) ...@@ -2016,7 +2004,7 @@ int iwch_create_listen(struct iw_cm_id *cm_id, int backlog)
*/ */
ep->stid = cxgb3_alloc_stid(h->rdev.t3cdev_p, &t3c_client, ep); ep->stid = cxgb3_alloc_stid(h->rdev.t3cdev_p, &t3c_client, ep);
if (ep->stid == -1) { if (ep->stid == -1) {
printk(KERN_ERR MOD "%s - cannot alloc atid.\n", __func__); pr_err("%s - cannot alloc atid\n", __func__);
err = -ENOMEM; err = -ENOMEM;
goto fail2; goto fail2;
} }
...@@ -2225,8 +2213,8 @@ static int set_tcb_rpl(struct t3cdev *tdev, struct sk_buff *skb, void *ctx) ...@@ -2225,8 +2213,8 @@ static int set_tcb_rpl(struct t3cdev *tdev, struct sk_buff *skb, void *ctx)
struct cpl_set_tcb_rpl *rpl = cplhdr(skb); struct cpl_set_tcb_rpl *rpl = cplhdr(skb);
if (rpl->status != CPL_ERR_NONE) { if (rpl->status != CPL_ERR_NONE) {
printk(KERN_ERR MOD "Unexpected SET_TCB_RPL status %u " pr_err("Unexpected SET_TCB_RPL status %u for tid %u\n",
"for tid %u\n", rpl->status, GET_TID(rpl)); rpl->status, GET_TID(rpl));
} }
return CPL_RET_BUF_DONE; return CPL_RET_BUF_DONE;
} }
......
...@@ -122,8 +122,7 @@ static int iwch_poll_cq_one(struct iwch_dev *rhp, struct iwch_cq *chp, ...@@ -122,8 +122,7 @@ static int iwch_poll_cq_one(struct iwch_dev *rhp, struct iwch_cq *chp,
wc->opcode = IB_WC_REG_MR; wc->opcode = IB_WC_REG_MR;
break; break;
default: default:
printk(KERN_ERR MOD "Unexpected opcode %d " pr_err("Unexpected opcode %d in the CQE received for QPID=0x%0x\n",
"in the CQE received for QPID=0x%0x\n",
CQE_OPCODE(cqe), CQE_QPID(cqe)); CQE_OPCODE(cqe), CQE_QPID(cqe));
ret = -EINVAL; ret = -EINVAL;
goto out; goto out;
...@@ -177,8 +176,8 @@ static int iwch_poll_cq_one(struct iwch_dev *rhp, struct iwch_cq *chp, ...@@ -177,8 +176,8 @@ static int iwch_poll_cq_one(struct iwch_dev *rhp, struct iwch_cq *chp,
wc->status = IB_WC_WR_FLUSH_ERR; wc->status = IB_WC_WR_FLUSH_ERR;
break; break;
default: default:
printk(KERN_ERR MOD "Unexpected cqe_status 0x%x for " pr_err("Unexpected cqe_status 0x%x for QPID=0x%0x\n",
"QPID=0x%0x\n", CQE_STATUS(cqe), CQE_QPID(cqe)); CQE_STATUS(cqe), CQE_QPID(cqe));
ret = -EINVAL; ret = -EINVAL;
} }
} }
......
...@@ -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,
qhp = get_qhp(rnicp, CQE_QPID(rsp_msg->cqe)); qhp = get_qhp(rnicp, CQE_QPID(rsp_msg->cqe));
if (!qhp) { if (!qhp) {
printk(KERN_ERR "%s unaffiliated error 0x%x qpid 0x%x\n", pr_err("%s unaffiliated error 0x%x qpid 0x%x\n",
__func__, 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);
...@@ -68,8 +68,8 @@ static void post_qp_event(struct iwch_dev *rnicp, struct iwch_cq *chp, ...@@ -68,8 +68,8 @@ static void post_qp_event(struct iwch_dev *rnicp, struct iwch_cq *chp,
return; return;
} }
printk(KERN_ERR "%s - AE qpid 0x%x opcode %d status 0x%x " pr_err("%s - AE qpid 0x%x opcode %d status 0x%x type %d wrid.hi 0x%x wrid.lo 0x%x\n",
"type %d wrid.hi 0x%x wrid.lo 0x%x \n", __func__, __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));
...@@ -117,8 +117,7 @@ void iwch_ev_dispatch(struct cxio_rdev *rdev_p, struct sk_buff *skb) ...@@ -117,8 +117,7 @@ void iwch_ev_dispatch(struct cxio_rdev *rdev_p, struct sk_buff *skb)
chp = get_chp(rnicp, cqid); chp = get_chp(rnicp, cqid);
qhp = get_qhp(rnicp, CQE_QPID(rsp_msg->cqe)); qhp = get_qhp(rnicp, CQE_QPID(rsp_msg->cqe));
if (!chp || !qhp) { if (!chp || !qhp) {
printk(KERN_ERR MOD "BAD AE cqid 0x%x qpid 0x%x opcode %d " pr_err("BAD AE cqid 0x%x qpid 0x%x opcode %d status 0x%x type %d wrid.hi 0x%x wrid.lo 0x%x\n",
"status 0x%x type %d wrid.hi 0x%x wrid.lo 0x%x \n",
cqid, CQE_QPID(rsp_msg->cqe), cqid, CQE_QPID(rsp_msg->cqe),
CQE_OPCODE(rsp_msg->cqe), CQE_STATUS(rsp_msg->cqe), CQE_OPCODE(rsp_msg->cqe), CQE_STATUS(rsp_msg->cqe),
CQE_TYPE(rsp_msg->cqe), CQE_WRID_HI(rsp_msg->cqe), CQE_TYPE(rsp_msg->cqe), CQE_WRID_HI(rsp_msg->cqe),
...@@ -218,7 +217,7 @@ void iwch_ev_dispatch(struct cxio_rdev *rdev_p, struct sk_buff *skb) ...@@ -218,7 +217,7 @@ void iwch_ev_dispatch(struct cxio_rdev *rdev_p, struct sk_buff *skb)
break; break;
default: default:
printk(KERN_ERR MOD "Unknown T3 status 0x%x QPID 0x%x\n", pr_err("Unknown T3 status 0x%x QPID 0x%x\n",
CQE_STATUS(rsp_msg->cqe), qhp->wq.qpid); CQE_STATUS(rsp_msg->cqe), qhp->wq.qpid);
post_qp_event(rnicp, chp, rsp_msg, IB_EVENT_QP_FATAL, 1); post_qp_event(rnicp, chp, rsp_msg, IB_EVENT_QP_FATAL, 1);
break; break;
......
...@@ -227,8 +227,7 @@ static struct ib_cq *iwch_create_cq(struct ib_device *ibdev, ...@@ -227,8 +227,7 @@ static struct ib_cq *iwch_create_cq(struct ib_device *ibdev,
mm->addr = virt_to_phys(chp->cq.queue); mm->addr = virt_to_phys(chp->cq.queue);
if (udata->outlen < sizeof uresp) { if (udata->outlen < sizeof uresp) {
if (!warned++) if (!warned++)
printk(KERN_WARNING MOD "Warning - " pr_warn("Warning - downlevel libcxgb3 (non-fatal)\n");
"downlevel libcxgb3 (non-fatal).\n");
mm->len = PAGE_ALIGN((1UL << uresp.size_log2) * mm->len = PAGE_ALIGN((1UL << uresp.size_log2) *
sizeof(struct t3_cqe)); sizeof(struct t3_cqe));
resplen = sizeof(struct iwch_create_cq_resp_v0); resplen = sizeof(struct iwch_create_cq_resp_v0);
...@@ -306,8 +305,7 @@ static int iwch_resize_cq(struct ib_cq *cq, int cqe, struct ib_udata *udata) ...@@ -306,8 +305,7 @@ static int iwch_resize_cq(struct ib_cq *cq, int cqe, struct ib_udata *udata)
oldcq.cqid = newcq.cqid; oldcq.cqid = newcq.cqid;
ret = cxio_destroy_cq(&chp->rhp->rdev, &oldcq); ret = cxio_destroy_cq(&chp->rhp->rdev, &oldcq);
if (ret) { if (ret) {
printk(KERN_ERR MOD "%s - cxio_destroy_cq failed %d\n", pr_err("%s - cxio_destroy_cq failed %d\n", __func__, ret);
__func__, ret);
} }
/* add user hooks here */ /* add user hooks here */
...@@ -346,8 +344,7 @@ static int iwch_arm_cq(struct ib_cq *ibcq, enum ib_cq_notify_flags flags) ...@@ -346,8 +344,7 @@ static int iwch_arm_cq(struct ib_cq *ibcq, enum ib_cq_notify_flags flags)
err = cxio_hal_cq_op(&rhp->rdev, &chp->cq, cq_op, 0); err = cxio_hal_cq_op(&rhp->rdev, &chp->cq, cq_op, 0);
spin_unlock_irqrestore(&chp->lock, flag); spin_unlock_irqrestore(&chp->lock, flag);
if (err < 0) if (err < 0)
printk(KERN_ERR MOD "Error %d rearming CQID 0x%x\n", err, pr_err("Error %d rearming CQID 0x%x\n", err, chp->cq.cqid);
chp->cq.cqid);
if (err > 0 && !(flags & IB_CQ_REPORT_MISSED_EVENTS)) if (err > 0 && !(flags & IB_CQ_REPORT_MISSED_EVENTS))
err = 0; err = 0;
return err; return err;
...@@ -493,7 +490,7 @@ static struct ib_mr *iwch_get_dma_mr(struct ib_pd *pd, int acc) ...@@ -493,7 +490,7 @@ static struct ib_mr *iwch_get_dma_mr(struct ib_pd *pd, int acc)
* T3 only supports 32 bits of size. * T3 only supports 32 bits of size.
*/ */
if (sizeof(phys_addr_t) > 4) { if (sizeof(phys_addr_t) > 4) {
pr_warn_once(MOD "Cannot support dma_mrs on this platform.\n"); pr_warn_once("Cannot support dma_mrs on this platform\n");
return ERR_PTR(-ENOTSUPP); return ERR_PTR(-ENOTSUPP);
} }
......
...@@ -667,7 +667,7 @@ int iwch_post_zb_read(struct iwch_ep *ep) ...@@ -667,7 +667,7 @@ int iwch_post_zb_read(struct iwch_ep *ep)
PDBG("%s enter\n", __func__); PDBG("%s enter\n", __func__);
skb = alloc_skb(40, GFP_KERNEL); skb = alloc_skb(40, GFP_KERNEL);
if (!skb) { if (!skb) {
printk(KERN_ERR "%s cannot send zb_read!!\n", __func__); pr_err("%s cannot send zb_read!!\n", __func__);
return -ENOMEM; return -ENOMEM;
} }
wqe = (union t3_wr *)skb_put(skb, sizeof(struct t3_rdma_read_wr)); wqe = (union t3_wr *)skb_put(skb, sizeof(struct t3_rdma_read_wr));
...@@ -699,7 +699,7 @@ int iwch_post_terminate(struct iwch_qp *qhp, struct respQ_msg_t *rsp_msg) ...@@ -699,7 +699,7 @@ int iwch_post_terminate(struct iwch_qp *qhp, struct respQ_msg_t *rsp_msg)
PDBG("%s %d\n", __func__, __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", __func__); pr_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);
...@@ -1034,8 +1034,7 @@ int iwch_modify_qp(struct iwch_dev *rhp, struct iwch_qp *qhp, ...@@ -1034,8 +1034,7 @@ int iwch_modify_qp(struct iwch_dev *rhp, struct iwch_qp *qhp,
goto err; goto err;
break; break;
default: default:
printk(KERN_ERR "%s in a bad state %d\n", pr_err("%s in a bad state %d\n", __func__, qhp->attr.state);
__func__, qhp->attr.state);
ret = -EINVAL; ret = -EINVAL;
goto err; goto err;
break; break;
......
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