diff options
Diffstat (limited to 'drivers/infiniband/hw/nes/nes_cm.c')
-rw-r--r-- | drivers/infiniband/hw/nes/nes_cm.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c index 6ba57e91d7ab..a01b4488208b 100644 --- a/drivers/infiniband/hw/nes/nes_cm.c +++ b/drivers/infiniband/hw/nes/nes_cm.c | |||
@@ -778,12 +778,13 @@ static struct nes_cm_node *find_node(struct nes_cm_core *cm_core, | |||
778 | unsigned long flags; | 778 | unsigned long flags; |
779 | struct list_head *hte; | 779 | struct list_head *hte; |
780 | struct nes_cm_node *cm_node; | 780 | struct nes_cm_node *cm_node; |
781 | __be32 tmp_addr = cpu_to_be32(loc_addr); | ||
781 | 782 | ||
782 | /* get a handle on the hte */ | 783 | /* get a handle on the hte */ |
783 | hte = &cm_core->connected_nodes; | 784 | hte = &cm_core->connected_nodes; |
784 | 785 | ||
785 | nes_debug(NES_DBG_CM, "Searching for an owner node: %pI4:%x from core %p->%p\n", | 786 | nes_debug(NES_DBG_CM, "Searching for an owner node: %pI4:%x from core %p->%p\n", |
786 | &loc_addr, loc_port, cm_core, hte); | 787 | &tmp_addr, loc_port, cm_core, hte); |
787 | 788 | ||
788 | /* walk list and find cm_node associated with this session ID */ | 789 | /* walk list and find cm_node associated with this session ID */ |
789 | spin_lock_irqsave(&cm_core->ht_lock, flags); | 790 | spin_lock_irqsave(&cm_core->ht_lock, flags); |
@@ -816,6 +817,7 @@ static struct nes_cm_listener *find_listener(struct nes_cm_core *cm_core, | |||
816 | { | 817 | { |
817 | unsigned long flags; | 818 | unsigned long flags; |
818 | struct nes_cm_listener *listen_node; | 819 | struct nes_cm_listener *listen_node; |
820 | __be32 tmp_addr = cpu_to_be32(dst_addr); | ||
819 | 821 | ||
820 | /* walk list and find cm_node associated with this session ID */ | 822 | /* walk list and find cm_node associated with this session ID */ |
821 | spin_lock_irqsave(&cm_core->listen_list_lock, flags); | 823 | spin_lock_irqsave(&cm_core->listen_list_lock, flags); |
@@ -833,7 +835,7 @@ static struct nes_cm_listener *find_listener(struct nes_cm_core *cm_core, | |||
833 | spin_unlock_irqrestore(&cm_core->listen_list_lock, flags); | 835 | spin_unlock_irqrestore(&cm_core->listen_list_lock, flags); |
834 | 836 | ||
835 | nes_debug(NES_DBG_CM, "Unable to find listener for %pI4:%x\n", | 837 | nes_debug(NES_DBG_CM, "Unable to find listener for %pI4:%x\n", |
836 | &dst_addr, dst_port); | 838 | &tmp_addr, dst_port); |
837 | 839 | ||
838 | /* no listener */ | 840 | /* no listener */ |
839 | return NULL; | 841 | return NULL; |
@@ -2059,6 +2061,7 @@ static int mini_cm_recv_pkt(struct nes_cm_core *cm_core, | |||
2059 | struct tcphdr *tcph; | 2061 | struct tcphdr *tcph; |
2060 | struct nes_cm_info nfo; | 2062 | struct nes_cm_info nfo; |
2061 | int skb_handled = 1; | 2063 | int skb_handled = 1; |
2064 | __be32 tmp_daddr, tmp_saddr; | ||
2062 | 2065 | ||
2063 | if (!skb) | 2066 | if (!skb) |
2064 | return 0; | 2067 | return 0; |
@@ -2074,8 +2077,11 @@ static int mini_cm_recv_pkt(struct nes_cm_core *cm_core, | |||
2074 | nfo.rem_addr = ntohl(iph->saddr); | 2077 | nfo.rem_addr = ntohl(iph->saddr); |
2075 | nfo.rem_port = ntohs(tcph->source); | 2078 | nfo.rem_port = ntohs(tcph->source); |
2076 | 2079 | ||
2080 | tmp_daddr = cpu_to_be32(iph->daddr); | ||
2081 | tmp_saddr = cpu_to_be32(iph->saddr); | ||
2082 | |||
2077 | nes_debug(NES_DBG_CM, "Received packet: dest=%pI4:0x%04X src=%pI4:0x%04X\n", | 2083 | nes_debug(NES_DBG_CM, "Received packet: dest=%pI4:0x%04X src=%pI4:0x%04X\n", |
2078 | &iph->daddr, tcph->dest, &iph->saddr, tcph->source); | 2084 | &tmp_daddr, tcph->dest, &tmp_saddr, tcph->source); |
2079 | 2085 | ||
2080 | do { | 2086 | do { |
2081 | cm_node = find_node(cm_core, | 2087 | cm_node = find_node(cm_core, |