diff options
author | Steve Wise <swise@opengridcomputing.com> | 2014-04-09 10:38:28 -0400 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2014-04-11 14:36:09 -0400 |
commit | 98a3e879907644c0b7e2f16436eb5cf24b9cd61f (patch) | |
tree | 6932b78f424a341816cf47bd9d869cd0afc377f9 /drivers | |
parent | c3f98fa29176753a759ade424f18b11f440b19f4 (diff) |
RDMA/cxgb4: Add missing debug stats
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/infiniband/hw/cxgb4/mem.c | 6 | ||||
-rw-r--r-- | drivers/infiniband/hw/cxgb4/resource.c | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/cxgb4/mem.c b/drivers/infiniband/hw/cxgb4/mem.c index f9ca072a99ed..ec7a2988a703 100644 --- a/drivers/infiniband/hw/cxgb4/mem.c +++ b/drivers/infiniband/hw/cxgb4/mem.c | |||
@@ -259,8 +259,12 @@ static int write_tpt_entry(struct c4iw_rdev *rdev, u32 reset_tpt_entry, | |||
259 | 259 | ||
260 | if ((!reset_tpt_entry) && (*stag == T4_STAG_UNSET)) { | 260 | if ((!reset_tpt_entry) && (*stag == T4_STAG_UNSET)) { |
261 | stag_idx = c4iw_get_resource(&rdev->resource.tpt_table); | 261 | stag_idx = c4iw_get_resource(&rdev->resource.tpt_table); |
262 | if (!stag_idx) | 262 | if (!stag_idx) { |
263 | mutex_lock(&rdev->stats.lock); | ||
264 | rdev->stats.stag.fail++; | ||
265 | mutex_unlock(&rdev->stats.lock); | ||
263 | return -ENOMEM; | 266 | return -ENOMEM; |
267 | } | ||
264 | mutex_lock(&rdev->stats.lock); | 268 | mutex_lock(&rdev->stats.lock); |
265 | rdev->stats.stag.cur += 32; | 269 | rdev->stats.stag.cur += 32; |
266 | if (rdev->stats.stag.cur > rdev->stats.stag.max) | 270 | if (rdev->stats.stag.cur > rdev->stats.stag.max) |
diff --git a/drivers/infiniband/hw/cxgb4/resource.c b/drivers/infiniband/hw/cxgb4/resource.c index 94b5fd9b9379..67df71a7012e 100644 --- a/drivers/infiniband/hw/cxgb4/resource.c +++ b/drivers/infiniband/hw/cxgb4/resource.c | |||
@@ -179,8 +179,12 @@ u32 c4iw_get_qpid(struct c4iw_rdev *rdev, struct c4iw_dev_ucontext *uctx) | |||
179 | kfree(entry); | 179 | kfree(entry); |
180 | } else { | 180 | } else { |
181 | qid = c4iw_get_resource(&rdev->resource.qid_table); | 181 | qid = c4iw_get_resource(&rdev->resource.qid_table); |
182 | if (!qid) | 182 | if (!qid) { |
183 | mutex_lock(&rdev->stats.lock); | ||
184 | rdev->stats.qid.fail++; | ||
185 | mutex_unlock(&rdev->stats.lock); | ||
183 | goto out; | 186 | goto out; |
187 | } | ||
184 | mutex_lock(&rdev->stats.lock); | 188 | mutex_lock(&rdev->stats.lock); |
185 | rdev->stats.qid.cur += rdev->qpmask + 1; | 189 | rdev->stats.qid.cur += rdev->qpmask + 1; |
186 | mutex_unlock(&rdev->stats.lock); | 190 | mutex_unlock(&rdev->stats.lock); |