Lines Matching refs:mailbox
255 struct hns_roce_cmd_mailbox *mailbox; in hns_roce_alloc_cmd_mailbox() local
257 mailbox = kmalloc(sizeof(*mailbox), GFP_KERNEL); in hns_roce_alloc_cmd_mailbox()
258 if (!mailbox) in hns_roce_alloc_cmd_mailbox()
261 mailbox->buf = in hns_roce_alloc_cmd_mailbox()
262 dma_pool_alloc(hr_dev->cmd.pool, GFP_KERNEL, &mailbox->dma); in hns_roce_alloc_cmd_mailbox()
263 if (!mailbox->buf) { in hns_roce_alloc_cmd_mailbox()
264 kfree(mailbox); in hns_roce_alloc_cmd_mailbox()
268 return mailbox; in hns_roce_alloc_cmd_mailbox()
272 struct hns_roce_cmd_mailbox *mailbox) in hns_roce_free_cmd_mailbox() argument
274 if (!mailbox) in hns_roce_free_cmd_mailbox()
277 dma_pool_free(hr_dev->cmd.pool, mailbox->buf, mailbox->dma); in hns_roce_free_cmd_mailbox()
278 kfree(mailbox); in hns_roce_free_cmd_mailbox()
282 struct hns_roce_cmd_mailbox *mailbox, in hns_roce_create_hw_ctx() argument
285 return hns_roce_cmd_mbox(dev, mailbox->dma, 0, cmd, idx); in hns_roce_create_hw_ctx()