Lines Matching defs:cmd

490 static void mtip_complete_command(struct mtip_cmd *cmd, blk_status_t status)
492 struct request *req = blk_mq_rq_from_pdu(cmd);
494 cmd->status = status;
511 struct mtip_cmd *cmd;
525 cmd = mtip_cmd_from_tag(dd, MTIP_TAG_INTERNAL);
527 mtip_complete_command(cmd, BLK_STS_IOERR);
553 cmd = mtip_cmd_from_tag(dd, tag);
554 mtip_complete_command(cmd, 0);
607 cmd = mtip_cmd_from_tag(dd, tag);
609 fis = (struct host_to_dev_fis *)cmd->command;
626 mtip_complete_command(cmd, BLK_STS_MEDIUM);
635 if (reissue && (cmd->retries-- > 0)) {
649 mtip_complete_command(cmd, BLK_STS_IOERR);
698 struct mtip_cmd *cmd = mtip_cmd_from_tag(dd, MTIP_TAG_INTERNAL);
700 if (test_bit(MTIP_PF_IC_ACTIVE_BIT, &port->flags) && cmd) {
705 mtip_complete_command(cmd, 0);
988 dbg_printk(MTIP_DRV_NAME "Unable to allocate tag for PIO cmd\n");
1235 dbg_printk(MTIP_DRV_NAME "Time taken to complete standby cmd: %d ms\n",
1508 dbg_printk(MTIP_DRV_NAME " %s: User Command: cmd %x, feat %x, nsect %x, sect %x, lcyl %x, hcyl %x, sel %x\n",
1604 " %s: User Command: cmd %x, sect %x, "
1825 " %s: cmd %x, feat %x, nsect %x,"
1945 * @cmd IOCTL command passed from the Block Layer.
1954 static int mtip_hw_ioctl(struct driver_data *dd, unsigned int cmd,
1957 switch (cmd) {
2587 struct mtip_cmd *cmd = blk_mq_rq_to_pdu(rq);
2591 dma_unmap_sg(&dd->pdev->dev, cmd->sg, cmd->scatter_ents,
2592 cmd->direction);
2594 if (unlikely(cmd->unaligned))
2597 blk_mq_end_request(rq, cmd->status);
2602 struct mtip_cmd *cmd = blk_mq_rq_to_pdu(req);
2608 cmd->status = BLK_STS_IOERR;
3194 * @cmd IOCTL command passed from the user application.
3204 unsigned cmd,
3218 switch (cmd) {
3222 return mtip_hw_ioctl(dd, cmd, arg);
3232 * @cmd IOCTL command passed from the user application.
3242 unsigned cmd,
3256 switch (cmd) {
3299 return mtip_hw_ioctl(dd, cmd, arg);
3427 struct mtip_cmd *cmd = blk_mq_rq_to_pdu(rq);
3438 cmd->unaligned = 1;
3441 if (cmd->unaligned && atomic_dec_if_positive(&dd->port->cmd_slot_unal) >= 0)
3451 struct mtip_cmd *cmd = blk_mq_rq_to_pdu(rq);
3452 struct mtip_int_cmd *icmd = cmd->icmd;
3460 hdr->ctba = cpu_to_le32(cmd->command_dma & 0xFFFFFFFF);
3462 hdr->ctbau = cpu_to_le32((cmd->command_dma >> 16) >> 16);
3466 command_sg = cmd->command + AHCI_CMD_TBL_HDR_SZ;
3489 struct mtip_cmd *cmd = blk_mq_rq_to_pdu(rq);
3502 mtip_hw_submit_io(dd, rq, cmd, hctx);
3510 struct mtip_cmd *cmd = blk_mq_rq_to_pdu(rq);
3512 if (!cmd->command)
3515 dma_free_coherent(&dd->pdev->dev, CMD_DMA_ALLOC_SZ, cmd->command,
3516 cmd->command_dma);
3523 struct mtip_cmd *cmd = blk_mq_rq_to_pdu(rq);
3525 cmd->command = dma_alloc_coherent(&dd->pdev->dev, CMD_DMA_ALLOC_SZ,
3526 &cmd->command_dma, GFP_KERNEL);
3527 if (!cmd->command)
3530 sg_init_table(cmd->sg, MTIP_MAX_SG);
3540 struct mtip_cmd *cmd = blk_mq_rq_to_pdu(req);
3542 cmd->status = BLK_STS_TIMEOUT;
3752 struct mtip_cmd *cmd = blk_mq_rq_to_pdu(rq);
3754 cmd->status = BLK_STS_IOERR;