Extra debug for o2iblind

From: root <root@opahsx121.cornelisnetworks.com>


---
 lnet/klnds/o2iblnd/o2iblnd.c |   15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/lnet/klnds/o2iblnd/o2iblnd.c b/lnet/klnds/o2iblnd/o2iblnd.c
index 738e289b1b..a271b0a67a 100644
--- a/lnet/klnds/o2iblnd/o2iblnd.c
+++ b/lnet/klnds/o2iblnd/o2iblnd.c
@@ -1820,6 +1820,12 @@ kiblnd_fmr_pool_unmap(struct kib_fmr *fmr, int status)
 #endif /* HAVE_FMR_POOL_API */
 	{
 		struct kib_fast_reg_descriptor *frd = fmr->fmr_frd;
+		if (frd) {
+			struct ib_mr *mr = frd->frd_mr;
+			printk("%s: mr 0x%lx, rkey 0x%08x, posted %d\n",
+				__func__, (unsigned long)mr, mr->rkey,
+				(int)frd->frd_posted);
+		}
 
 		if (frd) {
 			if (!frd->frd_posted) {
@@ -1902,6 +1908,7 @@ again:
 		} else
 #endif /* HAVE_FMR_POOL_API */
 		{
+static unsigned int count;
 			if (!list_empty(&fpo->fast_reg.fpo_pool_list)) {
 				struct kib_fast_reg_descriptor *frd;
 #ifdef HAVE_IB_MAP_MR_SG
@@ -1923,6 +1930,13 @@ again:
 				frpl = frd->frd_frpl;
 #endif
 				mr   = frd->frd_mr;
+				printk("%s  : mr 0x%lx, rkey 0x%08x, is_rx %d, count %u\n", __func__, (unsigned long)mr, mr->rkey, (int)is_rx, count);
+#if 0
+				if ((count % 100) == 0) {
+					dump_stack();
+				}
+#endif
+				count++;
 
 				if (!frd->frd_valid) {
 					struct ib_rdma_wr *inv_wr;
@@ -2610,6 +2624,7 @@ kiblnd_hdev_get_attr(struct kib_hca_dev *hdev)
 #endif /* HAVE_FMR_POOL_API */
 	if (dev_attr->device_cap_flags & IB_DEVICE_MEM_MGT_EXTENSIONS) {
 		LCONSOLE_INFO("Using FastReg for registration\n");
+		LCONSOLE_INFO("CN debug v3\n");
 		hdev->ibh_dev->ibd_dev_caps |= IBLND_DEV_CAPS_FASTREG_ENABLED;
 #ifndef HAVE_IB_ALLOC_FAST_REG_MR
 #ifdef IB_DEVICE_SG_GAPS_REG
