Lines Matching refs:ioarcb

311 	struct pmcraid_ioarcb *ioarcb = &(cmd->ioa_cb->ioarcb);  in pmcraid_init_cmdblk()  local
320 ioarcb->response_handle = cpu_to_le32(index << 2); in pmcraid_init_cmdblk()
321 ioarcb->ioarcb_bus_addr = cpu_to_le64(dma_addr); in pmcraid_init_cmdblk()
322 ioarcb->ioasa_bus_addr = cpu_to_le64(dma_addr + ioasa_offset); in pmcraid_init_cmdblk()
323 ioarcb->ioasa_len = cpu_to_le16(sizeof(struct pmcraid_ioasa)); in pmcraid_init_cmdblk()
328 memset(&cmd->ioa_cb->ioarcb.cdb, 0, PMCRAID_MAX_CDB_LEN); in pmcraid_init_cmdblk()
329 ioarcb->hrrq_id = 0; in pmcraid_init_cmdblk()
330 ioarcb->request_flags0 = 0; in pmcraid_init_cmdblk()
331 ioarcb->request_flags1 = 0; in pmcraid_init_cmdblk()
332 ioarcb->cmd_timeout = 0; in pmcraid_init_cmdblk()
333 ioarcb->ioarcb_bus_addr &= cpu_to_le64(~0x1FULL); in pmcraid_init_cmdblk()
334 ioarcb->ioadl_bus_addr = 0; in pmcraid_init_cmdblk()
335 ioarcb->ioadl_length = 0; in pmcraid_init_cmdblk()
336 ioarcb->data_transfer_length = 0; in pmcraid_init_cmdblk()
337 ioarcb->add_cmd_param_length = 0; in pmcraid_init_cmdblk()
338 ioarcb->add_cmd_param_offset = 0; in pmcraid_init_cmdblk()
709 cmd->ioa_cb->ioarcb.cdb[0]); in pmcraid_timeout_handler()
777 cmd->ioa_cb->ioarcb.cdb[0], in pmcraid_internal_done()
815 cmd->ioa_cb->ioarcb.cdb[0], in pmcraid_reinit_cfgtable_done()
846 cmd->ioa_cb->ioarcb.cdb[0], ioasc); in pmcraid_erp_done()
896 iowrite32(le64_to_cpu(cmd->ioa_cb->ioarcb.ioarcb_bus_addr), pinstance->ioarrin); in _pmcraid_fire_command()
962 cmd->ioa_cb->ioarcb.cdb[0], in pmcraid_ioa_shutdown()
969 cmd->ioa_cb->ioarcb.request_type = REQ_TYPE_IOACMD; in pmcraid_ioa_shutdown()
970 cmd->ioa_cb->ioarcb.resource_handle = in pmcraid_ioa_shutdown()
972 cmd->ioa_cb->ioarcb.cdb[0] = PMCRAID_IOA_SHUTDOWN; in pmcraid_ioa_shutdown()
973 cmd->ioa_cb->ioarcb.cdb[1] = PMCRAID_SHUTDOWN_NORMAL; in pmcraid_ioa_shutdown()
977 le32_to_cpu(cmd->ioa_cb->ioarcb.response_handle)); in pmcraid_ioa_shutdown()
1027 struct pmcraid_ioarcb *ioarcb = &cmd->ioa_cb->ioarcb; in pmcraid_get_fwversion() local
1033 ioarcb->request_type = REQ_TYPE_SCSI; in pmcraid_get_fwversion()
1034 ioarcb->resource_handle = cpu_to_le32(PMCRAID_IOA_RES_HANDLE); in pmcraid_get_fwversion()
1035 ioarcb->cdb[0] = INQUIRY; in pmcraid_get_fwversion()
1036 ioarcb->cdb[1] = 1; in pmcraid_get_fwversion()
1037 ioarcb->cdb[2] = 0xD0; in pmcraid_get_fwversion()
1038 ioarcb->cdb[3] = (data_size >> 8) & 0xFF; in pmcraid_get_fwversion()
1039 ioarcb->cdb[4] = data_size & 0xFF; in pmcraid_get_fwversion()
1043 ioarcb->ioadl_bus_addr = cpu_to_le64((cmd->ioa_cb_bus_addr) + in pmcraid_get_fwversion()
1046 ioarcb->ioadl_length = cpu_to_le32(sizeof(struct pmcraid_ioadl_desc)); in pmcraid_get_fwversion()
1047 ioarcb->ioarcb_bus_addr &= cpu_to_le64(~(0x1FULL)); in pmcraid_get_fwversion()
1049 ioarcb->request_flags0 |= NO_LINK_DESCS; in pmcraid_get_fwversion()
1050 ioarcb->data_transfer_length = cpu_to_le32(data_size); in pmcraid_get_fwversion()
1051 ioadl = &(ioarcb->add_data.u.ioadl[0]); in pmcraid_get_fwversion()
1070 struct pmcraid_ioarcb *ioarcb = &cmd->ioa_cb->ioarcb; in pmcraid_identify_hrrq() local
1087 ioarcb->request_type = REQ_TYPE_IOACMD; in pmcraid_identify_hrrq()
1088 ioarcb->resource_handle = cpu_to_le32(PMCRAID_IOA_RES_HANDLE); in pmcraid_identify_hrrq()
1091 ioarcb->hrrq_id = index; in pmcraid_identify_hrrq()
1092 ioarcb->cdb[0] = PMCRAID_IDENTIFY_HRRQ; in pmcraid_identify_hrrq()
1093 ioarcb->cdb[1] = index; in pmcraid_identify_hrrq()
1099 hrrq_addr, ioarcb->ioarcb_bus_addr, index); in pmcraid_identify_hrrq()
1101 memcpy(&(ioarcb->cdb[2]), &hrrq_addr, sizeof(hrrq_addr)); in pmcraid_identify_hrrq()
1102 memcpy(&(ioarcb->cdb[10]), &hrrq_size, sizeof(hrrq_size)); in pmcraid_identify_hrrq()
1126 if (cmd->ioa_cb->ioarcb.cdb[1] == PMCRAID_HCAM_CODE_CONFIG_CHANGE) in pmcraid_send_hcam_cmd()
1150 struct pmcraid_ioarcb *ioarcb; in pmcraid_init_hcam() local
1179 ioarcb = &cmd->ioa_cb->ioarcb; in pmcraid_init_hcam()
1180 ioarcb->ioadl_bus_addr = cpu_to_le64((cmd->ioa_cb_bus_addr) + in pmcraid_init_hcam()
1183 ioarcb->ioadl_length = cpu_to_le32(sizeof(struct pmcraid_ioadl_desc)); in pmcraid_init_hcam()
1184 ioadl = ioarcb->add_data.u.ioadl; in pmcraid_init_hcam()
1187 ioarcb->request_type = REQ_TYPE_HCAM; in pmcraid_init_hcam()
1188 ioarcb->resource_handle = cpu_to_le32(PMCRAID_IOA_RES_HANDLE); in pmcraid_init_hcam()
1189 ioarcb->cdb[0] = PMCRAID_HOST_CONTROLLED_ASYNC; in pmcraid_init_hcam()
1190 ioarcb->cdb[1] = type; in pmcraid_init_hcam()
1191 ioarcb->cdb[7] = (rcb_size >> 8) & 0xFF; in pmcraid_init_hcam()
1192 ioarcb->cdb[8] = (rcb_size) & 0xFF; in pmcraid_init_hcam()
1194 ioarcb->data_transfer_length = cpu_to_le32(rcb_size); in pmcraid_init_hcam()
1232 struct pmcraid_ioarcb *ioarcb = &cmd->ioa_cb->ioarcb; in pmcraid_prepare_cancel_cmd() local
1239 ioarcb_addr = cpu_to_be64(le64_to_cpu(cmd_to_cancel->ioa_cb->ioarcb.ioarcb_bus_addr)); in pmcraid_prepare_cancel_cmd()
1244 ioarcb->resource_handle = cmd_to_cancel->ioa_cb->ioarcb.resource_handle; in pmcraid_prepare_cancel_cmd()
1245 ioarcb->request_type = REQ_TYPE_IOACMD; in pmcraid_prepare_cancel_cmd()
1246 memset(ioarcb->cdb, 0, PMCRAID_MAX_CDB_LEN); in pmcraid_prepare_cancel_cmd()
1247 ioarcb->cdb[0] = PMCRAID_ABORT_CMD; in pmcraid_prepare_cancel_cmd()
1249 memcpy(&(ioarcb->cdb[2]), &ioarcb_addr, sizeof(ioarcb_addr)); in pmcraid_prepare_cancel_cmd()
1296 cmd->ioa_cb->ioarcb.cdb[0], in pmcraid_cancel_ccn()
1707 cmd->ioa_cb->ioarcb.cdb[0], in pmcraid_ioasc_logger()
1708 le32_to_cpu(cmd->ioa_cb->ioarcb.resource_handle), in pmcraid_ioasc_logger()
2038 __le32 resp = cmd->ioa_cb->ioarcb.response_handle; in pmcraid_fail_outstanding_cmds()
2047 cmd->ioa_cb->ioarcb.cdb[0], in pmcraid_fail_outstanding_cmds()
2445 struct pmcraid_ioarcb *ioarcb = &cmd->ioa_cb->ioarcb; in pmcraid_request_sense() local
2446 struct pmcraid_ioadl_desc *ioadl = ioarcb->add_data.u.ioadl; in pmcraid_request_sense()
2462 memset(ioarcb->cdb, 0, PMCRAID_MAX_CDB_LEN); in pmcraid_request_sense()
2463 ioarcb->request_flags0 = (SYNC_COMPLETE | in pmcraid_request_sense()
2466 ioarcb->request_type = REQ_TYPE_SCSI; in pmcraid_request_sense()
2467 ioarcb->cdb[0] = REQUEST_SENSE; in pmcraid_request_sense()
2468 ioarcb->cdb[4] = SCSI_SENSE_BUFFERSIZE; in pmcraid_request_sense()
2470 ioarcb->ioadl_bus_addr = cpu_to_le64((cmd->ioa_cb_bus_addr) + in pmcraid_request_sense()
2473 ioarcb->ioadl_length = cpu_to_le32(sizeof(struct pmcraid_ioadl_desc)); in pmcraid_request_sense()
2475 ioarcb->data_transfer_length = cpu_to_le32(SCSI_SENSE_BUFFERSIZE); in pmcraid_request_sense()
2501 struct pmcraid_ioarcb *ioarcb = &cmd->ioa_cb->ioarcb; in pmcraid_cancel_all() local
2506 memset(ioarcb->cdb, 0, PMCRAID_MAX_CDB_LEN); in pmcraid_cancel_all()
2507 ioarcb->request_flags0 = SYNC_OVERRIDE; in pmcraid_cancel_all()
2508 ioarcb->request_type = REQ_TYPE_IOACMD; in pmcraid_cancel_all()
2509 ioarcb->cdb[0] = PMCRAID_CANCEL_ALL_REQUESTS; in pmcraid_cancel_all()
2512 ioarcb->cdb[1] = PMCRAID_SYNC_COMPLETE_AFTER_CANCEL; in pmcraid_cancel_all()
2514 ioarcb->ioadl_bus_addr = 0; in pmcraid_cancel_all()
2515 ioarcb->ioadl_length = 0; in pmcraid_cancel_all()
2516 ioarcb->data_transfer_length = 0; in pmcraid_cancel_all()
2517 ioarcb->ioarcb_bus_addr &= cpu_to_le64((~0x1FULL)); in pmcraid_cancel_all()
2732 struct pmcraid_ioarcb *ioarcb; in pmcraid_reset_device() local
2772 ioarcb = &cmd->ioa_cb->ioarcb; in pmcraid_reset_device()
2773 ioarcb->resource_handle = res->cfg_entry.resource_handle; in pmcraid_reset_device()
2774 ioarcb->request_type = REQ_TYPE_IOACMD; in pmcraid_reset_device()
2775 ioarcb->cdb[0] = PMCRAID_RESET_DEVICE; in pmcraid_reset_device()
2781 ioarcb->cdb[1] = modifier; in pmcraid_reset_device()
2787 cmd->ioa_cb->ioarcb.cdb[0], in pmcraid_reset_device()
2788 le32_to_cpu(cmd->ioa_cb->ioarcb.resource_handle), in pmcraid_reset_device()
2789 le32_to_cpu(cmd->ioa_cb->ioarcb.response_handle) >> 2); in pmcraid_reset_device()
2839 le32_to_cpu(cmd->ioa_cb->ioarcb.response_handle) >> 2, in _pmcraid_io_done()
2840 cmd->ioa_cb->ioarcb.cdb[0], in _pmcraid_io_done()
2902 cmd->ioa_cb->ioarcb.cdb[0], in pmcraid_abort_cmd()
2903 le32_to_cpu(cmd->ioa_cb->ioarcb.response_handle) >> 2); in pmcraid_abort_cmd()
2909 le32_to_cpu(cancel_cmd->ioa_cb->ioarcb.response_handle) >> 2, in pmcraid_abort_cmd()
2910 cancel_cmd->ioa_cb->ioarcb.cdb[0], in pmcraid_abort_cmd()
2911 le32_to_cpu(cancel_cmd->ioa_cb->ioarcb.resource_handle)); in pmcraid_abort_cmd()
3124 struct pmcraid_ioarcb *ioarcb = &cmd->ioa_cb->ioarcb; in pmcraid_init_ioadls() local
3127 if (ioarcb->add_cmd_param_length) in pmcraid_init_ioadls()
3128 ioadl_count = DIV_ROUND_UP(le16_to_cpu(ioarcb->add_cmd_param_length), 16); in pmcraid_init_ioadls()
3129 ioarcb->ioadl_length = cpu_to_le32(sizeof(struct pmcraid_ioadl_desc) * sgcount); in pmcraid_init_ioadls()
3131 if ((sgcount + ioadl_count) > (ARRAY_SIZE(ioarcb->add_data.u.ioadl))) { in pmcraid_init_ioadls()
3137 ioarcb->ioarcb_bus_addr &= cpu_to_le64(~(0x1FULL)); in pmcraid_init_ioadls()
3138 ioarcb->ioadl_bus_addr = in pmcraid_init_ioadls()
3142 ioadl = &ioarcb->add_data.u.ioadl[3]; in pmcraid_init_ioadls()
3144 ioarcb->ioadl_bus_addr = in pmcraid_init_ioadls()
3149 ioadl = &ioarcb->add_data.u.ioadl[ioadl_count]; in pmcraid_init_ioadls()
3150 ioarcb->ioarcb_bus_addr |= in pmcraid_init_ioadls()
3177 struct pmcraid_ioarcb *ioarcb = &(cmd->ioa_cb->ioarcb); in pmcraid_build_ioadl() local
3199 ioarcb->request_flags0 |= TRANSFER_DIR_WRITE; in pmcraid_build_ioadl()
3201 ioarcb->request_flags0 |= NO_LINK_DESCS; in pmcraid_build_ioadl()
3202 ioarcb->data_transfer_length = cpu_to_le32(length); in pmcraid_build_ioadl()
3356 struct pmcraid_ioarcb *ioarcb; in pmcraid_queuecommand_lck() local
3400 ioarcb = &(cmd->ioa_cb->ioarcb); in pmcraid_queuecommand_lck()
3401 memcpy(ioarcb->cdb, scsi_cmd->cmnd, scsi_cmd->cmd_len); in pmcraid_queuecommand_lck()
3402 ioarcb->resource_handle = res->cfg_entry.resource_handle; in pmcraid_queuecommand_lck()
3403 ioarcb->request_type = REQ_TYPE_SCSI; in pmcraid_queuecommand_lck()
3410 ioarcb->hrrq_id = atomic_add_return(1, &(pinstance->last_message_id)) % in pmcraid_queuecommand_lck()
3416 ioarcb->request_flags0 |= INHIBIT_UL_CHECK; in pmcraid_queuecommand_lck()
3419 ioarcb->request_flags0 |= SYNC_COMPLETE; in pmcraid_queuecommand_lck()
3423 ioarcb->request_flags0 |= NO_LINK_DESCS; in pmcraid_queuecommand_lck()
3426 ioarcb->request_flags1 |= TASK_TAG_SIMPLE; in pmcraid_queuecommand_lck()
3429 ioarcb->request_flags1 |= DELAY_AFTER_RESET; in pmcraid_queuecommand_lck()
3435 le32_to_cpu(ioarcb->response_handle) >> 2, in pmcraid_queuecommand_lck()
3515 struct pmcraid_ioarcb *ioarcb = &cmd->ioa_cb->ioarcb; in pmcraid_build_passthrough_ioadls() local
3538 ioarcb->request_flags0 |= NO_LINK_DESCS; in pmcraid_build_passthrough_ioadls()
3602 struct pmcraid_ioarcb *ioarcb; in pmcraid_ioctl_passthrough() local
3658 request_size = le32_to_cpu(buffer->ioarcb.data_transfer_length); in pmcraid_ioctl_passthrough()
3660 if (buffer->ioarcb.request_flags0 & TRANSFER_DIR_WRITE) { in pmcraid_ioctl_passthrough()
3674 if (le16_to_cpu(buffer->ioarcb.add_cmd_param_length) in pmcraid_ioctl_passthrough()
3689 ioarcb = &(cmd->ioa_cb->ioarcb); in pmcraid_ioctl_passthrough()
3692 ioarcb->resource_handle = buffer->ioarcb.resource_handle; in pmcraid_ioctl_passthrough()
3693 ioarcb->data_transfer_length = buffer->ioarcb.data_transfer_length; in pmcraid_ioctl_passthrough()
3694 ioarcb->cmd_timeout = buffer->ioarcb.cmd_timeout; in pmcraid_ioctl_passthrough()
3695 ioarcb->request_type = buffer->ioarcb.request_type; in pmcraid_ioctl_passthrough()
3696 ioarcb->request_flags0 = buffer->ioarcb.request_flags0; in pmcraid_ioctl_passthrough()
3697 ioarcb->request_flags1 = buffer->ioarcb.request_flags1; in pmcraid_ioctl_passthrough()
3698 memcpy(ioarcb->cdb, buffer->ioarcb.cdb, PMCRAID_MAX_CDB_LEN); in pmcraid_ioctl_passthrough()
3700 if (buffer->ioarcb.add_cmd_param_length) { in pmcraid_ioctl_passthrough()
3701 ioarcb->add_cmd_param_length = in pmcraid_ioctl_passthrough()
3702 buffer->ioarcb.add_cmd_param_length; in pmcraid_ioctl_passthrough()
3703 ioarcb->add_cmd_param_offset = in pmcraid_ioctl_passthrough()
3704 buffer->ioarcb.add_cmd_param_offset; in pmcraid_ioctl_passthrough()
3705 memcpy(ioarcb->add_data.u.add_cmd_params, in pmcraid_ioctl_passthrough()
3706 buffer->ioarcb.add_data.u.add_cmd_params, in pmcraid_ioctl_passthrough()
3707 le16_to_cpu(buffer->ioarcb.add_cmd_param_length)); in pmcraid_ioctl_passthrough()
3715 ioarcb->hrrq_id = atomic_add_return(1, &(pinstance->last_message_id)) % in pmcraid_ioctl_passthrough()
3750 le32_to_cpu(cmd->ioa_cb->ioarcb.response_handle) >> 2, in pmcraid_ioctl_passthrough()
3751 cmd->ioa_cb->ioarcb.cdb[0], in pmcraid_ioctl_passthrough()
3752 le32_to_cpu(cmd->ioa_cb->ioarcb.resource_handle)); in pmcraid_ioctl_passthrough()
3764 buffer->ioarcb.cmd_timeout = 0; in pmcraid_ioctl_passthrough()
3770 if (buffer->ioarcb.cmd_timeout == 0) { in pmcraid_ioctl_passthrough()
3774 msecs_to_jiffies(le16_to_cpu(buffer->ioarcb.cmd_timeout) * 1000))) { in pmcraid_ioctl_passthrough()
3777 le32_to_cpu(cmd->ioa_cb->ioarcb.response_handle) >> 2, in pmcraid_ioctl_passthrough()
3778 cmd->ioa_cb->ioarcb.cdb[0]); in pmcraid_ioctl_passthrough()
5417 struct pmcraid_ioarcb *ioarcb = &cmd->ioa_cb->ioarcb; in pmcraid_set_supported_devs() local
5422 ioarcb->resource_handle = cpu_to_le32(PMCRAID_IOA_RES_HANDLE); in pmcraid_set_supported_devs()
5423 ioarcb->request_type = REQ_TYPE_IOACMD; in pmcraid_set_supported_devs()
5424 ioarcb->cdb[0] = PMCRAID_SET_SUPPORTED_DEVICES; in pmcraid_set_supported_devs()
5425 ioarcb->cdb[1] = ALL_DEVICES_SUPPORTED; in pmcraid_set_supported_devs()
5459 struct pmcraid_ioarcb *ioarcb = &cmd->ioa_cb->ioarcb; in pmcraid_set_timestamp() local
5474 ioarcb->request_type = REQ_TYPE_SCSI; in pmcraid_set_timestamp()
5475 ioarcb->resource_handle = cpu_to_le32(PMCRAID_IOA_RES_HANDLE); in pmcraid_set_timestamp()
5476 ioarcb->cdb[0] = PMCRAID_SCSI_SET_TIMESTAMP; in pmcraid_set_timestamp()
5477 ioarcb->cdb[1] = PMCRAID_SCSI_SERVICE_ACTION; in pmcraid_set_timestamp()
5478 memcpy(&(ioarcb->cdb[6]), &time_stamp_len, sizeof(time_stamp_len)); in pmcraid_set_timestamp()
5480 ioarcb->ioadl_bus_addr = cpu_to_le64((cmd->ioa_cb_bus_addr) + in pmcraid_set_timestamp()
5483 ioarcb->ioadl_length = cpu_to_le32(sizeof(struct pmcraid_ioadl_desc)); in pmcraid_set_timestamp()
5484 ioarcb->ioarcb_bus_addr &= cpu_to_le64(~(0x1FULL)); in pmcraid_set_timestamp()
5486 ioarcb->request_flags0 |= NO_LINK_DESCS; in pmcraid_set_timestamp()
5487 ioarcb->request_flags0 |= TRANSFER_DIR_WRITE; in pmcraid_set_timestamp()
5488 ioarcb->data_transfer_length = in pmcraid_set_timestamp()
5490 ioadl = &(ioarcb->add_data.u.ioadl[0]); in pmcraid_set_timestamp()
5633 struct pmcraid_ioarcb *ioarcb = &cmd->ioa_cb->ioarcb; in pmcraid_querycfg() local
5646 ioarcb->request_type = REQ_TYPE_IOACMD; in pmcraid_querycfg()
5647 ioarcb->resource_handle = cpu_to_le32(PMCRAID_IOA_RES_HANDLE); in pmcraid_querycfg()
5649 ioarcb->cdb[0] = PMCRAID_QUERY_IOA_CONFIG; in pmcraid_querycfg()
5652 memcpy(&(ioarcb->cdb[10]), &cfg_table_size, sizeof(cfg_table_size)); in pmcraid_querycfg()
5657 ioarcb->ioadl_bus_addr = cpu_to_le64((cmd->ioa_cb_bus_addr) + in pmcraid_querycfg()
5660 ioarcb->ioadl_length = cpu_to_le32(sizeof(struct pmcraid_ioadl_desc)); in pmcraid_querycfg()
5661 ioarcb->ioarcb_bus_addr &= cpu_to_le64(~0x1FULL); in pmcraid_querycfg()
5663 ioarcb->request_flags0 |= NO_LINK_DESCS; in pmcraid_querycfg()
5664 ioarcb->data_transfer_length = in pmcraid_querycfg()
5667 ioadl = &(ioarcb->add_data.u.ioadl[0]); in pmcraid_querycfg()