Lines Matching refs:drv_cmd
1412 struct mpi3mr_drv_cmd *drv_cmd) in mpi3mr_dev_rmhs_complete_iou() argument
1414 u16 cmd_idx = drv_cmd->host_tag - MPI3MR_HOSTTAG_DEVRMCMD_MIN; in mpi3mr_dev_rmhs_complete_iou()
1419 __func__, drv_cmd->dev_handle, drv_cmd->ioc_status, in mpi3mr_dev_rmhs_complete_iou()
1420 drv_cmd->ioc_loginfo); in mpi3mr_dev_rmhs_complete_iou()
1421 if (drv_cmd->ioc_status != MPI3_IOCSTATUS_SUCCESS) { in mpi3mr_dev_rmhs_complete_iou()
1422 if (drv_cmd->retry_count < MPI3MR_DEV_RMHS_RETRY_COUNT) { in mpi3mr_dev_rmhs_complete_iou()
1423 drv_cmd->retry_count++; in mpi3mr_dev_rmhs_complete_iou()
1426 __func__, drv_cmd->dev_handle, in mpi3mr_dev_rmhs_complete_iou()
1427 drv_cmd->retry_count); in mpi3mr_dev_rmhs_complete_iou()
1428 mpi3mr_dev_rmhs_send_tm(mrioc, drv_cmd->dev_handle, in mpi3mr_dev_rmhs_complete_iou()
1429 drv_cmd, drv_cmd->iou_rc); in mpi3mr_dev_rmhs_complete_iou()
1434 __func__, drv_cmd->dev_handle); in mpi3mr_dev_rmhs_complete_iou()
1438 __func__, drv_cmd->dev_handle); in mpi3mr_dev_rmhs_complete_iou()
1439 clear_bit(drv_cmd->dev_handle, mrioc->removepend_bitmap); in mpi3mr_dev_rmhs_complete_iou()
1445 drv_cmd->dev_handle = delayed_dev_rmhs->handle; in mpi3mr_dev_rmhs_complete_iou()
1446 drv_cmd->retry_count = 0; in mpi3mr_dev_rmhs_complete_iou()
1447 drv_cmd->iou_rc = delayed_dev_rmhs->iou_rc; in mpi3mr_dev_rmhs_complete_iou()
1450 __func__, drv_cmd->dev_handle); in mpi3mr_dev_rmhs_complete_iou()
1451 mpi3mr_dev_rmhs_send_tm(mrioc, drv_cmd->dev_handle, drv_cmd, in mpi3mr_dev_rmhs_complete_iou()
1452 drv_cmd->iou_rc); in mpi3mr_dev_rmhs_complete_iou()
1457 drv_cmd->state = MPI3MR_CMD_NOTUSED; in mpi3mr_dev_rmhs_complete_iou()
1458 drv_cmd->callback = NULL; in mpi3mr_dev_rmhs_complete_iou()
1459 drv_cmd->retry_count = 0; in mpi3mr_dev_rmhs_complete_iou()
1460 drv_cmd->dev_handle = MPI3MR_INVALID_DEV_HANDLE; in mpi3mr_dev_rmhs_complete_iou()
1476 struct mpi3mr_drv_cmd *drv_cmd) in mpi3mr_dev_rmhs_complete_tm() argument
1479 u16 cmd_idx = drv_cmd->host_tag - MPI3MR_HOSTTAG_DEVRMCMD_MIN; in mpi3mr_dev_rmhs_complete_tm()
1483 if (drv_cmd->state & MPI3MR_CMD_REPLY_VALID) in mpi3mr_dev_rmhs_complete_tm()
1484 tm_reply = (struct mpi3_scsi_task_mgmt_reply *)drv_cmd->reply; in mpi3mr_dev_rmhs_complete_tm()
1489 mrioc->name, drv_cmd->dev_handle, drv_cmd->ioc_status, in mpi3mr_dev_rmhs_complete_tm()
1490 drv_cmd->ioc_loginfo, in mpi3mr_dev_rmhs_complete_tm()
1494 mrioc->name, drv_cmd->dev_handle, cmd_idx); in mpi3mr_dev_rmhs_complete_tm()
1498 drv_cmd->state = MPI3MR_CMD_PENDING; in mpi3mr_dev_rmhs_complete_tm()
1499 drv_cmd->is_waiting = 0; in mpi3mr_dev_rmhs_complete_tm()
1500 drv_cmd->callback = mpi3mr_dev_rmhs_complete_iou; in mpi3mr_dev_rmhs_complete_tm()
1501 iou_ctrl.operation = drv_cmd->iou_rc; in mpi3mr_dev_rmhs_complete_tm()
1502 iou_ctrl.param16[0] = cpu_to_le16(drv_cmd->dev_handle); in mpi3mr_dev_rmhs_complete_tm()
1503 iou_ctrl.host_tag = cpu_to_le16(drv_cmd->host_tag); in mpi3mr_dev_rmhs_complete_tm()
1516 drv_cmd->state = MPI3MR_CMD_NOTUSED; in mpi3mr_dev_rmhs_complete_tm()
1517 drv_cmd->callback = NULL; in mpi3mr_dev_rmhs_complete_tm()
1518 drv_cmd->dev_handle = MPI3MR_INVALID_DEV_HANDLE; in mpi3mr_dev_rmhs_complete_tm()
1519 drv_cmd->retry_count = 0; in mpi3mr_dev_rmhs_complete_tm()
1543 struct mpi3mr_drv_cmd *drv_cmd = cmdparam; in mpi3mr_dev_rmhs_send_tm() local
1546 if (drv_cmd) in mpi3mr_dev_rmhs_send_tm()
1572 drv_cmd = &mrioc->dev_rmhs_cmds[cmd_idx]; in mpi3mr_dev_rmhs_send_tm()
1575 cmd_idx = drv_cmd->host_tag - MPI3MR_HOSTTAG_DEVRMCMD_MIN; in mpi3mr_dev_rmhs_send_tm()
1581 if (drv_cmd->state & MPI3MR_CMD_PENDING) { in mpi3mr_dev_rmhs_send_tm()
1585 drv_cmd->state = MPI3MR_CMD_PENDING; in mpi3mr_dev_rmhs_send_tm()
1586 drv_cmd->is_waiting = 0; in mpi3mr_dev_rmhs_send_tm()
1587 drv_cmd->callback = mpi3mr_dev_rmhs_complete_tm; in mpi3mr_dev_rmhs_send_tm()
1588 drv_cmd->dev_handle = handle; in mpi3mr_dev_rmhs_send_tm()
1589 drv_cmd->iou_rc = iou_rc; in mpi3mr_dev_rmhs_send_tm()
1592 tm_req.host_tag = cpu_to_le16(drv_cmd->host_tag); in mpi3mr_dev_rmhs_send_tm()
1606 drv_cmd->state = MPI3MR_CMD_NOTUSED; in mpi3mr_dev_rmhs_send_tm()
1607 drv_cmd->callback = NULL; in mpi3mr_dev_rmhs_send_tm()
1608 drv_cmd->dev_handle = MPI3MR_INVALID_DEV_HANDLE; in mpi3mr_dev_rmhs_send_tm()
1609 drv_cmd->retry_count = 0; in mpi3mr_dev_rmhs_send_tm()
2588 struct mpi3mr_drv_cmd *drv_cmd, in mpi3mr_issue_tm() argument
2608 mutex_lock(&drv_cmd->mutex); in mpi3mr_issue_tm()
2609 if (drv_cmd->state & MPI3MR_CMD_PENDING) { in mpi3mr_issue_tm()
2612 mutex_unlock(&drv_cmd->mutex); in mpi3mr_issue_tm()
2618 mutex_unlock(&drv_cmd->mutex); in mpi3mr_issue_tm()
2622 drv_cmd->state = MPI3MR_CMD_PENDING; in mpi3mr_issue_tm()
2623 drv_cmd->is_waiting = 1; in mpi3mr_issue_tm()
2624 drv_cmd->callback = NULL; in mpi3mr_issue_tm()
2650 init_completion(&drv_cmd->done); in mpi3mr_issue_tm()
2656 wait_for_completion_timeout(&drv_cmd->done, (timeout * HZ)); in mpi3mr_issue_tm()
2658 if (!(drv_cmd->state & MPI3MR_CMD_COMPLETE)) { in mpi3mr_issue_tm()
2660 drv_cmd->is_waiting = 0; in mpi3mr_issue_tm()
2667 if (drv_cmd->state & MPI3MR_CMD_REPLY_VALID) in mpi3mr_issue_tm()
2668 tm_reply = (struct mpi3_scsi_task_mgmt_reply *)drv_cmd->reply; in mpi3mr_issue_tm()
2670 if (drv_cmd->ioc_status != MPI3_IOCSTATUS_SUCCESS) { in mpi3mr_issue_tm()
2673 __func__, handle, drv_cmd->ioc_status, in mpi3mr_issue_tm()
2674 drv_cmd->ioc_loginfo); in mpi3mr_issue_tm()
2705 drv_cmd->ioc_status, drv_cmd->ioc_loginfo, in mpi3mr_issue_tm()
2710 drv_cmd->state = MPI3MR_CMD_NOTUSED; in mpi3mr_issue_tm()
2711 mutex_unlock(&drv_cmd->mutex); in mpi3mr_issue_tm()