All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Anand <anandkumar_santhanam@pmc-sierra.com>
Cc: linux-scsi@vger.kernel.org, Harry.Yang@pmcs.com,
	Vishwanath.Maram@pmcs.com, sakthivel.sk@hcl.com,
	rich.Bono@pmcs.com, Sangeetha.Gnanasekaran@pmcs.com
Subject: Re: [PATCH V4 2/12] pm80xx: Added SPCv/ve specific ids, variables and modify for SPC
Date: Thu, 02 May 2013 15:12:24 -0700	[thread overview]
Message-ID: <1367532744.3133.13.camel@dabdike> (raw)
In-Reply-To: <51703A99.5030605@pmc-sierra.com>

On Thu, 2013-04-18 at 11:25 -0700, Anand wrote:
> >From 6e057b9cd46d2f0f1838cf727bf8c0abc6a7b399 Mon Sep 17 00:00:00 2001
> From: Sakthivel K <Sakthivel.SaravananKamalRaju@pmcs.com>
> Date: Wed, 17 Apr 2013 16:26:36 +0530
> Subject: [PATCH V4 2/12] pm80xx: Added SPCv/ve specific ids, variables and modify for SPC
> 
> Updated pci id table with device, vendor, subdevice and subvendor ids
> for 8081, 8088, 8089 SAS/SATA controllers. Added SPCv/ve related macros.
> Updated macros, hba info structure and other structures for SPCv/ve.
> Update of structure and variable names for SPC hardware functionalities.
> 
> Signed-off-by: Sakthivel K <Sakthivel.SaravananKamalRaju@pmcs.com>
> Signed-off-by: Anand Kumar S <AnandKumar.Santhanam@pmcs.com>
> Ack-by: Jack Wang <jack_wang@usish.com>
> Ack-by:  Hannes Reinecke <hare@suse.de>

I think this should be Acked-by: and Reviewed-by: respectively

[...]
> diff --git a/drivers/scsi/pm8001/pm8001_hwi.c b/drivers/scsi/pm8001/pm8001_hwi.c
> index b8dd050..dc45fdc 100644
> --- a/drivers/scsi/pm8001/pm8001_hwi.c
> +++ b/drivers/scsi/pm8001/pm8001_hwi.c
> @@ -50,32 +50,39 @@
>  static void read_main_config_table(struct pm8001_hba_info *pm8001_ha)
>  {
>  	void __iomem *address = pm8001_ha->main_cfg_tbl_addr;
> -	pm8001_ha->main_cfg_tbl.signature	= pm8001_mr32(address, 0x00);
> -	pm8001_ha->main_cfg_tbl.interface_rev	= pm8001_mr32(address, 0x04);
> -	pm8001_ha->main_cfg_tbl.firmware_rev	= pm8001_mr32(address, 0x08);
> -	pm8001_ha->main_cfg_tbl.max_out_io	= pm8001_mr32(address, 0x0C);
> -	pm8001_ha->main_cfg_tbl.max_sgl		= pm8001_mr32(address, 0x10);
> -	pm8001_ha->main_cfg_tbl.ctrl_cap_flag	= pm8001_mr32(address, 0x14);
> -	pm8001_ha->main_cfg_tbl.gst_offset	= pm8001_mr32(address, 0x18);
> -	pm8001_ha->main_cfg_tbl.inbound_queue_offset =
> +	pm8001_ha->main_cfg_tbl.pm8001_tbl.signature	=
> +				pm8001_mr32(address, 0x00);
> +	pm8001_ha->main_cfg_tbl.pm8001_tbl.interface_rev =
> +				pm8001_mr32(address, 0x04);
> +	pm8001_ha->main_cfg_tbl.pm8001_tbl.firmware_rev	=
> +				pm8001_mr32(address, 0x08);
> +	pm8001_ha->main_cfg_tbl.pm8001_tbl.max_out_io	=
> +				pm8001_mr32(address, 0x0C);
> +	pm8001_ha->main_cfg_tbl.pm8001_tbl.max_sgl	=
> +				pm8001_mr32(address, 0x10);
> +	pm8001_ha->main_cfg_tbl.pm8001_tbl.ctrl_cap_flag =
> +				pm8001_mr32(address, 0x14);
> +	pm8001_ha->main_cfg_tbl.pm8001_tbl.gst_offset	=
> +				pm8001_mr32(address, 0x18);
> +	pm8001_ha->main_cfg_tbl.pm8001_tbl.inbound_queue_offset =
>  		pm8001_mr32(address, MAIN_IBQ_OFFSET);
> -	pm8001_ha->main_cfg_tbl.outbound_queue_offset =
> +	pm8001_ha->main_cfg_tbl.pm8001_tbl.outbound_queue_offset =
>  		pm8001_mr32(address, MAIN_OBQ_OFFSET);
> -	pm8001_ha->main_cfg_tbl.hda_mode_flag	=
> +	pm8001_ha->main_cfg_tbl.pm8001_tbl.hda_mode_flag	=
>  		pm8001_mr32(address, MAIN_HDA_FLAGS_OFFSET);
>  
>  	/* read analog Setting offset from the configuration table */
> -	pm8001_ha->main_cfg_tbl.anolog_setup_table_offset =
> +	pm8001_ha->main_cfg_tbl.pm8001_tbl.anolog_setup_table_offset =
>  		pm8001_mr32(address, MAIN_ANALOG_SETUP_OFFSET);
>  
>  	/* read Error Dump Offset and Length */
> -	pm8001_ha->main_cfg_tbl.fatal_err_dump_offset0 =
> +	pm8001_ha->main_cfg_tbl.pm8001_tbl.fatal_err_dump_offset0 =
>  		pm8001_mr32(address, MAIN_FATAL_ERROR_RDUMP0_OFFSET);
> -	pm8001_ha->main_cfg_tbl.fatal_err_dump_length0 =
> +	pm8001_ha->main_cfg_tbl.pm8001_tbl.fatal_err_dump_length0 =
>  		pm8001_mr32(address, MAIN_FATAL_ERROR_RDUMP0_LENGTH);
> -	pm8001_ha->main_cfg_tbl.fatal_err_dump_offset1 =
> +	pm8001_ha->main_cfg_tbl.pm8001_tbl.fatal_err_dump_offset1 =
>  		pm8001_mr32(address, MAIN_FATAL_ERROR_RDUMP1_OFFSET);
> -	pm8001_ha->main_cfg_tbl.fatal_err_dump_length1 =
> +	pm8001_ha->main_cfg_tbl.pm8001_tbl.fatal_err_dump_length1 =
>  		pm8001_mr32(address, MAIN_FATAL_ERROR_RDUMP1_LENGTH);
>  }
>  
> @@ -86,31 +93,56 @@ static void read_main_config_table(struct pm8001_hba_info *pm8001_ha)
>  static void read_general_status_table(struct pm8001_hba_info *pm8001_ha)
>  {
>  	void __iomem *address = pm8001_ha->general_stat_tbl_addr;
> -	pm8001_ha->gs_tbl.gst_len_mpistate	= pm8001_mr32(address, 0x00);
> -	pm8001_ha->gs_tbl.iq_freeze_state0	= pm8001_mr32(address, 0x04);
> -	pm8001_ha->gs_tbl.iq_freeze_state1	= pm8001_mr32(address, 0x08);
> -	pm8001_ha->gs_tbl.msgu_tcnt		= pm8001_mr32(address, 0x0C);
> -	pm8001_ha->gs_tbl.iop_tcnt		= pm8001_mr32(address, 0x10);
> -	pm8001_ha->gs_tbl.reserved		= pm8001_mr32(address, 0x14);
> -	pm8001_ha->gs_tbl.phy_state[0]	= pm8001_mr32(address, 0x18);
> -	pm8001_ha->gs_tbl.phy_state[1]	= pm8001_mr32(address, 0x1C);
> -	pm8001_ha->gs_tbl.phy_state[2]	= pm8001_mr32(address, 0x20);
> -	pm8001_ha->gs_tbl.phy_state[3]	= pm8001_mr32(address, 0x24);
> -	pm8001_ha->gs_tbl.phy_state[4]	= pm8001_mr32(address, 0x28);
> -	pm8001_ha->gs_tbl.phy_state[5]	= pm8001_mr32(address, 0x2C);
> -	pm8001_ha->gs_tbl.phy_state[6]	= pm8001_mr32(address, 0x30);
> -	pm8001_ha->gs_tbl.phy_state[7]	= pm8001_mr32(address, 0x34);
> -	pm8001_ha->gs_tbl.reserved1		= pm8001_mr32(address, 0x38);
> -	pm8001_ha->gs_tbl.reserved2		= pm8001_mr32(address, 0x3C);
> -	pm8001_ha->gs_tbl.reserved3		= pm8001_mr32(address, 0x40);
> -	pm8001_ha->gs_tbl.recover_err_info[0]	= pm8001_mr32(address, 0x44);
> -	pm8001_ha->gs_tbl.recover_err_info[1]	= pm8001_mr32(address, 0x48);
> -	pm8001_ha->gs_tbl.recover_err_info[2]	= pm8001_mr32(address, 0x4C);
> -	pm8001_ha->gs_tbl.recover_err_info[3]	= pm8001_mr32(address, 0x50);
> -	pm8001_ha->gs_tbl.recover_err_info[4]	= pm8001_mr32(address, 0x54);
> -	pm8001_ha->gs_tbl.recover_err_info[5]	= pm8001_mr32(address, 0x58);
> -	pm8001_ha->gs_tbl.recover_err_info[6]	= pm8001_mr32(address, 0x5C);
> -	pm8001_ha->gs_tbl.recover_err_info[7]	= pm8001_mr32(address, 0x60);
> +	pm8001_ha->gs_tbl.pm8001_tbl.gst_len_mpistate	=
> +				pm8001_mr32(address, 0x00);
> +	pm8001_ha->gs_tbl.pm8001_tbl.iq_freeze_state0	=
> +				pm8001_mr32(address, 0x04);
> +	pm8001_ha->gs_tbl.pm8001_tbl.iq_freeze_state1	=
> +				pm8001_mr32(address, 0x08);
> +	pm8001_ha->gs_tbl.pm8001_tbl.msgu_tcnt		=
> +				pm8001_mr32(address, 0x0C);
> +	pm8001_ha->gs_tbl.pm8001_tbl.iop_tcnt		=
> +				pm8001_mr32(address, 0x10);
> +	pm8001_ha->gs_tbl.pm8001_tbl.rsvd		=
> +				pm8001_mr32(address, 0x14);
> +	pm8001_ha->gs_tbl.pm8001_tbl.phy_state[0]	=
> +				pm8001_mr32(address, 0x18);
> +	pm8001_ha->gs_tbl.pm8001_tbl.phy_state[1]	=
> +				pm8001_mr32(address, 0x1C);
> +	pm8001_ha->gs_tbl.pm8001_tbl.phy_state[2]	=
> +				pm8001_mr32(address, 0x20);
> +	pm8001_ha->gs_tbl.pm8001_tbl.phy_state[3]	=
> +				pm8001_mr32(address, 0x24);
> +	pm8001_ha->gs_tbl.pm8001_tbl.phy_state[4]	=
> +				pm8001_mr32(address, 0x28);
> +	pm8001_ha->gs_tbl.pm8001_tbl.phy_state[5]	=
> +				pm8001_mr32(address, 0x2C);
> +	pm8001_ha->gs_tbl.pm8001_tbl.phy_state[6]	=
> +				pm8001_mr32(address, 0x30);
> +	pm8001_ha->gs_tbl.pm8001_tbl.phy_state[7]	=
> +				pm8001_mr32(address, 0x34);
> +	pm8001_ha->gs_tbl.pm8001_tbl.rsvd1[0]		=
> +				pm8001_mr32(address, 0x38);
> +	pm8001_ha->gs_tbl.pm8001_tbl.rsvd1[1]		=
> +				pm8001_mr32(address, 0x3C);
> +	pm8001_ha->gs_tbl.pm8001_tbl.rsvd1[2]		=
> +				pm8001_mr32(address, 0x40);

The compiler doesn't like this bit:

drivers/scsi/pm8001/pm8001_hwi.c: In function ‘pm8001_chip_init’:
drivers/scsi/pm8001/pm8001_hwi.c:128:36: warning: array subscript is
above array bounds [-Warray-bounds]

And it's clearly right: the resvd1[] array only has two elements in
pm8001_sas.h, so  Either the array has to grow or something else needs
fixing in here.

James


--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2013-05-02 22:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-18 18:25 [PATCH V4 2/12] pm80xx: Added SPCv/ve specific ids, variables and modify for SPC Anand
2013-05-02 22:12 ` James Bottomley [this message]
2013-05-03  2:26   ` Anand Kumar Santhanam
2013-05-03  5:59     ` James Bottomley
2013-05-06 16:48       ` Anand Kumar Santhanam
2013-05-06 18:27         ` James Bottomley

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=1367532744.3133.13.camel@dabdike \
    --to=james.bottomley@hansenpartnership.com \
    --cc=Harry.Yang@pmcs.com \
    --cc=Sangeetha.Gnanasekaran@pmcs.com \
    --cc=Vishwanath.Maram@pmcs.com \
    --cc=anandkumar_santhanam@pmc-sierra.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=rich.Bono@pmcs.com \
    --cc=sakthivel.sk@hcl.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.