diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-07 15:18:21 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-07 15:18:21 -0400 |
commit | 972d45fb43f0f0793fa275c4a22998106760cd61 (patch) | |
tree | f80ac6698044b179bf3fb9d686bd33083033ccb5 /drivers/infiniband/core | |
parent | 5b6b54982258c330247957a8d877b9851ac69d53 (diff) | |
parent | 8d1cc86a6278687efbab7b8c294ab01efe4d4231 (diff) |
Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband
* 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband:
IPoIB: Convert to NAPI
IB: Return "maybe missed event" hint from ib_req_notify_cq()
IB: Add CQ comp_vector support
IB/ipath: Fix a race condition when generating ACKs
IB/ipath: Fix two more spin lock problems
IB/fmr_pool: Add prefix to all printks
IB/srp: Set proc_name
IB/srp: Add orig_dgid sysfs attribute to scsi_host
IPoIB/cm: Don't crash if remote side uses one QP for both directions
RDMA/cxgb3: Support for new abort logic
RDMA/cxgb3: Initialize cpu_idx field in cpl_close_listserv_req message
RDMA/cxgb3: Fail qp creation if the requested max_inline is too large
RDMA/cxgb3: Fix TERM codes
IPoIB/cm: Fix error handling in ipoib_cm_dev_open()
IB/ipath: Don't corrupt pending mmap list when unmapped objects are freed
IB/mthca: Work around kernel QP starvation
IB/ipath: Don't put QP in timeout queue if waiting to send
IB/ipath: Don't call spin_lock_irq() from interrupt context
Diffstat (limited to 'drivers/infiniband/core')
-rw-r--r-- | drivers/infiniband/core/fmr_pool.c | 32 | ||||
-rw-r--r-- | drivers/infiniband/core/mad.c | 2 | ||||
-rw-r--r-- | drivers/infiniband/core/uverbs_cmd.c | 1 | ||||
-rw-r--r-- | drivers/infiniband/core/uverbs_main.c | 2 | ||||
-rw-r--r-- | drivers/infiniband/core/verbs.c | 4 |
5 files changed, 22 insertions, 19 deletions
diff --git a/drivers/infiniband/core/fmr_pool.c b/drivers/infiniband/core/fmr_pool.c index 1d796e7c8199..a06bcc65a871 100644 --- a/drivers/infiniband/core/fmr_pool.c +++ b/drivers/infiniband/core/fmr_pool.c | |||
@@ -43,6 +43,8 @@ | |||
43 | 43 | ||
44 | #include "core_priv.h" | 44 | #include "core_priv.h" |
45 | 45 | ||
46 | #define PFX "fmr_pool: " | ||
47 | |||
46 | enum { | 48 | enum { |
47 | IB_FMR_MAX_REMAPS = 32, | 49 | IB_FMR_MAX_REMAPS = 32, |
48 | 50 | ||
@@ -150,7 +152,7 @@ static void ib_fmr_batch_release(struct ib_fmr_pool *pool) | |||
150 | 152 | ||
151 | #ifdef DEBUG | 153 | #ifdef DEBUG |
152 | if (fmr->ref_count !=0) { | 154 | if (fmr->ref_count !=0) { |
153 | printk(KERN_WARNING "Unmapping FMR 0x%08x with ref count %d", | 155 | printk(KERN_WARNING PFX "Unmapping FMR 0x%08x with ref count %d", |
154 | fmr, fmr->ref_count); | 156 | fmr, fmr->ref_count); |
155 | } | 157 | } |
156 | #endif | 158 | #endif |
@@ -168,7 +170,7 @@ static void ib_fmr_batch_release(struct ib_fmr_pool *pool) | |||
168 | 170 | ||
169 | ret = ib_unmap_fmr(&fmr_list); | 171 | ret = ib_unmap_fmr(&fmr_list); |
170 | if (ret) | 172 | if (ret) |
171 | printk(KERN_WARNING "ib_unmap_fmr returned %d", ret); | 173 | printk(KERN_WARNING PFX "ib_unmap_fmr returned %d", ret); |
172 | 174 | ||
173 | spin_lock_irq(&pool->pool_lock); | 175 | spin_lock_irq(&pool->pool_lock); |
174 | list_splice(&unmap_list, &pool->free_list); | 176 | list_splice(&unmap_list, &pool->free_list); |
@@ -226,20 +228,20 @@ struct ib_fmr_pool *ib_create_fmr_pool(struct ib_pd *pd, | |||
226 | device = pd->device; | 228 | device = pd->device; |
227 | if (!device->alloc_fmr || !device->dealloc_fmr || | 229 | if (!device->alloc_fmr || !device->dealloc_fmr || |
228 | !device->map_phys_fmr || !device->unmap_fmr) { | 230 | !device->map_phys_fmr || !device->unmap_fmr) { |
229 | printk(KERN_WARNING "Device %s does not support fast memory regions", | 231 | printk(KERN_INFO PFX "Device %s does not support FMRs\n", |
230 | device->name); | 232 | device->name); |
231 | return ERR_PTR(-ENOSYS); | 233 | return ERR_PTR(-ENOSYS); |
232 | } | 234 | } |
233 | 235 | ||
234 | attr = kmalloc(sizeof *attr, GFP_KERNEL); | 236 | attr = kmalloc(sizeof *attr, GFP_KERNEL); |
235 | if (!attr) { | 237 | if (!attr) { |
236 | printk(KERN_WARNING "couldn't allocate device attr struct"); | 238 | printk(KERN_WARNING PFX "couldn't allocate device attr struct"); |
237 | return ERR_PTR(-ENOMEM); | 239 | return ERR_PTR(-ENOMEM); |
238 | } | 240 | } |
239 | 241 | ||
240 | ret = ib_query_device(device, attr); | 242 | ret = ib_query_device(device, attr); |
241 | if (ret) { | 243 | if (ret) { |
242 | printk(KERN_WARNING "couldn't query device"); | 244 | printk(KERN_WARNING PFX "couldn't query device: %d", ret); |
243 | kfree(attr); | 245 | kfree(attr); |
244 | return ERR_PTR(ret); | 246 | return ERR_PTR(ret); |
245 | } | 247 | } |
@@ -253,7 +255,7 @@ struct ib_fmr_pool *ib_create_fmr_pool(struct ib_pd *pd, | |||
253 | 255 | ||
254 | pool = kmalloc(sizeof *pool, GFP_KERNEL); | 256 | pool = kmalloc(sizeof *pool, GFP_KERNEL); |
255 | if (!pool) { | 257 | if (!pool) { |
256 | printk(KERN_WARNING "couldn't allocate pool struct"); | 258 | printk(KERN_WARNING PFX "couldn't allocate pool struct"); |
257 | return ERR_PTR(-ENOMEM); | 259 | return ERR_PTR(-ENOMEM); |
258 | } | 260 | } |
259 | 261 | ||
@@ -270,7 +272,7 @@ struct ib_fmr_pool *ib_create_fmr_pool(struct ib_pd *pd, | |||
270 | kmalloc(IB_FMR_HASH_SIZE * sizeof *pool->cache_bucket, | 272 | kmalloc(IB_FMR_HASH_SIZE * sizeof *pool->cache_bucket, |
271 | GFP_KERNEL); | 273 | GFP_KERNEL); |
272 | if (!pool->cache_bucket) { | 274 | if (!pool->cache_bucket) { |
273 | printk(KERN_WARNING "Failed to allocate cache in pool"); | 275 | printk(KERN_WARNING PFX "Failed to allocate cache in pool"); |
274 | ret = -ENOMEM; | 276 | ret = -ENOMEM; |
275 | goto out_free_pool; | 277 | goto out_free_pool; |
276 | } | 278 | } |
@@ -294,7 +296,7 @@ struct ib_fmr_pool *ib_create_fmr_pool(struct ib_pd *pd, | |||
294 | "ib_fmr(%s)", | 296 | "ib_fmr(%s)", |
295 | device->name); | 297 | device->name); |
296 | if (IS_ERR(pool->thread)) { | 298 | if (IS_ERR(pool->thread)) { |
297 | printk(KERN_WARNING "couldn't start cleanup thread"); | 299 | printk(KERN_WARNING PFX "couldn't start cleanup thread"); |
298 | ret = PTR_ERR(pool->thread); | 300 | ret = PTR_ERR(pool->thread); |
299 | goto out_free_pool; | 301 | goto out_free_pool; |
300 | } | 302 | } |
@@ -311,8 +313,8 @@ struct ib_fmr_pool *ib_create_fmr_pool(struct ib_pd *pd, | |||
311 | fmr = kmalloc(sizeof *fmr + params->max_pages_per_fmr * sizeof (u64), | 313 | fmr = kmalloc(sizeof *fmr + params->max_pages_per_fmr * sizeof (u64), |
312 | GFP_KERNEL); | 314 | GFP_KERNEL); |
313 | if (!fmr) { | 315 | if (!fmr) { |
314 | printk(KERN_WARNING "failed to allocate fmr struct " | 316 | printk(KERN_WARNING PFX "failed to allocate fmr " |
315 | "for FMR %d", i); | 317 | "struct for FMR %d", i); |
316 | goto out_fail; | 318 | goto out_fail; |
317 | } | 319 | } |
318 | 320 | ||
@@ -323,7 +325,8 @@ struct ib_fmr_pool *ib_create_fmr_pool(struct ib_pd *pd, | |||
323 | 325 | ||
324 | fmr->fmr = ib_alloc_fmr(pd, params->access, &fmr_attr); | 326 | fmr->fmr = ib_alloc_fmr(pd, params->access, &fmr_attr); |
325 | if (IS_ERR(fmr->fmr)) { | 327 | if (IS_ERR(fmr->fmr)) { |
326 | printk(KERN_WARNING "fmr_create failed for FMR %d", i); | 328 | printk(KERN_WARNING PFX "fmr_create failed " |
329 | "for FMR %d", i); | ||
327 | kfree(fmr); | 330 | kfree(fmr); |
328 | goto out_fail; | 331 | goto out_fail; |
329 | } | 332 | } |
@@ -378,7 +381,7 @@ void ib_destroy_fmr_pool(struct ib_fmr_pool *pool) | |||
378 | } | 381 | } |
379 | 382 | ||
380 | if (i < pool->pool_size) | 383 | if (i < pool->pool_size) |
381 | printk(KERN_WARNING "pool still has %d regions registered", | 384 | printk(KERN_WARNING PFX "pool still has %d regions registered", |
382 | pool->pool_size - i); | 385 | pool->pool_size - i); |
383 | 386 | ||
384 | kfree(pool->cache_bucket); | 387 | kfree(pool->cache_bucket); |
@@ -463,8 +466,7 @@ struct ib_pool_fmr *ib_fmr_pool_map_phys(struct ib_fmr_pool *pool_handle, | |||
463 | list_add(&fmr->list, &pool->free_list); | 466 | list_add(&fmr->list, &pool->free_list); |
464 | spin_unlock_irqrestore(&pool->pool_lock, flags); | 467 | spin_unlock_irqrestore(&pool->pool_lock, flags); |
465 | 468 | ||
466 | printk(KERN_WARNING "fmr_map returns %d\n", | 469 | printk(KERN_WARNING PFX "fmr_map returns %d\n", result); |
467 | result); | ||
468 | 470 | ||
469 | return ERR_PTR(result); | 471 | return ERR_PTR(result); |
470 | } | 472 | } |
@@ -516,7 +518,7 @@ int ib_fmr_pool_unmap(struct ib_pool_fmr *fmr) | |||
516 | 518 | ||
517 | #ifdef DEBUG | 519 | #ifdef DEBUG |
518 | if (fmr->ref_count < 0) | 520 | if (fmr->ref_count < 0) |
519 | printk(KERN_WARNING "FMR %p has ref count %d < 0", | 521 | printk(KERN_WARNING PFX "FMR %p has ref count %d < 0", |
520 | fmr, fmr->ref_count); | 522 | fmr, fmr->ref_count); |
521 | #endif | 523 | #endif |
522 | 524 | ||
diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c index 6edfecf1be72..85ccf13b8041 100644 --- a/drivers/infiniband/core/mad.c +++ b/drivers/infiniband/core/mad.c | |||
@@ -2771,7 +2771,7 @@ static int ib_mad_port_open(struct ib_device *device, | |||
2771 | cq_size = (IB_MAD_QP_SEND_SIZE + IB_MAD_QP_RECV_SIZE) * 2; | 2771 | cq_size = (IB_MAD_QP_SEND_SIZE + IB_MAD_QP_RECV_SIZE) * 2; |
2772 | port_priv->cq = ib_create_cq(port_priv->device, | 2772 | port_priv->cq = ib_create_cq(port_priv->device, |
2773 | ib_mad_thread_completion_handler, | 2773 | ib_mad_thread_completion_handler, |
2774 | NULL, port_priv, cq_size); | 2774 | NULL, port_priv, cq_size, 0); |
2775 | if (IS_ERR(port_priv->cq)) { | 2775 | if (IS_ERR(port_priv->cq)) { |
2776 | printk(KERN_ERR PFX "Couldn't create ib_mad CQ\n"); | 2776 | printk(KERN_ERR PFX "Couldn't create ib_mad CQ\n"); |
2777 | ret = PTR_ERR(port_priv->cq); | 2777 | ret = PTR_ERR(port_priv->cq); |
diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c index 4fd75afa6a3a..bab66769be14 100644 --- a/drivers/infiniband/core/uverbs_cmd.c +++ b/drivers/infiniband/core/uverbs_cmd.c | |||
@@ -802,6 +802,7 @@ ssize_t ib_uverbs_create_cq(struct ib_uverbs_file *file, | |||
802 | INIT_LIST_HEAD(&obj->async_list); | 802 | INIT_LIST_HEAD(&obj->async_list); |
803 | 803 | ||
804 | cq = file->device->ib_dev->create_cq(file->device->ib_dev, cmd.cqe, | 804 | cq = file->device->ib_dev->create_cq(file->device->ib_dev, cmd.cqe, |
805 | cmd.comp_vector, | ||
805 | file->ucontext, &udata); | 806 | file->ucontext, &udata); |
806 | if (IS_ERR(cq)) { | 807 | if (IS_ERR(cq)) { |
807 | ret = PTR_ERR(cq); | 808 | ret = PTR_ERR(cq); |
diff --git a/drivers/infiniband/core/uverbs_main.c b/drivers/infiniband/core/uverbs_main.c index f8bc822a3cc3..d44e54799651 100644 --- a/drivers/infiniband/core/uverbs_main.c +++ b/drivers/infiniband/core/uverbs_main.c | |||
@@ -752,7 +752,7 @@ static void ib_uverbs_add_one(struct ib_device *device) | |||
752 | spin_unlock(&map_lock); | 752 | spin_unlock(&map_lock); |
753 | 753 | ||
754 | uverbs_dev->ib_dev = device; | 754 | uverbs_dev->ib_dev = device; |
755 | uverbs_dev->num_comp_vectors = 1; | 755 | uverbs_dev->num_comp_vectors = device->num_comp_vectors; |
756 | 756 | ||
757 | uverbs_dev->dev = cdev_alloc(); | 757 | uverbs_dev->dev = cdev_alloc(); |
758 | if (!uverbs_dev->dev) | 758 | if (!uverbs_dev->dev) |
diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c index ccdf93d30b01..86ed8af9c7e6 100644 --- a/drivers/infiniband/core/verbs.c +++ b/drivers/infiniband/core/verbs.c | |||
@@ -609,11 +609,11 @@ EXPORT_SYMBOL(ib_destroy_qp); | |||
609 | struct ib_cq *ib_create_cq(struct ib_device *device, | 609 | struct ib_cq *ib_create_cq(struct ib_device *device, |
610 | ib_comp_handler comp_handler, | 610 | ib_comp_handler comp_handler, |
611 | void (*event_handler)(struct ib_event *, void *), | 611 | void (*event_handler)(struct ib_event *, void *), |
612 | void *cq_context, int cqe) | 612 | void *cq_context, int cqe, int comp_vector) |
613 | { | 613 | { |
614 | struct ib_cq *cq; | 614 | struct ib_cq *cq; |
615 | 615 | ||
616 | cq = device->create_cq(device, cqe, NULL, NULL); | 616 | cq = device->create_cq(device, cqe, comp_vector, NULL, NULL); |
617 | 617 | ||
618 | if (!IS_ERR(cq)) { | 618 | if (!IS_ERR(cq)) { |
619 | cq->device = device; | 619 | cq->device = device; |