* [PATCH 2/5] ipr add error logs to abort and reset paths
@ 2004-05-23 0:49 Brian King
0 siblings, 0 replies; only message in thread
From: Brian King @ 2004-05-23 0:49 UTC (permalink / raw)
To: James Bottomley; +Cc: linux-scsi
[-- Attachment #1: Type: text/plain, Size: 64 bytes --]
--
Brian King
eServer Storage I/O
IBM Linux Technology Center
[-- Attachment #2: ipr_eh_elog_fixes-2.patch --]
[-- Type: text/plain, Size: 1961 bytes --]
This patch adds additional error logging to abort, device reset,
and bus reset paths to help in diagnosing scsi problems on ipr.
---
linux-2.6.6-bjking1/drivers/scsi/ipr.c | 4 ++++
linux-2.6.6-bjking1/drivers/scsi/ipr.h | 1 +
2 files changed, 5 insertions(+)
diff -puN drivers/scsi/ipr.c~ipr_eh_elog_fixes drivers/scsi/ipr.c
--- linux-2.6.6/drivers/scsi/ipr.c~ipr_eh_elog_fixes 2004-05-22 14:43:51.000000000 -0500
+++ linux-2.6.6-bjking1/drivers/scsi/ipr.c 2004-05-22 14:49:38.000000000 -0500
@@ -2972,6 +2972,7 @@ static int ipr_eh_dev_reset(struct scsi_
cmd_pkt->request_type = IPR_RQTYPE_IOACMD;
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);
ioasc = be32_to_cpu(ipr_cmd->ioasa.ioasc);
@@ -3045,6 +3046,7 @@ static void ipr_abort_timeout(struct ipr
return;
}
+ ipr_sdev_err(ipr_cmd->sdev, "Abort timed out. Resetting bus\n");
reset_cmd = ipr_get_free_ipr_cmnd(ioa_cfg);
ipr_cmd->sibling = reset_cmd;
reset_cmd->sibling = ipr_cmd;
@@ -3106,7 +3108,9 @@ static int ipr_cancel_op(struct scsi_cmn
cmd_pkt->cdb[3] = (ioarcb_addr >> 16) & 0xff;
cmd_pkt->cdb[4] = (ioarcb_addr >> 8) & 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);
ioasc = be32_to_cpu(ipr_cmd->ioasa.ioasc);
diff -puN drivers/scsi/ipr.h~ipr_eh_elog_fixes drivers/scsi/ipr.h
--- linux-2.6.6/drivers/scsi/ipr.h~ipr_eh_elog_fixes 2004-05-22 14:43:51.000000000 -0500
+++ linux-2.6.6-bjking1/drivers/scsi/ipr.h 2004-05-22 14:49:07.000000000 -0500
@@ -939,6 +939,7 @@ struct ipr_cmnd {
unsigned long scratch;
struct ipr_resource_entry *res;
struct ipr_cmnd *sibling;
+ struct scsi_device *sdev;
};
struct ipr_ioa_cfg *ioa_cfg;
_
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-05-23 0:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-23 0:49 [PATCH 2/5] ipr add error logs to abort and reset paths Brian King
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.