diff options
author | brking@us.ibm.com <brking@us.ibm.com> | 2005-11-01 18:00:47 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2005-11-06 14:01:24 -0500 |
commit | cf8520376c2b752237095f6cd279e5443bd2fffe (patch) | |
tree | 7984a56ed5fbada16a7af99d9ac4b254c2348390 /drivers/scsi/ipr.c | |
parent | a9cfca9622d660daf9422c2f041828e017eba58b (diff) |
[SCSI] ipr: Error logging cleanup
Simplify error logging path, sanitize error length returned
by the adapter.
Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/ipr.c')
-rw-r--r-- | drivers/scsi/ipr.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index 40763b64e9eb..b5a2669518ba 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c | |||
@@ -1141,11 +1141,10 @@ static void ipr_handle_log_data(struct ipr_ioa_cfg *ioa_cfg, | |||
1141 | 1141 | ||
1142 | if (ioa_cfg->log_level < IPR_DEFAULT_LOG_LEVEL) | 1142 | if (ioa_cfg->log_level < IPR_DEFAULT_LOG_LEVEL) |
1143 | return; | 1143 | return; |
1144 | if (be32_to_cpu(hostrcb->hcam.length) > sizeof(hostrcb->hcam.u.raw)) | ||
1145 | hostrcb->hcam.length = cpu_to_be32(sizeof(hostrcb->hcam.u.raw)); | ||
1144 | 1146 | ||
1145 | switch (hostrcb->hcam.overlay_id) { | 1147 | switch (hostrcb->hcam.overlay_id) { |
1146 | case IPR_HOST_RCB_OVERLAY_ID_1: | ||
1147 | ipr_log_generic_error(ioa_cfg, hostrcb); | ||
1148 | break; | ||
1149 | case IPR_HOST_RCB_OVERLAY_ID_2: | 1148 | case IPR_HOST_RCB_OVERLAY_ID_2: |
1150 | ipr_log_cache_error(ioa_cfg, hostrcb); | 1149 | ipr_log_cache_error(ioa_cfg, hostrcb); |
1151 | break; | 1150 | break; |
@@ -1156,6 +1155,7 @@ static void ipr_handle_log_data(struct ipr_ioa_cfg *ioa_cfg, | |||
1156 | case IPR_HOST_RCB_OVERLAY_ID_6: | 1155 | case IPR_HOST_RCB_OVERLAY_ID_6: |
1157 | ipr_log_array_error(ioa_cfg, hostrcb); | 1156 | ipr_log_array_error(ioa_cfg, hostrcb); |
1158 | break; | 1157 | break; |
1158 | case IPR_HOST_RCB_OVERLAY_ID_1: | ||
1159 | case IPR_HOST_RCB_OVERLAY_ID_DEFAULT: | 1159 | case IPR_HOST_RCB_OVERLAY_ID_DEFAULT: |
1160 | default: | 1160 | default: |
1161 | ipr_log_generic_error(ioa_cfg, hostrcb); | 1161 | ipr_log_generic_error(ioa_cfg, hostrcb); |