linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Brian King <brking@linux.vnet.ibm.com>
To: Wayne Boyer <wayneb@linux.vnet.ibm.com>
Cc: James Bottomley <James.Bottomley@suse.de>,
	linux-scsi <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH 1/3] ipr: implement fixes for 64 bit adapter support
Date: Mon, 10 May 2010 11:15:06 -0500	[thread overview]
Message-ID: <4BE8310A.108@linux.vnet.ibm.com> (raw)
In-Reply-To: <4BE8308C.7070904@linux.vnet.ibm.com>

Acked-by: Brian King <brking@linux.vnet.ibm.com>

On 05/10/2010 11:13 AM, Wayne Boyer wrote:
> Implement some small fixes for 64 bit support that were preventing
> the adapter from becoming operational.
> 
> Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com>
> ---
> 
>  drivers/scsi/ipr.c |   13 +++++++++----
>  drivers/scsi/ipr.h |    3 ++-
>  2 files changed, 11 insertions(+), 5 deletions(-)
> 
> Index: b/drivers/scsi/ipr.c
> ===================================================================
> --- a/drivers/scsi/ipr.c	2010-05-03 14:18:27.000000000 -0700
> +++ b/drivers/scsi/ipr.c	2010-05-07 09:36:44.000000000 -0700
> @@ -1040,7 +1040,7 @@ static void ipr_init_res_entry(struct ip
>  		proto = cfgtew->u.cfgte64->proto;
>  		res->res_flags = cfgtew->u.cfgte64->res_flags;
>  		res->qmodel = IPR_QUEUEING_MODEL64(res);
> -		res->type = cfgtew->u.cfgte64->res_type & 0x0f;
> +		res->type = cfgtew->u.cfgte64->res_type;
> 
>  		memcpy(res->res_path, &cfgtew->u.cfgte64->res_path,
>  			sizeof(res->res_path));
> @@ -5011,6 +5011,8 @@ static int ipr_build_ioadl64(struct ipr_
> 
>  	ipr_cmd->dma_use_sg = nseg;
> 
> +	ioarcb->data_transfer_length = cpu_to_be32(length);
> +
>  	if (scsi_cmd->sc_data_direction == DMA_TO_DEVICE) {
>  		ioadl_flags = IPR_IOADL_FLAGS_WRITE;
>  		ioarcb->cmd_pkt.flags_hi |= IPR_FLAGS_HI_WRITE_NOT_READ;
> @@ -6703,7 +6705,7 @@ static int ipr_init_res_table(struct ipr
>  		list_move_tail(&res->queue, &old_res);
> 
>  	if (ioa_cfg->sis64)
> -		entries = ioa_cfg->u.cfg_table64->hdr64.num_entries;
> +		entries = be16_to_cpu(ioa_cfg->u.cfg_table64->hdr64.num_entries);
>  	else
>  		entries = ioa_cfg->u.cfg_table->hdr.num_entries;
> 
> @@ -6789,6 +6791,7 @@ static int ipr_ioafp_query_ioa_cfg(struc
>  	ioarcb->res_handle = cpu_to_be32(IPR_IOA_RES_HANDLE);
> 
>  	ioarcb->cmd_pkt.cdb[0] = IPR_QUERY_IOA_CONFIG;
> +	ioarcb->cmd_pkt.cdb[6] = (ioa_cfg->cfg_table_size >> 16) & 0xff;
>  	ioarcb->cmd_pkt.cdb[7] = (ioa_cfg->cfg_table_size >> 8) & 0xff;
>  	ioarcb->cmd_pkt.cdb[8] = ioa_cfg->cfg_table_size & 0xff;
> 
> @@ -7119,7 +7122,9 @@ static int ipr_reset_next_stage(struct i
>  	ipr_dbg("IPL stage = 0x%lx, IPL stage time = %ld\n", stage, stage_time);
> 
>  	/* sanity check the stage_time value */
> -	if (stage_time < IPR_IPL_INIT_MIN_STAGE_TIME)
> +	if (stage_time == 0)
> +		stage_time = IPR_IPL_INIT_DEFAULT_STAGE_TIME;
> +	else if (stage_time < IPR_IPL_INIT_MIN_STAGE_TIME)
>  		stage_time = IPR_IPL_INIT_MIN_STAGE_TIME;
>  	else if (stage_time > IPR_LONG_OPERATIONAL_TIMEOUT)
>  		stage_time = IPR_LONG_OPERATIONAL_TIMEOUT;
> @@ -7361,7 +7366,7 @@ static int ipr_reset_restore_cfg_space(s
>  		}
>  	}
> 
> -	ENTER;
> +	LEAVE;
>  	return IPR_RC_JOB_CONTINUE;
>  }
> 
> Index: b/drivers/scsi/ipr.h
> ===================================================================
> --- a/drivers/scsi/ipr.h	2010-05-03 14:18:27.000000000 -0700
> +++ b/drivers/scsi/ipr.h	2010-05-07 09:36:44.000000000 -0700
> @@ -244,6 +244,7 @@
>  #define IPR_RUNTIME_RESET				0x40000000
> 
>  #define IPR_IPL_INIT_MIN_STAGE_TIME			5
> +#define IPR_IPL_INIT_DEFAULT_STAGE_TIME                 15
>  #define IPR_IPL_INIT_STAGE_UNKNOWN			0x0
>  #define IPR_IPL_INIT_STAGE_TRANSOP			0xB0000000
>  #define IPR_IPL_INIT_STAGE_MASK				0xff000000
> @@ -804,7 +805,7 @@ struct ipr_hostrcb_array_data_entry_enha
>  }__attribute__((packed, aligned (4)));
> 
>  struct ipr_hostrcb_type_ff_error {
> -	__be32 ioa_data[502];
> +	__be32 ioa_data[758];
>  }__attribute__((packed, aligned (4)));
> 
>  struct ipr_hostrcb_type_01_error {
> 


-- 
Brian King
Linux on Power Virtualization
IBM Linux Technology Center

  reply	other threads:[~2010-05-10 16:15 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 [this message]
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 ` [PATCH 3/3] ipr: fix a register read to use the correct address for 64 bit adapters Wayne Boyer
2010-05-10 16:21   ` 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=4BE8310A.108@linux.vnet.ibm.com \
    --to=brking@linux.vnet.ibm.com \
    --cc=James.Bottomley@suse.de \
    --cc=linux-scsi@vger.kernel.org \
    --cc=wayneb@linux.vnet.ibm.com \
    /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).