Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 168693
b: refs/heads/master
c: 3feeb89
h: refs/heads/master
i:
  168691: 4a04988
v: v3
  • Loading branch information
Wayne Boyer authored and James Bottomley committed Nov 6, 2009
1 parent 25ead31 commit fa49f6b
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 10 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: 61ec33eb7d8e1e94a93a8243238dc5f9a183001a
refs/heads/master: 3feeb89d40cc0ab3777f12571509b23da466105c
42 changes: 33 additions & 9 deletions trunk/drivers/scsi/ipr.c
Original file line number Diff line number Diff line change
Expand Up @@ -4188,6 +4188,25 @@ static irqreturn_t ipr_handle_other_interrupt(struct ipr_ioa_cfg *ioa_cfg,
return rc;
}

/**
* ipr_isr_eh - Interrupt service routine error handler
* @ioa_cfg: ioa config struct
* @msg: message to log
*
* Return value:
* none
**/
static void ipr_isr_eh(struct ipr_ioa_cfg *ioa_cfg, char *msg)
{
ioa_cfg->errors_logged++;
dev_err(&ioa_cfg->pdev->dev, "%s\n", msg);

if (WAIT_FOR_DUMP == ioa_cfg->sdt_state)
ioa_cfg->sdt_state = GET_DUMP;

ipr_initiate_ioa_reset(ioa_cfg, IPR_SHUTDOWN_NONE);
}

/**
* ipr_isr - Interrupt service routine
* @irq: irq number
Expand All @@ -4203,6 +4222,7 @@ static irqreturn_t ipr_isr(int irq, void *devp)
volatile u32 int_reg, int_mask_reg;
u32 ioasc;
u16 cmd_index;
int num_hrrq = 0;
struct ipr_cmnd *ipr_cmd;
irqreturn_t rc = IRQ_NONE;

Expand Down Expand Up @@ -4233,13 +4253,7 @@ static irqreturn_t ipr_isr(int irq, void *devp)
IPR_HRRQ_REQ_RESP_HANDLE_MASK) >> IPR_HRRQ_REQ_RESP_HANDLE_SHIFT;

if (unlikely(cmd_index >= IPR_NUM_CMD_BLKS)) {
ioa_cfg->errors_logged++;
dev_err(&ioa_cfg->pdev->dev, "Invalid response handle from IOA\n");

if (WAIT_FOR_DUMP == ioa_cfg->sdt_state)
ioa_cfg->sdt_state = GET_DUMP;

ipr_initiate_ioa_reset(ioa_cfg, IPR_SHUTDOWN_NONE);
ipr_isr_eh(ioa_cfg, "Invalid response handle from IOA");
spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags);
return IRQ_HANDLED;
}
Expand All @@ -4266,8 +4280,18 @@ static irqreturn_t ipr_isr(int irq, void *devp)

if (ipr_cmd != NULL) {
/* Clear the PCI interrupt */
writel(IPR_PCII_HRRQ_UPDATED, ioa_cfg->regs.clr_interrupt_reg);
int_reg = readl(ioa_cfg->regs.sense_interrupt_reg) & ~int_mask_reg;
do {
writel(IPR_PCII_HRRQ_UPDATED, ioa_cfg->regs.clr_interrupt_reg);
int_reg = readl(ioa_cfg->regs.sense_interrupt_reg) & ~int_mask_reg;
} while (int_reg & IPR_PCII_HRRQ_UPDATED &&
num_hrrq++ < IPR_MAX_HRRQ_RETRIES);

if (int_reg & IPR_PCII_HRRQ_UPDATED) {
ipr_isr_eh(ioa_cfg, "Error clearing HRRQ");
spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags);
return IRQ_HANDLED;
}

} else
break;
}
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/scsi/ipr.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@
#define IPR_IOA_MAX_SECTORS 32767
#define IPR_VSET_MAX_SECTORS 512
#define IPR_MAX_CDB_LEN 16
#define IPR_MAX_HRRQ_RETRIES 3

#define IPR_DEFAULT_BUS_WIDTH 16
#define IPR_80MBs_SCSI_RATE ((80 * 10) / (IPR_DEFAULT_BUS_WIDTH / 8))
Expand Down

0 comments on commit fa49f6b

Please sign in to comment.