/drivers/infiniband/hw/mthca/ |
D | mthca_cmd.c | 610 struct mthca_mailbox *mailbox; in mthca_alloc_mailbox() local 612 mailbox = kmalloc(sizeof *mailbox, gfp_mask); in mthca_alloc_mailbox() 613 if (!mailbox) in mthca_alloc_mailbox() 616 mailbox->buf = pci_pool_alloc(dev->cmd.pool, gfp_mask, &mailbox->dma); in mthca_alloc_mailbox() 617 if (!mailbox->buf) { in mthca_alloc_mailbox() 618 kfree(mailbox); in mthca_alloc_mailbox() 622 return mailbox; in mthca_alloc_mailbox() 625 void mthca_free_mailbox(struct mthca_dev *dev, struct mthca_mailbox *mailbox) in mthca_free_mailbox() argument 627 if (!mailbox) in mthca_free_mailbox() 630 pci_pool_free(dev->cmd.pool, mailbox->buf, mailbox->dma); in mthca_free_mailbox() [all …]
|
D | mthca_mcg.c | 67 struct mthca_mailbox *mailbox; in find_mgm() local 72 mailbox = mthca_alloc_mailbox(dev, GFP_KERNEL); in find_mgm() 73 if (IS_ERR(mailbox)) in find_mgm() 75 mgid = mailbox->buf; in find_mgm() 79 err = mthca_MGID_HASH(dev, mailbox, hash); in find_mgm() 116 mthca_free_mailbox(dev, mailbox); in find_mgm() 123 struct mthca_mailbox *mailbox; in mthca_multicast_attach() local 131 mailbox = mthca_alloc_mailbox(dev, GFP_KERNEL); in mthca_multicast_attach() 132 if (IS_ERR(mailbox)) in mthca_multicast_attach() 133 return PTR_ERR(mailbox); in mthca_multicast_attach() [all …]
|
D | mthca_cmd.h | 253 void mthca_free_mailbox(struct mthca_dev *dev, struct mthca_mailbox *mailbox); 283 int mthca_SW2HW_MPT(struct mthca_dev *dev, struct mthca_mailbox *mailbox, 285 int mthca_HW2SW_MPT(struct mthca_dev *dev, struct mthca_mailbox *mailbox, 287 int mthca_WRITE_MTT(struct mthca_dev *dev, struct mthca_mailbox *mailbox, 292 int mthca_SW2HW_EQ(struct mthca_dev *dev, struct mthca_mailbox *mailbox, 294 int mthca_HW2SW_EQ(struct mthca_dev *dev, struct mthca_mailbox *mailbox, 296 int mthca_SW2HW_CQ(struct mthca_dev *dev, struct mthca_mailbox *mailbox, 298 int mthca_HW2SW_CQ(struct mthca_dev *dev, struct mthca_mailbox *mailbox, 301 int mthca_SW2HW_SRQ(struct mthca_dev *dev, struct mthca_mailbox *mailbox, 303 int mthca_HW2SW_SRQ(struct mthca_dev *dev, struct mthca_mailbox *mailbox, [all …]
|
D | mthca_srq.c | 202 struct mthca_mailbox *mailbox; in mthca_alloc_srq() local 248 mailbox = mthca_alloc_mailbox(dev, GFP_KERNEL); in mthca_alloc_srq() 249 if (IS_ERR(mailbox)) { in mthca_alloc_srq() 250 err = PTR_ERR(mailbox); in mthca_alloc_srq() 264 mthca_arbel_init_srq_context(dev, pd, srq, mailbox->buf); in mthca_alloc_srq() 266 mthca_tavor_init_srq_context(dev, pd, srq, mailbox->buf); in mthca_alloc_srq() 268 err = mthca_SW2HW_SRQ(dev, mailbox, srq->srqn); in mthca_alloc_srq() 284 mthca_free_mailbox(dev, mailbox); in mthca_alloc_srq() 295 err = mthca_HW2SW_SRQ(dev, mailbox, srq->srqn); in mthca_alloc_srq() 304 mthca_free_mailbox(dev, mailbox); in mthca_alloc_srq() [all …]
|
D | mthca_mr.c | 257 struct mthca_mailbox *mailbox; in __mthca_write_mtt() local 262 mailbox = mthca_alloc_mailbox(dev, GFP_KERNEL); in __mthca_write_mtt() 263 if (IS_ERR(mailbox)) in __mthca_write_mtt() 264 return PTR_ERR(mailbox); in __mthca_write_mtt() 265 mtt_entry = mailbox->buf; in __mthca_write_mtt() 283 err = mthca_WRITE_MTT(dev, mailbox, (i + 1) & ~1); in __mthca_write_mtt() 295 mthca_free_mailbox(dev, mailbox); in __mthca_write_mtt() 432 struct mthca_mailbox *mailbox; in mthca_mr_alloc() local 452 mailbox = mthca_alloc_mailbox(dev, GFP_KERNEL); in mthca_mr_alloc() 453 if (IS_ERR(mailbox)) { in mthca_mr_alloc() [all …]
|
D | mthca_eq.c | 473 struct mthca_mailbox *mailbox; in mthca_create_eq() local 494 mailbox = mthca_alloc_mailbox(dev, GFP_KERNEL); in mthca_create_eq() 495 if (IS_ERR(mailbox)) in mthca_create_eq() 497 eq_context = mailbox->buf; in mthca_create_eq() 545 err = mthca_SW2HW_EQ(dev, mailbox, eq->eqn); in mthca_create_eq() 552 mthca_free_mailbox(dev, mailbox); in mthca_create_eq() 578 mthca_free_mailbox(dev, mailbox); in mthca_create_eq() 591 struct mthca_mailbox *mailbox; in mthca_free_eq() local 597 mailbox = mthca_alloc_mailbox(dev, GFP_KERNEL); in mthca_free_eq() 598 if (IS_ERR(mailbox)) in mthca_free_eq() [all …]
|
D | mthca_cq.c | 780 struct mthca_mailbox *mailbox; in mthca_init_cq() local 813 mailbox = mthca_alloc_mailbox(dev, GFP_KERNEL); in mthca_init_cq() 814 if (IS_ERR(mailbox)) in mthca_init_cq() 817 cq_context = mailbox->buf; in mthca_init_cq() 850 err = mthca_SW2HW_CQ(dev, mailbox, cq->cqn); in mthca_init_cq() 867 mthca_free_mailbox(dev, mailbox); in mthca_init_cq() 876 mthca_free_mailbox(dev, mailbox); in mthca_init_cq() 909 struct mthca_mailbox *mailbox; in mthca_free_cq() local 912 mailbox = mthca_alloc_mailbox(dev, GFP_KERNEL); in mthca_free_cq() 913 if (IS_ERR(mailbox)) { in mthca_free_cq() [all …]
|
/drivers/net/ethernet/mellanox/mlx4/ |
D | cq.c | 97 static int mlx4_SW2HW_CQ(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox, in mlx4_SW2HW_CQ() argument 100 return mlx4_cmd(dev, mailbox->dma, cq_num, 0, in mlx4_SW2HW_CQ() 105 static int mlx4_MODIFY_CQ(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox, in mlx4_MODIFY_CQ() argument 108 return mlx4_cmd(dev, mailbox->dma, cq_num, opmod, MLX4_CMD_MODIFY_CQ, in mlx4_MODIFY_CQ() 112 static int mlx4_HW2SW_CQ(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox, in mlx4_HW2SW_CQ() argument 115 return mlx4_cmd_box(dev, 0, mailbox ? mailbox->dma : 0, in mlx4_HW2SW_CQ() 116 cq_num, mailbox ? 0 : 1, MLX4_CMD_HW2SW_CQ, in mlx4_HW2SW_CQ() 123 struct mlx4_cmd_mailbox *mailbox; in mlx4_cq_modify() local 127 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_cq_modify() 128 if (IS_ERR(mailbox)) in mlx4_cq_modify() [all …]
|
D | mcg.c | 55 struct mlx4_cmd_mailbox *mailbox, in mlx4_QP_FLOW_STEERING_ATTACH() argument 62 err = mlx4_cmd_imm(dev, mailbox->dma, &imm, size, 0, in mlx4_QP_FLOW_STEERING_ATTACH() 84 struct mlx4_cmd_mailbox *mailbox) in mlx4_READ_ENTRY() argument 86 return mlx4_cmd_box(dev, 0, mailbox->dma, index, 0, MLX4_CMD_READ_MCG, in mlx4_READ_ENTRY() 91 struct mlx4_cmd_mailbox *mailbox) in mlx4_WRITE_ENTRY() argument 93 return mlx4_cmd(dev, mailbox->dma, index, 0, MLX4_CMD_WRITE_MCG, in mlx4_WRITE_ENTRY() 98 struct mlx4_cmd_mailbox *mailbox) in mlx4_WRITE_PROMISC() argument 103 return mlx4_cmd(dev, mailbox->dma, in_mod, 0x1, in mlx4_WRITE_PROMISC() 108 static int mlx4_GID_HASH(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox, in mlx4_GID_HASH() argument 114 err = mlx4_cmd_imm(dev, mailbox->dma, &imm, 0, op_mod, in mlx4_GID_HASH() [all …]
|
D | srq.c | 67 static int mlx4_SW2HW_SRQ(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox, in mlx4_SW2HW_SRQ() argument 70 return mlx4_cmd(dev, mailbox->dma, srq_num, 0, in mlx4_SW2HW_SRQ() 75 static int mlx4_HW2SW_SRQ(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox, in mlx4_HW2SW_SRQ() argument 78 return mlx4_cmd_box(dev, 0, mailbox ? mailbox->dma : 0, srq_num, in mlx4_HW2SW_SRQ() 79 mailbox ? 0 : 1, MLX4_CMD_HW2SW_SRQ, in mlx4_HW2SW_SRQ() 89 static int mlx4_QUERY_SRQ(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox, in mlx4_QUERY_SRQ() argument 92 return mlx4_cmd_box(dev, 0, mailbox->dma, srq_num, 0, MLX4_CMD_QUERY_SRQ, in mlx4_QUERY_SRQ() 169 struct mlx4_cmd_mailbox *mailbox; in mlx4_srq_alloc() local 184 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_srq_alloc() 185 if (IS_ERR(mailbox)) { in mlx4_srq_alloc() [all …]
|
D | en_port.c | 46 struct mlx4_cmd_mailbox *mailbox; in mlx4_SET_VLAN_FLTR() local 54 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_SET_VLAN_FLTR() 55 if (IS_ERR(mailbox)) in mlx4_SET_VLAN_FLTR() 56 return PTR_ERR(mailbox); in mlx4_SET_VLAN_FLTR() 58 filter = mailbox->buf; in mlx4_SET_VLAN_FLTR() 66 err = mlx4_cmd(dev, mailbox->dma, priv->port, 0, MLX4_CMD_SET_VLAN_FLTR, in mlx4_SET_VLAN_FLTR() 68 mlx4_free_cmd_mailbox(dev, mailbox); in mlx4_SET_VLAN_FLTR() 77 struct mlx4_cmd_mailbox *mailbox; in mlx4_en_QUERY_PORT() local 80 mailbox = mlx4_alloc_cmd_mailbox(mdev->dev); in mlx4_en_QUERY_PORT() 81 if (IS_ERR(mailbox)) in mlx4_en_QUERY_PORT() [all …]
|
D | port.c | 118 struct mlx4_cmd_mailbox *mailbox; in mlx4_set_port_mac_table() local 122 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_set_port_mac_table() 123 if (IS_ERR(mailbox)) in mlx4_set_port_mac_table() 124 return PTR_ERR(mailbox); in mlx4_set_port_mac_table() 126 memcpy(mailbox->buf, entries, MLX4_MAC_TABLE_SIZE); in mlx4_set_port_mac_table() 130 err = mlx4_cmd(dev, mailbox->dma, in_mod, 1, MLX4_CMD_SET_PORT, in mlx4_set_port_mac_table() 133 mlx4_free_cmd_mailbox(dev, mailbox); in mlx4_set_port_mac_table() 334 struct mlx4_cmd_mailbox *mailbox; in mlx4_set_port_vlan_table() local 338 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_set_port_vlan_table() 339 if (IS_ERR(mailbox)) in mlx4_set_port_vlan_table() [all …]
|
D | fw.c | 153 struct mlx4_cmd_mailbox *mailbox; in mlx4_MOD_STAT_CFG() local 162 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_MOD_STAT_CFG() 163 if (IS_ERR(mailbox)) in mlx4_MOD_STAT_CFG() 164 return PTR_ERR(mailbox); in mlx4_MOD_STAT_CFG() 165 inbox = mailbox->buf; in mlx4_MOD_STAT_CFG() 170 err = mlx4_cmd(dev, mailbox->dma, 0, 0, MLX4_CMD_MOD_STAT_CFG, in mlx4_MOD_STAT_CFG() 173 mlx4_free_cmd_mailbox(dev, mailbox); in mlx4_MOD_STAT_CFG() 338 struct mlx4_cmd_mailbox *mailbox; in mlx4_QUERY_FUNC_CAP() local 346 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_QUERY_FUNC_CAP() 347 if (IS_ERR(mailbox)) in mlx4_QUERY_FUNC_CAP() [all …]
|
D | mr.c | 285 static int mlx4_SW2HW_MPT(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox, in mlx4_SW2HW_MPT() argument 288 return mlx4_cmd(dev, mailbox->dma, mpt_index, in mlx4_SW2HW_MPT() 293 static int mlx4_HW2SW_MPT(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox, in mlx4_HW2SW_MPT() argument 296 return mlx4_cmd_box(dev, 0, mailbox ? mailbox->dma : 0, mpt_index, in mlx4_HW2SW_MPT() 297 !mailbox, MLX4_CMD_HW2SW_MPT, in mlx4_HW2SW_MPT() 307 struct mlx4_cmd_mailbox *mailbox = NULL; in mlx4_mr_hw_get_mpt() local 326 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_mr_hw_get_mpt() 327 if (IS_ERR_OR_NULL(mailbox)) in mlx4_mr_hw_get_mpt() 328 return PTR_ERR(mailbox); in mlx4_mr_hw_get_mpt() 330 err = mlx4_cmd_box(dev, 0, mailbox->dma, key, in mlx4_mr_hw_get_mpt() [all …]
|
D | qp.c | 130 struct mlx4_cmd_mailbox *mailbox; in __mlx4_qp_modify() local 155 mailbox = mlx4_alloc_cmd_mailbox(dev); in __mlx4_qp_modify() 156 if (IS_ERR(mailbox)) in __mlx4_qp_modify() 157 return PTR_ERR(mailbox); in __mlx4_qp_modify() 166 *(__be32 *) mailbox->buf = cpu_to_be32(optpar); in __mlx4_qp_modify() 167 memcpy(mailbox->buf + 8, context, sizeof *context); in __mlx4_qp_modify() 169 ((struct mlx4_qp_context *) (mailbox->buf + 8))->local_qpn = in __mlx4_qp_modify() 172 ret = mlx4_cmd(dev, mailbox->dma, in __mlx4_qp_modify() 194 mlx4_free_cmd_mailbox(dev, mailbox); in __mlx4_qp_modify() 397 struct mlx4_cmd_mailbox *mailbox; in mlx4_update_qp() local [all …]
|
D | eq.c | 825 static int mlx4_SW2HW_EQ(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox, in mlx4_SW2HW_EQ() argument 828 return mlx4_cmd(dev, mailbox->dma, eq_num, 0, in mlx4_SW2HW_EQ() 833 static int mlx4_HW2SW_EQ(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox, in mlx4_HW2SW_EQ() argument 836 return mlx4_cmd_box(dev, 0, mailbox->dma, eq_num, in mlx4_HW2SW_EQ() 890 struct mlx4_cmd_mailbox *mailbox; in mlx4_create_eq() local 918 mailbox = mlx4_alloc_cmd_mailbox(dev); in mlx4_create_eq() 919 if (IS_ERR(mailbox)) in mlx4_create_eq() 921 eq_context = mailbox->buf; in mlx4_create_eq() 963 err = mlx4_SW2HW_EQ(dev, mailbox, eq->eqn); in mlx4_create_eq() 970 mlx4_free_cmd_mailbox(dev, mailbox); in mlx4_create_eq() [all …]
|
/drivers/net/appletalk/ |
D | ltpc.h | 20 unsigned char mailbox; member 25 unsigned char mailbox; member 32 unsigned char mailbox; member 38 unsigned char mailbox; member 43 unsigned char mailbox; member 49 unsigned char mailbox; member
|
D | ltpc.c | 277 unsigned char mailbox; member 332 static unsigned char mailbox[16]; variable 550 qels[0].mailbox = 0; in idle() 575 ltdmacbuf[1] = q->mailbox; in idle() 599 qels[0].mailbox = 0; in idle() 618 if(q->mailbox) { in idle() 622 mailbox[ 0x0f & ltdmabuf[0] ] = ltdmabuf[1]; in idle() 659 qels[i].mailbox = i; /* this should be initted rather */ in do_write() 662 ret = mailbox[i]; in do_write() 683 qels[i].mailbox = i; /* this should be initted rather */ in do_read() [all …]
|
/drivers/char/ |
D | applicom.c | 362 struct mailbox tmpmailbox; in ac_write() 368 if (count != sizeof(struct st_ram_io) + sizeof(struct mailbox)) { in ac_write() 372 count, sizeof(struct st_ram_io) + sizeof(struct mailbox)); in ac_write() 382 sizeof(struct mailbox))) in ac_write() 407 for (c = 0; c < sizeof(struct mailbox);) { in ac_write() 410 for (c++; c % 8 && c < sizeof(struct mailbox); c++) { in ac_write() 464 for (c = 0; c < sizeof(struct mailbox); c++) in ac_write() 480 struct st_ram_io *st_loc, struct mailbox *mailbox) in do_ac_read() argument 483 unsigned char *to = (unsigned char *)mailbox; in do_ac_read() 495 for (c = 0; c < sizeof(struct mailbox); c++) in do_ac_read() [all …]
|
/drivers/crypto/qat/qat_dh895xcc/ |
D | adf_admin.c | 71 void __iomem *mailbox = admin->mailbox_addr; in adf_put_admin_msg_sync() local 77 if (ADF_CSR_RD(mailbox, mb_offset) == 1) { in adf_put_admin_msg_sync() 83 ADF_CSR_WR(mailbox, mb_offset, 1); in adf_put_admin_msg_sync() 87 if (ADF_CSR_RD(mailbox, mb_offset) == 0) { in adf_put_admin_msg_sync() 107 void __iomem *mailbox = csr + ADF_DH895XCC_MAILBOX_BASE_OFFSET; in adf_init_admin_comms() local 125 admin->mailbox_addr = mailbox; in adf_init_admin_comms()
|
/drivers/infiniband/hw/mlx4/ |
D | main.c | 352 struct mlx4_cmd_mailbox *mailbox; in eth_link_query_port() local 355 mailbox = mlx4_alloc_cmd_mailbox(mdev->dev); in eth_link_query_port() 356 if (IS_ERR(mailbox)) in eth_link_query_port() 357 return PTR_ERR(mailbox); in eth_link_query_port() 359 err = mlx4_cmd_box(mdev->dev, 0, mailbox->dma, port, 0, in eth_link_query_port() 365 props->active_width = (((u8 *)mailbox->buf)[5] == 0x40) ? in eth_link_query_port() 391 mlx4_free_cmd_mailbox(mdev->dev, mailbox); in eth_link_query_port() 532 struct mlx4_cmd_mailbox *mailbox; in mlx4_ib_modify_device() local 552 mailbox = mlx4_alloc_cmd_mailbox(to_mdev(ibdev)->dev); in mlx4_ib_modify_device() 553 if (IS_ERR(mailbox)) in mlx4_ib_modify_device() [all …]
|
/drivers/mailbox/ |
D | Makefile | 3 obj-$(CONFIG_MAILBOX) += mailbox.o 7 obj-$(CONFIG_OMAP2PLUS_MBOX) += omap-mailbox.o
|
/drivers/net/ethernet/mellanox/mlx5/core/ |
D | cmd.c | 757 struct mlx5_cmd_mailbox *mailbox; in alloc_cmd_box() local 759 mailbox = kmalloc(sizeof(*mailbox), flags); in alloc_cmd_box() 760 if (!mailbox) in alloc_cmd_box() 763 mailbox->buf = pci_pool_alloc(dev->cmd.pool, flags, in alloc_cmd_box() 764 &mailbox->dma); in alloc_cmd_box() 765 if (!mailbox->buf) { in alloc_cmd_box() 767 kfree(mailbox); in alloc_cmd_box() 770 memset(mailbox->buf, 0, sizeof(struct mlx5_cmd_prot_block)); in alloc_cmd_box() 771 mailbox->next = NULL; in alloc_cmd_box() 773 return mailbox; in alloc_cmd_box() [all …]
|
/drivers/media/pci/cx88/ |
D | cx88-blackbird.c | 326 memory_read(dev->core, dev->mailbox - 4, &value); in blackbird_mbox_func() 332 memory_read(dev->core, dev->mailbox, &flag); in blackbird_mbox_func() 339 memory_write(dev->core, dev->mailbox, flag); in blackbird_mbox_func() 342 memory_write(dev->core, dev->mailbox + 1, command); /* command code */ in blackbird_mbox_func() 343 memory_write(dev->core, dev->mailbox + 3, IVTV_API_STD_TIMEOUT); /* timeout */ in blackbird_mbox_func() 345 memory_write(dev->core, dev->mailbox + 4 + i, data[i]); in blackbird_mbox_func() 349 memory_write(dev->core, dev->mailbox + 4 + i, 0); in blackbird_mbox_func() 352 memory_write(dev->core, dev->mailbox, flag); in blackbird_mbox_func() 357 memory_read(dev->core, dev->mailbox, &flag); in blackbird_mbox_func() 369 memory_read(dev->core, dev->mailbox + 4 + i, data + i); in blackbird_mbox_func() [all …]
|
/drivers/scsi/ |
D | qla1280.c | 3420 uint16_t mailbox[MAILBOX_REGISTER_COUNT]; in qla1280_isr() local 3432 mailbox[5] = RD_REG_WORD(®->mailbox5); in qla1280_isr() 3436 mailbox[0] = RD_REG_WORD_dmasync(®->semaphore); in qla1280_isr() 3438 if (mailbox[0] & BIT_0) { in qla1280_isr() 3442 wptr = &mailbox[0]; in qla1280_isr() 3446 if (mailbox[0] != MBA_SCSI_COMPLETION) { in qla1280_isr() 3461 mailbox[0]); in qla1280_isr() 3464 switch (mailbox[0]) { in qla1280_isr() 3471 index = mailbox[2] << 16 | mailbox[1]; in qla1280_isr() 3501 index = mailbox[6] & BIT_0; in qla1280_isr() [all …]
|