]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/infiniband/hw/mthca/mthca_dev.h
IB/mthca: Make functions that never fail return void
[linux-2.6-omap-h63xx.git] / drivers / infiniband / hw / mthca / mthca_dev.h
index 7e68bd4a3780348041c5adb65b00d462d6c7104b..c98628ab8a09fc5fbb0787f9656b231d971bf4a9 100644 (file)
@@ -43,6 +43,9 @@
 #include <linux/kernel.h>
 #include <linux/pci.h>
 #include <linux/dma-mapping.h>
+#include <linux/timer.h>
+#include <linux/mutex.h>
+
 #include <asm/semaphore.h>
 
 #include "mthca_provider.h"
@@ -50,8 +53,8 @@
 
 #define DRV_NAME       "ib_mthca"
 #define PFX            DRV_NAME ": "
-#define DRV_VERSION    "0.06"
-#define DRV_RELDATE    "June 23, 2005"
+#define DRV_VERSION    "0.07"
+#define DRV_RELDATE    "February 13, 2006"
 
 enum {
        MTHCA_FLAG_DDR_HIDDEN = 1 << 1,
@@ -110,7 +113,7 @@ enum {
 struct mthca_cmd {
        struct pci_pool          *pool;
        int                       use_events;
-       struct semaphore          hcr_sem;
+       struct mutex              hcr_mutex;
        struct semaphore          poll_sem;
        struct semaphore          event_sem;
        int                       max_cmds;
@@ -131,6 +134,7 @@ struct mthca_limits {
        int      max_sg;
        int      num_qps;
        int      max_wqes;
+       int      max_desc_sz;
        int      max_qp_init_rdma;
        int      reserved_qps;
        int      num_srqs;
@@ -154,6 +158,7 @@ struct mthca_limits {
        int      reserved_mcgs;
        int      num_pds;
        int      reserved_pds;
+       u32      page_size_cap;
        u32      flags;
        u8       port_width_cap;
 };
@@ -253,7 +258,7 @@ struct mthca_av_table {
 };
 
 struct mthca_mcg_table {
-       struct semaphore        sem;
+       struct mutex            mutex;
        struct mthca_alloc      alloc;
        struct mthca_icm_table *table;
 };
@@ -298,7 +303,7 @@ struct mthca_dev {
        u64              ddr_end;
 
        MTHCA_DECLARE_DOORBELL_LOCK(doorbell_lock)
-       struct semaphore cap_mask_mutex;
+       struct mutex cap_mask_mutex;
 
        void __iomem    *hcr;
        void __iomem    *kar;
@@ -460,7 +465,9 @@ int mthca_init_cq(struct mthca_dev *dev, int nent,
                  struct mthca_cq *cq);
 void mthca_free_cq(struct mthca_dev *dev,
                   struct mthca_cq *cq);
-void mthca_cq_event(struct mthca_dev *dev, u32 cqn);
+void mthca_cq_completion(struct mthca_dev *dev, u32 cqn);
+void mthca_cq_event(struct mthca_dev *dev, u32 cqn,
+                   enum ib_event_type event_type);
 void mthca_cq_clean(struct mthca_dev *dev, u32 cqn, u32 qpn,
                    struct mthca_srq *srq);
 
@@ -488,8 +495,8 @@ int mthca_arbel_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
                          struct ib_send_wr **bad_wr);
 int mthca_arbel_post_receive(struct ib_qp *ibqp, struct ib_recv_wr *wr,
                             struct ib_recv_wr **bad_wr);
-int mthca_free_err_wqe(struct mthca_dev *dev, struct mthca_qp *qp, int is_send,
-                      int index, int *dbd, __be32 *new_wqe);
+void mthca_free_err_wqe(struct mthca_dev *dev, struct mthca_qp *qp, int is_send,
+                       int index, int *dbd, __be32 *new_wqe);
 int mthca_alloc_qp(struct mthca_dev *dev,
                   struct mthca_pd *pd,
                   struct mthca_cq *send_cq,
@@ -515,6 +522,7 @@ int mthca_create_ah(struct mthca_dev *dev,
 int mthca_destroy_ah(struct mthca_dev *dev, struct mthca_ah *ah);
 int mthca_read_ah(struct mthca_dev *dev, struct mthca_ah *ah,
                  struct ib_ud_header *header);
+int mthca_ah_grh_present(struct mthca_ah *ah);
 
 int mthca_multicast_attach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid);
 int mthca_multicast_detach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid);