mirror of
https://github.com/adulau/aha.git
synced 2025-01-02 14:13:18 +00:00
[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>
This commit is contained in:
parent
a9cfca9622
commit
cf8520376c
1 changed files with 3 additions and 3 deletions
|
@ -1141,11 +1141,10 @@ static void ipr_handle_log_data(struct ipr_ioa_cfg *ioa_cfg,
|
||||||
|
|
||||||
if (ioa_cfg->log_level < IPR_DEFAULT_LOG_LEVEL)
|
if (ioa_cfg->log_level < IPR_DEFAULT_LOG_LEVEL)
|
||||||
return;
|
return;
|
||||||
|
if (be32_to_cpu(hostrcb->hcam.length) > sizeof(hostrcb->hcam.u.raw))
|
||||||
|
hostrcb->hcam.length = cpu_to_be32(sizeof(hostrcb->hcam.u.raw));
|
||||||
|
|
||||||
switch (hostrcb->hcam.overlay_id) {
|
switch (hostrcb->hcam.overlay_id) {
|
||||||
case IPR_HOST_RCB_OVERLAY_ID_1:
|
|
||||||
ipr_log_generic_error(ioa_cfg, hostrcb);
|
|
||||||
break;
|
|
||||||
case IPR_HOST_RCB_OVERLAY_ID_2:
|
case IPR_HOST_RCB_OVERLAY_ID_2:
|
||||||
ipr_log_cache_error(ioa_cfg, hostrcb);
|
ipr_log_cache_error(ioa_cfg, hostrcb);
|
||||||
break;
|
break;
|
||||||
|
@ -1156,6 +1155,7 @@ static void ipr_handle_log_data(struct ipr_ioa_cfg *ioa_cfg,
|
||||||
case IPR_HOST_RCB_OVERLAY_ID_6:
|
case IPR_HOST_RCB_OVERLAY_ID_6:
|
||||||
ipr_log_array_error(ioa_cfg, hostrcb);
|
ipr_log_array_error(ioa_cfg, hostrcb);
|
||||||
break;
|
break;
|
||||||
|
case IPR_HOST_RCB_OVERLAY_ID_1:
|
||||||
case IPR_HOST_RCB_OVERLAY_ID_DEFAULT:
|
case IPR_HOST_RCB_OVERLAY_ID_DEFAULT:
|
||||||
default:
|
default:
|
||||||
ipr_log_generic_error(ioa_cfg, hostrcb);
|
ipr_log_generic_error(ioa_cfg, hostrcb);
|
||||||
|
|
Loading…
Reference in a new issue