• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/drivers/infiniband/hw/mthca/

Lines Matching refs:mtt

203 	struct mthca_mtt *mtt;
209 mtt = kmalloc(sizeof *mtt, GFP_KERNEL);
210 if (!mtt)
213 mtt->buddy = buddy;
214 mtt->order = 0;
216 ++mtt->order;
218 mtt->first_seg = mthca_alloc_mtt_range(dev, mtt->order, buddy);
219 if (mtt->first_seg == -1) {
220 kfree(mtt);
224 return mtt;
232 void mthca_free_mtt(struct mthca_dev *dev, struct mthca_mtt *mtt)
234 if (!mtt)
237 mthca_buddy_free(mtt->buddy, mtt->first_seg, mtt->order);
240 mtt->first_seg,
241 mtt->first_seg + (1 << mtt->order) - 1);
243 kfree(mtt);
246 static int __mthca_write_mtt(struct mthca_dev *dev, struct mthca_mtt *mtt,
262 mtt->first_seg * MTHCA_MTT_SEG_SIZE +
315 struct mthca_mtt *mtt, int start_index,
321 mtts = dev->mr_table.tavor_fmr.mtt_base + mtt->first_seg * MTHCA_MTT_SEG_SIZE +
329 struct mthca_mtt *mtt, int start_index,
342 mtts = mthca_table_find(dev->mr_table.mtt_table, mtt->first_seg +
353 int mthca_write_mtt(struct mthca_dev *dev, struct mthca_mtt *mtt,
361 return __mthca_write_mtt(dev, mtt, start_index, buffer_list, list_len);
366 mthca_arbel_write_mtt_seg(dev, mtt, start_index,
369 mthca_tavor_write_mtt_seg(dev, mtt, start_index,
459 if (!mr->mtt)
471 if (mr->mtt)
474 mr->mtt->first_seg * MTHCA_MTT_SEG_SIZE);
517 mr->mtt = NULL;
528 mr->mtt = mthca_alloc_mtt(dev, list_len);
529 if (IS_ERR(mr->mtt))
530 return PTR_ERR(mr->mtt);
532 err = mthca_write_mtt(dev, mr->mtt, 0, buffer_list, list_len);
534 mthca_free_mtt(dev, mr->mtt);
541 mthca_free_mtt(dev, mr->mtt);
571 mthca_free_mtt(dev, mr->mtt);
615 mr->mtt = __mthca_alloc_mtt(dev, list_len, dev->mr_table.fmr_mtt_buddy);
616 if (IS_ERR(mr->mtt))
619 mtt_seg = mr->mtt->first_seg * MTHCA_MTT_SEG_SIZE;
623 mr->mtt->first_seg,
679 mthca_free_mtt(dev, mr->mtt);
695 mthca_free_mtt(dev, fmr->mtt);