Commit fe964d0a authored by Brian King's avatar Brian King Committed by James Bottomley

[SCSI] ipr: Simplify status area dumping

Simplify the dumping of the command status area by
removing some device specific information that has proven
to not be worthwhile.
Signed-off-by: default avatarBrian King <brking@us.ibm.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent e4fbf44e
...@@ -164,29 +164,6 @@ MODULE_PARM_DESC(auto_create, "Auto-create single device RAID 0 arrays when init ...@@ -164,29 +164,6 @@ MODULE_PARM_DESC(auto_create, "Auto-create single device RAID 0 arrays when init
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_VERSION(IPR_DRIVER_VERSION); 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 */ /* A constant array of IOASCs/URCs/Error Messages */
static const static const
struct ipr_error_table_t ipr_error_table[] = { struct ipr_error_table_t ipr_error_table[] = {
...@@ -3938,6 +3915,7 @@ static void ipr_erp_cancel_all(struct ipr_cmnd *ipr_cmd) ...@@ -3938,6 +3915,7 @@ static void ipr_erp_cancel_all(struct ipr_cmnd *ipr_cmd)
* ipr_dump_ioasa - Dump contents of IOASA * ipr_dump_ioasa - Dump contents of IOASA
* @ioa_cfg: ioa config struct * @ioa_cfg: ioa config struct
* @ipr_cmd: ipr command struct * @ipr_cmd: ipr command struct
* @res: resource entry struct
* *
* This function is invoked by the interrupt handler when ops * This function is invoked by the interrupt handler when ops
* fail. It will log the IOASA if appropriate. Only called * 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) ...@@ -3947,7 +3925,7 @@ static void ipr_erp_cancel_all(struct ipr_cmnd *ipr_cmd)
* none * none
**/ **/
static void ipr_dump_ioasa(struct ipr_ioa_cfg *ioa_cfg, 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; int i;
u16 data_len; u16 data_len;
...@@ -3975,16 +3953,7 @@ static void ipr_dump_ioasa(struct ipr_ioa_cfg *ioa_cfg, ...@@ -3975,16 +3953,7 @@ static void ipr_dump_ioasa(struct ipr_ioa_cfg *ioa_cfg,
return; return;
} }
ipr_sdev_err(ipr_cmd->scsi_cmd->device, "%s\n", ipr_res_err(ioa_cfg, res, "%s\n", ipr_error_table[error_index].error);
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]);
}
if (sizeof(struct ipr_ioasa) < be16_to_cpu(ioasa->ret_stat_len)) if (sizeof(struct ipr_ioasa) < be16_to_cpu(ioasa->ret_stat_len))
data_len = sizeof(struct ipr_ioasa); data_len = sizeof(struct ipr_ioasa);
...@@ -4141,7 +4110,7 @@ static void ipr_erp_start(struct ipr_ioa_cfg *ioa_cfg, ...@@ -4141,7 +4110,7 @@ static void ipr_erp_start(struct ipr_ioa_cfg *ioa_cfg,
} }
if (ipr_is_gscsi(res)) if (ipr_is_gscsi(res))
ipr_dump_ioasa(ioa_cfg, ipr_cmd); ipr_dump_ioasa(ioa_cfg, ipr_cmd, res);
else else
ipr_gen_sense(ipr_cmd); ipr_gen_sense(ipr_cmd);
......
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