aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ipr.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/ipr.c')
-rw-r--r--drivers/scsi/ipr.c54
1 files changed, 44 insertions, 10 deletions
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
index 5bbaee597e88..de2e09e49a3e 100644
--- a/drivers/scsi/ipr.c
+++ b/drivers/scsi/ipr.c
@@ -146,7 +146,7 @@ static const struct ipr_chip_cfg_t ipr_chip_cfg[] = {
146 } 146 }
147 }, 147 },
148 { /* CRoC */ 148 { /* CRoC */
149 .mailbox = 0x00040, 149 .mailbox = 0x00044,
150 .cache_line_size = 0x20, 150 .cache_line_size = 0x20,
151 { 151 {
152 .set_interrupt_mask_reg = 0x00010, 152 .set_interrupt_mask_reg = 0x00010,
@@ -1048,6 +1048,8 @@ static void ipr_init_res_entry(struct ipr_resource_entry *res,
1048 sizeof(res->res_path)); 1048 sizeof(res->res_path));
1049 1049
1050 res->bus = 0; 1050 res->bus = 0;
1051 memcpy(&res->dev_lun.scsi_lun, &cfgtew->u.cfgte64->lun,
1052 sizeof(res->dev_lun.scsi_lun));
1051 res->lun = scsilun_to_int(&res->dev_lun); 1053 res->lun = scsilun_to_int(&res->dev_lun);
1052 1054
1053 if (res->type == IPR_RES_TYPE_GENERIC_SCSI) { 1055 if (res->type == IPR_RES_TYPE_GENERIC_SCSI) {
@@ -1063,9 +1065,6 @@ static void ipr_init_res_entry(struct ipr_resource_entry *res,
1063 ioa_cfg->max_devs_supported); 1065 ioa_cfg->max_devs_supported);
1064 set_bit(res->target, ioa_cfg->target_ids); 1066 set_bit(res->target, ioa_cfg->target_ids);
1065 } 1067 }
1066
1067 memcpy(&res->dev_lun.scsi_lun, &cfgtew->u.cfgte64->lun,
1068 sizeof(res->dev_lun.scsi_lun));
1069 } else if (res->type == IPR_RES_TYPE_IOAFP) { 1068 } else if (res->type == IPR_RES_TYPE_IOAFP) {
1070 res->bus = IPR_IOAFP_VIRTUAL_BUS; 1069 res->bus = IPR_IOAFP_VIRTUAL_BUS;
1071 res->target = 0; 1070 res->target = 0;
@@ -1116,7 +1115,7 @@ static int ipr_is_same_device(struct ipr_resource_entry *res,
1116 if (res->ioa_cfg->sis64) { 1115 if (res->ioa_cfg->sis64) {
1117 if (!memcmp(&res->dev_id, &cfgtew->u.cfgte64->dev_id, 1116 if (!memcmp(&res->dev_id, &cfgtew->u.cfgte64->dev_id,
1118 sizeof(cfgtew->u.cfgte64->dev_id)) && 1117 sizeof(cfgtew->u.cfgte64->dev_id)) &&
1119 !memcmp(&res->lun, &cfgtew->u.cfgte64->lun, 1118 !memcmp(&res->dev_lun.scsi_lun, &cfgtew->u.cfgte64->lun,
1120 sizeof(cfgtew->u.cfgte64->lun))) { 1119 sizeof(cfgtew->u.cfgte64->lun))) {
1121 return 1; 1120 return 1;
1122 } 1121 }
@@ -2901,6 +2900,12 @@ static void ipr_get_ioa_dump(struct ipr_ioa_cfg *ioa_cfg, struct ipr_dump *dump)
2901 return; 2900 return;
2902 } 2901 }
2903 2902
2903 if (ioa_cfg->sis64) {
2904 spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags);
2905 ssleep(IPR_DUMP_DELAY_SECONDS);
2906 spin_lock_irqsave(ioa_cfg->host->host_lock, lock_flags);
2907 }
2908
2904 start_addr = readl(ioa_cfg->ioa_mailbox); 2909 start_addr = readl(ioa_cfg->ioa_mailbox);
2905 2910
2906 if (!ioa_cfg->sis64 && !ipr_sdt_is_fmt2(start_addr)) { 2911 if (!ioa_cfg->sis64 && !ipr_sdt_is_fmt2(start_addr)) {
@@ -7473,6 +7478,29 @@ static void ipr_get_unit_check_buffer(struct ipr_ioa_cfg *ioa_cfg)
7473} 7478}
7474 7479
7475/** 7480/**
7481 * ipr_reset_get_unit_check_job - Call to get the unit check buffer.
7482 * @ipr_cmd: ipr command struct
7483 *
7484 * Description: This function will call to get the unit check buffer.
7485 *
7486 * Return value:
7487 * IPR_RC_JOB_RETURN
7488 **/
7489static int ipr_reset_get_unit_check_job(struct ipr_cmnd *ipr_cmd)
7490{
7491 struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
7492
7493 ENTER;
7494 ioa_cfg->ioa_unit_checked = 0;
7495 ipr_get_unit_check_buffer(ioa_cfg);
7496 ipr_cmd->job_step = ipr_reset_alert;
7497 ipr_reset_start_timer(ipr_cmd, 0);
7498
7499 LEAVE;
7500 return IPR_RC_JOB_RETURN;
7501}
7502
7503/**
7476 * ipr_reset_restore_cfg_space - Restore PCI config space. 7504 * ipr_reset_restore_cfg_space - Restore PCI config space.
7477 * @ipr_cmd: ipr command struct 7505 * @ipr_cmd: ipr command struct
7478 * 7506 *
@@ -7512,11 +7540,17 @@ static int ipr_reset_restore_cfg_space(struct ipr_cmnd *ipr_cmd)
7512 } 7540 }
7513 7541
7514 if (ioa_cfg->ioa_unit_checked) { 7542 if (ioa_cfg->ioa_unit_checked) {
7515 ioa_cfg->ioa_unit_checked = 0; 7543 if (ioa_cfg->sis64) {
7516 ipr_get_unit_check_buffer(ioa_cfg); 7544 ipr_cmd->job_step = ipr_reset_get_unit_check_job;
7517 ipr_cmd->job_step = ipr_reset_alert; 7545 ipr_reset_start_timer(ipr_cmd, IPR_DUMP_DELAY_TIMEOUT);
7518 ipr_reset_start_timer(ipr_cmd, 0); 7546 return IPR_RC_JOB_RETURN;
7519 return IPR_RC_JOB_RETURN; 7547 } else {
7548 ioa_cfg->ioa_unit_checked = 0;
7549 ipr_get_unit_check_buffer(ioa_cfg);
7550 ipr_cmd->job_step = ipr_reset_alert;
7551 ipr_reset_start_timer(ipr_cmd, 0);
7552 return IPR_RC_JOB_RETURN;
7553 }
7520 } 7554 }
7521 7555
7522 if (ioa_cfg->in_ioa_bringdown) { 7556 if (ioa_cfg->in_ioa_bringdown) {