Commit 8b6ab6a9 authored by Brian King's avatar Brian King Committed by James Bottomley

[PATCH] ipr add error logs to abort and reset paths

This patch adds additional error logging to abort, device reset,
and bus reset paths to help in diagnosing scsi problems on ipr.
parent f8e85c63
...@@ -2972,6 +2972,7 @@ static int ipr_eh_dev_reset(struct scsi_cmnd * scsi_cmd) ...@@ -2972,6 +2972,7 @@ static int ipr_eh_dev_reset(struct scsi_cmnd * scsi_cmd)
cmd_pkt->request_type = IPR_RQTYPE_IOACMD; cmd_pkt->request_type = IPR_RQTYPE_IOACMD;
cmd_pkt->cdb[0] = IPR_RESET_DEVICE; cmd_pkt->cdb[0] = IPR_RESET_DEVICE;
ipr_sdev_err(scsi_cmd->device, "Resetting device\n");
ipr_send_blocking_cmd(ipr_cmd, ipr_timeout, IPR_DEVICE_RESET_TIMEOUT); ipr_send_blocking_cmd(ipr_cmd, ipr_timeout, IPR_DEVICE_RESET_TIMEOUT);
ioasc = be32_to_cpu(ipr_cmd->ioasa.ioasc); ioasc = be32_to_cpu(ipr_cmd->ioasa.ioasc);
...@@ -3045,6 +3046,7 @@ static void ipr_abort_timeout(struct ipr_cmnd *ipr_cmd) ...@@ -3045,6 +3046,7 @@ static void ipr_abort_timeout(struct ipr_cmnd *ipr_cmd)
return; return;
} }
ipr_sdev_err(ipr_cmd->sdev, "Abort timed out. Resetting bus\n");
reset_cmd = ipr_get_free_ipr_cmnd(ioa_cfg); reset_cmd = ipr_get_free_ipr_cmnd(ioa_cfg);
ipr_cmd->sibling = reset_cmd; ipr_cmd->sibling = reset_cmd;
reset_cmd->sibling = ipr_cmd; reset_cmd->sibling = ipr_cmd;
...@@ -3106,7 +3108,9 @@ static int ipr_cancel_op(struct scsi_cmnd * scsi_cmd) ...@@ -3106,7 +3108,9 @@ static int ipr_cancel_op(struct scsi_cmnd * scsi_cmd)
cmd_pkt->cdb[3] = (ioarcb_addr >> 16) & 0xff; cmd_pkt->cdb[3] = (ioarcb_addr >> 16) & 0xff;
cmd_pkt->cdb[4] = (ioarcb_addr >> 8) & 0xff; cmd_pkt->cdb[4] = (ioarcb_addr >> 8) & 0xff;
cmd_pkt->cdb[5] = ioarcb_addr & 0xff; cmd_pkt->cdb[5] = ioarcb_addr & 0xff;
ipr_cmd->sdev = scsi_cmd->device;
ipr_sdev_err(scsi_cmd->device, "Aborting command: %02X\n", scsi_cmd->cmnd[0]);
ipr_send_blocking_cmd(ipr_cmd, ipr_abort_timeout, IPR_ABORT_TASK_TIMEOUT); ipr_send_blocking_cmd(ipr_cmd, ipr_abort_timeout, IPR_ABORT_TASK_TIMEOUT);
ioasc = be32_to_cpu(ipr_cmd->ioasa.ioasc); ioasc = be32_to_cpu(ipr_cmd->ioasa.ioasc);
......
...@@ -939,6 +939,7 @@ struct ipr_cmnd { ...@@ -939,6 +939,7 @@ struct ipr_cmnd {
unsigned long scratch; unsigned long scratch;
struct ipr_resource_entry *res; struct ipr_resource_entry *res;
struct ipr_cmnd *sibling; struct ipr_cmnd *sibling;
struct scsi_device *sdev;
}; };
struct ipr_ioa_cfg *ioa_cfg; struct ipr_ioa_cfg *ioa_cfg;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment