From: Wayne Boyer <wayneb@linux.vnet.ibm.com>
To: James Bottomley <James.Bottomley@suse.de>
Cc: linux-scsi <linux-scsi@vger.kernel.org>,
Brian King <brking@linux.vnet.ibm.com>
Subject: [PATCH 3/3] ipr: fix a register read to use the correct address for 64 bit adapters
Date: Mon, 10 May 2010 09:14:07 -0700 [thread overview]
Message-ID: <4BE830CF.1090603@linux.vnet.ibm.com> (raw)
In-Reply-To: <20100510160631.899608040@linux.vnet.ibm.com>
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>
---
drivers/scsi/ipr.c | 12 ++++++++----
drivers/scsi/ipr.h | 2 +-
2 files changed, 9 insertions(+), 5 deletions(-)
Index: b/drivers/scsi/ipr.c
===================================================================
--- a/drivers/scsi/ipr.c 2010-05-07 09:46:11.000000000 -0700
+++ b/drivers/scsi/ipr.c 2010-05-07 09:46:12.000000000 -0700
@@ -7184,13 +7184,14 @@ static int ipr_reset_enable_ioa(struct i
{
struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
volatile u32 int_reg;
+ volatile u64 maskval;
ENTER;
ipr_cmd->job_step = ipr_ioafp_identify_hrrq;
ipr_init_ioa_mem(ioa_cfg);
ioa_cfg->allow_interrupts = 1;
- int_reg = readl(ioa_cfg->regs.sense_interrupt_reg);
+ int_reg = readl(ioa_cfg->regs.sense_interrupt_reg32);
if (int_reg & IPR_PCII_IOA_TRANS_TO_OPER) {
writel((IPR_PCII_ERROR_INTERRUPTS | IPR_PCII_HRRQ_UPDATED),
@@ -7202,9 +7203,12 @@ static int ipr_reset_enable_ioa(struct i
/* Enable destructive diagnostics on IOA */
writel(ioa_cfg->doorbell, ioa_cfg->regs.set_uproc_interrupt_reg32);
- writel(IPR_PCII_OPER_INTERRUPTS, ioa_cfg->regs.clr_interrupt_mask_reg32);
- if (ioa_cfg->sis64)
- writel(IPR_PCII_IPL_STAGE_CHANGE, ioa_cfg->regs.clr_interrupt_mask_reg);
+ if (ioa_cfg->sis64) {
+ maskval = IPR_PCII_IPL_STAGE_CHANGE;
+ maskval = (maskval << 32) | IPR_PCII_OPER_INTERRUPTS;
+ writeq(maskval, ioa_cfg->regs.clr_interrupt_mask_reg);
+ } else
+ writel(IPR_PCII_OPER_INTERRUPTS, ioa_cfg->regs.clr_interrupt_mask_reg32);
int_reg = readl(ioa_cfg->regs.sense_interrupt_mask_reg);
Index: b/drivers/scsi/ipr.h
===================================================================
--- a/drivers/scsi/ipr.h 2010-05-07 09:46:11.000000000 -0700
+++ b/drivers/scsi/ipr.h 2010-05-07 09:46:12.000000000 -0700
@@ -1201,7 +1201,7 @@ struct ipr_resource_entry {
u8 flags;
__be16 res_flags;
- __be32 type;
+ u8 type;
u8 qmodel;
struct ipr_std_inq_data std_inq_data;
next prev parent reply other threads:[~2010-05-10 16:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20100510160631.899608040@linux.vnet.ibm.com>
2010-05-10 16:13 ` [PATCH 1/3] ipr: implement fixes for 64 bit adapter support Wayne Boyer
2010-05-10 16:15 ` Brian King
2010-05-10 16:13 ` [PATCH 2/3] ipr: include the resource path in the IOA status area structure Wayne Boyer
2010-05-10 16:20 ` Brian King
2010-05-10 16:14 ` Wayne Boyer [this message]
2010-05-10 16:21 ` [PATCH 3/3] ipr: fix a register read to use the correct address for 64 bit adapters Brian King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4BE830CF.1090603@linux.vnet.ibm.com \
--to=wayneb@linux.vnet.ibm.com \
--cc=James.Bottomley@suse.de \
--cc=brking@linux.vnet.ibm.com \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).