]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/infiniband/hw/nes/nes_cm.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg...
[linux-2.6-omap-h63xx.git] / drivers / infiniband / hw / nes / nes_cm.c
index d0738623bcf3529ecbef5ae6f64f8f7037720e33..6aa531d5276dfd969114d07ebcc4c871e611e79d 100644 (file)
@@ -594,7 +594,7 @@ static void nes_cm_timer_tick(unsigned long pass)
                                continue;
                        }
                        /* this seems like the correct place, but leave send entry unprotected */
-                       // spin_unlock_irqrestore(&cm_node->retrans_list_lock, flags);
+                       /* spin_unlock_irqrestore(&cm_node->retrans_list_lock, flags); */
                        atomic_inc(&send_entry->skb->users);
                        cm_packets_retrans++;
                        nes_debug(NES_DBG_CM, "Retransmitting send_entry %p for node %p,"
@@ -852,8 +852,8 @@ static struct nes_cm_node *find_node(struct nes_cm_core *cm_core,
        /* get a handle on the hte */
        hte = &cm_core->connected_nodes;
 
-       nes_debug(NES_DBG_CM, "Searching for an owner node:%x:%x from core %p->%p\n",
-                       loc_addr, loc_port, cm_core, hte);
+       nes_debug(NES_DBG_CM, "Searching for an owner node: " NIPQUAD_FMT ":%x from core %p->%p\n",
+                 HIPQUAD(loc_addr), loc_port, cm_core, hte);
 
        /* walk list and find cm_node associated with this session ID */
        spin_lock_irqsave(&cm_core->ht_lock, flags);
@@ -902,8 +902,8 @@ static struct nes_cm_listener *find_listener(struct nes_cm_core *cm_core,
        }
        spin_unlock_irqrestore(&cm_core->listen_list_lock, flags);
 
-       nes_debug(NES_DBG_CM, "Unable to find listener- %x:%x\n",
-                       dst_addr, dst_port);
+       nes_debug(NES_DBG_CM, "Unable to find listener for " NIPQUAD_FMT ":%x\n",
+                 HIPQUAD(dst_addr), dst_port);
 
        /* no listener */
        return NULL;
@@ -1054,6 +1054,7 @@ static struct nes_cm_node *make_cm_node(struct nes_cm_core *cm_core,
        int arpindex = 0;
        struct nes_device *nesdev;
        struct nes_adapter *nesadapter;
+       DECLARE_MAC_BUF(mac);
 
        /* create an hte and cm_node for this instance */
        cm_node = kzalloc(sizeof(*cm_node), GFP_ATOMIC);
@@ -1066,8 +1067,9 @@ static struct nes_cm_node *make_cm_node(struct nes_cm_core *cm_core,
        cm_node->loc_port = cm_info->loc_port;
        cm_node->rem_port = cm_info->rem_port;
        cm_node->send_write0 = send_first;
-       nes_debug(NES_DBG_CM, "Make node addresses : loc = %x:%x, rem = %x:%x\n",
-                       cm_node->loc_addr, cm_node->loc_port, cm_node->rem_addr, cm_node->rem_port);
+       nes_debug(NES_DBG_CM, "Make node addresses : loc = " NIPQUAD_FMT ":%x, rem = " NIPQUAD_FMT ":%x\n",
+                 HIPQUAD(cm_node->loc_addr), cm_node->loc_port,
+                 HIPQUAD(cm_node->rem_addr), cm_node->rem_port);
        cm_node->listener = listener;
        cm_node->netdev = nesvnic->netdev;
        cm_node->cm_id = cm_info->cm_id;
@@ -1116,11 +1118,8 @@ static struct nes_cm_node *make_cm_node(struct nes_cm_core *cm_core,
 
        /* copy the mac addr to node context */
        memcpy(cm_node->rem_mac, nesadapter->arp_table[arpindex].mac_addr, ETH_ALEN);
-       nes_debug(NES_DBG_CM, "Remote mac addr from arp table:%02x,"
-                       " %02x, %02x, %02x, %02x, %02x\n",
-                       cm_node->rem_mac[0], cm_node->rem_mac[1],
-                       cm_node->rem_mac[2], cm_node->rem_mac[3],
-                       cm_node->rem_mac[4], cm_node->rem_mac[5]);
+       nes_debug(NES_DBG_CM, "Remote mac addr from arp table: %s\n",
+                 print_mac(mac, cm_node->rem_mac));
 
        add_hte_node(cm_core, cm_node);
        atomic_inc(&cm_nodes_created);
@@ -1336,7 +1335,7 @@ static int process_packet(struct nes_cm_node *cm_node, struct sk_buff *skb,
                                                        cm_node->loc_addr, cm_node->loc_port,
                                                        cm_node->rem_addr, cm_node->rem_port,
                                                        cm_node->state, atomic_read(&cm_node->ref_count));
-                               // create event
+                               /* create event */
                                cm_node->state = NES_CM_STATE_CLOSED;
 
                                create_event(cm_node, NES_CM_EVENT_ABORTED);
@@ -1604,7 +1603,6 @@ static struct nes_cm_listener *mini_cm_listen(struct nes_cm_core *cm_core,
                        return NULL;
                }
 
-               memset(listener, 0, sizeof(struct nes_cm_listener));
                listener->loc_addr = htonl(cm_info->loc_addr);
                listener->loc_port = htons(cm_info->loc_port);
                listener->reused_node = 0;
@@ -1670,7 +1668,7 @@ static struct nes_cm_node *mini_cm_connect(struct nes_cm_core *cm_core,
        if (!cm_node)
                return NULL;
 
-       // set our node side to client (active) side
+       /* set our node side to client (active) side */
        cm_node->tcp_cntxt.client = 1;
        cm_node->tcp_cntxt.rcv_wscale = NES_CM_DEFAULT_RCV_WND_SCALE;
 
@@ -1695,7 +1693,7 @@ static struct nes_cm_node *mini_cm_connect(struct nes_cm_core *cm_core,
                        loopbackremotenode->mpa_frame_size = mpa_frame_size -
                                        sizeof(struct ietf_mpa_frame);
 
-                       // we are done handling this state, set node to a TSA state
+                       /* we are done handling this state, set node to a TSA state */
                        cm_node->state = NES_CM_STATE_TSA;
                        cm_node->tcp_cntxt.rcv_nxt = loopbackremotenode->tcp_cntxt.loc_seq_num;
                        loopbackremotenode->tcp_cntxt.rcv_nxt = cm_node->tcp_cntxt.loc_seq_num;
@@ -1850,8 +1848,10 @@ static int mini_cm_recv_pkt(struct nes_cm_core *cm_core, struct nes_vnic *nesvni
        nfo.rem_addr = ntohl(iph->saddr);
        nfo.rem_port = ntohs(tcph->source);
 
-       nes_debug(NES_DBG_CM, "Received packet: dest=0x%08X:0x%04X src=0x%08X:0x%04X\n",
-                       iph->daddr, tcph->dest, iph->saddr, tcph->source);
+       nes_debug(NES_DBG_CM, "Received packet: dest=" NIPQUAD_FMT
+                 ":0x%04X src=" NIPQUAD_FMT ":0x%04X\n",
+                 NIPQUAD(iph->daddr), tcph->dest,
+                 NIPQUAD(iph->saddr), tcph->source);
 
        /* note: this call is going to increment cm_node ref count */
        cm_node = find_node(cm_core,