Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 226750
b: refs/heads/master
c: 110def8
h: refs/heads/master
v: v3
  • Loading branch information
Wayne Boyer authored and James Bottomley committed Dec 21, 2010
1 parent d137f81 commit d2879e3
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0cb992eda1f7e7672775032378690baa87c0e13d
refs/heads/master: 110def851fc823bb1a4584cb6308e30e5ffb3e05
47 changes: 41 additions & 6 deletions trunk/drivers/scsi/ipr.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ static const struct ipr_chip_cfg_t ipr_chip_cfg[] = {
}
},
{ /* CRoC */
.mailbox = 0x00040,
.mailbox = 0x00044,
.cache_line_size = 0x20,
{
.set_interrupt_mask_reg = 0x00010,
Expand Down Expand Up @@ -2900,6 +2900,12 @@ static void ipr_get_ioa_dump(struct ipr_ioa_cfg *ioa_cfg, struct ipr_dump *dump)
return;
}

if (ioa_cfg->sis64) {
spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags);
ssleep(IPR_DUMP_DELAY_SECONDS);
spin_lock_irqsave(ioa_cfg->host->host_lock, lock_flags);
}

start_addr = readl(ioa_cfg->ioa_mailbox);

if (!ioa_cfg->sis64 && !ipr_sdt_is_fmt2(start_addr)) {
Expand Down Expand Up @@ -7471,6 +7477,29 @@ static void ipr_get_unit_check_buffer(struct ipr_ioa_cfg *ioa_cfg)
list_add_tail(&hostrcb->queue, &ioa_cfg->hostrcb_free_q);
}

/**
* ipr_reset_get_unit_check_job - Call to get the unit check buffer.
* @ipr_cmd: ipr command struct
*
* Description: This function will call to get the unit check buffer.
*
* Return value:
* IPR_RC_JOB_RETURN
**/
static int ipr_reset_get_unit_check_job(struct ipr_cmnd *ipr_cmd)
{
struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;

ENTER;
ioa_cfg->ioa_unit_checked = 0;
ipr_get_unit_check_buffer(ioa_cfg);
ipr_cmd->job_step = ipr_reset_alert;
ipr_reset_start_timer(ipr_cmd, 0);

LEAVE;
return IPR_RC_JOB_RETURN;
}

/**
* ipr_reset_restore_cfg_space - Restore PCI config space.
* @ipr_cmd: ipr command struct
Expand Down Expand Up @@ -7511,11 +7540,17 @@ static int ipr_reset_restore_cfg_space(struct ipr_cmnd *ipr_cmd)
}

if (ioa_cfg->ioa_unit_checked) {
ioa_cfg->ioa_unit_checked = 0;
ipr_get_unit_check_buffer(ioa_cfg);
ipr_cmd->job_step = ipr_reset_alert;
ipr_reset_start_timer(ipr_cmd, 0);
return IPR_RC_JOB_RETURN;
if (ioa_cfg->sis64) {
ipr_cmd->job_step = ipr_reset_get_unit_check_job;
ipr_reset_start_timer(ipr_cmd, IPR_DUMP_DELAY_TIMEOUT);
return IPR_RC_JOB_RETURN;
} else {
ioa_cfg->ioa_unit_checked = 0;
ipr_get_unit_check_buffer(ioa_cfg);
ipr_cmd->job_step = ipr_reset_alert;
ipr_reset_start_timer(ipr_cmd, 0);
return IPR_RC_JOB_RETURN;
}
}

if (ioa_cfg->in_ioa_bringdown) {
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/scsi/ipr.h
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,8 @@
#define IPR_WAIT_FOR_BIST_TIMEOUT (2 * HZ)
#define IPR_PCI_RESET_TIMEOUT (HZ / 2)
#define IPR_DUMP_TIMEOUT (15 * HZ)
#define IPR_DUMP_DELAY_SECONDS 4
#define IPR_DUMP_DELAY_TIMEOUT (IPR_DUMP_DELAY_SECONDS * HZ)

/*
* SCSI Literals
Expand Down

0 comments on commit d2879e3

Please sign in to comment.