diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-12-28 15:49:40 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-12-28 15:49:40 -0500 |
commit | 0191b625ca5a46206d2fb862bb08f36f2fcb3b31 (patch) | |
tree | 454d1842b1833d976da62abcbd5c47521ebe9bd7 /drivers/infiniband/hw/nes/nes_cm.c | |
parent | 54a696bd07c14d3b1192d03ce7269bc59b45209a (diff) | |
parent | eb56092fc168bf5af199d47af50c0d84a96db898 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1429 commits)
net: Allow dependancies of FDDI & Tokenring to be modular.
igb: Fix build warning when DCA is disabled.
net: Fix warning fallout from recent NAPI interface changes.
gro: Fix potential use after free
sfc: If AN is enabled, always read speed/duplex from the AN advertising bits
sfc: When disabling the NIC, close the device rather than unregistering it
sfc: SFT9001: Add cable diagnostics
sfc: Add support for multiple PHY self-tests
sfc: Merge top-level functions for self-tests
sfc: Clean up PHY mode management in loopback self-test
sfc: Fix unreliable link detection in some loopback modes
sfc: Generate unique names for per-NIC workqueues
802.3ad: use standard ethhdr instead of ad_header
802.3ad: generalize out mac address initializer
802.3ad: initialize ports LACPDU from const initializer
802.3ad: remove typedef around ad_system
802.3ad: turn ports is_individual into a bool
802.3ad: turn ports is_enabled into a bool
802.3ad: make ntt bool
ixgbe: Fix set_ringparam in ixgbe to use the same memory pools.
...
Fixed trivial IPv4/6 address printing conflicts in fs/cifs/connect.c due
to the conversion to %pI (in this networking merge) and the addition of
doing IPv6 addresses (from the earlier merge of CIFS).
Diffstat (limited to 'drivers/infiniband/hw/nes/nes_cm.c')
-rw-r--r-- | drivers/infiniband/hw/nes/nes_cm.c | 31 |
1 files changed, 13 insertions, 18 deletions
diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c index cb48041bed69..a812db243477 100644 --- a/drivers/infiniband/hw/nes/nes_cm.c +++ b/drivers/infiniband/hw/nes/nes_cm.c | |||
@@ -782,8 +782,8 @@ static struct nes_cm_node *find_node(struct nes_cm_core *cm_core, | |||
782 | /* get a handle on the hte */ | 782 | /* get a handle on the hte */ |
783 | hte = &cm_core->connected_nodes; | 783 | hte = &cm_core->connected_nodes; |
784 | 784 | ||
785 | nes_debug(NES_DBG_CM, "Searching for an owner node: " NIPQUAD_FMT ":%x from core %p->%p\n", | 785 | nes_debug(NES_DBG_CM, "Searching for an owner node: %pI4:%x from core %p->%p\n", |
786 | HIPQUAD(loc_addr), loc_port, cm_core, hte); | 786 | &loc_addr, loc_port, cm_core, hte); |
787 | 787 | ||
788 | /* walk list and find cm_node associated with this session ID */ | 788 | /* walk list and find cm_node associated with this session ID */ |
789 | spin_lock_irqsave(&cm_core->ht_lock, flags); | 789 | spin_lock_irqsave(&cm_core->ht_lock, flags); |
@@ -832,8 +832,8 @@ static struct nes_cm_listener *find_listener(struct nes_cm_core *cm_core, | |||
832 | } | 832 | } |
833 | spin_unlock_irqrestore(&cm_core->listen_list_lock, flags); | 833 | spin_unlock_irqrestore(&cm_core->listen_list_lock, flags); |
834 | 834 | ||
835 | nes_debug(NES_DBG_CM, "Unable to find listener for " NIPQUAD_FMT ":%x\n", | 835 | nes_debug(NES_DBG_CM, "Unable to find listener for %pI4:%x\n", |
836 | HIPQUAD(dst_addr), dst_port); | 836 | &dst_addr, dst_port); |
837 | 837 | ||
838 | /* no listener */ | 838 | /* no listener */ |
839 | return NULL; | 839 | return NULL; |
@@ -988,7 +988,6 @@ static int nes_addr_resolve_neigh(struct nes_vnic *nesvnic, u32 dst_ip) | |||
988 | struct flowi fl; | 988 | struct flowi fl; |
989 | struct neighbour *neigh; | 989 | struct neighbour *neigh; |
990 | int rc = -1; | 990 | int rc = -1; |
991 | DECLARE_MAC_BUF(mac); | ||
992 | 991 | ||
993 | memset(&fl, 0, sizeof fl); | 992 | memset(&fl, 0, sizeof fl); |
994 | fl.nl_u.ip4_u.daddr = htonl(dst_ip); | 993 | fl.nl_u.ip4_u.daddr = htonl(dst_ip); |
@@ -1002,8 +1001,8 @@ static int nes_addr_resolve_neigh(struct nes_vnic *nesvnic, u32 dst_ip) | |||
1002 | if (neigh) { | 1001 | if (neigh) { |
1003 | if (neigh->nud_state & NUD_VALID) { | 1002 | if (neigh->nud_state & NUD_VALID) { |
1004 | nes_debug(NES_DBG_CM, "Neighbor MAC address for 0x%08X" | 1003 | nes_debug(NES_DBG_CM, "Neighbor MAC address for 0x%08X" |
1005 | " is %s, Gateway is 0x%08X \n", dst_ip, | 1004 | " is %pM, Gateway is 0x%08X \n", dst_ip, |
1006 | print_mac(mac, neigh->ha), ntohl(rt->rt_gateway)); | 1005 | neigh->ha, ntohl(rt->rt_gateway)); |
1007 | nes_manage_arp_cache(nesvnic->netdev, neigh->ha, | 1006 | nes_manage_arp_cache(nesvnic->netdev, neigh->ha, |
1008 | dst_ip, NES_ARP_ADD); | 1007 | dst_ip, NES_ARP_ADD); |
1009 | rc = nes_arp_table(nesvnic->nesdev, dst_ip, NULL, | 1008 | rc = nes_arp_table(nesvnic->nesdev, dst_ip, NULL, |
@@ -1032,7 +1031,6 @@ static struct nes_cm_node *make_cm_node(struct nes_cm_core *cm_core, | |||
1032 | int arpindex = 0; | 1031 | int arpindex = 0; |
1033 | struct nes_device *nesdev; | 1032 | struct nes_device *nesdev; |
1034 | struct nes_adapter *nesadapter; | 1033 | struct nes_adapter *nesadapter; |
1035 | DECLARE_MAC_BUF(mac); | ||
1036 | 1034 | ||
1037 | /* create an hte and cm_node for this instance */ | 1035 | /* create an hte and cm_node for this instance */ |
1038 | cm_node = kzalloc(sizeof(*cm_node), GFP_ATOMIC); | 1036 | cm_node = kzalloc(sizeof(*cm_node), GFP_ATOMIC); |
@@ -1045,10 +1043,9 @@ static struct nes_cm_node *make_cm_node(struct nes_cm_core *cm_core, | |||
1045 | cm_node->loc_port = cm_info->loc_port; | 1043 | cm_node->loc_port = cm_info->loc_port; |
1046 | cm_node->rem_port = cm_info->rem_port; | 1044 | cm_node->rem_port = cm_info->rem_port; |
1047 | cm_node->send_write0 = send_first; | 1045 | cm_node->send_write0 = send_first; |
1048 | nes_debug(NES_DBG_CM, "Make node addresses : loc = " NIPQUAD_FMT | 1046 | nes_debug(NES_DBG_CM, "Make node addresses : loc = %pI4:%x, rem = %pI4:%x\n", |
1049 | ":%x, rem = " NIPQUAD_FMT ":%x\n", | 1047 | &cm_node->loc_addr, cm_node->loc_port, |
1050 | HIPQUAD(cm_node->loc_addr), cm_node->loc_port, | 1048 | &cm_node->rem_addr, cm_node->rem_port); |
1051 | HIPQUAD(cm_node->rem_addr), cm_node->rem_port); | ||
1052 | cm_node->listener = listener; | 1049 | cm_node->listener = listener; |
1053 | cm_node->netdev = nesvnic->netdev; | 1050 | cm_node->netdev = nesvnic->netdev; |
1054 | cm_node->cm_id = cm_info->cm_id; | 1051 | cm_node->cm_id = cm_info->cm_id; |
@@ -1101,8 +1098,8 @@ static struct nes_cm_node *make_cm_node(struct nes_cm_core *cm_core, | |||
1101 | 1098 | ||
1102 | /* copy the mac addr to node context */ | 1099 | /* copy the mac addr to node context */ |
1103 | memcpy(cm_node->rem_mac, nesadapter->arp_table[arpindex].mac_addr, ETH_ALEN); | 1100 | memcpy(cm_node->rem_mac, nesadapter->arp_table[arpindex].mac_addr, ETH_ALEN); |
1104 | nes_debug(NES_DBG_CM, "Remote mac addr from arp table: %s\n", | 1101 | nes_debug(NES_DBG_CM, "Remote mac addr from arp table: %pM\n", |
1105 | print_mac(mac, cm_node->rem_mac)); | 1102 | cm_node->rem_mac); |
1106 | 1103 | ||
1107 | add_hte_node(cm_core, cm_node); | 1104 | add_hte_node(cm_core, cm_node); |
1108 | atomic_inc(&cm_nodes_created); | 1105 | atomic_inc(&cm_nodes_created); |
@@ -2077,10 +2074,8 @@ static int mini_cm_recv_pkt(struct nes_cm_core *cm_core, | |||
2077 | nfo.rem_addr = ntohl(iph->saddr); | 2074 | nfo.rem_addr = ntohl(iph->saddr); |
2078 | nfo.rem_port = ntohs(tcph->source); | 2075 | nfo.rem_port = ntohs(tcph->source); |
2079 | 2076 | ||
2080 | nes_debug(NES_DBG_CM, "Received packet: dest=" NIPQUAD_FMT | 2077 | nes_debug(NES_DBG_CM, "Received packet: dest=%pI4:0x%04X src=%pI4:0x%04X\n", |
2081 | ":0x%04X src=" NIPQUAD_FMT ":0x%04X\n", | 2078 | &iph->daddr, tcph->dest, &iph->saddr, tcph->source); |
2082 | NIPQUAD(iph->daddr), tcph->dest, | ||
2083 | NIPQUAD(iph->saddr), tcph->source); | ||
2084 | 2079 | ||
2085 | do { | 2080 | do { |
2086 | cm_node = find_node(cm_core, | 2081 | cm_node = find_node(cm_core, |