Lines Matching refs:mailbox
2634 struct mlx4_cmd_mailbox *mailbox; in mlx4_alloc_cmd_mailbox() local
2636 mailbox = kmalloc(sizeof *mailbox, GFP_KERNEL); in mlx4_alloc_cmd_mailbox()
2637 if (!mailbox) in mlx4_alloc_cmd_mailbox()
2640 mailbox->buf = pci_pool_alloc(mlx4_priv(dev)->cmd.pool, GFP_KERNEL, in mlx4_alloc_cmd_mailbox()
2641 &mailbox->dma); in mlx4_alloc_cmd_mailbox()
2642 if (!mailbox->buf) { in mlx4_alloc_cmd_mailbox()
2643 kfree(mailbox); in mlx4_alloc_cmd_mailbox()
2647 memset(mailbox->buf, 0, MLX4_MAILBOX_SIZE); in mlx4_alloc_cmd_mailbox()
2649 return mailbox; in mlx4_alloc_cmd_mailbox()
2654 struct mlx4_cmd_mailbox *mailbox) in mlx4_free_cmd_mailbox() argument
2656 if (!mailbox) in mlx4_free_cmd_mailbox()
2659 pci_pool_free(mlx4_priv(dev)->cmd.pool, mailbox->buf, mailbox->dma); in mlx4_free_cmd_mailbox()
2660 kfree(mailbox); in mlx4_free_cmd_mailbox()
3186 struct mlx4_cmd_mailbox *mailbox = NULL; in mlx4_get_counter_stats() local
3197 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_get_counter_stats()
3198 if (IS_ERR(mailbox)) in mlx4_get_counter_stats()
3199 return PTR_ERR(mailbox); in mlx4_get_counter_stats()
3201 memset(mailbox->buf, 0, sizeof(struct mlx4_counter)); in mlx4_get_counter_stats()
3205 err = mlx4_cmd_box(dev, 0, mailbox->dma, in mlx4_get_counter_stats()
3215 tmp_counter = (struct mlx4_counter *)mailbox->buf; in mlx4_get_counter_stats()
3233 mlx4_free_cmd_mailbox(dev, mailbox); in mlx4_get_counter_stats()