diff options
author | Brian King <brking@us.ibm.com> | 2006-03-29 10:37:29 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-04-13 11:13:28 -0400 |
commit | fe964d0a4bfa7c25e75c53d81acbf53099777e9e (patch) | |
tree | 6e6a5685866f6c99aac1fbcbd30f5fa3d4ec0a87 /drivers/scsi | |
parent | e4fbf44ed0618acce4a06010ed9fa9c02e06e36a (diff) |
[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: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/ipr.c | 39 |
1 files changed, 4 insertions, 35 deletions
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index 20b6929cb4fe..dd5c96239e06 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c | |||
@@ -164,29 +164,6 @@ MODULE_PARM_DESC(auto_create, "Auto-create single device RAID 0 arrays when init | |||
164 | MODULE_LICENSE("GPL"); | 164 | MODULE_LICENSE("GPL"); |
165 | MODULE_VERSION(IPR_DRIVER_VERSION); | 165 | MODULE_VERSION(IPR_DRIVER_VERSION); |
166 | 166 | ||
167 | static const char *ipr_gpdd_dev_end_states[] = { | ||
168 | "Command complete", | ||
169 | "Terminated by host", | ||
170 | "Terminated by device reset", | ||
171 | "Terminated by bus reset", | ||
172 | "Unknown", | ||
173 | "Command not started" | ||
174 | }; | ||
175 | |||
176 | static const char *ipr_gpdd_dev_bus_phases[] = { | ||
177 | "Bus free", | ||
178 | "Arbitration", | ||
179 | "Selection", | ||
180 | "Message out", | ||
181 | "Command", | ||
182 | "Message in", | ||
183 | "Data out", | ||
184 | "Data in", | ||
185 | "Status", | ||
186 | "Reselection", | ||
187 | "Unknown" | ||
188 | }; | ||
189 | |||
190 | /* A constant array of IOASCs/URCs/Error Messages */ | 167 | /* A constant array of IOASCs/URCs/Error Messages */ |
191 | static const | 168 | static const |
192 | struct ipr_error_table_t ipr_error_table[] = { | 169 | struct ipr_error_table_t ipr_error_table[] = { |
@@ -3938,6 +3915,7 @@ static void ipr_erp_cancel_all(struct ipr_cmnd *ipr_cmd) | |||
3938 | * ipr_dump_ioasa - Dump contents of IOASA | 3915 | * ipr_dump_ioasa - Dump contents of IOASA |
3939 | * @ioa_cfg: ioa config struct | 3916 | * @ioa_cfg: ioa config struct |
3940 | * @ipr_cmd: ipr command struct | 3917 | * @ipr_cmd: ipr command struct |
3918 | * @res: resource entry struct | ||
3941 | * | 3919 | * |
3942 | * This function is invoked by the interrupt handler when ops | 3920 | * This function is invoked by the interrupt handler when ops |
3943 | * fail. It will log the IOASA if appropriate. Only called | 3921 | * 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 | * none | 3925 | * none |
3948 | **/ | 3926 | **/ |
3949 | static void ipr_dump_ioasa(struct ipr_ioa_cfg *ioa_cfg, | 3927 | static void ipr_dump_ioasa(struct ipr_ioa_cfg *ioa_cfg, |
3950 | struct ipr_cmnd *ipr_cmd) | 3928 | struct ipr_cmnd *ipr_cmd, struct ipr_resource_entry *res) |
3951 | { | 3929 | { |
3952 | int i; | 3930 | int i; |
3953 | u16 data_len; | 3931 | u16 data_len; |
@@ -3975,16 +3953,7 @@ static void ipr_dump_ioasa(struct ipr_ioa_cfg *ioa_cfg, | |||
3975 | return; | 3953 | return; |
3976 | } | 3954 | } |
3977 | 3955 | ||
3978 | ipr_sdev_err(ipr_cmd->scsi_cmd->device, "%s\n", | 3956 | ipr_res_err(ioa_cfg, res, "%s\n", ipr_error_table[error_index].error); |
3979 | ipr_error_table[error_index].error); | ||
3980 | |||
3981 | if ((ioasa->u.gpdd.end_state <= ARRAY_SIZE(ipr_gpdd_dev_end_states)) && | ||
3982 | (ioasa->u.gpdd.bus_phase <= ARRAY_SIZE(ipr_gpdd_dev_bus_phases))) { | ||
3983 | ipr_sdev_err(ipr_cmd->scsi_cmd->device, | ||
3984 | "Device End state: %s Phase: %s\n", | ||
3985 | ipr_gpdd_dev_end_states[ioasa->u.gpdd.end_state], | ||
3986 | ipr_gpdd_dev_bus_phases[ioasa->u.gpdd.bus_phase]); | ||
3987 | } | ||
3988 | 3957 | ||
3989 | if (sizeof(struct ipr_ioasa) < be16_to_cpu(ioasa->ret_stat_len)) | 3958 | if (sizeof(struct ipr_ioasa) < be16_to_cpu(ioasa->ret_stat_len)) |
3990 | data_len = sizeof(struct ipr_ioasa); | 3959 | data_len = sizeof(struct ipr_ioasa); |
@@ -4141,7 +4110,7 @@ static void ipr_erp_start(struct ipr_ioa_cfg *ioa_cfg, | |||
4141 | } | 4110 | } |
4142 | 4111 | ||
4143 | if (ipr_is_gscsi(res)) | 4112 | if (ipr_is_gscsi(res)) |
4144 | ipr_dump_ioasa(ioa_cfg, ipr_cmd); | 4113 | ipr_dump_ioasa(ioa_cfg, ipr_cmd, res); |
4145 | else | 4114 | else |
4146 | ipr_gen_sense(ipr_cmd); | 4115 | ipr_gen_sense(ipr_cmd); |
4147 | 4116 | ||