Lines Matching refs:ioarcb
296 struct pmcraid_ioarcb *ioarcb = &(cmd->ioa_cb->ioarcb); in pmcraid_init_cmdblk() local
305 ioarcb->response_handle = cpu_to_le32(index << 2); in pmcraid_init_cmdblk()
306 ioarcb->ioarcb_bus_addr = cpu_to_le64(dma_addr); in pmcraid_init_cmdblk()
307 ioarcb->ioasa_bus_addr = cpu_to_le64(dma_addr + ioasa_offset); in pmcraid_init_cmdblk()
308 ioarcb->ioasa_len = cpu_to_le16(sizeof(struct pmcraid_ioasa)); in pmcraid_init_cmdblk()
313 memset(&cmd->ioa_cb->ioarcb.cdb, 0, PMCRAID_MAX_CDB_LEN); in pmcraid_init_cmdblk()
314 ioarcb->hrrq_id = 0; in pmcraid_init_cmdblk()
315 ioarcb->request_flags0 = 0; in pmcraid_init_cmdblk()
316 ioarcb->request_flags1 = 0; in pmcraid_init_cmdblk()
317 ioarcb->cmd_timeout = 0; in pmcraid_init_cmdblk()
318 ioarcb->ioarcb_bus_addr &= cpu_to_le64(~0x1FULL); in pmcraid_init_cmdblk()
319 ioarcb->ioadl_bus_addr = 0; in pmcraid_init_cmdblk()
320 ioarcb->ioadl_length = 0; in pmcraid_init_cmdblk()
321 ioarcb->data_transfer_length = 0; in pmcraid_init_cmdblk()
322 ioarcb->add_cmd_param_length = 0; in pmcraid_init_cmdblk()
323 ioarcb->add_cmd_param_offset = 0; in pmcraid_init_cmdblk()
691 cmd->ioa_cb->ioarcb.cdb[0]); in pmcraid_timeout_handler()
759 cmd->ioa_cb->ioarcb.cdb[0], in pmcraid_internal_done()
797 cmd->ioa_cb->ioarcb.cdb[0], in pmcraid_reinit_cfgtable_done()
828 cmd->ioa_cb->ioarcb.cdb[0], ioasc); in pmcraid_erp_done()
871 iowrite32(le64_to_cpu(cmd->ioa_cb->ioarcb.ioarcb_bus_addr), pinstance->ioarrin); in _pmcraid_fire_command()
937 cmd->ioa_cb->ioarcb.cdb[0], in pmcraid_ioa_shutdown()
944 cmd->ioa_cb->ioarcb.request_type = REQ_TYPE_IOACMD; in pmcraid_ioa_shutdown()
945 cmd->ioa_cb->ioarcb.resource_handle = in pmcraid_ioa_shutdown()
947 cmd->ioa_cb->ioarcb.cdb[0] = PMCRAID_IOA_SHUTDOWN; in pmcraid_ioa_shutdown()
948 cmd->ioa_cb->ioarcb.cdb[1] = PMCRAID_SHUTDOWN_NORMAL; in pmcraid_ioa_shutdown()
952 le32_to_cpu(cmd->ioa_cb->ioarcb.response_handle)); in pmcraid_ioa_shutdown()
1001 struct pmcraid_ioarcb *ioarcb = &cmd->ioa_cb->ioarcb; in pmcraid_get_fwversion() local
1007 ioarcb->request_type = REQ_TYPE_SCSI; in pmcraid_get_fwversion()
1008 ioarcb->resource_handle = cpu_to_le32(PMCRAID_IOA_RES_HANDLE); in pmcraid_get_fwversion()
1009 ioarcb->cdb[0] = INQUIRY; in pmcraid_get_fwversion()
1010 ioarcb->cdb[1] = 1; in pmcraid_get_fwversion()
1011 ioarcb->cdb[2] = 0xD0; in pmcraid_get_fwversion()
1012 ioarcb->cdb[3] = (data_size >> 8) & 0xFF; in pmcraid_get_fwversion()
1013 ioarcb->cdb[4] = data_size & 0xFF; in pmcraid_get_fwversion()
1017 ioarcb->ioadl_bus_addr = cpu_to_le64((cmd->ioa_cb_bus_addr) + in pmcraid_get_fwversion()
1020 ioarcb->ioadl_length = cpu_to_le32(sizeof(struct pmcraid_ioadl_desc)); in pmcraid_get_fwversion()
1021 ioarcb->ioarcb_bus_addr &= cpu_to_le64(~(0x1FULL)); in pmcraid_get_fwversion()
1023 ioarcb->request_flags0 |= NO_LINK_DESCS; in pmcraid_get_fwversion()
1024 ioarcb->data_transfer_length = cpu_to_le32(data_size); in pmcraid_get_fwversion()
1025 ioadl = &(ioarcb->add_data.u.ioadl[0]); in pmcraid_get_fwversion()
1044 struct pmcraid_ioarcb *ioarcb = &cmd->ioa_cb->ioarcb; in pmcraid_identify_hrrq() local
1061 ioarcb->request_type = REQ_TYPE_IOACMD; in pmcraid_identify_hrrq()
1062 ioarcb->resource_handle = cpu_to_le32(PMCRAID_IOA_RES_HANDLE); in pmcraid_identify_hrrq()
1065 ioarcb->hrrq_id = index; in pmcraid_identify_hrrq()
1066 ioarcb->cdb[0] = PMCRAID_IDENTIFY_HRRQ; in pmcraid_identify_hrrq()
1067 ioarcb->cdb[1] = index; in pmcraid_identify_hrrq()
1073 hrrq_addr, ioarcb->ioarcb_bus_addr, index); in pmcraid_identify_hrrq()
1075 memcpy(&(ioarcb->cdb[2]), &hrrq_addr, sizeof(hrrq_addr)); in pmcraid_identify_hrrq()
1076 memcpy(&(ioarcb->cdb[10]), &hrrq_size, sizeof(hrrq_size)); in pmcraid_identify_hrrq()
1100 if (cmd->ioa_cb->ioarcb.cdb[1] == PMCRAID_HCAM_CODE_CONFIG_CHANGE) in pmcraid_send_hcam_cmd()
1124 struct pmcraid_ioarcb *ioarcb; in pmcraid_init_hcam() local
1153 ioarcb = &cmd->ioa_cb->ioarcb; in pmcraid_init_hcam()
1154 ioarcb->ioadl_bus_addr = cpu_to_le64((cmd->ioa_cb_bus_addr) + in pmcraid_init_hcam()
1157 ioarcb->ioadl_length = cpu_to_le32(sizeof(struct pmcraid_ioadl_desc)); in pmcraid_init_hcam()
1158 ioadl = ioarcb->add_data.u.ioadl; in pmcraid_init_hcam()
1161 ioarcb->request_type = REQ_TYPE_HCAM; in pmcraid_init_hcam()
1162 ioarcb->resource_handle = cpu_to_le32(PMCRAID_IOA_RES_HANDLE); in pmcraid_init_hcam()
1163 ioarcb->cdb[0] = PMCRAID_HOST_CONTROLLED_ASYNC; in pmcraid_init_hcam()
1164 ioarcb->cdb[1] = type; in pmcraid_init_hcam()
1165 ioarcb->cdb[7] = (rcb_size >> 8) & 0xFF; in pmcraid_init_hcam()
1166 ioarcb->cdb[8] = (rcb_size) & 0xFF; in pmcraid_init_hcam()
1168 ioarcb->data_transfer_length = cpu_to_le32(rcb_size); in pmcraid_init_hcam()
1206 struct pmcraid_ioarcb *ioarcb = &cmd->ioa_cb->ioarcb; in pmcraid_prepare_cancel_cmd() local
1213 ioarcb_addr = cpu_to_be64(le64_to_cpu(cmd_to_cancel->ioa_cb->ioarcb.ioarcb_bus_addr)); in pmcraid_prepare_cancel_cmd()
1218 ioarcb->resource_handle = cmd_to_cancel->ioa_cb->ioarcb.resource_handle; in pmcraid_prepare_cancel_cmd()
1219 ioarcb->request_type = REQ_TYPE_IOACMD; in pmcraid_prepare_cancel_cmd()
1220 memset(ioarcb->cdb, 0, PMCRAID_MAX_CDB_LEN); in pmcraid_prepare_cancel_cmd()
1221 ioarcb->cdb[0] = PMCRAID_ABORT_CMD; in pmcraid_prepare_cancel_cmd()
1223 memcpy(&(ioarcb->cdb[2]), &ioarcb_addr, sizeof(ioarcb_addr)); in pmcraid_prepare_cancel_cmd()
1270 cmd->ioa_cb->ioarcb.cdb[0], in pmcraid_cancel_ccn()
1679 cmd->ioa_cb->ioarcb.cdb[0], in pmcraid_ioasc_logger()
1680 le32_to_cpu(cmd->ioa_cb->ioarcb.resource_handle), in pmcraid_ioasc_logger()
2009 __le32 resp = cmd->ioa_cb->ioarcb.response_handle; in pmcraid_fail_outstanding_cmds()
2018 cmd->ioa_cb->ioarcb.cdb[0], in pmcraid_fail_outstanding_cmds()
2416 struct pmcraid_ioarcb *ioarcb = &cmd->ioa_cb->ioarcb; in pmcraid_request_sense() local
2417 struct pmcraid_ioadl_desc *ioadl = ioarcb->add_data.u.ioadl; in pmcraid_request_sense()
2432 memset(ioarcb->cdb, 0, PMCRAID_MAX_CDB_LEN); in pmcraid_request_sense()
2433 ioarcb->request_flags0 = (SYNC_COMPLETE | in pmcraid_request_sense()
2436 ioarcb->request_type = REQ_TYPE_SCSI; in pmcraid_request_sense()
2437 ioarcb->cdb[0] = REQUEST_SENSE; in pmcraid_request_sense()
2438 ioarcb->cdb[4] = SCSI_SENSE_BUFFERSIZE; in pmcraid_request_sense()
2440 ioarcb->ioadl_bus_addr = cpu_to_le64((cmd->ioa_cb_bus_addr) + in pmcraid_request_sense()
2443 ioarcb->ioadl_length = cpu_to_le32(sizeof(struct pmcraid_ioadl_desc)); in pmcraid_request_sense()
2445 ioarcb->data_transfer_length = cpu_to_le32(SCSI_SENSE_BUFFERSIZE); in pmcraid_request_sense()
2471 struct pmcraid_ioarcb *ioarcb = &cmd->ioa_cb->ioarcb; in pmcraid_cancel_all() local
2474 memset(ioarcb->cdb, 0, PMCRAID_MAX_CDB_LEN); in pmcraid_cancel_all()
2475 ioarcb->request_flags0 = SYNC_OVERRIDE; in pmcraid_cancel_all()
2476 ioarcb->request_type = REQ_TYPE_IOACMD; in pmcraid_cancel_all()
2477 ioarcb->cdb[0] = PMCRAID_CANCEL_ALL_REQUESTS; in pmcraid_cancel_all()
2480 ioarcb->cdb[1] = PMCRAID_SYNC_COMPLETE_AFTER_CANCEL; in pmcraid_cancel_all()
2482 ioarcb->ioadl_bus_addr = 0; in pmcraid_cancel_all()
2483 ioarcb->ioadl_length = 0; in pmcraid_cancel_all()
2484 ioarcb->data_transfer_length = 0; in pmcraid_cancel_all()
2485 ioarcb->ioarcb_bus_addr &= cpu_to_le64((~0x1FULL)); in pmcraid_cancel_all()
2701 struct pmcraid_ioarcb *ioarcb; in pmcraid_reset_device() local
2741 ioarcb = &cmd->ioa_cb->ioarcb; in pmcraid_reset_device()
2742 ioarcb->resource_handle = res->cfg_entry.resource_handle; in pmcraid_reset_device()
2743 ioarcb->request_type = REQ_TYPE_IOACMD; in pmcraid_reset_device()
2744 ioarcb->cdb[0] = PMCRAID_RESET_DEVICE; in pmcraid_reset_device()
2750 ioarcb->cdb[1] = modifier; in pmcraid_reset_device()
2756 cmd->ioa_cb->ioarcb.cdb[0], in pmcraid_reset_device()
2757 le32_to_cpu(cmd->ioa_cb->ioarcb.resource_handle), in pmcraid_reset_device()
2758 le32_to_cpu(cmd->ioa_cb->ioarcb.response_handle) >> 2); in pmcraid_reset_device()
2808 le32_to_cpu(cmd->ioa_cb->ioarcb.response_handle) >> 2, in _pmcraid_io_done()
2809 cmd->ioa_cb->ioarcb.cdb[0], in _pmcraid_io_done()
2869 cmd->ioa_cb->ioarcb.cdb[0], in pmcraid_abort_cmd()
2870 le32_to_cpu(cmd->ioa_cb->ioarcb.response_handle) >> 2); in pmcraid_abort_cmd()
2876 le32_to_cpu(cancel_cmd->ioa_cb->ioarcb.response_handle) >> 2, in pmcraid_abort_cmd()
2877 cancel_cmd->ioa_cb->ioarcb.cdb[0], in pmcraid_abort_cmd()
2878 le32_to_cpu(cancel_cmd->ioa_cb->ioarcb.resource_handle)); in pmcraid_abort_cmd()
3091 struct pmcraid_ioarcb *ioarcb = &cmd->ioa_cb->ioarcb; in pmcraid_init_ioadls() local
3094 if (ioarcb->add_cmd_param_length) in pmcraid_init_ioadls()
3095 ioadl_count = DIV_ROUND_UP(le16_to_cpu(ioarcb->add_cmd_param_length), 16); in pmcraid_init_ioadls()
3096 ioarcb->ioadl_length = cpu_to_le32(sizeof(struct pmcraid_ioadl_desc) * sgcount); in pmcraid_init_ioadls()
3098 if ((sgcount + ioadl_count) > (ARRAY_SIZE(ioarcb->add_data.u.ioadl))) { in pmcraid_init_ioadls()
3104 ioarcb->ioarcb_bus_addr &= cpu_to_le64(~(0x1FULL)); in pmcraid_init_ioadls()
3105 ioarcb->ioadl_bus_addr = in pmcraid_init_ioadls()
3109 ioadl = &ioarcb->add_data.u.ioadl[3]; in pmcraid_init_ioadls()
3111 ioarcb->ioadl_bus_addr = in pmcraid_init_ioadls()
3116 ioadl = &ioarcb->add_data.u.ioadl[ioadl_count]; in pmcraid_init_ioadls()
3117 ioarcb->ioarcb_bus_addr |= in pmcraid_init_ioadls()
3144 struct pmcraid_ioarcb *ioarcb = &(cmd->ioa_cb->ioarcb); in pmcraid_build_ioadl() local
3166 ioarcb->request_flags0 |= TRANSFER_DIR_WRITE; in pmcraid_build_ioadl()
3168 ioarcb->request_flags0 |= NO_LINK_DESCS; in pmcraid_build_ioadl()
3169 ioarcb->data_transfer_length = cpu_to_le32(length); in pmcraid_build_ioadl()
3201 struct pmcraid_ioarcb *ioarcb; in pmcraid_queuecommand_lck() local
3244 ioarcb = &(cmd->ioa_cb->ioarcb); in pmcraid_queuecommand_lck()
3245 memcpy(ioarcb->cdb, scsi_cmd->cmnd, scsi_cmd->cmd_len); in pmcraid_queuecommand_lck()
3246 ioarcb->resource_handle = res->cfg_entry.resource_handle; in pmcraid_queuecommand_lck()
3247 ioarcb->request_type = REQ_TYPE_SCSI; in pmcraid_queuecommand_lck()
3254 ioarcb->hrrq_id = atomic_add_return(1, &(pinstance->last_message_id)) % in pmcraid_queuecommand_lck()
3260 ioarcb->request_flags0 |= INHIBIT_UL_CHECK; in pmcraid_queuecommand_lck()
3263 ioarcb->request_flags0 |= SYNC_COMPLETE; in pmcraid_queuecommand_lck()
3267 ioarcb->request_flags0 |= NO_LINK_DESCS; in pmcraid_queuecommand_lck()
3270 ioarcb->request_flags1 |= TASK_TAG_SIMPLE; in pmcraid_queuecommand_lck()
3273 ioarcb->request_flags1 |= DELAY_AFTER_RESET; in pmcraid_queuecommand_lck()
3279 le32_to_cpu(ioarcb->response_handle) >> 2, in pmcraid_queuecommand_lck()
4854 struct pmcraid_ioarcb *ioarcb = &cmd->ioa_cb->ioarcb; in pmcraid_set_supported_devs() local
4859 ioarcb->resource_handle = cpu_to_le32(PMCRAID_IOA_RES_HANDLE); in pmcraid_set_supported_devs()
4860 ioarcb->request_type = REQ_TYPE_IOACMD; in pmcraid_set_supported_devs()
4861 ioarcb->cdb[0] = PMCRAID_SET_SUPPORTED_DEVICES; in pmcraid_set_supported_devs()
4862 ioarcb->cdb[1] = ALL_DEVICES_SUPPORTED; in pmcraid_set_supported_devs()
4896 struct pmcraid_ioarcb *ioarcb = &cmd->ioa_cb->ioarcb; in pmcraid_set_timestamp() local
4911 ioarcb->request_type = REQ_TYPE_SCSI; in pmcraid_set_timestamp()
4912 ioarcb->resource_handle = cpu_to_le32(PMCRAID_IOA_RES_HANDLE); in pmcraid_set_timestamp()
4913 ioarcb->cdb[0] = PMCRAID_SCSI_SET_TIMESTAMP; in pmcraid_set_timestamp()
4914 ioarcb->cdb[1] = PMCRAID_SCSI_SERVICE_ACTION; in pmcraid_set_timestamp()
4915 memcpy(&(ioarcb->cdb[6]), &time_stamp_len, sizeof(time_stamp_len)); in pmcraid_set_timestamp()
4917 ioarcb->ioadl_bus_addr = cpu_to_le64((cmd->ioa_cb_bus_addr) + in pmcraid_set_timestamp()
4920 ioarcb->ioadl_length = cpu_to_le32(sizeof(struct pmcraid_ioadl_desc)); in pmcraid_set_timestamp()
4921 ioarcb->ioarcb_bus_addr &= cpu_to_le64(~(0x1FULL)); in pmcraid_set_timestamp()
4923 ioarcb->request_flags0 |= NO_LINK_DESCS; in pmcraid_set_timestamp()
4924 ioarcb->request_flags0 |= TRANSFER_DIR_WRITE; in pmcraid_set_timestamp()
4925 ioarcb->data_transfer_length = in pmcraid_set_timestamp()
4927 ioadl = &(ioarcb->add_data.u.ioadl[0]); in pmcraid_set_timestamp()
5070 struct pmcraid_ioarcb *ioarcb = &cmd->ioa_cb->ioarcb; in pmcraid_querycfg() local
5083 ioarcb->request_type = REQ_TYPE_IOACMD; in pmcraid_querycfg()
5084 ioarcb->resource_handle = cpu_to_le32(PMCRAID_IOA_RES_HANDLE); in pmcraid_querycfg()
5086 ioarcb->cdb[0] = PMCRAID_QUERY_IOA_CONFIG; in pmcraid_querycfg()
5089 memcpy(&(ioarcb->cdb[10]), &cfg_table_size, sizeof(cfg_table_size)); in pmcraid_querycfg()
5094 ioarcb->ioadl_bus_addr = cpu_to_le64((cmd->ioa_cb_bus_addr) + in pmcraid_querycfg()
5097 ioarcb->ioadl_length = cpu_to_le32(sizeof(struct pmcraid_ioadl_desc)); in pmcraid_querycfg()
5098 ioarcb->ioarcb_bus_addr &= cpu_to_le64(~0x1FULL); in pmcraid_querycfg()
5100 ioarcb->request_flags0 |= NO_LINK_DESCS; in pmcraid_querycfg()
5101 ioarcb->data_transfer_length = in pmcraid_querycfg()
5104 ioadl = &(ioarcb->add_data.u.ioadl[0]); in pmcraid_querycfg()