aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/scsi/ipr.c35
-rw-r--r--drivers/scsi/ipr.h11
2 files changed, 17 insertions, 29 deletions
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
index d5da5e5c4c6..75f1b6247e1 100644
--- a/drivers/scsi/ipr.c
+++ b/drivers/scsi/ipr.c
@@ -968,13 +968,7 @@ static void ipr_log_config_error(struct ipr_ioa_cfg *ioa_cfg,
968 for (i = 0; i < errors_logged; i++, dev_entry++) { 968 for (i = 0; i < errors_logged; i++, dev_entry++) {
969 ipr_err_separator; 969 ipr_err_separator;
970 970
971 if (dev_entry->dev_res_addr.bus >= IPR_MAX_NUM_BUSES) { 971 ipr_phys_res_err(ioa_cfg, dev_entry->dev_res_addr, "Device %d", i + 1);
972 ipr_err("Device %d: missing\n", i + 1);
973 } else {
974 ipr_err("Device %d: %d:%d:%d:%d\n", i + 1,
975 ioa_cfg->host->host_no, dev_entry->dev_res_addr.bus,
976 dev_entry->dev_res_addr.target, dev_entry->dev_res_addr.lun);
977 }
978 ipr_log_vpd(&dev_entry->vpd); 972 ipr_log_vpd(&dev_entry->vpd);
979 973
980 ipr_err("-----New Device Information-----\n"); 974 ipr_err("-----New Device Information-----\n");
@@ -1030,33 +1024,16 @@ static void ipr_log_array_error(struct ipr_ioa_cfg *ioa_cfg,
1030 if (!memcmp(array_entry->vpd.sn, zero_sn, IPR_SERIAL_NUM_LEN)) 1024 if (!memcmp(array_entry->vpd.sn, zero_sn, IPR_SERIAL_NUM_LEN))
1031 continue; 1025 continue;
1032 1026
1033 if (be32_to_cpu(error->exposed_mode_adn) == i) { 1027 if (be32_to_cpu(error->exposed_mode_adn) == i)
1034 ipr_err("Exposed Array Member %d:\n", i); 1028 ipr_err("Exposed Array Member %d:\n", i);
1035 } else { 1029 else
1036 ipr_err("Array Member %d:\n", i); 1030 ipr_err("Array Member %d:\n", i);
1037 }
1038 1031
1039 ipr_log_vpd(&array_entry->vpd); 1032 ipr_log_vpd(&array_entry->vpd);
1040 1033
1041 if (array_entry->dev_res_addr.bus >= IPR_MAX_NUM_BUSES) { 1034 ipr_phys_res_err(ioa_cfg, array_entry->dev_res_addr, "Current Location");
1042 ipr_err("Current Location: unknown\n"); 1035 ipr_phys_res_err(ioa_cfg, array_entry->expected_dev_res_addr,
1043 } else { 1036 "Expected Location");
1044 ipr_err("Current Location: %d:%d:%d:%d\n",
1045 ioa_cfg->host->host_no,
1046 array_entry->dev_res_addr.bus,
1047 array_entry->dev_res_addr.target,
1048 array_entry->dev_res_addr.lun);
1049 }
1050
1051 if (array_entry->expected_dev_res_addr.bus >= IPR_MAX_NUM_BUSES) {
1052 ipr_err("Expected Location: unknown\n");
1053 } else {
1054 ipr_err("Expected Location: %d:%d:%d:%d\n",
1055 ioa_cfg->host->host_no,
1056 array_entry->expected_dev_res_addr.bus,
1057 array_entry->expected_dev_res_addr.target,
1058 array_entry->expected_dev_res_addr.lun);
1059 }
1060 1037
1061 ipr_err_separator; 1038 ipr_err_separator;
1062 1039
diff --git a/drivers/scsi/ipr.h b/drivers/scsi/ipr.h
index 01950b9d2e6..b8c1603f99e 100644
--- a/drivers/scsi/ipr.h
+++ b/drivers/scsi/ipr.h
@@ -1123,6 +1123,17 @@ struct ipr_ucode_image_header {
1123#define ipr_res_dbg(ioa_cfg, res, fmt, ...) \ 1123#define ipr_res_dbg(ioa_cfg, res, fmt, ...) \
1124 IPR_DBG_CMD(ipr_res_printk(KERN_INFO, ioa_cfg, res, fmt, ##__VA_ARGS__)) 1124 IPR_DBG_CMD(ipr_res_printk(KERN_INFO, ioa_cfg, res, fmt, ##__VA_ARGS__))
1125 1125
1126#define ipr_phys_res_err(ioa_cfg, res, fmt, ...) \
1127{ \
1128 if ((res).bus >= IPR_MAX_NUM_BUSES) { \
1129 ipr_err(fmt": unknown\n", ##__VA_ARGS__); \
1130 } else { \
1131 ipr_err(fmt": %d:%d:%d:%d\n", \
1132 ##__VA_ARGS__, (ioa_cfg)->host->host_no, \
1133 (res).bus, (res).target, (res).lun); \
1134 } \
1135}
1136
1126#define ipr_trace ipr_dbg("%s: %s: Line: %d\n",\ 1137#define ipr_trace ipr_dbg("%s: %s: Line: %d\n",\
1127 __FILE__, __FUNCTION__, __LINE__) 1138 __FILE__, __FUNCTION__, __LINE__)
1128 1139