linux/drivers/infiniband/hw/ehca
Roland Dreier 76dea3bc26 IB/ehca: Fix clipping of device limits to INT_MAX
Doing min_t(int, foo, INT_MAX) doesn't work correctly, because if foo
is bigger than INT_MAX, then when treated as a signed integer, it will
become negative and hence such an expression is just an elaborate NOP.

Fix such cases in ehca to do min_t(unsigned, foo, INT_MAX) instead.
This fixes negative reported values for max_cqe, max_pd and max_ah:

Before:

        max_cqe:                        -64
        max_pd:                         -1
        max_ah:                         -1

After:
        max_cqe:                        2147483647
        max_pd:                         2147483647
        max_ah:                         2147483647

Based on a bug report and fix from Anton Blanchard <anton@samba.org>.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-10-09 19:59:18 -07:00
..
Kconfig IB: Use menuconfig for InfiniBand menu 2007-07-09 20:12:26 -07:00
Makefile
ehca_av.c mm: Remove slab destructors from kmem_cache_create(). 2007-07-20 10:11:58 +09:00
ehca_classes.h IB/ehca: Adjust 64-bit alignment of create QP response for userspace 2007-10-09 19:59:14 -07:00
ehca_classes_pSeries.h IB/ehca: Fix warnings issued by checkpatch.pl 2007-07-17 18:37:40 -07:00
ehca_cq.c IB/ehca: Print return codes as signed decimal integers 2007-10-09 19:59:10 -07:00
ehca_eq.c IB/ehca: Support small QP queues 2007-07-20 21:19:47 -07:00
ehca_hca.c IB/ehca: Fix clipping of device limits to INT_MAX 2007-10-09 19:59:18 -07:00
ehca_irq.c IB/ehca: Misc cpuinit section annotations and #ifdef cleanups 2007-10-09 19:59:14 -07:00
ehca_irq.h IB/ehca: Refactor sync between completions and destroy_cq using atomic_t 2007-07-09 20:12:27 -07:00
ehca_iverbs.h IB/ehca: Fix warnings issued by checkpatch.pl 2007-07-17 18:37:40 -07:00
ehca_main.c IB/ehca: Bump version number and change its format 2007-10-09 19:59:11 -07:00
ehca_mcast.c IB/ehca: Print return codes as signed decimal integers 2007-10-09 19:59:10 -07:00
ehca_mrmw.c IB/ehca: Only use MR large pages for hugetlb regions 2007-10-09 19:59:13 -07:00
ehca_mrmw.h IB/ehca: Support large page MRs 2007-07-20 21:19:43 -07:00
ehca_pd.c IB/ehca: Move extern declarations from .c files to .h files 2007-07-28 21:47:53 -07:00
ehca_qes.h IB/ehca: Fix warnings issued by checkpatch.pl 2007-07-17 18:37:40 -07:00
ehca_qp.c IB/ehca: Return srq_attr->max_sge in ehca_query_srq() 2007-10-09 19:59:15 -07:00
ehca_reqs.c IB/ehca: Print return codes as signed decimal integers 2007-10-09 19:59:10 -07:00
ehca_sqp.c IB/ehca: Print return codes as signed decimal integers 2007-10-09 19:59:10 -07:00
ehca_tools.h IB/ehca: Replace get_paca()->paca_index by the more portable raw_smp_processor_id() 2007-10-09 19:59:11 -07:00
ehca_uverbs.c IB/ehca: Print return codes as signed decimal integers 2007-10-09 19:59:10 -07:00
hcp_if.c IB/ehca: Serialize MR alloc and MR free hvCalls 2007-10-09 19:59:11 -07:00
hcp_if.h IB/ehca: QP code restructuring in preparation for SRQ 2007-07-09 20:12:27 -07:00
hcp_phyp.c IB/ehca: Fix warnings issued by checkpatch.pl 2007-07-17 18:37:40 -07:00
hcp_phyp.h
hipz_fns.h
hipz_fns_core.h IB/ehca: Fix warnings issued by checkpatch.pl 2007-07-17 18:37:40 -07:00
hipz_hw.h IB/ehca: Fix warnings issued by checkpatch.pl 2007-07-17 18:37:40 -07:00
ipz_pt_fn.c IB/ehca: Small QP userspace support 2007-10-09 19:59:07 -07:00
ipz_pt_fn.h IB/ehca: Move extern declarations from .c files to .h files 2007-07-28 21:47:53 -07:00