aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWayne Boyer <wayneb@linux.vnet.ibm.com>2010-05-10 12:14:07 -0400
committerJames Bottomley <James.Bottomley@suse.de>2010-05-24 12:11:05 -0400
commit7be96900a2a662c67403559acd250f011b1d70db (patch)
treef7d3aa2ffb317f35fea7e37dd0982bb140dde3c9
parent96d21f00ab59c9f27fad191d12a2ccfeff3c9108 (diff)
[SCSI] ipr: fix a register read to use the correct address for 64 bit adapters
Fix ipr_reset_enable_ioa() to read the correct IOA to host interrupt register address for 64 bit adapters. We need to read the lower 32 bits, not the upper 32 bits. Also change the write of the 64 bit mask value to a single writeq instead of two writel calls. Finally, use the correct u8 type for the type field in the ipr_resource_entry structure. Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com> Acked-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
-rw-r--r--drivers/scsi/ipr.c12
-rw-r--r--drivers/scsi/ipr.h2
2 files changed, 9 insertions, 5 deletions
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
index 8c2f4c4041c1..2f280d08fcc6 100644
--- a/drivers/scsi/ipr.c
+++ b/drivers/scsi/ipr.c
@@ -7187,13 +7187,14 @@ static int ipr_reset_enable_ioa(struct ipr_cmnd *ipr_cmd)
7187{ 7187{
7188 struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg; 7188 struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
7189 volatile u32 int_reg; 7189 volatile u32 int_reg;
7190 volatile u64 maskval;
7190 7191
7191 ENTER; 7192 ENTER;
7192 ipr_cmd->job_step = ipr_ioafp_identify_hrrq; 7193 ipr_cmd->job_step = ipr_ioafp_identify_hrrq;
7193 ipr_init_ioa_mem(ioa_cfg); 7194 ipr_init_ioa_mem(ioa_cfg);
7194 7195
7195 ioa_cfg->allow_interrupts = 1; 7196 ioa_cfg->allow_interrupts = 1;
7196 int_reg = readl(ioa_cfg->regs.sense_interrupt_reg); 7197 int_reg = readl(ioa_cfg->regs.sense_interrupt_reg32);
7197 7198
7198 if (int_reg & IPR_PCII_IOA_TRANS_TO_OPER) { 7199 if (int_reg & IPR_PCII_IOA_TRANS_TO_OPER) {
7199 writel((IPR_PCII_ERROR_INTERRUPTS | IPR_PCII_HRRQ_UPDATED), 7200 writel((IPR_PCII_ERROR_INTERRUPTS | IPR_PCII_HRRQ_UPDATED),
@@ -7205,9 +7206,12 @@ static int ipr_reset_enable_ioa(struct ipr_cmnd *ipr_cmd)
7205 /* Enable destructive diagnostics on IOA */ 7206 /* Enable destructive diagnostics on IOA */
7206 writel(ioa_cfg->doorbell, ioa_cfg->regs.set_uproc_interrupt_reg32); 7207 writel(ioa_cfg->doorbell, ioa_cfg->regs.set_uproc_interrupt_reg32);
7207 7208
7208 writel(IPR_PCII_OPER_INTERRUPTS, ioa_cfg->regs.clr_interrupt_mask_reg32); 7209 if (ioa_cfg->sis64) {
7209 if (ioa_cfg->sis64) 7210 maskval = IPR_PCII_IPL_STAGE_CHANGE;
7210 writel(IPR_PCII_IPL_STAGE_CHANGE, ioa_cfg->regs.clr_interrupt_mask_reg); 7211 maskval = (maskval << 32) | IPR_PCII_OPER_INTERRUPTS;
7212 writeq(maskval, ioa_cfg->regs.clr_interrupt_mask_reg);
7213 } else
7214 writel(IPR_PCII_OPER_INTERRUPTS, ioa_cfg->regs.clr_interrupt_mask_reg32);
7211 7215
7212 int_reg = readl(ioa_cfg->regs.sense_interrupt_mask_reg); 7216 int_reg = readl(ioa_cfg->regs.sense_interrupt_mask_reg);
7213 7217
diff --git a/drivers/scsi/ipr.h b/drivers/scsi/ipr.h
index f8a17d88db84..9ecd2259eb39 100644
--- a/drivers/scsi/ipr.h
+++ b/drivers/scsi/ipr.h
@@ -1201,7 +1201,7 @@ struct ipr_resource_entry {
1201 u8 flags; 1201 u8 flags;
1202 __be16 res_flags; 1202 __be16 res_flags;
1203 1203
1204 __be32 type; 1204 u8 type;
1205 1205
1206 u8 qmodel; 1206 u8 qmodel;
1207 struct ipr_std_inq_data std_inq_data; 1207 struct ipr_std_inq_data std_inq_data;