History log of /drivers/infiniband/hw/ehca/ehca_classes.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
90ab5ee94171b3e28de6bb42ee30b527014e0be7 13-Jan-2012 Rusty Russell <rusty@rustcorp.com.au> module_param: make bool parameters really bool (drivers & misc)

module_param(bool) used to counter-intuitively take an int. In
fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy
trick.

It's time to remove the int/unsigned int option. For this version
it'll simply give a warning, but it'll break next kernel version.

Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
/drivers/infiniband/hw/ehca/ehca_classes.h
2dc11581376829303b98eadb2de253bee065a56a 06-Aug-2010 Grant Likely <grant.likely@secretlab.ca> of/device: Replace struct of_device with struct platform_device

of_device is just an alias for platform_device, so remove it entirely. Also
replace to_of_device() with to_platform_device() and update comment blocks.

This patch was initially generated from the following semantic patch, and then
edited by hand to pick up the bits that coccinelle didn't catch.

@@
@@
-struct of_device
+struct platform_device

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Reviewed-by: David S. Miller <davem@davemloft.net>
/drivers/infiniband/hw/ehca/ehca_classes.h
9420269428b3dc80c98e52beac60a3976fbef7d2 09-Dec-2009 Alexander Schmidt <alexs@linux.vnet.ibm.com> IB/ehca: Rework destroy_eq()

The ibmebus_free_irq() function, which might sleep, was called with
interrupts disabled. To fix this, make sure that no interrupts are
running by killing the interrupt tasklet. Also lock the
shca_list_lock to protect against the poll_eqs_timer running
concurrently.

Signed-off-by: Alexander Schmidt <alexs@linux.vnet.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/ehca/ehca_classes.h
1c721940ddd6496508f1f2fde5167b1c898b419b 05-Dec-2008 Stefan Roscher <ossrosch@linux.vnet.ibm.com> IB/ehca: Replace modulus operations in flush error completion path

With the latest flush error completion patch we introduced modulus
operation to calculate the next index within a qmap. Based on
comments from other mailing lists we decided to optimize this
operation by using an addition and an if-statement instead of modulus,
even though this is on the error path.

Signed-off-by: Stefan Roscher <stefan.roscher@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/ehca/ehca_classes.h
7ec4f4634a4326c1f8fd172c80c8f59c9b3e90a4 01-Dec-2008 Stefan Roscher <ossrosch@linux.vnet.ibm.com> IB/ehca: Fix problem with generated flush work completions

This fix enables ehca device driver to generate flush work completions
even if the application doesn't request completions for all work
requests. The current implementation of ehca will generate flush work
completions for the wrong work requests if an application uses non
signaled work completions.

Signed-off-by: Stefan Roscher <stefan.roscher@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/ehca/ehca_classes.h
19f4282149147b4a3e8c670373dc73ddd5d5facc 23-Oct-2008 Stefan Roscher <ossrosch@linux.vnet.ibm.com> IB/ehca: Fix reported max number of QPs and CQs in systems with >1 adapter

Because ehca adapters can differ in the maximum number of QPs and CQs
we have to save the maximum number of these ressources per adapter and
not globally per ehca driver. This fix introduces 2 new members to the
shca structure to store the maximum value for QPs and CQs per adapter.

The module parameters are now used as initial values for those
variables. If a user selects an invalid number of CQs or QPs we don't
print an error any longer, instead we will inform the user with a
warning and set the values to the respective maximum supported by the
HW.

Signed-off-by: Stefan Roscher <stefan.roscher@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/ehca/ehca_classes.h
b9012e0a4255c93e1d81f1ccee591de6414b5955 21-Sep-2008 Alexander Schmidt <alexs@linux.vnet.ibm.com> IB/ehca: Generate flush status CQ entries

When a QP goes into error state, it is required that CQ entries with a
flush error status are delivered to the application for any
outstanding work requests. eHCA does not do this in hardware, so this
patch adds software flush CQE generation to the ehca driver.

Whenever a QP gets into error state, it is added to the QP error list
of its respective CQ. If the error QP list of a CQ is not empty,
poll_cq() generates flush CQEs before polling the actual CQ.

Signed-off-by: Alexander Schmidt <alexs@linux.vnet.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/ehca/ehca_classes.h
6773f079b72ab0200fe9afa9bb0c656a6af5400c 12-Aug-2008 Alexander Schmidt <alexs@linux.vnet.ibm.com> IB/ehca: Discard double CQE for one WR

Under rare circumstances, the ehca hardware might erroneously generate
two CQEs for the same WQE, which is not compliant to the IB spec and
will cause unpredictable errors like memory being freed twice. To
avoid this problem, the driver needs to detect the second CQE and
discard it.

For this purpose, introduce an array holding as many elements as the
SQ of the QP, called sq_map. Each sq_map entry stores a "reported"
flag for one WQE in the SQ. When a work request is posted to the SQ,
the respective "reported" flag is set to zero. After the arrival of a
CQE, the flag is set to 1, which allows to detect the occurence of a
second CQE.

The mapping between WQE / CQE and the corresponding sq_map element is
implemented by replacing the lowest 16 Bits of the wr_id with the
index in the queue map. The original 16 Bits are stored in the sq_map
entry and are restored when the CQE is passed to the application.

Signed-off-by: Alexander Schmidt <alexs@linux.vnet.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/ehca/ehca_classes.h
5b673b71c8ca0fbdb99dc1b1434cfb554212d6ff 22-Jul-2008 Joachim Fenkes <fenkes@de.ibm.com> IB/ehca: Filter PATH_MIG events if QP was never armed

Certain firmware versions sometimes cause spurious PATH_MIG events to
occur during QP creation. Filter these events by making sure PATH_MIG
events are only handed down when they actually make sense (i.e. when
the QP has been armed at least once).

Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/ehca/ehca_classes.h
12137c593d127c6c1a3eb050674da047682badaf 07-May-2008 Stefan Roscher <ossrosch@linux.vnet.ibm.com> IB/ehca: Wait for async events to finish before destroying QP

This is necessary because, in a multicore environment, a race between
uverbs async handler and destroy QP could occur.

Signed-off-by: Stefan Roscher <stefan.roscher at de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/ehca/ehca_classes.h
d227fa7288adebe5ba37fa8e4a589c977d4e4a34 29-Apr-2008 Stefan Roscher <ossrosch@linux.vnet.ibm.com> IB/ehca: Allocate event queue size depending on max number of CQs and QPs

If a lot of QPs fall into Error state at once and the EQ of the
respective HCA is too small, it might overrun, causing the eHCA driver
to stop processing completion events and calling the application's
completion handlers, effectively causing traffic to stop.

Fix this by limiting available QPs and CQs to a customizable max
count, and determining EQ size based on these counts and a worst-case
assumption.

Signed-off-by: Stefan Roscher <stefan.roscher@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/ehca/ehca_classes.h
863fb09fbf1eb74f56ea02184a62165056aa29cb 23-Apr-2008 Joachim Fenkes <fenkes@de.ibm.com> IB/ehca: Prevent posting of SQ WQEs if QP not in RTS

...as required by IB Spec, C10-29.

Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/ehca/ehca_classes.h
f4f82994d1ea0cd01058a245985f1eb5e569e6d3 17-Apr-2008 Hoang-Nam Nguyen <hnguyen@de.ibm.com> IB/ehca: Remove tgid checking

Pavel Emelyanov <xemul@openvz.org> mentioned in <http://lkml.org/lkml/2008/3/17/131>
that the task_struct->tgid field is about to become deprecated, so the
uses in the ehca driver need to be fixed up.

However, all the uses in ehca are for some object ownership checking
that is not really needed, and anyway is implementing a policy that
should be in common code rather than a low-level driver. So just
remove all the checks.

Signed-off-by: Hoang-Nam Nguyen <hnguyen@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/ehca/ehca_classes.h
2b5e6b120e58d44cace68e6c7204b541a8b0b43f 25-Jan-2008 Hoang-Nam Nguyen <hnguyen@de.ibm.com> IB/ehca: Add PMA support

This patch enables ehca to redirect any PMA queries to the
actual PMA QP.

Signed-off-by: Hoang-Nam Nguyen <hnguyen@de.ibm.com>
Reviewed-by: Joachim Fenkes <fenkes@de.ibm.com>
Reviewed-by: Christoph Raisch <raisch@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/ehca/ehca_classes.h
2ec8e662416cc9a171cdfe3d75e1ff00ba757859 17-Jan-2008 Joachim Fenkes <fenkes@de.ibm.com> IB/ehca: Prevent RDMA-related connection failures on some eHCA2 hardware

Some HW revisions of eHCA2 may cause an RC connection to break if they
received RDMA Reads over that connection before. This can be
prevented by assuring that, after the first RDMA Read, the QP receives
a new RDMA Read every few million link packets.

Include code into the driver that inserts an empty (size 0) RDMA Read
into the message stream every now and then if the consumer doesn't
post them frequently enough.

Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/ehca/ehca_classes.h
bbdd267ef2796e96b461b8447b2026ce06e6ec4b 17-Jan-2008 Hoang-Nam Nguyen <hnguyen@de.ibm.com> IB/ehca: Add "port connection autodetect mode"

This patch enhances ehca with a capability to "autodetect" the ports
being connected physically. In order to utilize that function the
module option nr_ports must be set to -1 (default is 2 - two
ports). This feature is experimental and will made the default later.

More detail:

If the user connects only one port to the switch, current code requires
1) port one to be connected and
2) module option nr_ports=1 to be given.

If autodetect is enabled, ehca will not wait at creation of the GSI QP
for the respective port to become active. Since firmware does not
accept modify_qp() while the port is down at initialization, we need
to cache all calls to modify_qp() for the SMI/GSI QP and just return a
good return code.

When a port is activated and we get a PORT_ACTIVE event, we replay the
cached modify-qp() parms and re-trigger any posted recv WRs. Only then
do we forward the PORT_ACTIVE event to registered clients.

The result of this autodetect patch is that all ports will be
accessible by the users. Depending on their respective cabling only
those ports that are connected properly will become operable. If a
user tries to modify a regular QP of a non-connected port, modify_qp()
will fail. Furthermore, ibv_devinfo should show the port state
accordingly.

Note that this patch primarily improves the loading behaviour of
ehca. If the cable is removed while the driver is operating and
plugged in again, firmware will handle that properly by sending an
appropriate async event.

Signed-off-by: Hoang-Nam Nguyen <hnguyen@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/ehca/ehca_classes.h
b8b50e353b85bc3c791dd2b99370ac300ebcd186 17-Jan-2008 Hoang-Nam Nguyen <hnguyen at de.ibm.com> IB/ehca: Define array to store SMI/GSI QPs

Signed-off-by: Hoang-Nam Nguyen <hnguyen@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/ehca/ehca_classes.h
3d758a4a48682639d3996968499913ecb1552e06 13-Dec-2007 Joachim Fenkes <fenkes@de.ibm.com> IB/ehca: Fix lock flag variable location, bump version number

Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/ehca/ehca_classes.h
51aaa54eb9e9f01878aa5d62277fd156e458dfe1 02-Nov-2007 Joachim Fenkes <fenkes@de.ibm.com> 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>
/drivers/infiniband/hw/ehca/ehca_classes.h
0b776eb5426752d4e53354ac89e3710d857e09a7 23-Oct-2007 Linus Torvalds <torvalds@woody.linux-foundation.org> 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:
mlx4_core: Increase command timeout for INIT_HCA to 10 seconds
IPoIB/cm: Use common CQ for CM send completions
IB/uverbs: Fix checking of userspace object ownership
IB/mlx4: Sanity check userspace send queue sizes
IPoIB: Rewrite "if (!likely(...))" as "if (unlikely(!(...)))"
IB/ehca: Enable large page MRs by default
IB/ehca: Change meaning of hca_cap_mr_pgsize
IB/ehca: Fix ehca_encode_hwpage_size() and alloc_fmr()
IB/ehca: Fix masking error in {,re}reg_phys_mr()
IB/ehca: Supply QP token for SRQ base QPs
IPoIB: Use round_jiffies() for ah_reap_task
RDMA/cma: Fix deadlock destroying listen requests
RDMA/cma: Add locking around QP accesses
IB/mthca: Avoid alignment traps when writing doorbells
mlx4_core: Kill mlx4_write64_raw()
abc39d3672d8af4bf6c943faf85fa8877caccf7e 16-Oct-2007 Joachim Fenkes <fenkes@de.ibm.com> IB/ehca: Change meaning of hca_cap_mr_pgsize

ehca_shca.hca_cap_mr_pgsize now contains all supported page sizes ORed
together. This makes some checks easier to code and understand, plus
we can return this value verbatim in query_hca(), fixing a problem
with SRP (reported by Anton Blanchard -- thanks!).

Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/ehca/ehca_classes.h
6b08f3ae8eec27a9e557468a48540bc64fd4a524 26-Sep-2007 Joachim Fenkes <fenkes@de.ibm.com> [POWERPC] ibmebus: Move to of_device and of_platform_driver, match eHCA and eHEA drivers

Replace struct ibmebus_dev and struct ibmebus_driver with struct of_device
and struct of_platform_driver, respectively. Match the external ibmebus
interface and drivers using it.

Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Roland Dreier <rolandd@cisco.com>
Acked-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
/drivers/infiniband/hw/ehca/ehca_classes.h
a66072237500f31cec19fa688210150de9c9f957 28-Sep-2007 Hoang-Nam Nguyen <hnguyen@linux.vnet.ibm.com> IB/ehca: Adjust 64-bit alignment of create QP response for userspace

Signed-off-by: Hoang-Nam Nguyen <hnguyen@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/ehca/ehca_classes.h
08c283ac262d7ab21c5733ff469ff88985381ca9 13-Sep-2007 Hoang-Nam Nguyen <hnguyen@de.ibm.com> IB/ehca: Fix large page HW cap defines

Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/ehca/ehca_classes.h
e390d3b52f791fcea26312ba4982cda82052727b 11-Sep-2007 Hoang-Nam Nguyen <hnguyen@de.ibm.com> IB/ehca: Use remap_4k_pfn() to map firmware contexts to user space

Use Paul's new remap_4k_pfn() function to map our 4K firmware contexts
into user space on 64K-page machines without exposing neighboring
firmware contexts. Return the context's offset within a 64K page to
user space so it can determine the proper virtual address.

For details about remap_4k_pfn(), see commit 721151d0 or
http://patchwork.ozlabs.org/linuxppc/patch?id=10281

Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/ehca/ehca_classes.h
1fea391039d1c4e876a164099bff475a02a29d96 10-Oct-2007 Roland Dreier <rolandd@cisco.com> IB/ehca: Include <linux/mutex.h> from ehca_classes.h

ehca_classes.h uses struct mutex, so while <linux/mutex.h> seems to be
pulled in indirectly by one of the headers it includes, the right
thing is to include <linux/mutex.h> directly.

Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>
Acked-by: Stefan Roscher <stefan.roscher@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/ehca/ehca_classes.h
1655fc2e12ed7d208403c043428291b83aa833bb 29-Jul-2007 Hoang-Nam Nguyen <hnguyen@de.ibm.com> IB/ehca: Move extern declarations from .c files to .h files

Make sure declarations stay in sync with definitions by keeping all
extern declarations in common .h files.

Signed-off-by: Hoang-Nam Nguyen <hnguyen@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/ehca/ehca_classes.h
e2f81daf23efde23d8cac1fc253d41838f0347cf 20-Jul-2007 Stefan Roscher <stefan.roscher at de.ibm.com> IB/ehca: Support small QP queues

eHCA2 supports QP queues that can be as small as 512 bytes. This
greatly reduces memory overhead for consumers that use lots of QPs
with small queues (e.g. RDMA-only QPs). Apart from dealing with
firmware, this code needs to manage bite-sized chunks of kernel pages,
making sure that no kernel page is shared between different protection
domains.

Signed-off-by: Hoang-Nam Nguyen <hnguyen@de.ibm.com>
/drivers/infiniband/hw/ehca/ehca_classes.h
5bb7d9290cd23a55906e4fe7a7fedecf29468c81 20-Jul-2007 Hoang-Nam Nguyen <hnguyen@de.ibm.com> IB/ehca: Support large page MRs

Add support for MR pages larger than 4K on eHCA2. This reduces
firmware memory consumption. If enabled via the mr_largepage module
parameter, the MR page size will be determined based on the MR length
and the hardware capabilities -- if the MR is >= 16M, 16M pages are
used, for example.

Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/ehca/ehca_classes.h
2b94397adc68c2f0f851539884cc426e03444a26 12-Jul-2007 Hoang-Nam Nguyen <hnguyen@de.ibm.com> IB/ehca: Fix warnings issued by checkpatch.pl

Run the existing ehca code through checkpatch.pl and clean up the
worst of the coding style violations.

Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/ehca/ehca_classes.h
df17bfd4a030f7d986de14210f4b21876a7a2989 12-Jul-2007 Hoang-Nam Nguyen <hnguyen@de.ibm.com> IB/ehca: MR/MW structure refactoring

- Rename struct ehca_mr fields to clearly distinguish between kernel
and HW page size.
- Sort struct ehca_mr_pginfo into a common part and a union containing
specific fields for physical, user and fast MR

Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/ehca/ehca_classes.h
8705ce5b90118be93eb8b0ed6f49ca5ff377df24 09-Jul-2007 Joachim Fenkes <fenkes@de.ibm.com> IB/ehca: Notify consumers of LID/PKEY/SM changes after nondisruptive events

When firmware reports a nondisruptive port configuration change event,
previous versions of the eHCA driver didn't forward the event to consumers
like IPoIB. Add code that determines the type of configuration change by
comparing old and new port attributes and reports it.

Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/ehca/ehca_classes.h
26ed687fdd541c2542b79dcd75fb2c82eb36f189 09-Jul-2007 Joachim Fenkes <fenkes@de.ibm.com> IB/ehca: Change idr spinlocks into rwlocks

This eliminates lock contention among IRQs as well as the need to
disable IRQs around idr_find, because there are no IRQ writers.

Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/ehca/ehca_classes.h
28db6beb420c756c61dd44d9f2786a0677159e74 09-Jul-2007 Joachim Fenkes <fenkes@de.ibm.com> IB/ehca: Refactor sync between completions and destroy_cq using atomic_t

- ehca_cq.nr_events is made an atomic_t, eliminating a lot of locking.
- The CQ is removed from the CQ idr first now to make sure no more
completions are scheduled on that CQ. The "wait for all completions to
end" code becomes much simpler this way.

Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/ehca/ehca_classes.h
9844b71baa60270110eabaa9589d3260443d1a71 09-Jul-2007 Joachim Fenkes <fenkes@de.ibm.com> IB/ehca: Lock renaming, static initializers

- Rename all spinlock flags to "flags", matching the vast majority of kernel
code.
- Move hcall_lock into the only file it's used in.
- Replaced spin_lock_init() and friends with static initializers for
global variables.

Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/ehca/ehca_classes.h
a6a12947fbf4a1782535468d756b0d44babf9760 09-Jul-2007 Joachim Fenkes <fenkes@de.ibm.com> IB/ehca: add Shared Receive Queue support

Support SRQs on eHCA2. Since an SRQ is a QP for eHCA2, a lot of code
(structures, create, destroy, post_recv) can be shared between QP and SRQ.

Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/ehca/ehca_classes.h
9a79fc0a1b815cbd05a8e37ea838acfccb7235cc 09-Jul-2007 Joachim Fenkes <fenkes@de.ibm.com> IB/ehca: QP code restructuring in preparation for SRQ

- Replace init_qp_queues() by a shorter init_qp_queue(), eliminating
duplicate code.

- hipz_h_alloc_resource_qp() doesn't need a pointer to struct ehca_qp any
longer. All input and output data is transferred through the parms
parameter.

- Change the interface to also support SRQ.

Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/ehca/ehca_classes.h
91f13aa3fc22e357b494c5b8270e94543870928d 09-Jul-2007 Joachim Fenkes <fenkes@de.ibm.com> IB/ehca: HW level, HW caps and MTU autodetection

In preparation for support of new eHCA2 features, change adapter probing:
- Hardware level is changed to encode major and minor chip version
- Hardware capabilities are queried from the firmware
- The maximum MTU is queried from the firmware instead of assuming a
fixed value

Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/ehca/ehca_classes.h
5d88278e3bdb6f2e4ed43306659e930ecd715f0c 09-May-2007 Stefan Roscher <stefan.roscher@de.ibm.com> IB/ehca: Serialize hypervisor calls in ehca_register_mr()

Some pSeries hypervisor versions show a race condition in the allocate
MR hCall. Serialize this call per adapter to circumvent this problem.

Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/ehca/ehca_classes.h
f7c6a7b5d59980b076abbf2ceeb8735591290285 05-Mar-2007 Roland Dreier <rolandd@cisco.com> IB/uverbs: Export ib_umem_get()/ib_umem_release() to modules

Export ib_umem_get()/ib_umem_release() and put low-level drivers in
control of when to call ib_umem_get() to pin and DMA map userspace,
rather than always calling it in ib_uverbs_reg_mr() before calling the
low-level driver's reg_user_mr method.

Also move these functions to be in the ib_core module instead of
ib_uverbs, so that driver modules using them do not depend on
ib_uverbs.

This has a number of advantages:
- It is better design from the standpoint of making generic code a
library that can be used or overridden by device-specific code as
the details of specific devices dictate.
- Drivers that do not need to pin userspace memory regions do not
need to take the performance hit of calling ib_mem_get(). For
example, although I have not tried to implement it in this patch,
the ipath driver should be able to avoid pinning memory and just
use copy_{to,from}_user() to access userspace memory regions.
- Buffers that need special mapping treatment can be identified by
the low-level driver. For example, it may be possible to solve
some Altix-specific memory ordering issues with mthca CQs in
userspace by mapping CQ buffers with extra flags.
- Drivers that need to pin and DMA map userspace memory for things
other than memory regions can use ib_umem_get() directly, instead
of hacks using extra parameters to their reg_phys_mr method. For
example, the mlx4 driver that is pending being merged needs to pin
and DMA map QP and CQ buffers, but it does not need to create a
memory key for these buffers. So the cleanest solution is for mlx4
to call ib_umem_get() in the create_qp and create_cq methods.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/ehca/ehca_classes.h
c4ed790dfd4b2182c76e0fcd79d4aa85ab02eccf 24-Apr-2007 Joachim Fenkes <fenkes@de.ibm.com> IB/ehca: Implement modify_port

Add "Modify Port" verb support to eHCA driver. The IB communication
manager needs this to set the IsCM port capability bit when
initializing.

Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/ehca/ehca_classes.h
31726798bd8fbef6244b28cf962f4a4c45793dea 28-Feb-2007 Hoang-Nam Nguyen <hnguyen@linux.vnet.ibm.com> IB/ehca: Fix sync between completion handler and destroy cq

This patch fixes two issues reported by Roland Dreier and Christoph Hellwig:

- Mismatched sync/locking between completion handler and destroy cq We
introduced a counter nr_events per cq to track number of irq events
seen. This counter is incremented when an event queue entry is seen
and decremented after completion handler has been called regardless
if scaling code is active or not. Note that nr_callbacks tracks
number of events assigned to a cpu and both counters can potentially
diverge.

The sync between running completion handler and destroy cq is done
by using the global spin lock ehca_cq_idr_lock.

- Replace yield by wait_event on the counter above to become zero.

Signed-off-by: Hoang-Nam Nguyen <hnguyen@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/ehca/ehca_classes.h
4fd3006032446be2b331dd482e34c6a9e644a5b8 15-Feb-2007 Hoang-Nam Nguyen <hnguyen@linux.vnet.ibm.com> IB/ehca: Allow en/disabling scaling code via module parameter

Allow users to en/disable scaling code when loading ib_ehca module,
rather than requiring the module to be rebuilt to change the setting.

Signed-off-by: Hoang-Nam Nguyen <hnguyen@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/ehca/ehca_classes.h
78d8d5f9ef8d6179e92b94481cfdfc45d396992f 15-Feb-2007 Hoang-Nam Nguyen <hnguyen@linux.vnet.ibm.com> IB/ehca: Rework irq handler

Rework ehca interrupt handling to avoid/reduce missed irq events.

Signed-off-by: Hoang-Nam Nguyen <hnguyen@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/ehca/ehca_classes.h
b45bfcc1ae084aa98c0350b8c33c8b57540b0acc 24-Jan-2007 Hoang-Nam Nguyen <hnguyen@linux.vnet.ibm.com> IB/ehca: Remove obsolete prototypes

Remove prototypes for functions that don't exist.

Signed-off-by: Hoang-Nam Nguyen <hnguyen@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/ehca/ehca_classes.h
4c34bdf58c0a3b305ebd9b5e74011ca1fd6d964d 24-Jan-2007 Hoang-Nam Nguyen <hnguyen@linux.vnet.ibm.com> IB/ehca: Remove use of do_mmap()

This patch removes do_mmap() from ehca:
- Call remap_pfn_range() for hardware register block
- Use vm_insert_page() to register memory allocated for completion
queues and queue pairs
- The actual mmap() call/trigger is now controlled by user space,
ie. libehca

Signed-off-by: Hoang-Nam Nguyen <hnguyen@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/ehca/ehca_classes.h
fab97220c9e409a98b1956ba677ddd2dd43b0b95 23-Sep-2006 Heiko J Schick <schickhj.ibm.com> IB/ehca: Add driver for IBM eHCA InfiniBand adapters

Add a driver for IBM GX bus InfiniBand adapters, which are usable with
some pSeries/System p systems.

Signed-off-by: Heiko J Schick <schickhj.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/ehca/ehca_classes.h