Lines Matching refs:hostrcb
1080 struct ipr_hostrcb *hostrcb) in ipr_send_hcam() argument
1088 list_add_tail(&hostrcb->queue, &ioa_cfg->hostrcb_pending_q); in ipr_send_hcam()
1090 ipr_cmd->u.hostrcb = hostrcb; in ipr_send_hcam()
1097 ioarcb->cmd_pkt.cdb[7] = (sizeof(hostrcb->hcam) >> 8) & 0xff; in ipr_send_hcam()
1098 ioarcb->cmd_pkt.cdb[8] = sizeof(hostrcb->hcam) & 0xff; in ipr_send_hcam()
1100 ipr_init_ioadl(ipr_cmd, hostrcb->hostrcb_dma, in ipr_send_hcam()
1101 sizeof(hostrcb->hcam), IPR_IOADL_FLAGS_READ_LAST); in ipr_send_hcam()
1112 list_add_tail(&hostrcb->queue, &ioa_cfg->hostrcb_free_q); in ipr_send_hcam()
1401 struct ipr_hostrcb *hostrcb) in ipr_handle_config_change() argument
1410 cfgtew.u.cfgte64 = &hostrcb->hcam.u.ccn.u.cfgte64; in ipr_handle_config_change()
1413 cfgtew.u.cfgte = &hostrcb->hcam.u.ccn.u.cfgte; in ipr_handle_config_change()
1428 hostrcb); in ipr_handle_config_change()
1442 if (hostrcb->hcam.notify_type == IPR_HOST_RCB_NOTIF_TYPE_REM_ENTRY) { in ipr_handle_config_change()
1456 ipr_send_hcam(ioa_cfg, IPR_HCAM_CDB_OP_CODE_CONFIG_CHANGE, hostrcb); in ipr_handle_config_change()
1472 struct ipr_hostrcb *hostrcb = ipr_cmd->u.hostrcb; in ipr_process_ccn() local
1475 list_del(&hostrcb->queue); in ipr_process_ccn()
1484 ipr_send_hcam(ioa_cfg, IPR_HCAM_CDB_OP_CODE_CONFIG_CHANGE, hostrcb); in ipr_process_ccn()
1486 ipr_handle_config_change(ioa_cfg, hostrcb); in ipr_process_ccn()
1519 static void ipr_log_vpd_compact(char *prefix, struct ipr_hostrcb *hostrcb, in ipr_log_vpd_compact() argument
1534 ipr_hcam_err(hostrcb, "%s VPID/SN: %s\n", prefix, buffer); in ipr_log_vpd_compact()
1569 static void ipr_log_ext_vpd_compact(char *prefix, struct ipr_hostrcb *hostrcb, in ipr_log_ext_vpd_compact() argument
1572 ipr_log_vpd_compact(prefix, hostrcb, &vpd->vpd); in ipr_log_ext_vpd_compact()
1573 ipr_hcam_err(hostrcb, "%s WWN: %08X%08X\n", prefix, in ipr_log_ext_vpd_compact()
1600 struct ipr_hostrcb *hostrcb) in ipr_log_enhanced_cache_error() argument
1605 error = &hostrcb->hcam.u.error64.u.type_12_error; in ipr_log_enhanced_cache_error()
1607 error = &hostrcb->hcam.u.error.u.type_12_error; in ipr_log_enhanced_cache_error()
1636 struct ipr_hostrcb *hostrcb) in ipr_log_cache_error() argument
1639 &hostrcb->hcam.u.error.u.type_02_error; in ipr_log_cache_error()
1668 struct ipr_hostrcb *hostrcb) in ipr_log_enhanced_config_error() argument
1674 error = &hostrcb->hcam.u.error.u.type_13_error; in ipr_log_enhanced_config_error()
1708 struct ipr_hostrcb *hostrcb) in ipr_log_sis64_config_error() argument
1715 error = &hostrcb->hcam.u.error64.u.type_23_error; in ipr_log_sis64_config_error()
1751 struct ipr_hostrcb *hostrcb) in ipr_log_config_error() argument
1757 error = &hostrcb->hcam.u.error.u.type_03_error; in ipr_log_config_error()
1798 struct ipr_hostrcb *hostrcb) in ipr_log_enhanced_array_error() argument
1805 error = &hostrcb->hcam.u.error.u.type_14_error; in ipr_log_enhanced_array_error()
1849 struct ipr_hostrcb *hostrcb) in ipr_log_array_error() argument
1856 error = &hostrcb->hcam.u.error.u.type_04_error; in ipr_log_array_error()
1932 struct ipr_hostrcb *hostrcb) in ipr_log_enhanced_dual_ioa_error() argument
1937 error = &hostrcb->hcam.u.error64.u.type_17_error; in ipr_log_enhanced_dual_ioa_error()
1939 error = &hostrcb->hcam.u.error.u.type_17_error; in ipr_log_enhanced_dual_ioa_error()
1944 ipr_hcam_err(hostrcb, "%s [PRC: %08X]\n", error->failure_reason, in ipr_log_enhanced_dual_ioa_error()
1945 be32_to_cpu(hostrcb->hcam.u.error.prc)); in ipr_log_enhanced_dual_ioa_error()
1946 ipr_log_ext_vpd_compact("Remote IOA", hostrcb, &error->vpd); in ipr_log_enhanced_dual_ioa_error()
1948 be32_to_cpu(hostrcb->hcam.length) - in ipr_log_enhanced_dual_ioa_error()
1962 struct ipr_hostrcb *hostrcb) in ipr_log_dual_ioa_error() argument
1966 error = &hostrcb->hcam.u.error.u.type_07_error; in ipr_log_dual_ioa_error()
1970 ipr_hcam_err(hostrcb, "%s [PRC: %08X]\n", error->failure_reason, in ipr_log_dual_ioa_error()
1971 be32_to_cpu(hostrcb->hcam.u.error.prc)); in ipr_log_dual_ioa_error()
1972 ipr_log_vpd_compact("Remote IOA", hostrcb, &error->vpd); in ipr_log_dual_ioa_error()
1974 be32_to_cpu(hostrcb->hcam.length) - in ipr_log_dual_ioa_error()
2006 static void ipr_log_fabric_path(struct ipr_hostrcb *hostrcb, in ipr_log_fabric_path() argument
2023 ipr_hcam_err(hostrcb, "%s %s: IOA Port=%d\n", in ipr_log_fabric_path()
2027 ipr_hcam_err(hostrcb, "%s %s: IOA Port=%d, Phy=%d\n", in ipr_log_fabric_path()
2031 ipr_hcam_err(hostrcb, "%s %s: IOA Port=%d, Cascade=%d\n", in ipr_log_fabric_path()
2035 ipr_hcam_err(hostrcb, "%s %s: IOA Port=%d, Cascade=%d, Phy=%d\n", in ipr_log_fabric_path()
2055 static void ipr_log64_fabric_path(struct ipr_hostrcb *hostrcb, in ipr_log64_fabric_path() argument
2072 ipr_hcam_err(hostrcb, "%s %s: Resource Path=%s\n", in ipr_log64_fabric_path()
2074 ipr_format_res_path(hostrcb->ioa_cfg, in ipr_log64_fabric_path()
2082 ipr_format_res_path(hostrcb->ioa_cfg, fabric->res_path, in ipr_log64_fabric_path()
2135 static void ipr_log_path_elem(struct ipr_hostrcb *hostrcb, in ipr_log_path_elem() argument
2154 ipr_hcam_err(hostrcb, "%s %s: Phy=%d, Link rate=%s, WWN=%08X%08X\n", in ipr_log_path_elem()
2160 ipr_hcam_err(hostrcb, "%s %s: Link rate=%s, WWN=%08X%08X\n", in ipr_log_path_elem()
2165 ipr_hcam_err(hostrcb, "%s %s: Phy=%d, Link rate=%s, " in ipr_log_path_elem()
2171 ipr_hcam_err(hostrcb, "%s %s: Cascade=%d, Link rate=%s, " in ipr_log_path_elem()
2177 ipr_hcam_err(hostrcb, "%s %s: Cascade=%d, Phy=%d, Link rate=%s " in ipr_log_path_elem()
2188 ipr_hcam_err(hostrcb, "Path element=%02X: Cascade=%d Phy=%d Link rate=%s " in ipr_log_path_elem()
2202 static void ipr_log64_path_elem(struct ipr_hostrcb *hostrcb, in ipr_log64_path_elem() argument
2222 ipr_hcam_err(hostrcb, "%s %s: Resource Path=%s, Link rate=%s, WWN=%08X%08X\n", in ipr_log64_path_elem()
2224 ipr_format_res_path(hostrcb->ioa_cfg, in ipr_log64_path_elem()
2232 ipr_hcam_err(hostrcb, "Path element=%02X: Resource Path=%s, Link rate=%s " in ipr_log64_path_elem()
2234 ipr_format_res_path(hostrcb->ioa_cfg, in ipr_log64_path_elem()
2249 struct ipr_hostrcb *hostrcb) in ipr_log_fabric_error() argument
2256 error = &hostrcb->hcam.u.error.u.type_20_error; in ipr_log_fabric_error()
2258 ipr_hcam_err(hostrcb, "%s\n", error->failure_reason); in ipr_log_fabric_error()
2260 add_len = be32_to_cpu(hostrcb->hcam.length) - in ipr_log_fabric_error()
2265 ipr_log_fabric_path(hostrcb, fabric); in ipr_log_fabric_error()
2267 ipr_log_path_elem(hostrcb, cfg); in ipr_log_fabric_error()
2286 struct ipr_hostrcb *hostrcb) in ipr_log_sis64_array_error() argument
2294 error = &hostrcb->hcam.u.error64.u.type_24_error; in ipr_log_sis64_array_error()
2342 struct ipr_hostrcb *hostrcb) in ipr_log_sis64_fabric_error() argument
2349 error = &hostrcb->hcam.u.error64.u.type_30_error; in ipr_log_sis64_fabric_error()
2352 ipr_hcam_err(hostrcb, "%s\n", error->failure_reason); in ipr_log_sis64_fabric_error()
2354 add_len = be32_to_cpu(hostrcb->hcam.length) - in ipr_log_sis64_fabric_error()
2359 ipr_log64_fabric_path(hostrcb, fabric); in ipr_log_sis64_fabric_error()
2361 ipr_log64_path_elem(hostrcb, cfg); in ipr_log_sis64_fabric_error()
2380 struct ipr_hostrcb *hostrcb) in ipr_log_generic_error() argument
2382 ipr_log_hex_data(ioa_cfg, hostrcb->hcam.u.raw.data, in ipr_log_generic_error()
2383 be32_to_cpu(hostrcb->hcam.length)); in ipr_log_generic_error()
2395 struct ipr_hostrcb *hostrcb) in ipr_log_sis64_device_error() argument
2400 error = &hostrcb->hcam.u.error64.u.type_21_error; in ipr_log_sis64_device_error()
2455 struct ipr_hostrcb *hostrcb) in ipr_handle_log_data() argument
2461 if (hostrcb->hcam.notify_type != IPR_HOST_RCB_NOTIF_TYPE_ERROR_LOG_ENTRY) in ipr_handle_log_data()
2464 if (hostrcb->hcam.notifications_lost == IPR_HOST_RCB_NOTIFICATIONS_LOST) in ipr_handle_log_data()
2468 ioasc = be32_to_cpu(hostrcb->hcam.u.error64.fd_ioasc); in ipr_handle_log_data()
2470 ioasc = be32_to_cpu(hostrcb->hcam.u.error.fd_ioasc); in ipr_handle_log_data()
2476 hostrcb->hcam.u.error.fd_res_addr.bus); in ipr_handle_log_data()
2485 hostrcb->hcam.overlay_id == IPR_HOST_RCB_OVERLAY_ID_21) { in ipr_handle_log_data()
2486 error = &hostrcb->hcam.u.error64.u.type_21_error; in ipr_handle_log_data()
2493 ipr_hcam_err(hostrcb, "%s\n", ipr_error_table[error_index].error); in ipr_handle_log_data()
2500 if (be32_to_cpu(hostrcb->hcam.length) > sizeof(hostrcb->hcam.u.raw)) in ipr_handle_log_data()
2501 hostrcb->hcam.length = cpu_to_be32(sizeof(hostrcb->hcam.u.raw)); in ipr_handle_log_data()
2503 switch (hostrcb->hcam.overlay_id) { in ipr_handle_log_data()
2505 ipr_log_cache_error(ioa_cfg, hostrcb); in ipr_handle_log_data()
2508 ipr_log_config_error(ioa_cfg, hostrcb); in ipr_handle_log_data()
2512 ipr_log_array_error(ioa_cfg, hostrcb); in ipr_handle_log_data()
2515 ipr_log_dual_ioa_error(ioa_cfg, hostrcb); in ipr_handle_log_data()
2518 ipr_log_enhanced_cache_error(ioa_cfg, hostrcb); in ipr_handle_log_data()
2521 ipr_log_enhanced_config_error(ioa_cfg, hostrcb); in ipr_handle_log_data()
2525 ipr_log_enhanced_array_error(ioa_cfg, hostrcb); in ipr_handle_log_data()
2528 ipr_log_enhanced_dual_ioa_error(ioa_cfg, hostrcb); in ipr_handle_log_data()
2531 ipr_log_fabric_error(ioa_cfg, hostrcb); in ipr_handle_log_data()
2534 ipr_log_sis64_device_error(ioa_cfg, hostrcb); in ipr_handle_log_data()
2537 ipr_log_sis64_config_error(ioa_cfg, hostrcb); in ipr_handle_log_data()
2541 ipr_log_sis64_array_error(ioa_cfg, hostrcb); in ipr_handle_log_data()
2544 ipr_log_sis64_fabric_error(ioa_cfg, hostrcb); in ipr_handle_log_data()
2549 ipr_log_generic_error(ioa_cfg, hostrcb); in ipr_handle_log_data()
2568 struct ipr_hostrcb *hostrcb = ipr_cmd->u.hostrcb; in ipr_process_error() local
2573 fd_ioasc = be32_to_cpu(hostrcb->hcam.u.error64.fd_ioasc); in ipr_process_error()
2575 fd_ioasc = be32_to_cpu(hostrcb->hcam.u.error.fd_ioasc); in ipr_process_error()
2577 list_del(&hostrcb->queue); in ipr_process_error()
2581 ipr_handle_log_data(ioa_cfg, hostrcb); in ipr_process_error()
2590 ipr_send_hcam(ioa_cfg, IPR_HCAM_CDB_OP_CODE_LOG_DATA, hostrcb); in ipr_process_error()
7025 struct ipr_hostrcb *hostrcb, *temp; in ipr_ioa_reset_done() local
7047 list_for_each_entry_safe(hostrcb, temp, &ioa_cfg->hostrcb_free_q, queue) { in ipr_ioa_reset_done()
7048 list_del(&hostrcb->queue); in ipr_ioa_reset_done()
7050 ipr_send_hcam(ioa_cfg, IPR_HCAM_CDB_OP_CODE_LOG_DATA, hostrcb); in ipr_ioa_reset_done()
7052 ipr_send_hcam(ioa_cfg, IPR_HCAM_CDB_OP_CODE_CONFIG_CHANGE, hostrcb); in ipr_ioa_reset_done()
8301 struct ipr_hostrcb *hostrcb; in ipr_get_unit_check_buffer() local
8332 hostrcb = list_entry(ioa_cfg->hostrcb_free_q.next, in ipr_get_unit_check_buffer()
8334 list_del(&hostrcb->queue); in ipr_get_unit_check_buffer()
8335 memset(&hostrcb->hcam, 0, sizeof(hostrcb->hcam)); in ipr_get_unit_check_buffer()
8339 (__be32 *)&hostrcb->hcam, in ipr_get_unit_check_buffer()
8340 min(length, (int)sizeof(hostrcb->hcam)) / sizeof(__be32)); in ipr_get_unit_check_buffer()
8343 ipr_handle_log_data(ioa_cfg, hostrcb); in ipr_get_unit_check_buffer()
8344 ioasc = be32_to_cpu(hostrcb->hcam.u.error.fd_ioasc); in ipr_get_unit_check_buffer()
8351 list_add_tail(&hostrcb->queue, &ioa_cfg->hostrcb_free_q); in ipr_get_unit_check_buffer()
9334 ioa_cfg->hostrcb[i], in ipr_free_mem()
9572 ioa_cfg->hostrcb[i] = dma_alloc_coherent(&pdev->dev, in ipr_alloc_mem()
9577 if (!ioa_cfg->hostrcb[i]) in ipr_alloc_mem()
9580 ioa_cfg->hostrcb[i]->hostrcb_dma = in ipr_alloc_mem()
9582 ioa_cfg->hostrcb[i]->ioa_cfg = ioa_cfg; in ipr_alloc_mem()
9583 list_add_tail(&ioa_cfg->hostrcb[i]->queue, &ioa_cfg->hostrcb_free_q); in ipr_alloc_mem()
9600 ioa_cfg->hostrcb[i], in ipr_alloc_mem()