Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 74425
b: refs/heads/master
c: b181258
h: refs/heads/master
i:
  74423: 816cf47
v: v3
  • Loading branch information
Joachim Fenkes authored and Roland Dreier committed Dec 1, 2007
1 parent 63a6eb9 commit 4b97c12
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 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: 1401b53acc0328d96bacb2a3393d2852699df96b
refs/heads/master: b1812582ba94b5f377d5d3cec7646cc17d84e733
8 changes: 6 additions & 2 deletions trunk/drivers/infiniband/hw/ehca/ehca_av.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,12 @@ int ehca_calc_ipd(struct ehca_shca *shca, int port,

link = ib_width_enum_to_int(pa.active_width) * pa.active_speed;

/* IPD = round((link / path) - 1) */
*ipd = ((link + (path >> 1)) / path) - 1;
if (path >= link)
/* no need to throttle if path faster than link */
*ipd = 0;
else
/* IPD = round((link / path) - 1) */
*ipd = ((link + (path >> 1)) / path) - 1;

return 0;
}
Expand Down

0 comments on commit 4b97c12

Please sign in to comment.