Lines Matching refs:ioarcb

299 	struct pmcraid_ioarcb *ioarcb = &(cmd->ioa_cb->ioarcb);  in pmcraid_init_cmdblk()  local
308 ioarcb->response_handle = cpu_to_le32(index << 2); in pmcraid_init_cmdblk()
309 ioarcb->ioarcb_bus_addr = cpu_to_le64(dma_addr); in pmcraid_init_cmdblk()
310 ioarcb->ioasa_bus_addr = cpu_to_le64(dma_addr + ioasa_offset); in pmcraid_init_cmdblk()
311 ioarcb->ioasa_len = cpu_to_le16(sizeof(struct pmcraid_ioasa)); in pmcraid_init_cmdblk()
316 memset(&cmd->ioa_cb->ioarcb.cdb, 0, PMCRAID_MAX_CDB_LEN); in pmcraid_init_cmdblk()
317 ioarcb->hrrq_id = 0; in pmcraid_init_cmdblk()
318 ioarcb->request_flags0 = 0; in pmcraid_init_cmdblk()
319 ioarcb->request_flags1 = 0; in pmcraid_init_cmdblk()
320 ioarcb->cmd_timeout = 0; in pmcraid_init_cmdblk()
321 ioarcb->ioarcb_bus_addr &= cpu_to_le64(~0x1FULL); in pmcraid_init_cmdblk()
322 ioarcb->ioadl_bus_addr = 0; in pmcraid_init_cmdblk()
323 ioarcb->ioadl_length = 0; in pmcraid_init_cmdblk()
324 ioarcb->data_transfer_length = 0; in pmcraid_init_cmdblk()
325 ioarcb->add_cmd_param_length = 0; in pmcraid_init_cmdblk()
326 ioarcb->add_cmd_param_offset = 0; in pmcraid_init_cmdblk()
694 cmd->ioa_cb->ioarcb.cdb[0]); in pmcraid_timeout_handler()
762 cmd->ioa_cb->ioarcb.cdb[0], in pmcraid_internal_done()
800 cmd->ioa_cb->ioarcb.cdb[0], in pmcraid_reinit_cfgtable_done()
831 cmd->ioa_cb->ioarcb.cdb[0], ioasc); in pmcraid_erp_done()
874 iowrite32(le64_to_cpu(cmd->ioa_cb->ioarcb.ioarcb_bus_addr), pinstance->ioarrin); in _pmcraid_fire_command()
940 cmd->ioa_cb->ioarcb.cdb[0], in pmcraid_ioa_shutdown()
947 cmd->ioa_cb->ioarcb.request_type = REQ_TYPE_IOACMD; in pmcraid_ioa_shutdown()
948 cmd->ioa_cb->ioarcb.resource_handle = in pmcraid_ioa_shutdown()
950 cmd->ioa_cb->ioarcb.cdb[0] = PMCRAID_IOA_SHUTDOWN; in pmcraid_ioa_shutdown()
951 cmd->ioa_cb->ioarcb.cdb[1] = PMCRAID_SHUTDOWN_NORMAL; in pmcraid_ioa_shutdown()
955 le32_to_cpu(cmd->ioa_cb->ioarcb.response_handle)); in pmcraid_ioa_shutdown()
1004 struct pmcraid_ioarcb *ioarcb = &cmd->ioa_cb->ioarcb; in pmcraid_get_fwversion() local
1010 ioarcb->request_type = REQ_TYPE_SCSI; in pmcraid_get_fwversion()
1011 ioarcb->resource_handle = cpu_to_le32(PMCRAID_IOA_RES_HANDLE); in pmcraid_get_fwversion()
1012 ioarcb->cdb[0] = INQUIRY; in pmcraid_get_fwversion()
1013 ioarcb->cdb[1] = 1; in pmcraid_get_fwversion()
1014 ioarcb->cdb[2] = 0xD0; in pmcraid_get_fwversion()
1015 ioarcb->cdb[3] = (data_size >> 8) & 0xFF; in pmcraid_get_fwversion()
1016 ioarcb->cdb[4] = data_size & 0xFF; in pmcraid_get_fwversion()
1020 ioarcb->ioadl_bus_addr = cpu_to_le64((cmd->ioa_cb_bus_addr) + in pmcraid_get_fwversion()
1023 ioarcb->ioadl_length = cpu_to_le32(sizeof(struct pmcraid_ioadl_desc)); in pmcraid_get_fwversion()
1024 ioarcb->ioarcb_bus_addr &= cpu_to_le64(~(0x1FULL)); in pmcraid_get_fwversion()
1026 ioarcb->request_flags0 |= NO_LINK_DESCS; in pmcraid_get_fwversion()
1027 ioarcb->data_transfer_length = cpu_to_le32(data_size); in pmcraid_get_fwversion()
1028 ioadl = &(ioarcb->add_data.u.ioadl[0]); in pmcraid_get_fwversion()
1047 struct pmcraid_ioarcb *ioarcb = &cmd->ioa_cb->ioarcb; in pmcraid_identify_hrrq() local
1064 ioarcb->request_type = REQ_TYPE_IOACMD; in pmcraid_identify_hrrq()
1065 ioarcb->resource_handle = cpu_to_le32(PMCRAID_IOA_RES_HANDLE); in pmcraid_identify_hrrq()
1068 ioarcb->hrrq_id = index; in pmcraid_identify_hrrq()
1069 ioarcb->cdb[0] = PMCRAID_IDENTIFY_HRRQ; in pmcraid_identify_hrrq()
1070 ioarcb->cdb[1] = index; in pmcraid_identify_hrrq()
1076 hrrq_addr, ioarcb->ioarcb_bus_addr, index); in pmcraid_identify_hrrq()
1078 memcpy(&(ioarcb->cdb[2]), &hrrq_addr, sizeof(hrrq_addr)); in pmcraid_identify_hrrq()
1079 memcpy(&(ioarcb->cdb[10]), &hrrq_size, sizeof(hrrq_size)); in pmcraid_identify_hrrq()
1103 if (cmd->ioa_cb->ioarcb.cdb[1] == PMCRAID_HCAM_CODE_CONFIG_CHANGE) in pmcraid_send_hcam_cmd()
1127 struct pmcraid_ioarcb *ioarcb; in pmcraid_init_hcam() local
1156 ioarcb = &cmd->ioa_cb->ioarcb; in pmcraid_init_hcam()
1157 ioarcb->ioadl_bus_addr = cpu_to_le64((cmd->ioa_cb_bus_addr) + in pmcraid_init_hcam()
1160 ioarcb->ioadl_length = cpu_to_le32(sizeof(struct pmcraid_ioadl_desc)); in pmcraid_init_hcam()
1161 ioadl = ioarcb->add_data.u.ioadl; in pmcraid_init_hcam()
1164 ioarcb->request_type = REQ_TYPE_HCAM; in pmcraid_init_hcam()
1165 ioarcb->resource_handle = cpu_to_le32(PMCRAID_IOA_RES_HANDLE); in pmcraid_init_hcam()
1166 ioarcb->cdb[0] = PMCRAID_HOST_CONTROLLED_ASYNC; in pmcraid_init_hcam()
1167 ioarcb->cdb[1] = type; in pmcraid_init_hcam()
1168 ioarcb->cdb[7] = (rcb_size >> 8) & 0xFF; in pmcraid_init_hcam()
1169 ioarcb->cdb[8] = (rcb_size) & 0xFF; in pmcraid_init_hcam()
1171 ioarcb->data_transfer_length = cpu_to_le32(rcb_size); in pmcraid_init_hcam()
1209 struct pmcraid_ioarcb *ioarcb = &cmd->ioa_cb->ioarcb; in pmcraid_prepare_cancel_cmd() local
1216 ioarcb_addr = cpu_to_be64(le64_to_cpu(cmd_to_cancel->ioa_cb->ioarcb.ioarcb_bus_addr)); in pmcraid_prepare_cancel_cmd()
1221 ioarcb->resource_handle = cmd_to_cancel->ioa_cb->ioarcb.resource_handle; in pmcraid_prepare_cancel_cmd()
1222 ioarcb->request_type = REQ_TYPE_IOACMD; in pmcraid_prepare_cancel_cmd()
1223 memset(ioarcb->cdb, 0, PMCRAID_MAX_CDB_LEN); in pmcraid_prepare_cancel_cmd()
1224 ioarcb->cdb[0] = PMCRAID_ABORT_CMD; in pmcraid_prepare_cancel_cmd()
1226 memcpy(&(ioarcb->cdb[2]), &ioarcb_addr, sizeof(ioarcb_addr)); in pmcraid_prepare_cancel_cmd()
1273 cmd->ioa_cb->ioarcb.cdb[0], in pmcraid_cancel_ccn()
1682 cmd->ioa_cb->ioarcb.cdb[0], in pmcraid_ioasc_logger()
1683 le32_to_cpu(cmd->ioa_cb->ioarcb.resource_handle), in pmcraid_ioasc_logger()
2012 __le32 resp = cmd->ioa_cb->ioarcb.response_handle; in pmcraid_fail_outstanding_cmds()
2021 cmd->ioa_cb->ioarcb.cdb[0], in pmcraid_fail_outstanding_cmds()
2419 struct pmcraid_ioarcb *ioarcb = &cmd->ioa_cb->ioarcb; in pmcraid_request_sense() local
2420 struct pmcraid_ioadl_desc *ioadl = ioarcb->add_data.u.ioadl; in pmcraid_request_sense()
2435 memset(ioarcb->cdb, 0, PMCRAID_MAX_CDB_LEN); in pmcraid_request_sense()
2436 ioarcb->request_flags0 = (SYNC_COMPLETE | in pmcraid_request_sense()
2439 ioarcb->request_type = REQ_TYPE_SCSI; in pmcraid_request_sense()
2440 ioarcb->cdb[0] = REQUEST_SENSE; in pmcraid_request_sense()
2441 ioarcb->cdb[4] = SCSI_SENSE_BUFFERSIZE; in pmcraid_request_sense()
2443 ioarcb->ioadl_bus_addr = cpu_to_le64((cmd->ioa_cb_bus_addr) + in pmcraid_request_sense()
2446 ioarcb->ioadl_length = cpu_to_le32(sizeof(struct pmcraid_ioadl_desc)); in pmcraid_request_sense()
2448 ioarcb->data_transfer_length = cpu_to_le32(SCSI_SENSE_BUFFERSIZE); in pmcraid_request_sense()
2474 struct pmcraid_ioarcb *ioarcb = &cmd->ioa_cb->ioarcb; in pmcraid_cancel_all() local
2477 memset(ioarcb->cdb, 0, PMCRAID_MAX_CDB_LEN); in pmcraid_cancel_all()
2478 ioarcb->request_flags0 = SYNC_OVERRIDE; in pmcraid_cancel_all()
2479 ioarcb->request_type = REQ_TYPE_IOACMD; in pmcraid_cancel_all()
2480 ioarcb->cdb[0] = PMCRAID_CANCEL_ALL_REQUESTS; in pmcraid_cancel_all()
2483 ioarcb->cdb[1] = PMCRAID_SYNC_COMPLETE_AFTER_CANCEL; in pmcraid_cancel_all()
2485 ioarcb->ioadl_bus_addr = 0; in pmcraid_cancel_all()
2486 ioarcb->ioadl_length = 0; in pmcraid_cancel_all()
2487 ioarcb->data_transfer_length = 0; in pmcraid_cancel_all()
2488 ioarcb->ioarcb_bus_addr &= cpu_to_le64((~0x1FULL)); in pmcraid_cancel_all()
2704 struct pmcraid_ioarcb *ioarcb; in pmcraid_reset_device() local
2744 ioarcb = &cmd->ioa_cb->ioarcb; in pmcraid_reset_device()
2745 ioarcb->resource_handle = res->cfg_entry.resource_handle; in pmcraid_reset_device()
2746 ioarcb->request_type = REQ_TYPE_IOACMD; in pmcraid_reset_device()
2747 ioarcb->cdb[0] = PMCRAID_RESET_DEVICE; in pmcraid_reset_device()
2753 ioarcb->cdb[1] = modifier; in pmcraid_reset_device()
2759 cmd->ioa_cb->ioarcb.cdb[0], in pmcraid_reset_device()
2760 le32_to_cpu(cmd->ioa_cb->ioarcb.resource_handle), in pmcraid_reset_device()
2761 le32_to_cpu(cmd->ioa_cb->ioarcb.response_handle) >> 2); in pmcraid_reset_device()
2811 le32_to_cpu(cmd->ioa_cb->ioarcb.response_handle) >> 2, in _pmcraid_io_done()
2812 cmd->ioa_cb->ioarcb.cdb[0], in _pmcraid_io_done()
2872 cmd->ioa_cb->ioarcb.cdb[0], in pmcraid_abort_cmd()
2873 le32_to_cpu(cmd->ioa_cb->ioarcb.response_handle) >> 2); in pmcraid_abort_cmd()
2879 le32_to_cpu(cancel_cmd->ioa_cb->ioarcb.response_handle) >> 2, in pmcraid_abort_cmd()
2880 cancel_cmd->ioa_cb->ioarcb.cdb[0], in pmcraid_abort_cmd()
2881 le32_to_cpu(cancel_cmd->ioa_cb->ioarcb.resource_handle)); in pmcraid_abort_cmd()
3139 struct pmcraid_ioarcb *ioarcb = &cmd->ioa_cb->ioarcb; in pmcraid_init_ioadls() local
3142 if (ioarcb->add_cmd_param_length) in pmcraid_init_ioadls()
3143 ioadl_count = DIV_ROUND_UP(le16_to_cpu(ioarcb->add_cmd_param_length), 16); in pmcraid_init_ioadls()
3144 ioarcb->ioadl_length = cpu_to_le32(sizeof(struct pmcraid_ioadl_desc) * sgcount); in pmcraid_init_ioadls()
3146 if ((sgcount + ioadl_count) > (ARRAY_SIZE(ioarcb->add_data.u.ioadl))) { in pmcraid_init_ioadls()
3152 ioarcb->ioarcb_bus_addr &= cpu_to_le64(~(0x1FULL)); in pmcraid_init_ioadls()
3153 ioarcb->ioadl_bus_addr = in pmcraid_init_ioadls()
3157 ioadl = &ioarcb->add_data.u.ioadl[3]; in pmcraid_init_ioadls()
3159 ioarcb->ioadl_bus_addr = in pmcraid_init_ioadls()
3164 ioadl = &ioarcb->add_data.u.ioadl[ioadl_count]; in pmcraid_init_ioadls()
3165 ioarcb->ioarcb_bus_addr |= in pmcraid_init_ioadls()
3192 struct pmcraid_ioarcb *ioarcb = &(cmd->ioa_cb->ioarcb); in pmcraid_build_ioadl() local
3214 ioarcb->request_flags0 |= TRANSFER_DIR_WRITE; in pmcraid_build_ioadl()
3216 ioarcb->request_flags0 |= NO_LINK_DESCS; in pmcraid_build_ioadl()
3217 ioarcb->data_transfer_length = cpu_to_le32(length); in pmcraid_build_ioadl()
3249 struct pmcraid_ioarcb *ioarcb; in pmcraid_queuecommand_lck() local
3292 ioarcb = &(cmd->ioa_cb->ioarcb); in pmcraid_queuecommand_lck()
3293 memcpy(ioarcb->cdb, scsi_cmd->cmnd, scsi_cmd->cmd_len); in pmcraid_queuecommand_lck()
3294 ioarcb->resource_handle = res->cfg_entry.resource_handle; in pmcraid_queuecommand_lck()
3295 ioarcb->request_type = REQ_TYPE_SCSI; in pmcraid_queuecommand_lck()
3302 ioarcb->hrrq_id = atomic_add_return(1, &(pinstance->last_message_id)) % in pmcraid_queuecommand_lck()
3308 ioarcb->request_flags0 |= INHIBIT_UL_CHECK; in pmcraid_queuecommand_lck()
3311 ioarcb->request_flags0 |= SYNC_COMPLETE; in pmcraid_queuecommand_lck()
3315 ioarcb->request_flags0 |= NO_LINK_DESCS; in pmcraid_queuecommand_lck()
3318 ioarcb->request_flags1 |= TASK_TAG_SIMPLE; in pmcraid_queuecommand_lck()
3321 ioarcb->request_flags1 |= DELAY_AFTER_RESET; in pmcraid_queuecommand_lck()
3327 le32_to_cpu(ioarcb->response_handle) >> 2, in pmcraid_queuecommand_lck()
4901 struct pmcraid_ioarcb *ioarcb = &cmd->ioa_cb->ioarcb; in pmcraid_set_supported_devs() local
4906 ioarcb->resource_handle = cpu_to_le32(PMCRAID_IOA_RES_HANDLE); in pmcraid_set_supported_devs()
4907 ioarcb->request_type = REQ_TYPE_IOACMD; in pmcraid_set_supported_devs()
4908 ioarcb->cdb[0] = PMCRAID_SET_SUPPORTED_DEVICES; in pmcraid_set_supported_devs()
4909 ioarcb->cdb[1] = ALL_DEVICES_SUPPORTED; in pmcraid_set_supported_devs()
4943 struct pmcraid_ioarcb *ioarcb = &cmd->ioa_cb->ioarcb; in pmcraid_set_timestamp() local
4958 ioarcb->request_type = REQ_TYPE_SCSI; in pmcraid_set_timestamp()
4959 ioarcb->resource_handle = cpu_to_le32(PMCRAID_IOA_RES_HANDLE); in pmcraid_set_timestamp()
4960 ioarcb->cdb[0] = PMCRAID_SCSI_SET_TIMESTAMP; in pmcraid_set_timestamp()
4961 ioarcb->cdb[1] = PMCRAID_SCSI_SERVICE_ACTION; in pmcraid_set_timestamp()
4962 memcpy(&(ioarcb->cdb[6]), &time_stamp_len, sizeof(time_stamp_len)); in pmcraid_set_timestamp()
4964 ioarcb->ioadl_bus_addr = cpu_to_le64((cmd->ioa_cb_bus_addr) + in pmcraid_set_timestamp()
4967 ioarcb->ioadl_length = cpu_to_le32(sizeof(struct pmcraid_ioadl_desc)); in pmcraid_set_timestamp()
4968 ioarcb->ioarcb_bus_addr &= cpu_to_le64(~(0x1FULL)); in pmcraid_set_timestamp()
4970 ioarcb->request_flags0 |= NO_LINK_DESCS; in pmcraid_set_timestamp()
4971 ioarcb->request_flags0 |= TRANSFER_DIR_WRITE; in pmcraid_set_timestamp()
4972 ioarcb->data_transfer_length = in pmcraid_set_timestamp()
4974 ioadl = &(ioarcb->add_data.u.ioadl[0]); in pmcraid_set_timestamp()
5117 struct pmcraid_ioarcb *ioarcb = &cmd->ioa_cb->ioarcb; in pmcraid_querycfg() local
5130 ioarcb->request_type = REQ_TYPE_IOACMD; in pmcraid_querycfg()
5131 ioarcb->resource_handle = cpu_to_le32(PMCRAID_IOA_RES_HANDLE); in pmcraid_querycfg()
5133 ioarcb->cdb[0] = PMCRAID_QUERY_IOA_CONFIG; in pmcraid_querycfg()
5136 memcpy(&(ioarcb->cdb[10]), &cfg_table_size, sizeof(cfg_table_size)); in pmcraid_querycfg()
5141 ioarcb->ioadl_bus_addr = cpu_to_le64((cmd->ioa_cb_bus_addr) + in pmcraid_querycfg()
5144 ioarcb->ioadl_length = cpu_to_le32(sizeof(struct pmcraid_ioadl_desc)); in pmcraid_querycfg()
5145 ioarcb->ioarcb_bus_addr &= cpu_to_le64(~0x1FULL); in pmcraid_querycfg()
5147 ioarcb->request_flags0 |= NO_LINK_DESCS; in pmcraid_querycfg()
5148 ioarcb->data_transfer_length = in pmcraid_querycfg()
5151 ioadl = &(ioarcb->add_data.u.ioadl[0]); in pmcraid_querycfg()