Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 310516
b: refs/heads/master
c: 3aac6ff
h: refs/heads/master
v: v3
  • Loading branch information
Shlomo Pongratz authored and Roland Dreier committed Jun 4, 2012
1 parent f3dc400 commit c7d4d20
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 17 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: 71b43fd573a60972b2175df4927c4ee10d757004
refs/heads/master: 3aac6ff16a2097be668975fd51084df2e27e4999
4 changes: 0 additions & 4 deletions trunk/drivers/infiniband/hw/cxgb4/cm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1593,10 +1593,6 @@ static int import_ep(struct c4iw_ep *ep, __be32 peer_ip, struct dst_entry *dst,
struct net_device *pdev;

pdev = ip_dev_find(&init_net, peer_ip);
if (!pdev) {
err = -ENODEV;
goto out;
}
ep->l2t = cxgb4_l2t_get(cdev->rdev.lldi.l2t,
n, pdev, 0);
if (!ep->l2t)
Expand Down
19 changes: 7 additions & 12 deletions trunk/drivers/infiniband/hw/mlx4/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1084,12 +1084,9 @@ static void mlx4_ib_alloc_eqs(struct mlx4_dev *dev, struct mlx4_ib_dev *ibdev)
int total_eqs = 0;
int i, j, eq;

/* Init eq table */
ibdev->eq_table = NULL;
ibdev->eq_added = 0;

/* Legacy mode? */
if (dev->caps.comp_pool == 0)
/* Legacy mode or comp_pool is not large enough */
if (dev->caps.comp_pool == 0 ||
dev->caps.num_ports > dev->caps.comp_pool)
return;

eq_per_port = rounddown_pow_of_two(dev->caps.comp_pool/
Expand Down Expand Up @@ -1135,7 +1132,10 @@ static void mlx4_ib_alloc_eqs(struct mlx4_dev *dev, struct mlx4_ib_dev *ibdev)
static void mlx4_ib_free_eqs(struct mlx4_dev *dev, struct mlx4_ib_dev *ibdev)
{
int i;
int total_eqs;

/* no additional eqs were added */
if (!ibdev->eq_table)
return;

/* Reset the advertised EQ number */
ibdev->ib_dev.num_comp_vectors = dev->caps.num_comp_vectors;
Expand All @@ -1148,12 +1148,7 @@ static void mlx4_ib_free_eqs(struct mlx4_dev *dev, struct mlx4_ib_dev *ibdev)
mlx4_release_eq(dev, ibdev->eq_table[i]);
}

total_eqs = dev->caps.num_comp_vectors + ibdev->eq_added;
memset(ibdev->eq_table, 0, total_eqs * sizeof(int));
kfree(ibdev->eq_table);

ibdev->eq_table = NULL;
ibdev->eq_added = 0;
}

static void *mlx4_ib_add(struct mlx4_dev *dev)
Expand Down

0 comments on commit c7d4d20

Please sign in to comment.