diff options
author | Joachim Fenkes <fenkes@de.ibm.com> | 2007-11-02 15:41:49 +0200 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2007-11-13 15:27:00 -0800 |
commit | 51aaa54eb9e9f01878aa5d62277fd156e458dfe1 (patch) | |
tree | 135d4f2f8ae6543f034e9607ae58fa05b8944451 /drivers/infiniband/hw/ehca/ehca_iverbs.h | |
parent | 40ebb5615e2e069d3b8936b894ceff436c914003 (diff) |
IB/ehca: Fix static rate calculation
The IPD (inter-packet delay) formula was a little off and assumed a
fixed physical link rate; fix the formula and query the actual
physical link rate, now that we can get it. Also, refactor the
calculation into a common function ehca_calc_ipd() and use that
instead of duplicating code.
Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/ehca/ehca_iverbs.h')
-rw-r--r-- | drivers/infiniband/hw/ehca/ehca_iverbs.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/ehca/ehca_iverbs.h b/drivers/infiniband/hw/ehca/ehca_iverbs.h index dce503bb7d6..5485799cdc8 100644 --- a/drivers/infiniband/hw/ehca/ehca_iverbs.h +++ b/drivers/infiniband/hw/ehca/ehca_iverbs.h @@ -189,6 +189,9 @@ int ehca_mmap(struct ib_ucontext *context, struct vm_area_struct *vma); void ehca_poll_eqs(unsigned long data); +int ehca_calc_ipd(struct ehca_shca *shca, int port, + enum ib_rate path_rate, u32 *ipd); + #ifdef CONFIG_PPC_64K_PAGES void *ehca_alloc_fw_ctrlblock(gfp_t flags); void ehca_free_fw_ctrlblock(void *ptr); |