Lines Matching refs:hostrcb
1109 struct ipr_hostrcb *hostrcb) in ipr_send_hcam() argument
1117 list_add_tail(&hostrcb->queue, &ioa_cfg->hostrcb_pending_q); in ipr_send_hcam()
1119 ipr_cmd->u.hostrcb = hostrcb; in ipr_send_hcam()
1126 ioarcb->cmd_pkt.cdb[7] = (sizeof(hostrcb->hcam) >> 8) & 0xff; in ipr_send_hcam()
1127 ioarcb->cmd_pkt.cdb[8] = sizeof(hostrcb->hcam) & 0xff; in ipr_send_hcam()
1129 ipr_init_ioadl(ipr_cmd, hostrcb->hostrcb_dma, in ipr_send_hcam()
1130 sizeof(hostrcb->hcam), IPR_IOADL_FLAGS_READ_LAST); in ipr_send_hcam()
1141 list_add_tail(&hostrcb->queue, &ioa_cfg->hostrcb_free_q); in ipr_send_hcam()
1429 struct ipr_hostrcb *hostrcb) in ipr_handle_config_change() argument
1438 cfgtew.u.cfgte64 = &hostrcb->hcam.u.ccn.u.cfgte64; in ipr_handle_config_change()
1441 cfgtew.u.cfgte = &hostrcb->hcam.u.ccn.u.cfgte; in ipr_handle_config_change()
1456 hostrcb); in ipr_handle_config_change()
1470 if (hostrcb->hcam.notify_type == IPR_HOST_RCB_NOTIF_TYPE_REM_ENTRY) { in ipr_handle_config_change()
1484 ipr_send_hcam(ioa_cfg, IPR_HCAM_CDB_OP_CODE_CONFIG_CHANGE, hostrcb); in ipr_handle_config_change()
1500 struct ipr_hostrcb *hostrcb = ipr_cmd->u.hostrcb; in ipr_process_ccn() local
1503 list_del_init(&hostrcb->queue); in ipr_process_ccn()
1512 ipr_send_hcam(ioa_cfg, IPR_HCAM_CDB_OP_CODE_CONFIG_CHANGE, hostrcb); in ipr_process_ccn()
1514 ipr_handle_config_change(ioa_cfg, hostrcb); in ipr_process_ccn()
1547 static void ipr_log_vpd_compact(char *prefix, struct ipr_hostrcb *hostrcb, in ipr_log_vpd_compact() argument
1562 ipr_hcam_err(hostrcb, "%s VPID/SN: %s\n", prefix, buffer); in ipr_log_vpd_compact()
1597 static void ipr_log_ext_vpd_compact(char *prefix, struct ipr_hostrcb *hostrcb, in ipr_log_ext_vpd_compact() argument
1600 ipr_log_vpd_compact(prefix, hostrcb, &vpd->vpd); in ipr_log_ext_vpd_compact()
1601 ipr_hcam_err(hostrcb, "%s WWN: %08X%08X\n", prefix, in ipr_log_ext_vpd_compact()
1628 struct ipr_hostrcb *hostrcb) in ipr_log_enhanced_cache_error() argument
1633 error = &hostrcb->hcam.u.error64.u.type_12_error; in ipr_log_enhanced_cache_error()
1635 error = &hostrcb->hcam.u.error.u.type_12_error; in ipr_log_enhanced_cache_error()
1664 struct ipr_hostrcb *hostrcb) in ipr_log_cache_error() argument
1667 &hostrcb->hcam.u.error.u.type_02_error; in ipr_log_cache_error()
1696 struct ipr_hostrcb *hostrcb) in ipr_log_enhanced_config_error() argument
1702 error = &hostrcb->hcam.u.error.u.type_13_error; in ipr_log_enhanced_config_error()
1736 struct ipr_hostrcb *hostrcb) in ipr_log_sis64_config_error() argument
1743 error = &hostrcb->hcam.u.error64.u.type_23_error; in ipr_log_sis64_config_error()
1779 struct ipr_hostrcb *hostrcb) in ipr_log_config_error() argument
1785 error = &hostrcb->hcam.u.error.u.type_03_error; in ipr_log_config_error()
1826 struct ipr_hostrcb *hostrcb) in ipr_log_enhanced_array_error() argument
1833 error = &hostrcb->hcam.u.error.u.type_14_error; in ipr_log_enhanced_array_error()
1877 struct ipr_hostrcb *hostrcb) in ipr_log_array_error() argument
1884 error = &hostrcb->hcam.u.error.u.type_04_error; in ipr_log_array_error()
1960 struct ipr_hostrcb *hostrcb) in ipr_log_enhanced_dual_ioa_error() argument
1965 error = &hostrcb->hcam.u.error64.u.type_17_error; in ipr_log_enhanced_dual_ioa_error()
1967 error = &hostrcb->hcam.u.error.u.type_17_error; in ipr_log_enhanced_dual_ioa_error()
1972 ipr_hcam_err(hostrcb, "%s [PRC: %08X]\n", error->failure_reason, in ipr_log_enhanced_dual_ioa_error()
1973 be32_to_cpu(hostrcb->hcam.u.error.prc)); in ipr_log_enhanced_dual_ioa_error()
1974 ipr_log_ext_vpd_compact("Remote IOA", hostrcb, &error->vpd); in ipr_log_enhanced_dual_ioa_error()
1976 be32_to_cpu(hostrcb->hcam.length) - in ipr_log_enhanced_dual_ioa_error()
1990 struct ipr_hostrcb *hostrcb) in ipr_log_dual_ioa_error() argument
1994 error = &hostrcb->hcam.u.error.u.type_07_error; in ipr_log_dual_ioa_error()
1998 ipr_hcam_err(hostrcb, "%s [PRC: %08X]\n", error->failure_reason, in ipr_log_dual_ioa_error()
1999 be32_to_cpu(hostrcb->hcam.u.error.prc)); in ipr_log_dual_ioa_error()
2000 ipr_log_vpd_compact("Remote IOA", hostrcb, &error->vpd); in ipr_log_dual_ioa_error()
2002 be32_to_cpu(hostrcb->hcam.length) - in ipr_log_dual_ioa_error()
2034 static void ipr_log_fabric_path(struct ipr_hostrcb *hostrcb, in ipr_log_fabric_path() argument
2051 ipr_hcam_err(hostrcb, "%s %s: IOA Port=%d\n", in ipr_log_fabric_path()
2055 ipr_hcam_err(hostrcb, "%s %s: IOA Port=%d, Phy=%d\n", in ipr_log_fabric_path()
2059 ipr_hcam_err(hostrcb, "%s %s: IOA Port=%d, Cascade=%d\n", in ipr_log_fabric_path()
2063 ipr_hcam_err(hostrcb, "%s %s: IOA Port=%d, Cascade=%d, Phy=%d\n", in ipr_log_fabric_path()
2083 static void ipr_log64_fabric_path(struct ipr_hostrcb *hostrcb, in ipr_log64_fabric_path() argument
2100 ipr_hcam_err(hostrcb, "%s %s: Resource Path=%s\n", in ipr_log64_fabric_path()
2102 ipr_format_res_path(hostrcb->ioa_cfg, in ipr_log64_fabric_path()
2110 ipr_format_res_path(hostrcb->ioa_cfg, fabric->res_path, in ipr_log64_fabric_path()
2163 static void ipr_log_path_elem(struct ipr_hostrcb *hostrcb, in ipr_log_path_elem() argument
2182 ipr_hcam_err(hostrcb, "%s %s: Phy=%d, Link rate=%s, WWN=%08X%08X\n", in ipr_log_path_elem()
2188 ipr_hcam_err(hostrcb, "%s %s: Link rate=%s, WWN=%08X%08X\n", in ipr_log_path_elem()
2193 ipr_hcam_err(hostrcb, "%s %s: Phy=%d, Link rate=%s, " in ipr_log_path_elem()
2199 ipr_hcam_err(hostrcb, "%s %s: Cascade=%d, Link rate=%s, " in ipr_log_path_elem()
2205 ipr_hcam_err(hostrcb, "%s %s: Cascade=%d, Phy=%d, Link rate=%s " in ipr_log_path_elem()
2216 ipr_hcam_err(hostrcb, "Path element=%02X: Cascade=%d Phy=%d Link rate=%s " in ipr_log_path_elem()
2230 static void ipr_log64_path_elem(struct ipr_hostrcb *hostrcb, in ipr_log64_path_elem() argument
2250 ipr_hcam_err(hostrcb, "%s %s: Resource Path=%s, Link rate=%s, WWN=%08X%08X\n", in ipr_log64_path_elem()
2252 ipr_format_res_path(hostrcb->ioa_cfg, in ipr_log64_path_elem()
2260 ipr_hcam_err(hostrcb, "Path element=%02X: Resource Path=%s, Link rate=%s " in ipr_log64_path_elem()
2262 ipr_format_res_path(hostrcb->ioa_cfg, in ipr_log64_path_elem()
2277 struct ipr_hostrcb *hostrcb) in ipr_log_fabric_error() argument
2284 error = &hostrcb->hcam.u.error.u.type_20_error; in ipr_log_fabric_error()
2286 ipr_hcam_err(hostrcb, "%s\n", error->failure_reason); in ipr_log_fabric_error()
2288 add_len = be32_to_cpu(hostrcb->hcam.length) - in ipr_log_fabric_error()
2293 ipr_log_fabric_path(hostrcb, fabric); in ipr_log_fabric_error()
2295 ipr_log_path_elem(hostrcb, cfg); in ipr_log_fabric_error()
2314 struct ipr_hostrcb *hostrcb) in ipr_log_sis64_array_error() argument
2322 error = &hostrcb->hcam.u.error64.u.type_24_error; in ipr_log_sis64_array_error()
2370 struct ipr_hostrcb *hostrcb) in ipr_log_sis64_fabric_error() argument
2377 error = &hostrcb->hcam.u.error64.u.type_30_error; in ipr_log_sis64_fabric_error()
2380 ipr_hcam_err(hostrcb, "%s\n", error->failure_reason); in ipr_log_sis64_fabric_error()
2382 add_len = be32_to_cpu(hostrcb->hcam.length) - in ipr_log_sis64_fabric_error()
2387 ipr_log64_fabric_path(hostrcb, fabric); in ipr_log_sis64_fabric_error()
2389 ipr_log64_path_elem(hostrcb, cfg); in ipr_log_sis64_fabric_error()
2408 struct ipr_hostrcb *hostrcb) in ipr_log_sis64_service_required_error() argument
2412 error = &hostrcb->hcam.u.error64.u.type_41_error; in ipr_log_sis64_service_required_error()
2417 be32_to_cpu(hostrcb->hcam.length) - in ipr_log_sis64_service_required_error()
2430 struct ipr_hostrcb *hostrcb) in ipr_log_generic_error() argument
2432 ipr_log_hex_data(ioa_cfg, hostrcb->hcam.u.raw.data, in ipr_log_generic_error()
2433 be32_to_cpu(hostrcb->hcam.length)); in ipr_log_generic_error()
2445 struct ipr_hostrcb *hostrcb) in ipr_log_sis64_device_error() argument
2450 error = &hostrcb->hcam.u.error64.u.type_21_error; in ipr_log_sis64_device_error()
2505 struct ipr_hostrcb *hostrcb) in ipr_handle_log_data() argument
2511 if (hostrcb->hcam.notify_type != IPR_HOST_RCB_NOTIF_TYPE_ERROR_LOG_ENTRY) in ipr_handle_log_data()
2514 if (hostrcb->hcam.notifications_lost == IPR_HOST_RCB_NOTIFICATIONS_LOST) in ipr_handle_log_data()
2518 ioasc = be32_to_cpu(hostrcb->hcam.u.error64.fd_ioasc); in ipr_handle_log_data()
2520 ioasc = be32_to_cpu(hostrcb->hcam.u.error.fd_ioasc); in ipr_handle_log_data()
2526 hostrcb->hcam.u.error.fd_res_addr.bus); in ipr_handle_log_data()
2535 hostrcb->hcam.overlay_id == IPR_HOST_RCB_OVERLAY_ID_21) { in ipr_handle_log_data()
2536 error = &hostrcb->hcam.u.error64.u.type_21_error; in ipr_handle_log_data()
2543 ipr_hcam_err(hostrcb, "%s\n", ipr_error_table[error_index].error); in ipr_handle_log_data()
2550 if (be32_to_cpu(hostrcb->hcam.length) > sizeof(hostrcb->hcam.u.raw)) in ipr_handle_log_data()
2551 hostrcb->hcam.length = cpu_to_be32(sizeof(hostrcb->hcam.u.raw)); in ipr_handle_log_data()
2553 switch (hostrcb->hcam.overlay_id) { in ipr_handle_log_data()
2555 ipr_log_cache_error(ioa_cfg, hostrcb); in ipr_handle_log_data()
2558 ipr_log_config_error(ioa_cfg, hostrcb); in ipr_handle_log_data()
2562 ipr_log_array_error(ioa_cfg, hostrcb); in ipr_handle_log_data()
2565 ipr_log_dual_ioa_error(ioa_cfg, hostrcb); in ipr_handle_log_data()
2568 ipr_log_enhanced_cache_error(ioa_cfg, hostrcb); in ipr_handle_log_data()
2571 ipr_log_enhanced_config_error(ioa_cfg, hostrcb); in ipr_handle_log_data()
2575 ipr_log_enhanced_array_error(ioa_cfg, hostrcb); in ipr_handle_log_data()
2578 ipr_log_enhanced_dual_ioa_error(ioa_cfg, hostrcb); in ipr_handle_log_data()
2581 ipr_log_fabric_error(ioa_cfg, hostrcb); in ipr_handle_log_data()
2584 ipr_log_sis64_device_error(ioa_cfg, hostrcb); in ipr_handle_log_data()
2587 ipr_log_sis64_config_error(ioa_cfg, hostrcb); in ipr_handle_log_data()
2591 ipr_log_sis64_array_error(ioa_cfg, hostrcb); in ipr_handle_log_data()
2594 ipr_log_sis64_fabric_error(ioa_cfg, hostrcb); in ipr_handle_log_data()
2597 ipr_log_sis64_service_required_error(ioa_cfg, hostrcb); in ipr_handle_log_data()
2602 ipr_log_generic_error(ioa_cfg, hostrcb); in ipr_handle_log_data()
2609 struct ipr_hostrcb *hostrcb; in ipr_get_free_hostrcb() local
2611 hostrcb = list_first_entry_or_null(&ioa->hostrcb_free_q, in ipr_get_free_hostrcb()
2614 if (unlikely(!hostrcb)) { in ipr_get_free_hostrcb()
2616 hostrcb = list_first_entry_or_null(&ioa->hostrcb_report_q, in ipr_get_free_hostrcb()
2620 list_del_init(&hostrcb->queue); in ipr_get_free_hostrcb()
2621 return hostrcb; in ipr_get_free_hostrcb()
2638 struct ipr_hostrcb *hostrcb = ipr_cmd->u.hostrcb; in ipr_process_error() local
2643 fd_ioasc = be32_to_cpu(hostrcb->hcam.u.error64.fd_ioasc); in ipr_process_error()
2645 fd_ioasc = be32_to_cpu(hostrcb->hcam.u.error.fd_ioasc); in ipr_process_error()
2647 list_del_init(&hostrcb->queue); in ipr_process_error()
2651 ipr_handle_log_data(ioa_cfg, hostrcb); in ipr_process_error()
2660 list_add_tail(&hostrcb->queue, &ioa_cfg->hostrcb_report_q); in ipr_process_error()
2662 hostrcb = ipr_get_free_hostrcb(ioa_cfg); in ipr_process_error()
2664 ipr_send_hcam(ioa_cfg, IPR_HCAM_CDB_OP_CODE_LOG_DATA, hostrcb); in ipr_process_error()
4188 struct ipr_hostrcb *hostrcb; in ipr_read_async_err_log() local
4193 hostrcb = list_first_entry_or_null(&ioa_cfg->hostrcb_report_q, in ipr_read_async_err_log()
4195 if (!hostrcb) { in ipr_read_async_err_log()
4199 ret = memory_read_from_buffer(buf, count, &off, &hostrcb->hcam, in ipr_read_async_err_log()
4200 sizeof(hostrcb->hcam)); in ipr_read_async_err_log()
4212 struct ipr_hostrcb *hostrcb; in ipr_next_async_err_log() local
4216 hostrcb = list_first_entry_or_null(&ioa_cfg->hostrcb_report_q, in ipr_next_async_err_log()
4218 if (!hostrcb) { in ipr_next_async_err_log()
4224 list_move_tail(&hostrcb->queue, &ioa_cfg->hostrcb_free_q); in ipr_next_async_err_log()
7301 list_del_init(&ioa_cfg->hostrcb[j]->queue); in ipr_ioa_reset_done()
7305 ioa_cfg->hostrcb[j]); in ipr_ioa_reset_done()
7309 ioa_cfg->hostrcb[j]); in ipr_ioa_reset_done()
8555 struct ipr_hostrcb *hostrcb; in ipr_get_unit_check_buffer() local
8586 hostrcb = list_entry(ioa_cfg->hostrcb_free_q.next, in ipr_get_unit_check_buffer()
8588 list_del_init(&hostrcb->queue); in ipr_get_unit_check_buffer()
8589 memset(&hostrcb->hcam, 0, sizeof(hostrcb->hcam)); in ipr_get_unit_check_buffer()
8593 (__be32 *)&hostrcb->hcam, in ipr_get_unit_check_buffer()
8594 min(length, (int)sizeof(hostrcb->hcam)) / sizeof(__be32)); in ipr_get_unit_check_buffer()
8597 ipr_handle_log_data(ioa_cfg, hostrcb); in ipr_get_unit_check_buffer()
8598 ioasc = be32_to_cpu(hostrcb->hcam.u.error.fd_ioasc); in ipr_get_unit_check_buffer()
8605 list_add_tail(&hostrcb->queue, &ioa_cfg->hostrcb_free_q); in ipr_get_unit_check_buffer()
9587 ioa_cfg->hostrcb[i], in ipr_free_mem()
9814 ioa_cfg->hostrcb[i] = dma_alloc_coherent(&pdev->dev, in ipr_alloc_mem()
9819 if (!ioa_cfg->hostrcb[i]) in ipr_alloc_mem()
9822 ioa_cfg->hostrcb[i]->hostrcb_dma = in ipr_alloc_mem()
9824 ioa_cfg->hostrcb[i]->ioa_cfg = ioa_cfg; in ipr_alloc_mem()
9825 list_add_tail(&ioa_cfg->hostrcb[i]->queue, &ioa_cfg->hostrcb_free_q); in ipr_alloc_mem()
9843 ioa_cfg->hostrcb[i], in ipr_alloc_mem()