Lines Matching refs:hostrcb

1057 			  struct ipr_hostrcb *hostrcb)  in ipr_send_hcam()  argument
1065 list_add_tail(&hostrcb->queue, &ioa_cfg->hostrcb_pending_q); in ipr_send_hcam()
1067 ipr_cmd->u.hostrcb = hostrcb; in ipr_send_hcam()
1074 ioarcb->cmd_pkt.cdb[7] = (sizeof(hostrcb->hcam) >> 8) & 0xff; in ipr_send_hcam()
1075 ioarcb->cmd_pkt.cdb[8] = sizeof(hostrcb->hcam) & 0xff; in ipr_send_hcam()
1077 ipr_init_ioadl(ipr_cmd, hostrcb->hostrcb_dma, in ipr_send_hcam()
1078 sizeof(hostrcb->hcam), IPR_IOADL_FLAGS_READ_LAST); in ipr_send_hcam()
1089 list_add_tail(&hostrcb->queue, &ioa_cfg->hostrcb_free_q); in ipr_send_hcam()
1341 struct ipr_hostrcb *hostrcb) in ipr_handle_config_change() argument
1350 cfgtew.u.cfgte64 = &hostrcb->hcam.u.ccn.u.cfgte64; in ipr_handle_config_change()
1353 cfgtew.u.cfgte = &hostrcb->hcam.u.ccn.u.cfgte; in ipr_handle_config_change()
1368 hostrcb); in ipr_handle_config_change()
1382 if (hostrcb->hcam.notify_type == IPR_HOST_RCB_NOTIF_TYPE_REM_ENTRY) { in ipr_handle_config_change()
1396 ipr_send_hcam(ioa_cfg, IPR_HCAM_CDB_OP_CODE_CONFIG_CHANGE, hostrcb); in ipr_handle_config_change()
1412 struct ipr_hostrcb *hostrcb = ipr_cmd->u.hostrcb; in ipr_process_ccn() local
1415 list_del_init(&hostrcb->queue); in ipr_process_ccn()
1424 ipr_send_hcam(ioa_cfg, IPR_HCAM_CDB_OP_CODE_CONFIG_CHANGE, hostrcb); in ipr_process_ccn()
1426 ipr_handle_config_change(ioa_cfg, hostrcb); in ipr_process_ccn()
1458 static void ipr_log_vpd_compact(char *prefix, struct ipr_hostrcb *hostrcb, in ipr_log_vpd_compact() argument
1474 ipr_hcam_err(hostrcb, "%s VPID/SN: %s %s %s\n", prefix, in ipr_log_vpd_compact()
1510 static void ipr_log_ext_vpd_compact(char *prefix, struct ipr_hostrcb *hostrcb, in ipr_log_ext_vpd_compact() argument
1513 ipr_log_vpd_compact(prefix, hostrcb, &vpd->vpd); in ipr_log_ext_vpd_compact()
1514 ipr_hcam_err(hostrcb, "%s WWN: %08X%08X\n", prefix, in ipr_log_ext_vpd_compact()
1541 struct ipr_hostrcb *hostrcb) in ipr_log_enhanced_cache_error() argument
1546 error = &hostrcb->hcam.u.error64.u.type_12_error; in ipr_log_enhanced_cache_error()
1548 error = &hostrcb->hcam.u.error.u.type_12_error; in ipr_log_enhanced_cache_error()
1577 struct ipr_hostrcb *hostrcb) in ipr_log_cache_error() argument
1580 &hostrcb->hcam.u.error.u.type_02_error; in ipr_log_cache_error()
1609 struct ipr_hostrcb *hostrcb) in ipr_log_enhanced_config_error() argument
1615 error = &hostrcb->hcam.u.error.u.type_13_error; in ipr_log_enhanced_config_error()
1649 struct ipr_hostrcb *hostrcb) in ipr_log_sis64_config_error() argument
1656 error = &hostrcb->hcam.u.error64.u.type_23_error; in ipr_log_sis64_config_error()
1692 struct ipr_hostrcb *hostrcb) in ipr_log_config_error() argument
1698 error = &hostrcb->hcam.u.error.u.type_03_error; in ipr_log_config_error()
1739 struct ipr_hostrcb *hostrcb) in ipr_log_enhanced_array_error() argument
1746 error = &hostrcb->hcam.u.error.u.type_14_error; in ipr_log_enhanced_array_error()
1790 struct ipr_hostrcb *hostrcb) in ipr_log_array_error() argument
1797 error = &hostrcb->hcam.u.error.u.type_04_error; in ipr_log_array_error()
1873 struct ipr_hostrcb *hostrcb) in ipr_log_enhanced_dual_ioa_error() argument
1878 error = &hostrcb->hcam.u.error64.u.type_17_error; in ipr_log_enhanced_dual_ioa_error()
1880 error = &hostrcb->hcam.u.error.u.type_17_error; in ipr_log_enhanced_dual_ioa_error()
1885 ipr_hcam_err(hostrcb, "%s [PRC: %08X]\n", error->failure_reason, in ipr_log_enhanced_dual_ioa_error()
1886 be32_to_cpu(hostrcb->hcam.u.error.prc)); in ipr_log_enhanced_dual_ioa_error()
1887 ipr_log_ext_vpd_compact("Remote IOA", hostrcb, &error->vpd); in ipr_log_enhanced_dual_ioa_error()
1889 be32_to_cpu(hostrcb->hcam.length) - in ipr_log_enhanced_dual_ioa_error()
1903 struct ipr_hostrcb *hostrcb) in ipr_log_dual_ioa_error() argument
1907 error = &hostrcb->hcam.u.error.u.type_07_error; in ipr_log_dual_ioa_error()
1911 ipr_hcam_err(hostrcb, "%s [PRC: %08X]\n", error->failure_reason, in ipr_log_dual_ioa_error()
1912 be32_to_cpu(hostrcb->hcam.u.error.prc)); in ipr_log_dual_ioa_error()
1913 ipr_log_vpd_compact("Remote IOA", hostrcb, &error->vpd); in ipr_log_dual_ioa_error()
1915 be32_to_cpu(hostrcb->hcam.length) - in ipr_log_dual_ioa_error()
1947 static void ipr_log_fabric_path(struct ipr_hostrcb *hostrcb, in ipr_log_fabric_path() argument
1964 ipr_hcam_err(hostrcb, "%s %s: IOA Port=%d\n", in ipr_log_fabric_path()
1968 ipr_hcam_err(hostrcb, "%s %s: IOA Port=%d, Phy=%d\n", in ipr_log_fabric_path()
1972 ipr_hcam_err(hostrcb, "%s %s: IOA Port=%d, Cascade=%d\n", in ipr_log_fabric_path()
1976 ipr_hcam_err(hostrcb, "%s %s: IOA Port=%d, Cascade=%d, Phy=%d\n", in ipr_log_fabric_path()
1996 static void ipr_log64_fabric_path(struct ipr_hostrcb *hostrcb, in ipr_log64_fabric_path() argument
2013 ipr_hcam_err(hostrcb, "%s %s: Resource Path=%s\n", in ipr_log64_fabric_path()
2015 ipr_format_res_path(hostrcb->ioa_cfg, in ipr_log64_fabric_path()
2023 ipr_format_res_path(hostrcb->ioa_cfg, fabric->res_path, in ipr_log64_fabric_path()
2076 static void ipr_log_path_elem(struct ipr_hostrcb *hostrcb, in ipr_log_path_elem() argument
2095 ipr_hcam_err(hostrcb, "%s %s: Phy=%d, Link rate=%s, WWN=%08X%08X\n", in ipr_log_path_elem()
2101 ipr_hcam_err(hostrcb, "%s %s: Link rate=%s, WWN=%08X%08X\n", in ipr_log_path_elem()
2106 ipr_hcam_err(hostrcb, "%s %s: Phy=%d, Link rate=%s, " in ipr_log_path_elem()
2112 ipr_hcam_err(hostrcb, "%s %s: Cascade=%d, Link rate=%s, " in ipr_log_path_elem()
2118 ipr_hcam_err(hostrcb, "%s %s: Cascade=%d, Phy=%d, Link rate=%s " in ipr_log_path_elem()
2129 ipr_hcam_err(hostrcb, "Path element=%02X: Cascade=%d Phy=%d Link rate=%s " in ipr_log_path_elem()
2143 static void ipr_log64_path_elem(struct ipr_hostrcb *hostrcb, in ipr_log64_path_elem() argument
2163 ipr_hcam_err(hostrcb, "%s %s: Resource Path=%s, Link rate=%s, WWN=%08X%08X\n", in ipr_log64_path_elem()
2165 ipr_format_res_path(hostrcb->ioa_cfg, in ipr_log64_path_elem()
2173 ipr_hcam_err(hostrcb, "Path element=%02X: Resource Path=%s, Link rate=%s " in ipr_log64_path_elem()
2175 ipr_format_res_path(hostrcb->ioa_cfg, in ipr_log64_path_elem()
2190 struct ipr_hostrcb *hostrcb) in ipr_log_fabric_error() argument
2197 error = &hostrcb->hcam.u.error.u.type_20_error; in ipr_log_fabric_error()
2199 ipr_hcam_err(hostrcb, "%s\n", error->failure_reason); in ipr_log_fabric_error()
2201 add_len = be32_to_cpu(hostrcb->hcam.length) - in ipr_log_fabric_error()
2206 ipr_log_fabric_path(hostrcb, fabric); in ipr_log_fabric_error()
2208 ipr_log_path_elem(hostrcb, cfg); in ipr_log_fabric_error()
2227 struct ipr_hostrcb *hostrcb) in ipr_log_sis64_array_error() argument
2235 error = &hostrcb->hcam.u.error64.u.type_24_error; in ipr_log_sis64_array_error()
2283 struct ipr_hostrcb *hostrcb) in ipr_log_sis64_fabric_error() argument
2290 error = &hostrcb->hcam.u.error64.u.type_30_error; in ipr_log_sis64_fabric_error()
2293 ipr_hcam_err(hostrcb, "%s\n", error->failure_reason); in ipr_log_sis64_fabric_error()
2295 add_len = be32_to_cpu(hostrcb->hcam.length) - in ipr_log_sis64_fabric_error()
2300 ipr_log64_fabric_path(hostrcb, fabric); in ipr_log_sis64_fabric_error()
2302 ipr_log64_path_elem(hostrcb, cfg); in ipr_log_sis64_fabric_error()
2321 struct ipr_hostrcb *hostrcb) in ipr_log_sis64_service_required_error() argument
2325 error = &hostrcb->hcam.u.error64.u.type_41_error; in ipr_log_sis64_service_required_error()
2330 be32_to_cpu(hostrcb->hcam.length) - in ipr_log_sis64_service_required_error()
2343 struct ipr_hostrcb *hostrcb) in ipr_log_generic_error() argument
2345 ipr_log_hex_data(ioa_cfg, hostrcb->hcam.u.raw.data, in ipr_log_generic_error()
2346 be32_to_cpu(hostrcb->hcam.length)); in ipr_log_generic_error()
2358 struct ipr_hostrcb *hostrcb) in ipr_log_sis64_device_error() argument
2363 error = &hostrcb->hcam.u.error64.u.type_21_error; in ipr_log_sis64_device_error()
2418 struct ipr_hostrcb *hostrcb) in ipr_handle_log_data() argument
2424 if (hostrcb->hcam.notify_type != IPR_HOST_RCB_NOTIF_TYPE_ERROR_LOG_ENTRY) in ipr_handle_log_data()
2427 if (hostrcb->hcam.notifications_lost == IPR_HOST_RCB_NOTIFICATIONS_LOST) in ipr_handle_log_data()
2431 ioasc = be32_to_cpu(hostrcb->hcam.u.error64.fd_ioasc); in ipr_handle_log_data()
2433 ioasc = be32_to_cpu(hostrcb->hcam.u.error.fd_ioasc); in ipr_handle_log_data()
2439 hostrcb->hcam.u.error.fd_res_addr.bus); in ipr_handle_log_data()
2448 hostrcb->hcam.overlay_id == IPR_HOST_RCB_OVERLAY_ID_21) { in ipr_handle_log_data()
2449 error = &hostrcb->hcam.u.error64.u.type_21_error; in ipr_handle_log_data()
2456 ipr_hcam_err(hostrcb, "%s\n", ipr_error_table[error_index].error); in ipr_handle_log_data()
2463 if (be32_to_cpu(hostrcb->hcam.length) > sizeof(hostrcb->hcam.u.raw)) in ipr_handle_log_data()
2464 hostrcb->hcam.length = cpu_to_be32(sizeof(hostrcb->hcam.u.raw)); in ipr_handle_log_data()
2466 switch (hostrcb->hcam.overlay_id) { in ipr_handle_log_data()
2468 ipr_log_cache_error(ioa_cfg, hostrcb); in ipr_handle_log_data()
2471 ipr_log_config_error(ioa_cfg, hostrcb); in ipr_handle_log_data()
2475 ipr_log_array_error(ioa_cfg, hostrcb); in ipr_handle_log_data()
2478 ipr_log_dual_ioa_error(ioa_cfg, hostrcb); in ipr_handle_log_data()
2481 ipr_log_enhanced_cache_error(ioa_cfg, hostrcb); in ipr_handle_log_data()
2484 ipr_log_enhanced_config_error(ioa_cfg, hostrcb); in ipr_handle_log_data()
2488 ipr_log_enhanced_array_error(ioa_cfg, hostrcb); in ipr_handle_log_data()
2491 ipr_log_enhanced_dual_ioa_error(ioa_cfg, hostrcb); in ipr_handle_log_data()
2494 ipr_log_fabric_error(ioa_cfg, hostrcb); in ipr_handle_log_data()
2497 ipr_log_sis64_device_error(ioa_cfg, hostrcb); in ipr_handle_log_data()
2500 ipr_log_sis64_config_error(ioa_cfg, hostrcb); in ipr_handle_log_data()
2504 ipr_log_sis64_array_error(ioa_cfg, hostrcb); in ipr_handle_log_data()
2507 ipr_log_sis64_fabric_error(ioa_cfg, hostrcb); in ipr_handle_log_data()
2510 ipr_log_sis64_service_required_error(ioa_cfg, hostrcb); in ipr_handle_log_data()
2515 ipr_log_generic_error(ioa_cfg, hostrcb); in ipr_handle_log_data()
2522 struct ipr_hostrcb *hostrcb; in ipr_get_free_hostrcb() local
2524 hostrcb = list_first_entry_or_null(&ioa->hostrcb_free_q, in ipr_get_free_hostrcb()
2527 if (unlikely(!hostrcb)) { in ipr_get_free_hostrcb()
2529 hostrcb = list_first_entry_or_null(&ioa->hostrcb_report_q, in ipr_get_free_hostrcb()
2533 list_del_init(&hostrcb->queue); in ipr_get_free_hostrcb()
2534 return hostrcb; in ipr_get_free_hostrcb()
2551 struct ipr_hostrcb *hostrcb = ipr_cmd->u.hostrcb; in ipr_process_error() local
2556 fd_ioasc = be32_to_cpu(hostrcb->hcam.u.error64.fd_ioasc); in ipr_process_error()
2558 fd_ioasc = be32_to_cpu(hostrcb->hcam.u.error.fd_ioasc); in ipr_process_error()
2560 list_del_init(&hostrcb->queue); in ipr_process_error()
2564 ipr_handle_log_data(ioa_cfg, hostrcb); in ipr_process_error()
2573 list_add_tail(&hostrcb->queue, &ioa_cfg->hostrcb_report_q); in ipr_process_error()
2575 hostrcb = ipr_get_free_hostrcb(ioa_cfg); in ipr_process_error()
2577 ipr_send_hcam(ioa_cfg, IPR_HCAM_CDB_OP_CODE_LOG_DATA, hostrcb); in ipr_process_error()
4096 struct ipr_hostrcb *hostrcb; in ipr_read_async_err_log() local
4101 hostrcb = list_first_entry_or_null(&ioa_cfg->hostrcb_report_q, in ipr_read_async_err_log()
4103 if (!hostrcb) { in ipr_read_async_err_log()
4107 ret = memory_read_from_buffer(buf, count, &off, &hostrcb->hcam, in ipr_read_async_err_log()
4108 sizeof(hostrcb->hcam)); in ipr_read_async_err_log()
4120 struct ipr_hostrcb *hostrcb; in ipr_next_async_err_log() local
4124 hostrcb = list_first_entry_or_null(&ioa_cfg->hostrcb_report_q, in ipr_next_async_err_log()
4126 if (!hostrcb) { in ipr_next_async_err_log()
4132 list_move_tail(&hostrcb->queue, &ioa_cfg->hostrcb_free_q); in ipr_next_async_err_log()
6493 list_del_init(&ioa_cfg->hostrcb[j]->queue); in ipr_ioa_reset_done()
6497 ioa_cfg->hostrcb[j]); in ipr_ioa_reset_done()
6501 ioa_cfg->hostrcb[j]); in ipr_ioa_reset_done()
7734 struct ipr_hostrcb *hostrcb; in ipr_get_unit_check_buffer() local
7765 hostrcb = list_entry(ioa_cfg->hostrcb_free_q.next, in ipr_get_unit_check_buffer()
7767 list_del_init(&hostrcb->queue); in ipr_get_unit_check_buffer()
7768 memset(&hostrcb->hcam, 0, sizeof(hostrcb->hcam)); in ipr_get_unit_check_buffer()
7772 (__be32 *)&hostrcb->hcam, in ipr_get_unit_check_buffer()
7773 min(length, (int)sizeof(hostrcb->hcam)) / sizeof(__be32)); in ipr_get_unit_check_buffer()
7776 ipr_handle_log_data(ioa_cfg, hostrcb); in ipr_get_unit_check_buffer()
7777 ioasc = be32_to_cpu(hostrcb->hcam.u.error.fd_ioasc); in ipr_get_unit_check_buffer()
7784 list_add_tail(&hostrcb->queue, &ioa_cfg->hostrcb_free_q); in ipr_get_unit_check_buffer()
8788 ioa_cfg->hostrcb[i], in ipr_free_mem()
9015 ioa_cfg->hostrcb[i] = dma_alloc_coherent(&pdev->dev, in ipr_alloc_mem()
9020 if (!ioa_cfg->hostrcb[i]) in ipr_alloc_mem()
9023 ioa_cfg->hostrcb[i]->hostrcb_dma = in ipr_alloc_mem()
9025 ioa_cfg->hostrcb[i]->ioa_cfg = ioa_cfg; in ipr_alloc_mem()
9026 list_add_tail(&ioa_cfg->hostrcb[i]->queue, &ioa_cfg->hostrcb_free_q); in ipr_alloc_mem()
9043 ioa_cfg->hostrcb[i], in ipr_alloc_mem()