|
@@ -110,9 +110,9 @@ static void connect_reply_upcall(struct iwch_ep *ep, int status);
|
|
|
|
|
|
static void start_ep_timer(struct iwch_ep *ep)
|
|
|
{
|
|
|
- PDBG("%s ep %p\n", __FUNCTION__, ep);
|
|
|
+ PDBG("%s ep %p\n", __func__, ep);
|
|
|
if (timer_pending(&ep->timer)) {
|
|
|
- PDBG("%s stopped / restarted timer ep %p\n", __FUNCTION__, ep);
|
|
|
+ PDBG("%s stopped / restarted timer ep %p\n", __func__, ep);
|
|
|
del_timer_sync(&ep->timer);
|
|
|
} else
|
|
|
get_ep(&ep->com);
|
|
@@ -124,7 +124,7 @@ static void start_ep_timer(struct iwch_ep *ep)
|
|
|
|
|
|
static void stop_ep_timer(struct iwch_ep *ep)
|
|
|
{
|
|
|
- PDBG("%s ep %p\n", __FUNCTION__, ep);
|
|
|
+ PDBG("%s ep %p\n", __func__, ep);
|
|
|
del_timer_sync(&ep->timer);
|
|
|
put_ep(&ep->com);
|
|
|
}
|
|
@@ -190,7 +190,7 @@ int iwch_resume_tid(struct iwch_ep *ep)
|
|
|
|
|
|
static void set_emss(struct iwch_ep *ep, u16 opt)
|
|
|
{
|
|
|
- PDBG("%s ep %p opt %u\n", __FUNCTION__, ep, opt);
|
|
|
+ PDBG("%s ep %p opt %u\n", __func__, ep, opt);
|
|
|
ep->emss = T3C_DATA(ep->com.tdev)->mtus[G_TCPOPT_MSS(opt)] - 40;
|
|
|
if (G_TCPOPT_TSTAMP(opt))
|
|
|
ep->emss -= 12;
|
|
@@ -220,7 +220,7 @@ static void state_set(struct iwch_ep_common *epc, enum iwch_ep_state new)
|
|
|
unsigned long flags;
|
|
|
|
|
|
spin_lock_irqsave(&epc->lock, flags);
|
|
|
- PDBG("%s - %s -> %s\n", __FUNCTION__, states[epc->state], states[new]);
|
|
|
+ PDBG("%s - %s -> %s\n", __func__, states[epc->state], states[new]);
|
|
|
__state_set(epc, new);
|
|
|
spin_unlock_irqrestore(&epc->lock, flags);
|
|
|
return;
|
|
@@ -236,7 +236,7 @@ static void *alloc_ep(int size, gfp_t gfp)
|
|
|
spin_lock_init(&epc->lock);
|
|
|
init_waitqueue_head(&epc->waitq);
|
|
|
}
|
|
|
- PDBG("%s alloc ep %p\n", __FUNCTION__, epc);
|
|
|
+ PDBG("%s alloc ep %p\n", __func__, epc);
|
|
|
return epc;
|
|
|
}
|
|
|
|
|
@@ -244,13 +244,13 @@ void __free_ep(struct kref *kref)
|
|
|
{
|
|
|
struct iwch_ep_common *epc;
|
|
|
epc = container_of(kref, struct iwch_ep_common, kref);
|
|
|
- PDBG("%s ep %p state %s\n", __FUNCTION__, epc, states[state_read(epc)]);
|
|
|
+ PDBG("%s ep %p state %s\n", __func__, epc, states[state_read(epc)]);
|
|
|
kfree(epc);
|
|
|
}
|
|
|
|
|
|
static void release_ep_resources(struct iwch_ep *ep)
|
|
|
{
|
|
|
- PDBG("%s ep %p tid %d\n", __FUNCTION__, ep, ep->hwtid);
|
|
|
+ PDBG("%s ep %p tid %d\n", __func__, ep, ep->hwtid);
|
|
|
cxgb3_remove_tid(ep->com.tdev, (void *)ep, ep->hwtid);
|
|
|
dst_release(ep->dst);
|
|
|
l2t_release(L2DATA(ep->com.tdev), ep->l2t);
|
|
@@ -349,7 +349,7 @@ static unsigned int find_best_mtu(const struct t3c_data *d, unsigned short mtu)
|
|
|
|
|
|
static void arp_failure_discard(struct t3cdev *dev, struct sk_buff *skb)
|
|
|
{
|
|
|
- PDBG("%s t3cdev %p\n", __FUNCTION__, dev);
|
|
|
+ PDBG("%s t3cdev %p\n", __func__, dev);
|
|
|
kfree_skb(skb);
|
|
|
}
|
|
|
|
|
@@ -370,7 +370,7 @@ static void abort_arp_failure(struct t3cdev *dev, struct sk_buff *skb)
|
|
|
{
|
|
|
struct cpl_abort_req *req = cplhdr(skb);
|
|
|
|
|
|
- PDBG("%s t3cdev %p\n", __FUNCTION__, dev);
|
|
|
+ PDBG("%s t3cdev %p\n", __func__, dev);
|
|
|
req->cmd = CPL_ABORT_NO_RST;
|
|
|
cxgb3_ofld_send(dev, skb);
|
|
|
}
|
|
@@ -380,10 +380,10 @@ static int send_halfclose(struct iwch_ep *ep, gfp_t gfp)
|
|
|
struct cpl_close_con_req *req;
|
|
|
struct sk_buff *skb;
|
|
|
|
|
|
- PDBG("%s ep %p\n", __FUNCTION__, ep);
|
|
|
+ PDBG("%s ep %p\n", __func__, ep);
|
|
|
skb = get_skb(NULL, sizeof(*req), gfp);
|
|
|
if (!skb) {
|
|
|
- printk(KERN_ERR MOD "%s - failed to alloc skb\n", __FUNCTION__);
|
|
|
+ printk(KERN_ERR MOD "%s - failed to alloc skb\n", __func__);
|
|
|
return -ENOMEM;
|
|
|
}
|
|
|
skb->priority = CPL_PRIORITY_DATA;
|
|
@@ -400,11 +400,11 @@ static int send_abort(struct iwch_ep *ep, struct sk_buff *skb, gfp_t gfp)
|
|
|
{
|
|
|
struct cpl_abort_req *req;
|
|
|
|
|
|
- PDBG("%s ep %p\n", __FUNCTION__, ep);
|
|
|
+ PDBG("%s ep %p\n", __func__, ep);
|
|
|
skb = get_skb(skb, sizeof(*req), gfp);
|
|
|
if (!skb) {
|
|
|
printk(KERN_ERR MOD "%s - failed to alloc skb.\n",
|
|
|
- __FUNCTION__);
|
|
|
+ __func__);
|
|
|
return -ENOMEM;
|
|
|
}
|
|
|
skb->priority = CPL_PRIORITY_DATA;
|
|
@@ -426,12 +426,12 @@ static int send_connect(struct iwch_ep *ep)
|
|
|
unsigned int mtu_idx;
|
|
|
int wscale;
|
|
|
|
|
|
- PDBG("%s ep %p\n", __FUNCTION__, ep);
|
|
|
+ PDBG("%s ep %p\n", __func__, ep);
|
|
|
|
|
|
skb = get_skb(NULL, sizeof(*req), GFP_KERNEL);
|
|
|
if (!skb) {
|
|
|
printk(KERN_ERR MOD "%s - failed to alloc skb.\n",
|
|
|
- __FUNCTION__);
|
|
|
+ __func__);
|
|
|
return -ENOMEM;
|
|
|
}
|
|
|
mtu_idx = find_best_mtu(T3C_DATA(ep->com.tdev), dst_mtu(ep->dst));
|
|
@@ -470,7 +470,7 @@ static void send_mpa_req(struct iwch_ep *ep, struct sk_buff *skb)
|
|
|
struct mpa_message *mpa;
|
|
|
int len;
|
|
|
|
|
|
- PDBG("%s ep %p pd_len %d\n", __FUNCTION__, ep, ep->plen);
|
|
|
+ PDBG("%s ep %p pd_len %d\n", __func__, ep, ep->plen);
|
|
|
|
|
|
BUG_ON(skb_cloned(skb));
|
|
|
|
|
@@ -530,13 +530,13 @@ static int send_mpa_reject(struct iwch_ep *ep, const void *pdata, u8 plen)
|
|
|
struct mpa_message *mpa;
|
|
|
struct sk_buff *skb;
|
|
|
|
|
|
- PDBG("%s ep %p plen %d\n", __FUNCTION__, ep, plen);
|
|
|
+ PDBG("%s ep %p plen %d\n", __func__, ep, plen);
|
|
|
|
|
|
mpalen = sizeof(*mpa) + plen;
|
|
|
|
|
|
skb = get_skb(NULL, mpalen + sizeof(*req), GFP_KERNEL);
|
|
|
if (!skb) {
|
|
|
- printk(KERN_ERR MOD "%s - cannot alloc skb!\n", __FUNCTION__);
|
|
|
+ printk(KERN_ERR MOD "%s - cannot alloc skb!\n", __func__);
|
|
|
return -ENOMEM;
|
|
|
}
|
|
|
skb_reserve(skb, sizeof(*req));
|
|
@@ -580,13 +580,13 @@ static int send_mpa_reply(struct iwch_ep *ep, const void *pdata, u8 plen)
|
|
|
int len;
|
|
|
struct sk_buff *skb;
|
|
|
|
|
|
- PDBG("%s ep %p plen %d\n", __FUNCTION__, ep, plen);
|
|
|
+ PDBG("%s ep %p plen %d\n", __func__, ep, plen);
|
|
|
|
|
|
mpalen = sizeof(*mpa) + plen;
|
|
|
|
|
|
skb = get_skb(NULL, mpalen + sizeof(*req), GFP_KERNEL);
|
|
|
if (!skb) {
|
|
|
- printk(KERN_ERR MOD "%s - cannot alloc skb!\n", __FUNCTION__);
|
|
|
+ printk(KERN_ERR MOD "%s - cannot alloc skb!\n", __func__);
|
|
|
return -ENOMEM;
|
|
|
}
|
|
|
skb->priority = CPL_PRIORITY_DATA;
|
|
@@ -630,7 +630,7 @@ static int act_establish(struct t3cdev *tdev, struct sk_buff *skb, void *ctx)
|
|
|
struct cpl_act_establish *req = cplhdr(skb);
|
|
|
unsigned int tid = GET_TID(req);
|
|
|
|
|
|
- PDBG("%s ep %p tid %d\n", __FUNCTION__, ep, tid);
|
|
|
+ PDBG("%s ep %p tid %d\n", __func__, ep, tid);
|
|
|
|
|
|
dst_confirm(ep->dst);
|
|
|
|
|
@@ -663,7 +663,7 @@ static void close_complete_upcall(struct iwch_ep *ep)
|
|
|
{
|
|
|
struct iw_cm_event event;
|
|
|
|
|
|
- PDBG("%s ep %p\n", __FUNCTION__, ep);
|
|
|
+ PDBG("%s ep %p\n", __func__, ep);
|
|
|
memset(&event, 0, sizeof(event));
|
|
|
event.event = IW_CM_EVENT_CLOSE;
|
|
|
if (ep->com.cm_id) {
|
|
@@ -680,7 +680,7 @@ static void peer_close_upcall(struct iwch_ep *ep)
|
|
|
{
|
|
|
struct iw_cm_event event;
|
|
|
|
|
|
- PDBG("%s ep %p\n", __FUNCTION__, ep);
|
|
|
+ PDBG("%s ep %p\n", __func__, ep);
|
|
|
memset(&event, 0, sizeof(event));
|
|
|
event.event = IW_CM_EVENT_DISCONNECT;
|
|
|
if (ep->com.cm_id) {
|
|
@@ -694,7 +694,7 @@ static void peer_abort_upcall(struct iwch_ep *ep)
|
|
|
{
|
|
|
struct iw_cm_event event;
|
|
|
|
|
|
- PDBG("%s ep %p\n", __FUNCTION__, ep);
|
|
|
+ PDBG("%s ep %p\n", __func__, ep);
|
|
|
memset(&event, 0, sizeof(event));
|
|
|
event.event = IW_CM_EVENT_CLOSE;
|
|
|
event.status = -ECONNRESET;
|
|
@@ -712,7 +712,7 @@ static void connect_reply_upcall(struct iwch_ep *ep, int status)
|
|
|
{
|
|
|
struct iw_cm_event event;
|
|
|
|
|
|
- PDBG("%s ep %p status %d\n", __FUNCTION__, ep, status);
|
|
|
+ PDBG("%s ep %p status %d\n", __func__, ep, status);
|
|
|
memset(&event, 0, sizeof(event));
|
|
|
event.event = IW_CM_EVENT_CONNECT_REPLY;
|
|
|
event.status = status;
|
|
@@ -724,7 +724,7 @@ static void connect_reply_upcall(struct iwch_ep *ep, int status)
|
|
|
event.private_data = ep->mpa_pkt + sizeof(struct mpa_message);
|
|
|
}
|
|
|
if (ep->com.cm_id) {
|
|
|
- PDBG("%s ep %p tid %d status %d\n", __FUNCTION__, ep,
|
|
|
+ PDBG("%s ep %p tid %d status %d\n", __func__, ep,
|
|
|
ep->hwtid, status);
|
|
|
ep->com.cm_id->event_handler(ep->com.cm_id, &event);
|
|
|
}
|
|
@@ -739,7 +739,7 @@ static void connect_request_upcall(struct iwch_ep *ep)
|
|
|
{
|
|
|
struct iw_cm_event event;
|
|
|
|
|
|
- PDBG("%s ep %p tid %d\n", __FUNCTION__, ep, ep->hwtid);
|
|
|
+ PDBG("%s ep %p tid %d\n", __func__, ep, ep->hwtid);
|
|
|
memset(&event, 0, sizeof(event));
|
|
|
event.event = IW_CM_EVENT_CONNECT_REQUEST;
|
|
|
event.local_addr = ep->com.local_addr;
|
|
@@ -759,11 +759,11 @@ static void established_upcall(struct iwch_ep *ep)
|
|
|
{
|
|
|
struct iw_cm_event event;
|
|
|
|
|
|
- PDBG("%s ep %p\n", __FUNCTION__, ep);
|
|
|
+ PDBG("%s ep %p\n", __func__, ep);
|
|
|
memset(&event, 0, sizeof(event));
|
|
|
event.event = IW_CM_EVENT_ESTABLISHED;
|
|
|
if (ep->com.cm_id) {
|
|
|
- PDBG("%s ep %p tid %d\n", __FUNCTION__, ep, ep->hwtid);
|
|
|
+ PDBG("%s ep %p tid %d\n", __func__, ep, ep->hwtid);
|
|
|
ep->com.cm_id->event_handler(ep->com.cm_id, &event);
|
|
|
}
|
|
|
}
|
|
@@ -773,7 +773,7 @@ static int update_rx_credits(struct iwch_ep *ep, u32 credits)
|
|
|
struct cpl_rx_data_ack *req;
|
|
|
struct sk_buff *skb;
|
|
|
|
|
|
- PDBG("%s ep %p credits %u\n", __FUNCTION__, ep, credits);
|
|
|
+ PDBG("%s ep %p credits %u\n", __func__, ep, credits);
|
|
|
skb = get_skb(NULL, sizeof(*req), GFP_KERNEL);
|
|
|
if (!skb) {
|
|
|
printk(KERN_ERR MOD "update_rx_credits - cannot alloc skb!\n");
|
|
@@ -797,7 +797,7 @@ static void process_mpa_reply(struct iwch_ep *ep, struct sk_buff *skb)
|
|
|
enum iwch_qp_attr_mask mask;
|
|
|
int err;
|
|
|
|
|
|
- PDBG("%s ep %p\n", __FUNCTION__, ep);
|
|
|
+ PDBG("%s ep %p\n", __func__, ep);
|
|
|
|
|
|
/*
|
|
|
* Stop mpa timer. If it expired, then the state has
|
|
@@ -884,7 +884,7 @@ static void process_mpa_reply(struct iwch_ep *ep, struct sk_buff *skb)
|
|
|
ep->mpa_attr.xmit_marker_enabled = mpa->flags & MPA_MARKERS ? 1 : 0;
|
|
|
ep->mpa_attr.version = mpa_rev;
|
|
|
PDBG("%s - crc_enabled=%d, recv_marker_enabled=%d, "
|
|
|
- "xmit_marker_enabled=%d, version=%d\n", __FUNCTION__,
|
|
|
+ "xmit_marker_enabled=%d, version=%d\n", __func__,
|
|
|
ep->mpa_attr.crc_enabled, ep->mpa_attr.recv_marker_enabled,
|
|
|
ep->mpa_attr.xmit_marker_enabled, ep->mpa_attr.version);
|
|
|
|
|
@@ -915,7 +915,7 @@ static void process_mpa_request(struct iwch_ep *ep, struct sk_buff *skb)
|
|
|
struct mpa_message *mpa;
|
|
|
u16 plen;
|
|
|
|
|
|
- PDBG("%s ep %p\n", __FUNCTION__, ep);
|
|
|
+ PDBG("%s ep %p\n", __func__, ep);
|
|
|
|
|
|
/*
|
|
|
* Stop mpa timer. If it expired, then the state has
|
|
@@ -935,7 +935,7 @@ static void process_mpa_request(struct iwch_ep *ep, struct sk_buff *skb)
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- PDBG("%s enter (%s line %u)\n", __FUNCTION__, __FILE__, __LINE__);
|
|
|
+ PDBG("%s enter (%s line %u)\n", __func__, __FILE__, __LINE__);
|
|
|
|
|
|
/*
|
|
|
* Copy the new data into our accumulation buffer.
|
|
@@ -950,7 +950,7 @@ static void process_mpa_request(struct iwch_ep *ep, struct sk_buff *skb)
|
|
|
*/
|
|
|
if (ep->mpa_pkt_len < sizeof(*mpa))
|
|
|
return;
|
|
|
- PDBG("%s enter (%s line %u)\n", __FUNCTION__, __FILE__, __LINE__);
|
|
|
+ PDBG("%s enter (%s line %u)\n", __func__, __FILE__, __LINE__);
|
|
|
mpa = (struct mpa_message *) ep->mpa_pkt;
|
|
|
|
|
|
/*
|
|
@@ -1000,7 +1000,7 @@ static void process_mpa_request(struct iwch_ep *ep, struct sk_buff *skb)
|
|
|
ep->mpa_attr.xmit_marker_enabled = mpa->flags & MPA_MARKERS ? 1 : 0;
|
|
|
ep->mpa_attr.version = mpa_rev;
|
|
|
PDBG("%s - crc_enabled=%d, recv_marker_enabled=%d, "
|
|
|
- "xmit_marker_enabled=%d, version=%d\n", __FUNCTION__,
|
|
|
+ "xmit_marker_enabled=%d, version=%d\n", __func__,
|
|
|
ep->mpa_attr.crc_enabled, ep->mpa_attr.recv_marker_enabled,
|
|
|
ep->mpa_attr.xmit_marker_enabled, ep->mpa_attr.version);
|
|
|
|
|
@@ -1017,7 +1017,7 @@ static int rx_data(struct t3cdev *tdev, struct sk_buff *skb, void *ctx)
|
|
|
struct cpl_rx_data *hdr = cplhdr(skb);
|
|
|
unsigned int dlen = ntohs(hdr->len);
|
|
|
|
|
|
- PDBG("%s ep %p dlen %u\n", __FUNCTION__, ep, dlen);
|
|
|
+ PDBG("%s ep %p dlen %u\n", __func__, ep, dlen);
|
|
|
|
|
|
skb_pull(skb, sizeof(*hdr));
|
|
|
skb_trim(skb, dlen);
|
|
@@ -1037,7 +1037,7 @@ static int rx_data(struct t3cdev *tdev, struct sk_buff *skb, void *ctx)
|
|
|
default:
|
|
|
printk(KERN_ERR MOD "%s Unexpected streaming data."
|
|
|
" ep %p state %d tid %d\n",
|
|
|
- __FUNCTION__, ep, state_read(&ep->com), ep->hwtid);
|
|
|
+ __func__, ep, state_read(&ep->com), ep->hwtid);
|
|
|
|
|
|
/*
|
|
|
* The ep will timeout and inform the ULP of the failure.
|
|
@@ -1063,7 +1063,7 @@ static int tx_ack(struct t3cdev *tdev, struct sk_buff *skb, void *ctx)
|
|
|
struct cpl_wr_ack *hdr = cplhdr(skb);
|
|
|
unsigned int credits = ntohs(hdr->credits);
|
|
|
|
|
|
- PDBG("%s ep %p credits %u\n", __FUNCTION__, ep, credits);
|
|
|
+ PDBG("%s ep %p credits %u\n", __func__, ep, credits);
|
|
|
|
|
|
if (credits == 0)
|
|
|
return CPL_RET_BUF_DONE;
|
|
@@ -1084,7 +1084,7 @@ static int abort_rpl(struct t3cdev *tdev, struct sk_buff *skb, void *ctx)
|
|
|
{
|
|
|
struct iwch_ep *ep = ctx;
|
|
|
|
|
|
- PDBG("%s ep %p\n", __FUNCTION__, ep);
|
|
|
+ PDBG("%s ep %p\n", __func__, ep);
|
|
|
|
|
|
/*
|
|
|
* We get 2 abort replies from the HW. The first one must
|
|
@@ -1115,7 +1115,7 @@ static int act_open_rpl(struct t3cdev *tdev, struct sk_buff *skb, void *ctx)
|
|
|
struct iwch_ep *ep = ctx;
|
|
|
struct cpl_act_open_rpl *rpl = cplhdr(skb);
|
|
|
|
|
|
- PDBG("%s ep %p status %u errno %d\n", __FUNCTION__, ep, rpl->status,
|
|
|
+ PDBG("%s ep %p status %u errno %d\n", __func__, ep, rpl->status,
|
|
|
status2errno(rpl->status));
|
|
|
connect_reply_upcall(ep, status2errno(rpl->status));
|
|
|
state_set(&ep->com, DEAD);
|
|
@@ -1133,7 +1133,7 @@ static int listen_start(struct iwch_listen_ep *ep)
|
|
|
struct sk_buff *skb;
|
|
|
struct cpl_pass_open_req *req;
|
|
|
|
|
|
- PDBG("%s ep %p\n", __FUNCTION__, ep);
|
|
|
+ PDBG("%s ep %p\n", __func__, ep);
|
|
|
skb = get_skb(NULL, sizeof(*req), GFP_KERNEL);
|
|
|
if (!skb) {
|
|
|
printk(KERN_ERR MOD "t3c_listen_start failed to alloc skb!\n");
|
|
@@ -1162,7 +1162,7 @@ static int pass_open_rpl(struct t3cdev *tdev, struct sk_buff *skb, void *ctx)
|
|
|
struct iwch_listen_ep *ep = ctx;
|
|
|
struct cpl_pass_open_rpl *rpl = cplhdr(skb);
|
|
|
|
|
|
- PDBG("%s ep %p status %d error %d\n", __FUNCTION__, ep,
|
|
|
+ PDBG("%s ep %p status %d error %d\n", __func__, ep,
|
|
|
rpl->status, status2errno(rpl->status));
|
|
|
ep->com.rpl_err = status2errno(rpl->status);
|
|
|
ep->com.rpl_done = 1;
|
|
@@ -1176,10 +1176,10 @@ static int listen_stop(struct iwch_listen_ep *ep)
|
|
|
struct sk_buff *skb;
|
|
|
struct cpl_close_listserv_req *req;
|
|
|
|
|
|
- PDBG("%s ep %p\n", __FUNCTION__, ep);
|
|
|
+ PDBG("%s ep %p\n", __func__, ep);
|
|
|
skb = get_skb(NULL, sizeof(*req), GFP_KERNEL);
|
|
|
if (!skb) {
|
|
|
- printk(KERN_ERR MOD "%s - failed to alloc skb\n", __FUNCTION__);
|
|
|
+ printk(KERN_ERR MOD "%s - failed to alloc skb\n", __func__);
|
|
|
return -ENOMEM;
|
|
|
}
|
|
|
req = (struct cpl_close_listserv_req *) skb_put(skb, sizeof(*req));
|
|
@@ -1197,7 +1197,7 @@ static int close_listsrv_rpl(struct t3cdev *tdev, struct sk_buff *skb,
|
|
|
struct iwch_listen_ep *ep = ctx;
|
|
|
struct cpl_close_listserv_rpl *rpl = cplhdr(skb);
|
|
|
|
|
|
- PDBG("%s ep %p\n", __FUNCTION__, ep);
|
|
|
+ PDBG("%s ep %p\n", __func__, ep);
|
|
|
ep->com.rpl_err = status2errno(rpl->status);
|
|
|
ep->com.rpl_done = 1;
|
|
|
wake_up(&ep->com.waitq);
|
|
@@ -1211,7 +1211,7 @@ static void accept_cr(struct iwch_ep *ep, __be32 peer_ip, struct sk_buff *skb)
|
|
|
u32 opt0h, opt0l, opt2;
|
|
|
int wscale;
|
|
|
|
|
|
- PDBG("%s ep %p\n", __FUNCTION__, ep);
|
|
|
+ PDBG("%s ep %p\n", __func__, ep);
|
|
|
BUG_ON(skb_cloned(skb));
|
|
|
skb_trim(skb, sizeof(*rpl));
|
|
|
skb_get(skb);
|
|
@@ -1244,7 +1244,7 @@ static void accept_cr(struct iwch_ep *ep, __be32 peer_ip, struct sk_buff *skb)
|
|
|
static void reject_cr(struct t3cdev *tdev, u32 hwtid, __be32 peer_ip,
|
|
|
struct sk_buff *skb)
|
|
|
{
|
|
|
- PDBG("%s t3cdev %p tid %u peer_ip %x\n", __FUNCTION__, tdev, hwtid,
|
|
|
+ PDBG("%s t3cdev %p tid %u peer_ip %x\n", __func__, tdev, hwtid,
|
|
|
peer_ip);
|
|
|
BUG_ON(skb_cloned(skb));
|
|
|
skb_trim(skb, sizeof(struct cpl_tid_release));
|
|
@@ -1279,11 +1279,11 @@ static int pass_accept_req(struct t3cdev *tdev, struct sk_buff *skb, void *ctx)
|
|
|
struct rtable *rt;
|
|
|
struct iff_mac tim;
|
|
|
|
|
|
- PDBG("%s parent ep %p tid %u\n", __FUNCTION__, parent_ep, hwtid);
|
|
|
+ PDBG("%s parent ep %p tid %u\n", __func__, parent_ep, hwtid);
|
|
|
|
|
|
if (state_read(&parent_ep->com) != LISTEN) {
|
|
|
printk(KERN_ERR "%s - listening ep not in LISTEN\n",
|
|
|
- __FUNCTION__);
|
|
|
+ __func__);
|
|
|
goto reject;
|
|
|
}
|
|
|
|
|
@@ -1295,7 +1295,7 @@ static int pass_accept_req(struct t3cdev *tdev, struct sk_buff *skb, void *ctx)
|
|
|
if (tdev->ctl(tdev, GET_IFF_FROM_MAC, &tim) < 0 || !tim.dev) {
|
|
|
printk(KERN_ERR
|
|
|
"%s bad dst mac %02x %02x %02x %02x %02x %02x\n",
|
|
|
- __FUNCTION__,
|
|
|
+ __func__,
|
|
|
req->dst_mac[0],
|
|
|
req->dst_mac[1],
|
|
|
req->dst_mac[2],
|
|
@@ -1313,21 +1313,21 @@ static int pass_accept_req(struct t3cdev *tdev, struct sk_buff *skb, void *ctx)
|
|
|
req->peer_port, G_PASS_OPEN_TOS(ntohl(req->tos_tid)));
|
|
|
if (!rt) {
|
|
|
printk(KERN_ERR MOD "%s - failed to find dst entry!\n",
|
|
|
- __FUNCTION__);
|
|
|
+ __func__);
|
|
|
goto reject;
|
|
|
}
|
|
|
dst = &rt->u.dst;
|
|
|
l2t = t3_l2t_get(tdev, dst->neighbour, dst->neighbour->dev);
|
|
|
if (!l2t) {
|
|
|
printk(KERN_ERR MOD "%s - failed to allocate l2t entry!\n",
|
|
|
- __FUNCTION__);
|
|
|
+ __func__);
|
|
|
dst_release(dst);
|
|
|
goto reject;
|
|
|
}
|
|
|
child_ep = alloc_ep(sizeof(*child_ep), GFP_KERNEL);
|
|
|
if (!child_ep) {
|
|
|
printk(KERN_ERR MOD "%s - failed to allocate ep entry!\n",
|
|
|
- __FUNCTION__);
|
|
|
+ __func__);
|
|
|
l2t_release(L2DATA(tdev), l2t);
|
|
|
dst_release(dst);
|
|
|
goto reject;
|
|
@@ -1362,7 +1362,7 @@ static int pass_establish(struct t3cdev *tdev, struct sk_buff *skb, void *ctx)
|
|
|
struct iwch_ep *ep = ctx;
|
|
|
struct cpl_pass_establish *req = cplhdr(skb);
|
|
|
|
|
|
- PDBG("%s ep %p\n", __FUNCTION__, ep);
|
|
|
+ PDBG("%s ep %p\n", __func__, ep);
|
|
|
ep->snd_seq = ntohl(req->snd_isn);
|
|
|
ep->rcv_seq = ntohl(req->rcv_isn);
|
|
|
|
|
@@ -1383,7 +1383,7 @@ static int peer_close(struct t3cdev *tdev, struct sk_buff *skb, void *ctx)
|
|
|
int disconnect = 1;
|
|
|
int release = 0;
|
|
|
|
|
|
- PDBG("%s ep %p\n", __FUNCTION__, ep);
|
|
|
+ PDBG("%s ep %p\n", __func__, ep);
|
|
|
dst_confirm(ep->dst);
|
|
|
|
|
|
spin_lock_irqsave(&ep->com.lock, flags);
|
|
@@ -1473,7 +1473,7 @@ static int peer_abort(struct t3cdev *tdev, struct sk_buff *skb, void *ctx)
|
|
|
int state;
|
|
|
|
|
|
if (is_neg_adv_abort(req->status)) {
|
|
|
- PDBG("%s neg_adv_abort ep %p tid %d\n", __FUNCTION__, ep,
|
|
|
+ PDBG("%s neg_adv_abort ep %p tid %d\n", __func__, ep,
|
|
|
ep->hwtid);
|
|
|
t3_l2t_send_event(ep->com.tdev, ep->l2t);
|
|
|
return CPL_RET_BUF_DONE;
|
|
@@ -1489,7 +1489,7 @@ static int peer_abort(struct t3cdev *tdev, struct sk_buff *skb, void *ctx)
|
|
|
}
|
|
|
|
|
|
state = state_read(&ep->com);
|
|
|
- PDBG("%s ep %p state %u\n", __FUNCTION__, ep, state);
|
|
|
+ PDBG("%s ep %p state %u\n", __func__, ep, state);
|
|
|
switch (state) {
|
|
|
case CONNECTING:
|
|
|
break;
|
|
@@ -1528,14 +1528,14 @@ static int peer_abort(struct t3cdev *tdev, struct sk_buff *skb, void *ctx)
|
|
|
if (ret)
|
|
|
printk(KERN_ERR MOD
|
|
|
"%s - qp <- error failed!\n",
|
|
|
- __FUNCTION__);
|
|
|
+ __func__);
|
|
|
}
|
|
|
peer_abort_upcall(ep);
|
|
|
break;
|
|
|
case ABORTING:
|
|
|
break;
|
|
|
case DEAD:
|
|
|
- PDBG("%s PEER_ABORT IN DEAD STATE!!!!\n", __FUNCTION__);
|
|
|
+ PDBG("%s PEER_ABORT IN DEAD STATE!!!!\n", __func__);
|
|
|
return CPL_RET_BUF_DONE;
|
|
|
default:
|
|
|
BUG_ON(1);
|
|
@@ -1546,7 +1546,7 @@ static int peer_abort(struct t3cdev *tdev, struct sk_buff *skb, void *ctx)
|
|
|
rpl_skb = get_skb(skb, sizeof(*rpl), GFP_KERNEL);
|
|
|
if (!rpl_skb) {
|
|
|
printk(KERN_ERR MOD "%s - cannot allocate skb!\n",
|
|
|
- __FUNCTION__);
|
|
|
+ __func__);
|
|
|
dst_release(ep->dst);
|
|
|
l2t_release(L2DATA(ep->com.tdev), ep->l2t);
|
|
|
put_ep(&ep->com);
|
|
@@ -1573,7 +1573,7 @@ static int close_con_rpl(struct t3cdev *tdev, struct sk_buff *skb, void *ctx)
|
|
|
unsigned long flags;
|
|
|
int release = 0;
|
|
|
|
|
|
- PDBG("%s ep %p\n", __FUNCTION__, ep);
|
|
|
+ PDBG("%s ep %p\n", __func__, ep);
|
|
|
BUG_ON(!ep);
|
|
|
|
|
|
/* The cm_id may be null if we failed to connect */
|
|
@@ -1624,9 +1624,9 @@ static int terminate(struct t3cdev *tdev, struct sk_buff *skb, void *ctx)
|
|
|
{
|
|
|
struct iwch_ep *ep = ctx;
|
|
|
|
|
|
- PDBG("%s ep %p\n", __FUNCTION__, ep);
|
|
|
+ PDBG("%s ep %p\n", __func__, ep);
|
|
|
skb_pull(skb, sizeof(struct cpl_rdma_terminate));
|
|
|
- PDBG("%s saving %d bytes of term msg\n", __FUNCTION__, skb->len);
|
|
|
+ PDBG("%s saving %d bytes of term msg\n", __func__, skb->len);
|
|
|
skb_copy_from_linear_data(skb, ep->com.qp->attr.terminate_buffer,
|
|
|
skb->len);
|
|
|
ep->com.qp->attr.terminate_msg_len = skb->len;
|
|
@@ -1639,13 +1639,13 @@ static int ec_status(struct t3cdev *tdev, struct sk_buff *skb, void *ctx)
|
|
|
struct cpl_rdma_ec_status *rep = cplhdr(skb);
|
|
|
struct iwch_ep *ep = ctx;
|
|
|
|
|
|
- PDBG("%s ep %p tid %u status %d\n", __FUNCTION__, ep, ep->hwtid,
|
|
|
+ PDBG("%s ep %p tid %u status %d\n", __func__, ep, ep->hwtid,
|
|
|
rep->status);
|
|
|
if (rep->status) {
|
|
|
struct iwch_qp_attributes attrs;
|
|
|
|
|
|
printk(KERN_ERR MOD "%s BAD CLOSE - Aborting tid %u\n",
|
|
|
- __FUNCTION__, ep->hwtid);
|
|
|
+ __func__, ep->hwtid);
|
|
|
stop_ep_timer(ep);
|
|
|
attrs.next_state = IWCH_QP_STATE_ERROR;
|
|
|
iwch_modify_qp(ep->com.qp->rhp,
|
|
@@ -1663,7 +1663,7 @@ static void ep_timeout(unsigned long arg)
|
|
|
unsigned long flags;
|
|
|
|
|
|
spin_lock_irqsave(&ep->com.lock, flags);
|
|
|
- PDBG("%s ep %p tid %u state %d\n", __FUNCTION__, ep, ep->hwtid,
|
|
|
+ PDBG("%s ep %p tid %u state %d\n", __func__, ep, ep->hwtid,
|
|
|
ep->com.state);
|
|
|
switch (ep->com.state) {
|
|
|
case MPA_REQ_SENT:
|
|
@@ -1693,7 +1693,7 @@ int iwch_reject_cr(struct iw_cm_id *cm_id, const void *pdata, u8 pdata_len)
|
|
|
{
|
|
|
int err;
|
|
|
struct iwch_ep *ep = to_ep(cm_id);
|
|
|
- PDBG("%s ep %p tid %u\n", __FUNCTION__, ep, ep->hwtid);
|
|
|
+ PDBG("%s ep %p tid %u\n", __func__, ep, ep->hwtid);
|
|
|
|
|
|
if (state_read(&ep->com) == DEAD) {
|
|
|
put_ep(&ep->com);
|
|
@@ -1718,7 +1718,7 @@ int iwch_accept_cr(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
|
|
|
struct iwch_dev *h = to_iwch_dev(cm_id->device);
|
|
|
struct iwch_qp *qp = get_qhp(h, conn_param->qpn);
|
|
|
|
|
|
- PDBG("%s ep %p tid %u\n", __FUNCTION__, ep, ep->hwtid);
|
|
|
+ PDBG("%s ep %p tid %u\n", __func__, ep, ep->hwtid);
|
|
|
if (state_read(&ep->com) == DEAD)
|
|
|
return -ECONNRESET;
|
|
|
|
|
@@ -1739,7 +1739,7 @@ int iwch_accept_cr(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
|
|
|
ep->com.rpl_err = 0;
|
|
|
ep->ird = conn_param->ird;
|
|
|
ep->ord = conn_param->ord;
|
|
|
- PDBG("%s %d ird %d ord %d\n", __FUNCTION__, __LINE__, ep->ird, ep->ord);
|
|
|
+ PDBG("%s %d ird %d ord %d\n", __func__, __LINE__, ep->ird, ep->ord);
|
|
|
|
|
|
get_ep(&ep->com);
|
|
|
|
|
@@ -1810,7 +1810,7 @@ int iwch_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
|
|
|
|
|
|
ep = alloc_ep(sizeof(*ep), GFP_KERNEL);
|
|
|
if (!ep) {
|
|
|
- printk(KERN_ERR MOD "%s - cannot alloc ep.\n", __FUNCTION__);
|
|
|
+ printk(KERN_ERR MOD "%s - cannot alloc ep.\n", __func__);
|
|
|
err = -ENOMEM;
|
|
|
goto out;
|
|
|
}
|
|
@@ -1827,7 +1827,7 @@ int iwch_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
|
|
|
ep->com.cm_id = cm_id;
|
|
|
ep->com.qp = get_qhp(h, conn_param->qpn);
|
|
|
BUG_ON(!ep->com.qp);
|
|
|
- PDBG("%s qpn 0x%x qp %p cm_id %p\n", __FUNCTION__, conn_param->qpn,
|
|
|
+ PDBG("%s qpn 0x%x qp %p cm_id %p\n", __func__, conn_param->qpn,
|
|
|
ep->com.qp, cm_id);
|
|
|
|
|
|
/*
|
|
@@ -1835,7 +1835,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);
|
|
|
if (ep->atid == -1) {
|
|
|
- printk(KERN_ERR MOD "%s - cannot alloc atid.\n", __FUNCTION__);
|
|
|
+ printk(KERN_ERR MOD "%s - cannot alloc atid.\n", __func__);
|
|
|
err = -ENOMEM;
|
|
|
goto fail2;
|
|
|
}
|
|
@@ -1847,7 +1847,7 @@ int iwch_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
|
|
|
cm_id->local_addr.sin_port,
|
|
|
cm_id->remote_addr.sin_port, IPTOS_LOWDELAY);
|
|
|
if (!rt) {
|
|
|
- printk(KERN_ERR MOD "%s - cannot find route.\n", __FUNCTION__);
|
|
|
+ printk(KERN_ERR MOD "%s - cannot find route.\n", __func__);
|
|
|
err = -EHOSTUNREACH;
|
|
|
goto fail3;
|
|
|
}
|
|
@@ -1857,7 +1857,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->neighbour,
|
|
|
ep->dst->neighbour->dev);
|
|
|
if (!ep->l2t) {
|
|
|
- printk(KERN_ERR MOD "%s - cannot alloc l2e.\n", __FUNCTION__);
|
|
|
+ printk(KERN_ERR MOD "%s - cannot alloc l2e.\n", __func__);
|
|
|
err = -ENOMEM;
|
|
|
goto fail4;
|
|
|
}
|
|
@@ -1894,11 +1894,11 @@ int iwch_create_listen(struct iw_cm_id *cm_id, int backlog)
|
|
|
|
|
|
ep = alloc_ep(sizeof(*ep), GFP_KERNEL);
|
|
|
if (!ep) {
|
|
|
- printk(KERN_ERR MOD "%s - cannot alloc ep.\n", __FUNCTION__);
|
|
|
+ printk(KERN_ERR MOD "%s - cannot alloc ep.\n", __func__);
|
|
|
err = -ENOMEM;
|
|
|
goto fail1;
|
|
|
}
|
|
|
- PDBG("%s ep %p\n", __FUNCTION__, ep);
|
|
|
+ PDBG("%s ep %p\n", __func__, ep);
|
|
|
ep->com.tdev = h->rdev.t3cdev_p;
|
|
|
cm_id->add_ref(cm_id);
|
|
|
ep->com.cm_id = cm_id;
|
|
@@ -1910,7 +1910,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);
|
|
|
if (ep->stid == -1) {
|
|
|
- printk(KERN_ERR MOD "%s - cannot alloc atid.\n", __FUNCTION__);
|
|
|
+ printk(KERN_ERR MOD "%s - cannot alloc atid.\n", __func__);
|
|
|
err = -ENOMEM;
|
|
|
goto fail2;
|
|
|
}
|
|
@@ -1942,7 +1942,7 @@ int iwch_destroy_listen(struct iw_cm_id *cm_id)
|
|
|
int err;
|
|
|
struct iwch_listen_ep *ep = to_listen_ep(cm_id);
|
|
|
|
|
|
- PDBG("%s ep %p\n", __FUNCTION__, ep);
|
|
|
+ PDBG("%s ep %p\n", __func__, ep);
|
|
|
|
|
|
might_sleep();
|
|
|
state_set(&ep->com, DEAD);
|
|
@@ -1965,11 +1965,11 @@ int iwch_ep_disconnect(struct iwch_ep *ep, int abrupt, gfp_t gfp)
|
|
|
|
|
|
spin_lock_irqsave(&ep->com.lock, flags);
|
|
|
|
|
|
- PDBG("%s ep %p state %s, abrupt %d\n", __FUNCTION__, ep,
|
|
|
+ PDBG("%s ep %p state %s, abrupt %d\n", __func__, ep,
|
|
|
states[ep->com.state], abrupt);
|
|
|
|
|
|
if (ep->com.state == DEAD) {
|
|
|
- PDBG("%s already dead ep %p\n", __FUNCTION__, ep);
|
|
|
+ PDBG("%s already dead ep %p\n", __func__, ep);
|
|
|
goto out;
|
|
|
}
|
|
|
|
|
@@ -2020,7 +2020,7 @@ int iwch_ep_redirect(void *ctx, struct dst_entry *old, struct dst_entry *new,
|
|
|
if (ep->dst != old)
|
|
|
return 0;
|
|
|
|
|
|
- PDBG("%s ep %p redirect to dst %p l2t %p\n", __FUNCTION__, ep, new,
|
|
|
+ PDBG("%s ep %p redirect to dst %p l2t %p\n", __func__, ep, new,
|
|
|
l2t);
|
|
|
dst_hold(new);
|
|
|
l2t_release(L2DATA(ep->com.tdev), ep->l2t);
|