diff options
author | Roland Dreier <rolandd@cisco.com> | 2006-06-18 03:37:41 (GMT) |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2006-06-18 03:37:41 (GMT) |
commit | c93b6fbaa99bb3a1552e14317296be14dde51dfb (patch) | |
tree | bad61dc728f0eb28fcfdf01953cd0ae43a4b2350 /drivers/infiniband/hw/mthca/mthca_provider.h | |
parent | c9c5d9feef86debee4d8e77a738ad86877cf371a (diff) | |
download | linux-fsl-qoriq-c93b6fbaa99bb3a1552e14317296be14dde51dfb.tar.xz |
IB/mthca: Make all device methods truly reentrant
Documentation/infiniband/core_locking.txt says:
All of the methods in struct ib_device exported by a low-level
driver must be fully reentrant. The low-level driver is required to
perform all synchronization necessary to maintain consistency, even
if multiple function calls using the same object are run
simultaneously.
However, mthca's modify_qp, modify_srq and resize_cq methods are
currently not reentrant. Add a mutex to the QP, SRQ and CQ structures
so that these calls can be properly serialized.
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/mthca/mthca_provider.h')
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_provider.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_provider.h b/drivers/infiniband/hw/mthca/mthca_provider.h index 179a8f6..8de2887 100644 --- a/drivers/infiniband/hw/mthca/mthca_provider.h +++ b/drivers/infiniband/hw/mthca/mthca_provider.h @@ -214,6 +214,7 @@ struct mthca_cq { int arm_sn; wait_queue_head_t wait; + struct mutex mutex; }; struct mthca_srq { @@ -237,6 +238,7 @@ struct mthca_srq { struct mthca_mr mr; wait_queue_head_t wait; + struct mutex mutex; }; struct mthca_wq { @@ -278,6 +280,7 @@ struct mthca_qp { union mthca_buf queue; wait_queue_head_t wait; + struct mutex mutex; }; struct mthca_sqp { |