Commit 92d499d991ec4f5cbd00d6f33967eab9d3ee8d6c
Exists in
master
and in
7 other branches
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: IB/ehca: Fix static rate if path faster than link IPoIB: Fix oops if xmit is called when priv->broadcast is NULL
Showing 2 changed files Side-by-side Diff
drivers/infiniband/hw/ehca/ehca_av.c
... | ... | @@ -76,8 +76,12 @@ |
76 | 76 | |
77 | 77 | link = ib_width_enum_to_int(pa.active_width) * pa.active_speed; |
78 | 78 | |
79 | - /* IPD = round((link / path) - 1) */ | |
80 | - *ipd = ((link + (path >> 1)) / path) - 1; | |
79 | + if (path >= link) | |
80 | + /* no need to throttle if path faster than link */ | |
81 | + *ipd = 0; | |
82 | + else | |
83 | + /* IPD = round((link / path) - 1) */ | |
84 | + *ipd = ((link + (path >> 1)) / path) - 1; | |
81 | 85 | |
82 | 86 | return 0; |
83 | 87 | } |
drivers/infiniband/ulp/ipoib/ipoib_main.c