aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw
diff options
context:
space:
mode:
authorSteve Wise <swise@opengridcomputing.com>2010-09-10 12:15:14 -0400
committerRoland Dreier <rolandd@cisco.com>2010-09-28 13:46:33 -0400
commit05fb9629473690e4be4112f22e1adeb1fe4ad733 (patch)
treec9ee5846085b06a1a295ea1bcc8d3f087fd93a2b /drivers/infiniband/hw
parent0e42c1f4303f3f8d5b2c257dc5488b0ad465097d (diff)
RDMA/cxgb4: Log HW lack-of-resource errors
This helps debug cases where HW resources are depleted. Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw')
-rw-r--r--drivers/infiniband/hw/cxgb4/resource.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/cxgb4/resource.c b/drivers/infiniband/hw/cxgb4/resource.c
index 83b23dfa250d..26365f6ed84b 100644
--- a/drivers/infiniband/hw/cxgb4/resource.c
+++ b/drivers/infiniband/hw/cxgb4/resource.c
@@ -311,6 +311,9 @@ u32 c4iw_pblpool_alloc(struct c4iw_rdev *rdev, int size)
311{ 311{
312 unsigned long addr = gen_pool_alloc(rdev->pbl_pool, size); 312 unsigned long addr = gen_pool_alloc(rdev->pbl_pool, size);
313 PDBG("%s addr 0x%x size %d\n", __func__, (u32)addr, size); 313 PDBG("%s addr 0x%x size %d\n", __func__, (u32)addr, size);
314 if (!addr && printk_ratelimit())
315 printk(KERN_WARNING MOD "%s: Out of PBL memory\n",
316 pci_name(rdev->lldi.pdev));
314 return (u32)addr; 317 return (u32)addr;
315} 318}
316 319
@@ -370,6 +373,9 @@ u32 c4iw_rqtpool_alloc(struct c4iw_rdev *rdev, int size)
370{ 373{
371 unsigned long addr = gen_pool_alloc(rdev->rqt_pool, size << 6); 374 unsigned long addr = gen_pool_alloc(rdev->rqt_pool, size << 6);
372 PDBG("%s addr 0x%x size %d\n", __func__, (u32)addr, size << 6); 375 PDBG("%s addr 0x%x size %d\n", __func__, (u32)addr, size << 6);
376 if (!addr && printk_ratelimit())
377 printk(KERN_WARNING MOD "%s: Out of RQT memory\n",
378 pci_name(rdev->lldi.pdev));
373 return (u32)addr; 379 return (u32)addr;
374} 380}
375 381