aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBrian King <brking@linux.vnet.ibm.com>2007-04-26 17:00:12 -0400
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2007-05-06 10:33:19 -0400
commit65f5647544960a68030352015d0b4a6234a818f8 (patch)
treee862690a950706a514c3bb25012f8353db11dfe1 /drivers
parent8a048994f4be7d0b670a358cea7812c6d5232105 (diff)
[SCSI] ipr: Handle IOA reset request
In ipr dual adapter configurations, the ipr adapter firmware may require an adapter reset for various reasons. The reset is requested by the adapter firmware logging an error with an IOASC of 0x02048000. Add support to log this error, and reset the adapter. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/ipr.c14
-rw-r--r--drivers/scsi/ipr.h1
2 files changed, 13 insertions, 2 deletions
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
index d871dd37d22c..393eda1d6537 100644
--- a/drivers/scsi/ipr.c
+++ b/drivers/scsi/ipr.c
@@ -206,6 +206,8 @@ struct ipr_error_table_t ipr_error_table[] = {
206 "8009: Impending cache battery pack failure"}, 206 "8009: Impending cache battery pack failure"},
207 {0x02040400, 0, 0, 207 {0x02040400, 0, 0,
208 "34FF: Disk device format in progress"}, 208 "34FF: Disk device format in progress"},
209 {0x02048000, 0, IPR_DEFAULT_LOG_LEVEL,
210 "9070: IOA requested reset"},
209 {0x023F0000, 0, 0, 211 {0x023F0000, 0, 0,
210 "Synchronization required"}, 212 "Synchronization required"},
211 {0x024E0000, 0, 0, 213 {0x024E0000, 0, 0,
@@ -1672,12 +1674,15 @@ static void ipr_process_error(struct ipr_cmnd *ipr_cmd)
1672 struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg; 1674 struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
1673 struct ipr_hostrcb *hostrcb = ipr_cmd->u.hostrcb; 1675 struct ipr_hostrcb *hostrcb = ipr_cmd->u.hostrcb;
1674 u32 ioasc = be32_to_cpu(ipr_cmd->ioasa.ioasc); 1676 u32 ioasc = be32_to_cpu(ipr_cmd->ioasa.ioasc);
1677 u32 fd_ioasc = be32_to_cpu(hostrcb->hcam.u.error.failing_dev_ioasc);
1675 1678
1676 list_del(&hostrcb->queue); 1679 list_del(&hostrcb->queue);
1677 list_add_tail(&ipr_cmd->queue, &ioa_cfg->free_q); 1680 list_add_tail(&ipr_cmd->queue, &ioa_cfg->free_q);
1678 1681
1679 if (!ioasc) { 1682 if (!ioasc) {
1680 ipr_handle_log_data(ioa_cfg, hostrcb); 1683 ipr_handle_log_data(ioa_cfg, hostrcb);
1684 if (fd_ioasc == IPR_IOASC_NR_IOA_RESET_REQUIRED)
1685 ipr_initiate_ioa_reset(ioa_cfg, IPR_SHUTDOWN_ABBREV);
1681 } else if (ioasc != IPR_IOASC_IOA_WAS_RESET) { 1686 } else if (ioasc != IPR_IOASC_IOA_WAS_RESET) {
1682 dev_err(&ioa_cfg->pdev->dev, 1687 dev_err(&ioa_cfg->pdev->dev,
1683 "Host RCB failed with IOASC: 0x%08X\n", ioasc); 1688 "Host RCB failed with IOASC: 0x%08X\n", ioasc);
@@ -6290,6 +6295,7 @@ static void ipr_get_unit_check_buffer(struct ipr_ioa_cfg *ioa_cfg)
6290 struct ipr_hostrcb *hostrcb; 6295 struct ipr_hostrcb *hostrcb;
6291 struct ipr_uc_sdt sdt; 6296 struct ipr_uc_sdt sdt;
6292 int rc, length; 6297 int rc, length;
6298 u32 ioasc;
6293 6299
6294 mailbox = readl(ioa_cfg->ioa_mailbox); 6300 mailbox = readl(ioa_cfg->ioa_mailbox);
6295 6301
@@ -6322,9 +6328,13 @@ static void ipr_get_unit_check_buffer(struct ipr_ioa_cfg *ioa_cfg)
6322 (__be32 *)&hostrcb->hcam, 6328 (__be32 *)&hostrcb->hcam,
6323 min(length, (int)sizeof(hostrcb->hcam)) / sizeof(__be32)); 6329 min(length, (int)sizeof(hostrcb->hcam)) / sizeof(__be32));
6324 6330
6325 if (!rc) 6331 if (!rc) {
6326 ipr_handle_log_data(ioa_cfg, hostrcb); 6332 ipr_handle_log_data(ioa_cfg, hostrcb);
6327 else 6333 ioasc = be32_to_cpu(hostrcb->hcam.u.error.failing_dev_ioasc);
6334 if (ioasc == IPR_IOASC_NR_IOA_RESET_REQUIRED &&
6335 ioa_cfg->sdt_state == GET_DUMP)
6336 ioa_cfg->sdt_state = WAIT_FOR_DUMP;
6337 } else
6328 ipr_unit_check_no_data(ioa_cfg); 6338 ipr_unit_check_no_data(ioa_cfg);
6329 6339
6330 list_add_tail(&hostrcb->queue, &ioa_cfg->hostrcb_free_q); 6340 list_add_tail(&hostrcb->queue, &ioa_cfg->hostrcb_free_q);
diff --git a/drivers/scsi/ipr.h b/drivers/scsi/ipr.h
index bc53d7cebe0a..c7e045aa16a0 100644
--- a/drivers/scsi/ipr.h
+++ b/drivers/scsi/ipr.h
@@ -91,6 +91,7 @@
91 * IOASCs 91 * IOASCs
92 */ 92 */
93#define IPR_IOASC_NR_INIT_CMD_REQUIRED 0x02040200 93#define IPR_IOASC_NR_INIT_CMD_REQUIRED 0x02040200
94#define IPR_IOASC_NR_IOA_RESET_REQUIRED 0x02048000
94#define IPR_IOASC_SYNC_REQUIRED 0x023f0000 95#define IPR_IOASC_SYNC_REQUIRED 0x023f0000
95#define IPR_IOASC_MED_DO_NOT_REALLOC 0x03110C00 96#define IPR_IOASC_MED_DO_NOT_REALLOC 0x03110C00
96#define IPR_IOASC_HW_SEL_TIMEOUT 0x04050000 97#define IPR_IOASC_HW_SEL_TIMEOUT 0x04050000