Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 157373
b: refs/heads/master
c: 6276e08
h: refs/heads/master
i:
  157371: 943d883
v: v3
  • Loading branch information
Roland Dreier committed Sep 6, 2009
1 parent e1ee1de commit 3ee00ab
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 41 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5e47596bee12597824a3b5b21e20f80b61e58a35
refs/heads/master: 6276e08a9bdf645b71a092fb4530baf4f6c4c6eb
6 changes: 1 addition & 5 deletions trunk/drivers/infiniband/core/mad.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ static struct list_head ib_mad_port_list;
static u32 ib_mad_client_id = 0;

/* Port list lock */
static spinlock_t ib_mad_port_list_lock;

static DEFINE_SPINLOCK(ib_mad_port_list_lock);

/* Forward declarations */
static int method_in_use(struct ib_mad_mgmt_method_table **method,
Expand Down Expand Up @@ -2984,8 +2983,6 @@ static int __init ib_mad_init_module(void)
{
int ret;

spin_lock_init(&ib_mad_port_list_lock);

ib_mad_cache = kmem_cache_create("ib_mad",
sizeof(struct ib_mad_private),
0,
Expand Down Expand Up @@ -3021,4 +3018,3 @@ static void __exit ib_mad_cleanup_module(void)

module_init(ib_mad_init_module);
module_exit(ib_mad_cleanup_module);

7 changes: 2 additions & 5 deletions trunk/drivers/infiniband/core/sa_query.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,10 @@ static struct ib_client sa_client = {
.remove = ib_sa_remove_one
};

static spinlock_t idr_lock;
static DEFINE_SPINLOCK(idr_lock);
static DEFINE_IDR(query_idr);

static spinlock_t tid_lock;
static DEFINE_SPINLOCK(tid_lock);
static u32 tid;

#define PATH_REC_FIELD(field) \
Expand Down Expand Up @@ -1077,9 +1077,6 @@ static int __init ib_sa_init(void)
{
int ret;

spin_lock_init(&idr_lock);
spin_lock_init(&tid_lock);

get_random_bytes(&tid, sizeof tid);

ret = ib_register_client(&sa_client);
Expand Down
4 changes: 1 addition & 3 deletions trunk/drivers/infiniband/core/uverbs_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ DEFINE_IDR(ib_uverbs_cq_idr);
DEFINE_IDR(ib_uverbs_qp_idr);
DEFINE_IDR(ib_uverbs_srq_idr);

static spinlock_t map_lock;
static DEFINE_SPINLOCK(map_lock);
static struct ib_uverbs_device *dev_table[IB_UVERBS_MAX_DEVICES];
static DECLARE_BITMAP(dev_map, IB_UVERBS_MAX_DEVICES);

Expand Down Expand Up @@ -836,8 +836,6 @@ static int __init ib_uverbs_init(void)
{
int ret;

spin_lock_init(&map_lock);

ret = register_chrdev_region(IB_UVERBS_BASE_DEV, IB_UVERBS_MAX_DEVICES,
"infiniband_verbs");
if (ret) {
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/infiniband/ulp/ipoib/ipoib_cm.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
*/

#include <rdma/ib_cm.h>
#include <rdma/ib_cache.h>
#include <net/dst.h>
#include <net/icmp.h>
#include <linux/icmpv6.h>
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/infiniband/ulp/ipoib/ipoib_ib.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include <linux/delay.h>
#include <linux/dma-mapping.h>

#include <rdma/ib_cache.h>
#include <linux/ip.h>
#include <linux/tcp.h>

Expand Down
7 changes: 1 addition & 6 deletions trunk/drivers/infiniband/ulp/ipoib/ipoib_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -604,11 +604,8 @@ static void neigh_add_path(struct sk_buff *skb, struct net_device *dev)
skb_queue_len(&neigh->queue));
goto err_drop;
}
} else {
spin_unlock_irqrestore(&priv->lock, flags);
} else
ipoib_send(dev, skb, path->ah, IPOIB_QPN(skb_dst(skb)->neighbour->ha));
return;
}
} else {
neigh->ah = NULL;

Expand Down Expand Up @@ -691,9 +688,7 @@ static void unicast_arp_send(struct sk_buff *skb, struct net_device *dev,
ipoib_dbg(priv, "Send unicast ARP to %04x\n",
be16_to_cpu(path->pathrec.dlid));

spin_unlock_irqrestore(&priv->lock, flags);
ipoib_send(dev, skb, path->ah, IPOIB_QPN(phdr->hwaddr));
return;
} else if ((path->query || !path_rec_start(dev, path)) &&
skb_queue_len(&path->queue) < IPOIB_MAX_PATH_REC_QUEUE) {
/* put pseudoheader back on for next time */
Expand Down
21 changes: 0 additions & 21 deletions trunk/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
Original file line number Diff line number Diff line change
Expand Up @@ -720,9 +720,7 @@ void ipoib_mcast_send(struct net_device *dev, void *mgid, struct sk_buff *skb)
}
}

spin_unlock_irqrestore(&priv->lock, flags);
ipoib_send(dev, skb, mcast->ah, IB_MULTICAST_QPN);
return;
}

unlock:
Expand Down Expand Up @@ -760,20 +758,6 @@ void ipoib_mcast_dev_flush(struct net_device *dev)
}
}

static int ipoib_mcast_addr_is_valid(const u8 *addr, unsigned int addrlen,
const u8 *broadcast)
{
if (addrlen != INFINIBAND_ALEN)
return 0;
/* reserved QPN, prefix, scope */
if (memcmp(addr, broadcast, 6))
return 0;
/* signature lower, pkey */
if (memcmp(addr + 7, broadcast + 7, 3))
return 0;
return 1;
}

void ipoib_mcast_restart_task(struct work_struct *work)
{
struct ipoib_dev_priv *priv =
Expand Down Expand Up @@ -807,11 +791,6 @@ void ipoib_mcast_restart_task(struct work_struct *work)
for (mclist = dev->mc_list; mclist; mclist = mclist->next) {
union ib_gid mgid;

if (!ipoib_mcast_addr_is_valid(mclist->dmi_addr,
mclist->dmi_addrlen,
dev->broadcast))
continue;

memcpy(mgid.raw, mclist->dmi_addr + 4, sizeof mgid);

mcast = __ipoib_mcast_find(dev, &mgid);
Expand Down

0 comments on commit 3ee00ab

Please sign in to comment.