Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 88490
b: refs/heads/master
c: 1977353
h: refs/heads/master
v: v3
  • Loading branch information
Roland Dreier committed Apr 17, 2008
1 parent f1ca7f2 commit ffdc953
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 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: f4f82994d1ea0cd01058a245985f1eb5e569e6d3
refs/heads/master: 19773539d6369c54fbb0c870de0c75417b0020d1
11 changes: 7 additions & 4 deletions trunk/drivers/infiniband/hw/mthca/mthca_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ static int mthca_dev_lim(struct mthca_dev *mdev, struct mthca_dev_lim *dev_lim)

static int mthca_init_tavor(struct mthca_dev *mdev)
{
s64 size;
u8 status;
int err;
struct mthca_dev_lim dev_lim;
Expand Down Expand Up @@ -328,9 +329,11 @@ static int mthca_init_tavor(struct mthca_dev *mdev)
if (mdev->mthca_flags & MTHCA_FLAG_SRQ)
profile.num_srq = dev_lim.max_srqs;

err = mthca_make_profile(mdev, &profile, &dev_lim, &init_hca);
if (err < 0)
size = mthca_make_profile(mdev, &profile, &dev_lim, &init_hca);
if (size < 0) {
err = size;
goto err_disable;
}

err = mthca_INIT_HCA(mdev, &init_hca, &status);
if (err) {
Expand Down Expand Up @@ -609,7 +612,7 @@ static int mthca_init_arbel(struct mthca_dev *mdev)
struct mthca_dev_lim dev_lim;
struct mthca_profile profile;
struct mthca_init_hca_param init_hca;
u64 icm_size;
s64 icm_size;
u8 status;
int err;

Expand Down Expand Up @@ -657,7 +660,7 @@ static int mthca_init_arbel(struct mthca_dev *mdev)
profile.num_srq = dev_lim.max_srqs;

icm_size = mthca_make_profile(mdev, &profile, &dev_lim, &init_hca);
if ((int) icm_size < 0) {
if (icm_size < 0) {
err = icm_size;
goto err_stop_fw;
}
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/infiniband/hw/mthca/mthca_profile.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ enum {
MTHCA_NUM_PDS = 1 << 15
};

u64 mthca_make_profile(struct mthca_dev *dev,
s64 mthca_make_profile(struct mthca_dev *dev,
struct mthca_profile *request,
struct mthca_dev_lim *dev_lim,
struct mthca_init_hca_param *init_hca)
Expand All @@ -77,7 +77,7 @@ u64 mthca_make_profile(struct mthca_dev *dev,
};

u64 mem_base, mem_avail;
u64 total_size = 0;
s64 total_size = 0;
struct mthca_resource *profile;
struct mthca_resource tmp;
int i, j;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/infiniband/hw/mthca/mthca_profile.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ struct mthca_profile {
int fmr_reserved_mtts;
};

u64 mthca_make_profile(struct mthca_dev *mdev,
s64 mthca_make_profile(struct mthca_dev *mdev,
struct mthca_profile *request,
struct mthca_dev_lim *dev_lim,
struct mthca_init_hca_param *init_hca);
Expand Down

0 comments on commit ffdc953

Please sign in to comment.