aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorBrian King <brking@linux.vnet.ibm.com>2007-01-23 12:25:37 -0500
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2007-01-27 10:26:23 -0500
commite619e1a7cbf73c27eacf53856443b1aa67cc1234 (patch)
tree511a1f8afcec952cd9171f2a31909e04c975dc52 /drivers/scsi
parent7dce0e1c84cfa8fb2a4b41877c20def386cade2b (diff)
[SCSI] ipr: PCI error recovery fix
Since the pci_block_user_cfg_access API was modified to track block/unblocks, it was discovered that the ipr driver had a path through its code (in PCI error recovery) which would unblock when not previously blocked. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/ipr.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
index 39133748fb73..4f5273ea2772 100644
--- a/drivers/scsi/ipr.c
+++ b/drivers/scsi/ipr.c
@@ -6308,7 +6308,6 @@ static int ipr_reset_restore_cfg_space(struct ipr_cmnd *ipr_cmd)
6308 int rc; 6308 int rc;
6309 6309
6310 ENTER; 6310 ENTER;
6311 pci_unblock_user_cfg_access(ioa_cfg->pdev);
6312 rc = pci_restore_state(ioa_cfg->pdev); 6311 rc = pci_restore_state(ioa_cfg->pdev);
6313 6312
6314 if (rc != PCIBIOS_SUCCESSFUL) { 6313 if (rc != PCIBIOS_SUCCESSFUL) {
@@ -6349,6 +6348,24 @@ static int ipr_reset_restore_cfg_space(struct ipr_cmnd *ipr_cmd)
6349} 6348}
6350 6349
6351/** 6350/**
6351 * ipr_reset_bist_done - BIST has completed on the adapter.
6352 * @ipr_cmd: ipr command struct
6353 *
6354 * Description: Unblock config space and resume the reset process.
6355 *
6356 * Return value:
6357 * IPR_RC_JOB_CONTINUE
6358 **/
6359static int ipr_reset_bist_done(struct ipr_cmnd *ipr_cmd)
6360{
6361 ENTER;
6362 pci_unblock_user_cfg_access(ipr_cmd->ioa_cfg->pdev);
6363 ipr_cmd->job_step = ipr_reset_restore_cfg_space;
6364 LEAVE;
6365 return IPR_RC_JOB_CONTINUE;
6366}
6367
6368/**
6352 * ipr_reset_start_bist - Run BIST on the adapter. 6369 * ipr_reset_start_bist - Run BIST on the adapter.
6353 * @ipr_cmd: ipr command struct 6370 * @ipr_cmd: ipr command struct
6354 * 6371 *
@@ -6370,7 +6387,7 @@ static int ipr_reset_start_bist(struct ipr_cmnd *ipr_cmd)
6370 ipr_cmd->ioasa.ioasc = cpu_to_be32(IPR_IOASC_PCI_ACCESS_ERROR); 6387 ipr_cmd->ioasa.ioasc = cpu_to_be32(IPR_IOASC_PCI_ACCESS_ERROR);
6371 rc = IPR_RC_JOB_CONTINUE; 6388 rc = IPR_RC_JOB_CONTINUE;
6372 } else { 6389 } else {
6373 ipr_cmd->job_step = ipr_reset_restore_cfg_space; 6390 ipr_cmd->job_step = ipr_reset_bist_done;
6374 ipr_reset_start_timer(ipr_cmd, IPR_WAIT_FOR_BIST_TIMEOUT); 6391 ipr_reset_start_timer(ipr_cmd, IPR_WAIT_FOR_BIST_TIMEOUT);
6375 rc = IPR_RC_JOB_RETURN; 6392 rc = IPR_RC_JOB_RETURN;
6376 } 6393 }