Skip to content

Commit

Permalink
[SCSI] ipr: Enable logging of debug error data for all devices
Browse files Browse the repository at this point in the history
The ipr driver has a sysfs attribute which can be used to
adjust the logging level of the driver for error events.
The error response data for commands can be dumped by
increasing the logging level of the ipr driver. This
currently only works for JBOD passthrough devices.
This patch enables this function for all devices, including
RAID devices, to aid in debugging problems.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
  • Loading branch information
Brian King authored and James Bottomley committed Apr 1, 2007
1 parent 185eb31 commit cc9bd5d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions drivers/scsi/ipr.c
Original file line number Diff line number Diff line change
Expand Up @@ -4473,6 +4473,9 @@ static void ipr_dump_ioasa(struct ipr_ioa_cfg *ioa_cfg,
if (ioasa->ilid != 0)
return;

if (!ipr_is_gscsi(res))
return;

if (ipr_error_table[error_index].log_ioasa == 0)
return;
}
Expand Down Expand Up @@ -4632,11 +4635,11 @@ static void ipr_erp_start(struct ipr_ioa_cfg *ioa_cfg,
return;
}

if (ipr_is_gscsi(res))
ipr_dump_ioasa(ioa_cfg, ipr_cmd, res);
else
if (!ipr_is_gscsi(res))
ipr_gen_sense(ipr_cmd);

ipr_dump_ioasa(ioa_cfg, ipr_cmd, res);

switch (ioasc & IPR_IOASC_IOASC_MASK) {
case IPR_IOASC_ABORTED_CMD_TERM_BY_HOST:
if (ipr_is_naca_model(res))
Expand Down

0 comments on commit cc9bd5d

Please sign in to comment.