From ba300760bf645ea6f62b390d36da888ef433a04b Mon Sep 17 00:00:00 2001 From: Brian King Date: Wed, 29 Mar 2006 09:37:29 -0600 Subject: [PATCH] --- yaml --- r: 25815 b: refs/heads/master c: fe964d0a4bfa7c25e75c53d81acbf53099777e9e h: refs/heads/master i: 25813: ddb659effd78e205df9e8ef39268a4e88a27e3e3 25811: 4917de059397952ae4d5439cb9f672692bc0fdba 25807: c789ec9916d59fc97fd06f7e3aed8470252e0533 v: v3 --- [refs] | 2 +- trunk/drivers/scsi/ipr.c | 39 ++++----------------------------------- 2 files changed, 5 insertions(+), 36 deletions(-) diff --git a/[refs] b/[refs] index 18fd12523bfd..a05e8601d361 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e4fbf44ed0618acce4a06010ed9fa9c02e06e36a +refs/heads/master: fe964d0a4bfa7c25e75c53d81acbf53099777e9e diff --git a/trunk/drivers/scsi/ipr.c b/trunk/drivers/scsi/ipr.c index 20b6929cb4fe..dd5c96239e06 100644 --- a/trunk/drivers/scsi/ipr.c +++ b/trunk/drivers/scsi/ipr.c @@ -164,29 +164,6 @@ MODULE_PARM_DESC(auto_create, "Auto-create single device RAID 0 arrays when init MODULE_LICENSE("GPL"); MODULE_VERSION(IPR_DRIVER_VERSION); -static const char *ipr_gpdd_dev_end_states[] = { - "Command complete", - "Terminated by host", - "Terminated by device reset", - "Terminated by bus reset", - "Unknown", - "Command not started" -}; - -static const char *ipr_gpdd_dev_bus_phases[] = { - "Bus free", - "Arbitration", - "Selection", - "Message out", - "Command", - "Message in", - "Data out", - "Data in", - "Status", - "Reselection", - "Unknown" -}; - /* A constant array of IOASCs/URCs/Error Messages */ static const struct ipr_error_table_t ipr_error_table[] = { @@ -3938,6 +3915,7 @@ static void ipr_erp_cancel_all(struct ipr_cmnd *ipr_cmd) * ipr_dump_ioasa - Dump contents of IOASA * @ioa_cfg: ioa config struct * @ipr_cmd: ipr command struct + * @res: resource entry struct * * This function is invoked by the interrupt handler when ops * fail. It will log the IOASA if appropriate. Only called @@ -3947,7 +3925,7 @@ static void ipr_erp_cancel_all(struct ipr_cmnd *ipr_cmd) * none **/ static void ipr_dump_ioasa(struct ipr_ioa_cfg *ioa_cfg, - struct ipr_cmnd *ipr_cmd) + struct ipr_cmnd *ipr_cmd, struct ipr_resource_entry *res) { int i; u16 data_len; @@ -3975,16 +3953,7 @@ static void ipr_dump_ioasa(struct ipr_ioa_cfg *ioa_cfg, return; } - ipr_sdev_err(ipr_cmd->scsi_cmd->device, "%s\n", - ipr_error_table[error_index].error); - - if ((ioasa->u.gpdd.end_state <= ARRAY_SIZE(ipr_gpdd_dev_end_states)) && - (ioasa->u.gpdd.bus_phase <= ARRAY_SIZE(ipr_gpdd_dev_bus_phases))) { - ipr_sdev_err(ipr_cmd->scsi_cmd->device, - "Device End state: %s Phase: %s\n", - ipr_gpdd_dev_end_states[ioasa->u.gpdd.end_state], - ipr_gpdd_dev_bus_phases[ioasa->u.gpdd.bus_phase]); - } + ipr_res_err(ioa_cfg, res, "%s\n", ipr_error_table[error_index].error); if (sizeof(struct ipr_ioasa) < be16_to_cpu(ioasa->ret_stat_len)) data_len = sizeof(struct ipr_ioasa); @@ -4141,7 +4110,7 @@ static void ipr_erp_start(struct ipr_ioa_cfg *ioa_cfg, } if (ipr_is_gscsi(res)) - ipr_dump_ioasa(ioa_cfg, ipr_cmd); + ipr_dump_ioasa(ioa_cfg, ipr_cmd, res); else ipr_gen_sense(ipr_cmd);