Lines Matching refs:frame
282 * @dcmd: DCMD frame inside MFI command
367 memset(cmd->frame, 0, instance->mfi_frame_size);
368 cmd->frame->io.context = cpu_to_le32(cmd->index);
370 cmd->frame->hdr.cmd = MFI_CMD_INVALID;
1124 struct megasas_header *frame_hdr = &cmd->frame->hdr;
1172 cmd->frame->dcmd.opcode, __func__);
1207 abort_fr = &cmd->frame->abort;
1210 * Prepare and issue the abort frame
1236 opcode = cmd_to_abort->frame->dcmd.opcode;
1343 * @frame_type : type of frame- io or pthru frame
1365 * Main frame can contain 2 SGEs for 64-bit SGLs and
1368 * 2 SGEs for 32-bit SGLs for pthru frame
1392 /* Main frame */
1420 pthru = (struct megasas_pthru_frame *)cmd->frame;
1434 * Prepare the DCDB frame
1518 ldio = (struct megasas_io_frame *)cmd->frame;
1530 * Prepare the Logical IO frame: 2nd bit is zero for all read cmds
1669 * megasas_dump_pending_frames - Dumps the frame address of all pending cmds
1698 ldio = (struct megasas_io_frame *)cmd->frame;
1701 dev_err(&instance->pdev->dev, "[%d]: frame count : 0x%x, Cmd : 0x%x, Tgt id : 0x%x,"
1707 pthru = (struct megasas_pthru_frame *) cmd->frame;
1710 dev_err(&instance->pdev->dev, "[%d]: frame count : 0x%x, Cmd : 0x%x, Tgt id : 0x%x, "
2197 (cmd_mfi->frame->hdr.cmd != MFI_CMD_ABORT)) {
2198 cmd_mfi->frame->hdr.cmd_status =
2208 if (cmd_mfi->sync_cmd && cmd_mfi->frame->hdr.cmd !=
2380 dcmd = &cmd->frame->dcmd;
2487 dcmd = &cmd->frame->dcmd;
2662 dcmd = &cmd->frame->dcmd;
3021 printk(KERN_INFO "IO request frame:\n");
3024 printk(KERN_INFO "Chain frame:\n");
3542 (cmd->frame->io.cmd_status == MFI_STAT_OK) ?
3599 struct megasas_header *hdr = &cmd->frame->hdr;
3708 opcode = le32_to_cpu(cmd->frame->dcmd.opcode);
3711 && (cmd->frame->dcmd.mbox.b[1] == 1)) {
3714 status = cmd->frame->hdr.cmd_status;
3719 cmd->frame->hdr.cmd_status);
3762 (cmd->frame->dcmd.mbox.b[0] == 1)) {
3765 status = cmd->frame->hdr.cmd_status;
4280 * megasas_teardown_frame_pool - Destroy the cmd frame DMA pool
4299 if (cmd->frame)
4300 dma_pool_free(instance->frame_dma_pool, cmd->frame,
4323 * filling MFI frame and the SG list that immediately follows the frame. This
4340 * Total 960 byte (15 MFI frame of 64 byte)
4342 * Fusion adapter require only 3 extra frame.
4345 * Total 192 byte (3 MFI frame of 64 byte)
4353 instance->frame_dma_pool = dma_pool_create("megasas frame pool",
4358 dev_printk(KERN_DEBUG, &instance->pdev->dev, "failed to setup frame pool\n");
4376 * Allocate and attach a frame to each of the commands in cmd_list.
4384 cmd->frame = dma_pool_zalloc(instance->frame_dma_pool,
4394 if (!cmd->frame || !cmd->sense) {
4400 cmd->frame->io.context = cpu_to_le32(cmd->index);
4401 cmd->frame->io.pad_0 = 0;
4403 cmd->frame->hdr.cmd = MFI_CMD_INVALID;
4417 /* First free the MFI frame pool */
4438 * megasas_cmd. The frame embedded in this megasas_cmd is actually issued to
4441 * Each frame has a 32-bit field called context (tag). This context is used
4442 * to get back the megasas_cmd from the frame when a frame gets completed in
4498 * Create a frame pool and assign one frame to each cmd
4501 dev_printk(KERN_DEBUG, &instance->pdev->dev, "Error creating frame DMA pool\n");
4547 dcmd = &cmd->frame->dcmd;
4639 dcmd = &cmd->frame->dcmd;
4770 dcmd = &cmd->frame->dcmd;
4888 dcmd = &cmd->frame->dcmd;
5011 dcmd = &cmd->frame->dcmd;
5197 dcmd = &cmd->frame->dcmd;
5279 dcmd = &cmd->frame->dcmd;
5429 dcmd = &cmd->frame->dcmd;
5489 * Prepare a init frame. Note the init frame points to queue info
5490 * structure. Each frame has SGL allocated after first 64 bytes. For
5491 * this frame - since we don't need any SGL - we use SGL's space as
5498 init_frame = (struct megasas_init_frame *)cmd->frame;
5526 * disable the intr before firing the init frame to FW
5531 * Issue the init frame in polled mode
6591 dcmd = &cmd->frame->dcmd;
6677 le32_to_cpu(instance->aen_cmd->frame->dcmd.mbox.w[1]);
6729 dcmd = &cmd->frame->dcmd;
6766 * Issue the aen registration frame
6809 dcmd = &cmd->frame->dcmd;
7648 dcmd = &cmd->frame->dcmd;
7701 dcmd = &cmd->frame->dcmd;
8184 * @cmd: MFI command frame
8193 crash_support = cmd->frame->dcmd.mbox.w[0];
8250 if ((ioc->frame.hdr.cmd >= MFI_CMD_OP_COUNT) ||
8251 ((ioc->frame.hdr.cmd == MFI_CMD_NVME) &&
8253 ((ioc->frame.hdr.cmd == MFI_CMD_TOOLBOX) &&
8257 ioc->frame.hdr.cmd);
8269 * frames into our cmd's frames. cmd->frame's context will get
8273 memcpy(cmd->frame, ioc->frame.raw, 2 * MEGAMFI_FRAME_SIZE);
8274 cmd->frame->hdr.context = cpu_to_le32(cmd->index);
8275 cmd->frame->hdr.pad_0 = 0;
8277 cmd->frame->hdr.flags &= (~MFI_FRAME_IEEE);
8280 cmd->frame->hdr.flags |= cpu_to_le16((MFI_FRAME_SGL64 |
8283 cmd->frame->hdr.flags &= cpu_to_le16(~(MFI_FRAME_SGL64 |
8286 if (cmd->frame->hdr.cmd == MFI_CMD_DCMD)
8287 opcode = le32_to_cpu(cmd->frame->dcmd.opcode);
8315 ((unsigned long)cmd->frame + ioc->sgl_off);
8318 ((unsigned long)cmd->frame + ioc->sgl_off);
8361 /* make sure the pointer is part of the frame */
8376 sense_ptr = (void *)cmd->frame + ioc->sense_off;
8393 __func__, __LINE__, cmd->frame->hdr.cmd, opcode,
8426 sense_ptr = (void *)ioc->frame.raw + ioc->sense_off;
8444 if (copy_to_user(&user_ioc->frame.hdr.cmd_status,
8445 &cmd->frame->hdr.cmd_status, sizeof(u8))) {
8488 size = offsetof(struct megasas_iocpacket, frame) + sizeof(ioc->frame);