aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-12 19:45:40 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-12 19:45:40 -0400
commit0cdf6990e992902ae59cbc625d28cb41390f378e (patch)
tree0c01cf792be5f36ea34064036005f424ab95a571 /drivers/net
parentde081fa517fed81b0369f2e90ca87c30182879c8 (diff)
parentcec7c893d8654723028f09d33341e42673558057 (diff)
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: (76 commits) IB: Update MAINTAINERS with Hal's new email address IB/mlx4: Implement query SRQ IB/mlx4: Implement query QP IB/cm: Send no match if a SIDR REQ does not match a listen IB/cm: Fix handling of duplicate SIDR REQs IB/cm: cm_msgs.h should include ib_cm.h IB/cm: Include HCA ACK delay in local ACK timeout IB/cm: Use spin_lock_irq() instead of spin_lock_irqsave() when possible IB/sa: Make sure SA queries use default P_Key IPoIB: Recycle loopback skbs instead of freeing and reallocating IB/mthca: Replace memset(<addr>, 0, PAGE_SIZE) with clear_page(<addr>) IPoIB/cm: Fix warning if IPV6 is not enabled IB/core: Take sizeof the correct pointer when calling kmalloc() IB/ehca: Improve latency by unlocking after triggering the hardware IB/ehca: Notify consumers of LID/PKEY/SM changes after nondisruptive events IB/ehca: Return QP pointer in poll_cq() IB/ehca: Change idr spinlocks into rwlocks IB/ehca: Refactor sync between completions and destroy_cq using atomic_t IB/ehca: Lock renaming, static initializers IB/ehca: Report RDMA atomic attributes in query_qp() ...
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/cxgb3/version.h2
-rw-r--r--drivers/net/mlx4/fw.c3
-rw-r--r--drivers/net/mlx4/fw.h1
-rw-r--r--drivers/net/mlx4/main.c1
-rw-r--r--drivers/net/mlx4/mlx4.h1
-rw-r--r--drivers/net/mlx4/qp.c21
-rw-r--r--drivers/net/mlx4/srq.c30
7 files changed, 58 insertions, 1 deletions
diff --git a/drivers/net/cxgb3/version.h b/drivers/net/cxgb3/version.h
index 8eddd23a3a51..eb508bf8022a 100644
--- a/drivers/net/cxgb3/version.h
+++ b/drivers/net/cxgb3/version.h
@@ -39,6 +39,6 @@
39 39
40/* Firmware version */ 40/* Firmware version */
41#define FW_VERSION_MAJOR 4 41#define FW_VERSION_MAJOR 4
42#define FW_VERSION_MINOR 1 42#define FW_VERSION_MINOR 3
43#define FW_VERSION_MICRO 0 43#define FW_VERSION_MICRO 0
44#endif /* __CHELSIO_VERSION_H */ 44#endif /* __CHELSIO_VERSION_H */
diff --git a/drivers/net/mlx4/fw.c b/drivers/net/mlx4/fw.c
index d2b065351e45..c45cbe43a0c4 100644
--- a/drivers/net/mlx4/fw.c
+++ b/drivers/net/mlx4/fw.c
@@ -138,6 +138,7 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap)
138#define QUERY_DEV_CAP_ACK_DELAY_OFFSET 0x35 138#define QUERY_DEV_CAP_ACK_DELAY_OFFSET 0x35
139#define QUERY_DEV_CAP_MTU_WIDTH_OFFSET 0x36 139#define QUERY_DEV_CAP_MTU_WIDTH_OFFSET 0x36
140#define QUERY_DEV_CAP_VL_PORT_OFFSET 0x37 140#define QUERY_DEV_CAP_VL_PORT_OFFSET 0x37
141#define QUERY_DEV_CAP_MAX_MSG_SZ_OFFSET 0x38
141#define QUERY_DEV_CAP_MAX_GID_OFFSET 0x3b 142#define QUERY_DEV_CAP_MAX_GID_OFFSET 0x3b
142#define QUERY_DEV_CAP_RATE_SUPPORT_OFFSET 0x3c 143#define QUERY_DEV_CAP_RATE_SUPPORT_OFFSET 0x3c
143#define QUERY_DEV_CAP_MAX_PKEY_OFFSET 0x3f 144#define QUERY_DEV_CAP_MAX_PKEY_OFFSET 0x3f
@@ -220,6 +221,8 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap)
220 dev_cap->local_ca_ack_delay = field & 0x1f; 221 dev_cap->local_ca_ack_delay = field & 0x1f;
221 MLX4_GET(field, outbox, QUERY_DEV_CAP_VL_PORT_OFFSET); 222 MLX4_GET(field, outbox, QUERY_DEV_CAP_VL_PORT_OFFSET);
222 dev_cap->num_ports = field & 0xf; 223 dev_cap->num_ports = field & 0xf;
224 MLX4_GET(field, outbox, QUERY_DEV_CAP_MAX_MSG_SZ_OFFSET);
225 dev_cap->max_msg_sz = 1 << (field & 0x1f);
223 MLX4_GET(stat_rate, outbox, QUERY_DEV_CAP_RATE_SUPPORT_OFFSET); 226 MLX4_GET(stat_rate, outbox, QUERY_DEV_CAP_RATE_SUPPORT_OFFSET);
224 dev_cap->stat_rate_support = stat_rate; 227 dev_cap->stat_rate_support = stat_rate;
225 MLX4_GET(dev_cap->flags, outbox, QUERY_DEV_CAP_FLAGS_OFFSET); 228 MLX4_GET(dev_cap->flags, outbox, QUERY_DEV_CAP_FLAGS_OFFSET);
diff --git a/drivers/net/mlx4/fw.h b/drivers/net/mlx4/fw.h
index 296254ac27c1..7e1dd9e25cfb 100644
--- a/drivers/net/mlx4/fw.h
+++ b/drivers/net/mlx4/fw.h
@@ -60,6 +60,7 @@ struct mlx4_dev_cap {
60 int max_rdma_global; 60 int max_rdma_global;
61 int local_ca_ack_delay; 61 int local_ca_ack_delay;
62 int num_ports; 62 int num_ports;
63 u32 max_msg_sz;
63 int max_mtu[MLX4_MAX_PORTS + 1]; 64 int max_mtu[MLX4_MAX_PORTS + 1];
64 int max_port_width[MLX4_MAX_PORTS + 1]; 65 int max_port_width[MLX4_MAX_PORTS + 1];
65 int max_vl[MLX4_MAX_PORTS + 1]; 66 int max_vl[MLX4_MAX_PORTS + 1];
diff --git a/drivers/net/mlx4/main.c b/drivers/net/mlx4/main.c
index c3da2a2f5431..a4f2e0475a71 100644
--- a/drivers/net/mlx4/main.c
+++ b/drivers/net/mlx4/main.c
@@ -154,6 +154,7 @@ static int __devinit mlx4_dev_cap(struct mlx4_dev *dev, struct mlx4_dev_cap *dev
154 dev->caps.reserved_uars = dev_cap->reserved_uars; 154 dev->caps.reserved_uars = dev_cap->reserved_uars;
155 dev->caps.reserved_pds = dev_cap->reserved_pds; 155 dev->caps.reserved_pds = dev_cap->reserved_pds;
156 dev->caps.mtt_entry_sz = MLX4_MTT_ENTRY_PER_SEG * dev_cap->mtt_entry_sz; 156 dev->caps.mtt_entry_sz = MLX4_MTT_ENTRY_PER_SEG * dev_cap->mtt_entry_sz;
157 dev->caps.max_msg_sz = dev_cap->max_msg_sz;
157 dev->caps.page_size_cap = ~(u32) (dev_cap->min_page_sz - 1); 158 dev->caps.page_size_cap = ~(u32) (dev_cap->min_page_sz - 1);
158 dev->caps.flags = dev_cap->flags; 159 dev->caps.flags = dev_cap->flags;
159 dev->caps.stat_rate_support = dev_cap->stat_rate_support; 160 dev->caps.stat_rate_support = dev_cap->stat_rate_support;
diff --git a/drivers/net/mlx4/mlx4.h b/drivers/net/mlx4/mlx4.h
index 3d3b6d24d8d3..d9c91a71fc87 100644
--- a/drivers/net/mlx4/mlx4.h
+++ b/drivers/net/mlx4/mlx4.h
@@ -37,6 +37,7 @@
37#ifndef MLX4_H 37#ifndef MLX4_H
38#define MLX4_H 38#define MLX4_H
39 39
40#include <linux/mutex.h>
40#include <linux/radix-tree.h> 41#include <linux/radix-tree.h>
41 42
42#include <linux/mlx4/device.h> 43#include <linux/mlx4/device.h>
diff --git a/drivers/net/mlx4/qp.c b/drivers/net/mlx4/qp.c
index 492cfaaaa75c..19b48c71cf7f 100644
--- a/drivers/net/mlx4/qp.c
+++ b/drivers/net/mlx4/qp.c
@@ -277,3 +277,24 @@ void mlx4_cleanup_qp_table(struct mlx4_dev *dev)
277 mlx4_CONF_SPECIAL_QP(dev, 0); 277 mlx4_CONF_SPECIAL_QP(dev, 0);
278 mlx4_bitmap_cleanup(&mlx4_priv(dev)->qp_table.bitmap); 278 mlx4_bitmap_cleanup(&mlx4_priv(dev)->qp_table.bitmap);
279} 279}
280
281int mlx4_qp_query(struct mlx4_dev *dev, struct mlx4_qp *qp,
282 struct mlx4_qp_context *context)
283{
284 struct mlx4_cmd_mailbox *mailbox;
285 int err;
286
287 mailbox = mlx4_alloc_cmd_mailbox(dev);
288 if (IS_ERR(mailbox))
289 return PTR_ERR(mailbox);
290
291 err = mlx4_cmd_box(dev, 0, mailbox->dma, qp->qpn, 0,
292 MLX4_CMD_QUERY_QP, MLX4_CMD_TIME_CLASS_A);
293 if (!err)
294 memcpy(context, mailbox->buf + 8, sizeof *context);
295
296 mlx4_free_cmd_mailbox(dev, mailbox);
297 return err;
298}
299EXPORT_SYMBOL_GPL(mlx4_qp_query);
300
diff --git a/drivers/net/mlx4/srq.c b/drivers/net/mlx4/srq.c
index 2134f83aed87..b061c86d6839 100644
--- a/drivers/net/mlx4/srq.c
+++ b/drivers/net/mlx4/srq.c
@@ -102,6 +102,13 @@ static int mlx4_ARM_SRQ(struct mlx4_dev *dev, int srq_num, int limit_watermark)
102 MLX4_CMD_TIME_CLASS_B); 102 MLX4_CMD_TIME_CLASS_B);
103} 103}
104 104
105static int mlx4_QUERY_SRQ(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox,
106 int srq_num)
107{
108 return mlx4_cmd_box(dev, 0, mailbox->dma, srq_num, 0, MLX4_CMD_QUERY_SRQ,
109 MLX4_CMD_TIME_CLASS_A);
110}
111
105int mlx4_srq_alloc(struct mlx4_dev *dev, u32 pdn, struct mlx4_mtt *mtt, 112int mlx4_srq_alloc(struct mlx4_dev *dev, u32 pdn, struct mlx4_mtt *mtt,
106 u64 db_rec, struct mlx4_srq *srq) 113 u64 db_rec, struct mlx4_srq *srq)
107{ 114{
@@ -205,6 +212,29 @@ int mlx4_srq_arm(struct mlx4_dev *dev, struct mlx4_srq *srq, int limit_watermark
205} 212}
206EXPORT_SYMBOL_GPL(mlx4_srq_arm); 213EXPORT_SYMBOL_GPL(mlx4_srq_arm);
207 214
215int mlx4_srq_query(struct mlx4_dev *dev, struct mlx4_srq *srq, int *limit_watermark)
216{
217 struct mlx4_cmd_mailbox *mailbox;
218 struct mlx4_srq_context *srq_context;
219 int err;
220
221 mailbox = mlx4_alloc_cmd_mailbox(dev);
222 if (IS_ERR(mailbox))
223 return PTR_ERR(mailbox);
224
225 srq_context = mailbox->buf;
226
227 err = mlx4_QUERY_SRQ(dev, mailbox, srq->srqn);
228 if (err)
229 goto err_out;
230 *limit_watermark = srq_context->limit_watermark;
231
232err_out:
233 mlx4_free_cmd_mailbox(dev, mailbox);
234 return err;
235}
236EXPORT_SYMBOL_GPL(mlx4_srq_query);
237
208int __devinit mlx4_init_srq_table(struct mlx4_dev *dev) 238int __devinit mlx4_init_srq_table(struct mlx4_dev *dev)
209{ 239{
210 struct mlx4_srq_table *srq_table = &mlx4_priv(dev)->srq_table; 240 struct mlx4_srq_table *srq_table = &mlx4_priv(dev)->srq_table;