All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sasikumar PC <sasikumar.pc@broadcom.com>
To: Tomas Henzl <thenzl@redhat.com>, jejb@kernel.org, hch@infradead.org
Cc: linux-scsi@vger.kernel.org,
	Sathya Prakash Veerichetty <sathya.prakash@broadcom.com>,
	linux-kernel@vger.kernel.org,
	Christopher Owens <christopher.owens@broadcom.com>,
	Kiran Kumar Kasturi <kiran-kumar.kasturi@broadcom.com>
Subject: RE: [PATCH V4 07/11] megaraid_sas: Add the Support for SAS3.5 Generic Megaraid Controllers Capabilities
Date: Wed, 14 Dec 2016 16:52:19 -0500	[thread overview]
Message-ID: <edea89c4186edd1d9a80583d97154c05@mail.gmail.com> (raw)
In-Reply-To: <a7dab0c3-bca5-0755-3b90-3a60e269e4c5@redhat.com>

Hi Tomas,

Please see my response inline

Thanks
sasi
-----Original Message-----
From: Tomas Henzl [mailto:thenzl@redhat.com]
Sent: Friday, December 09, 2016 8:14 AM
To: Sasikumar Chandrasekaran; jejb@kernel.org; hch@infradead.org
Cc: linux-scsi@vger.kernel.org; Sathya.Prakash@broadcom.com;
linux-kernel@vger.kernel.org; christopher.owens@broadcom.com;
kiran-kumar.kasturi@broadcom.com
Subject: Re: [PATCH V4 07/11] megaraid_sas: Add the Support for SAS3.5
Generic Megaraid Controllers Capabilities

On 7.12.2016 00:00, Sasikumar Chandrasekaran wrote:
> The Megaraid driver has to support the SAS3.5 Generic Megaraid
Controllers Firmware functionality.
>
> This patch is depending on patch 6
>
> Signed-off-by: Sasikumar Chandrasekaran <sasikumar.pc@broadcom.com>
> ---
>  drivers/scsi/megaraid/megaraid_sas_base.c   | 53
++++++++++++++---------------
>  drivers/scsi/megaraid/megaraid_sas_fusion.c | 19 ++++++-----
> drivers/scsi/megaraid/megaraid_sas_fusion.h |  1 +
>  3 files changed, 37 insertions(+), 36 deletions(-)
>
> diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c
> b/drivers/scsi/megaraid/megaraid_sas_base.c
> index 3f06b57..8aafb59 100644
> --- a/drivers/scsi/megaraid/megaraid_sas_base.c
> +++ b/drivers/scsi/megaraid/megaraid_sas_base.c
> @@ -5057,34 +5057,29 @@ static int megasas_init_fw(struct
> megasas_instance *instance)
>
>  	reg_set = instance->reg_set;
>
> -	switch (instance->pdev->device) {
> -	case PCI_DEVICE_ID_LSI_FUSION:
> -	case PCI_DEVICE_ID_LSI_PLASMA:
> -	case PCI_DEVICE_ID_LSI_INVADER:
> -	case PCI_DEVICE_ID_LSI_FURY:
> -	case PCI_DEVICE_ID_LSI_INTRUDER:
> -	case PCI_DEVICE_ID_LSI_INTRUDER_24:
> -	case PCI_DEVICE_ID_LSI_CUTLASS_52:
> -	case PCI_DEVICE_ID_LSI_CUTLASS_53:
> +	if (fusion)
>  		instance->instancet = &megasas_instance_template_fusion;
> -		break;
> -	case PCI_DEVICE_ID_LSI_SAS1078R:
> -	case PCI_DEVICE_ID_LSI_SAS1078DE:
> -		instance->instancet = &megasas_instance_template_ppc;
> -		break;
> -	case PCI_DEVICE_ID_LSI_SAS1078GEN2:
> -	case PCI_DEVICE_ID_LSI_SAS0079GEN2:
> -		instance->instancet = &megasas_instance_template_gen2;
> -		break;
> -	case PCI_DEVICE_ID_LSI_SAS0073SKINNY:
> -	case PCI_DEVICE_ID_LSI_SAS0071SKINNY:
> -		instance->instancet = &megasas_instance_template_skinny;
> -		break;
> -	case PCI_DEVICE_ID_LSI_SAS1064R:
> -	case PCI_DEVICE_ID_DELL_PERC5:
> -	default:
> -		instance->instancet = &megasas_instance_template_xscale;
> -		break;
> +	else {
> +		switch (instance->pdev->device) {
> +		case PCI_DEVICE_ID_LSI_SAS1078R:
> +		case PCI_DEVICE_ID_LSI_SAS1078DE:
> +			instance->instancet =
&megasas_instance_template_ppc;
> +			break;
> +		case PCI_DEVICE_ID_LSI_SAS1078GEN2:
> +		case PCI_DEVICE_ID_LSI_SAS0079GEN2:
> +			instance->instancet =
&megasas_instance_template_gen2;
> +			break;
> +		case PCI_DEVICE_ID_LSI_SAS0073SKINNY:
> +		case PCI_DEVICE_ID_LSI_SAS0071SKINNY:
> +			instance->instancet =
&megasas_instance_template_skinny;
> +			break;
> +		case PCI_DEVICE_ID_LSI_SAS1064R:
> +		case PCI_DEVICE_ID_DELL_PERC5:
> +		default:
> +			instance->instancet =
&megasas_instance_template_xscale;
> +			instance->pd_list_not_supported = 1;
> +			break;
> +		}
>  	}
>
>  	if (megasas_transition_to_ready(instance, 0)) { @@ -5828,7 +5823,9

> @@ static int megasas_probe_one(struct pci_dev *pdev,
>  		if ((instance->pdev->device == PCI_DEVICE_ID_LSI_FUSION)
||
>  			(instance->pdev->device ==
PCI_DEVICE_ID_LSI_PLASMA))
>  			fusion->adapter_type = THUNDERBOLT_SERIES;
> -		else if (!instance->is_ventura)
> +		else if (instance->is_ventura)
> +			fusion->adapter_type = VENTURA_SERIES;
> +		else
>  			fusion->adapter_type = INVADER_SERIES;
>  	}
>  	break;
> diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c
> b/drivers/scsi/megaraid/megaraid_sas_fusion.c
> index 58f86aa..f968a23 100644
> --- a/drivers/scsi/megaraid/megaraid_sas_fusion.c
> +++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c
> @@ -244,7 +244,10 @@ inline void megasas_return_cmd_fusion(struct
> megasas_instance *instance,
>
>  	reg_set = instance->reg_set;
>
> -	cur_max_fw_cmds =
readl(&instance->reg_set->outbound_scratch_pad_3) & 0x00FFFF;
> +	/* ventura FW does not fill outbound_scratch_pad_3 with queue
depth */
> +	if (!instance->is_ventura)
> +		cur_max_fw_cmds =
> +		readl(&instance->reg_set->outbound_scratch_pad_3) &
0x00FFFF;
>
>  	if (dual_qdepth_disable || !cur_max_fw_cmds)

This test connected with the fact that ventura skips reading
cur_max_fw_cmds makes using ventura equal to "dual_qdepth_disable == 1" so
ldio_threshold is not set.
Is that intentional?

Sasi - Yes , ldio_threshold is not applicable for Ventura

tomash

>  		cur_max_fw_cmds =
instance->instancet->read_fw_status_reg(reg_set)
> & 0x00FFFF; @@ -843,7 +846,7 @@ static int
megasas_create_sg_sense_fusion(struct megasas_instance *instance)
>  	drv_ops = (MFI_CAPABILITIES *) &(init_frame->driver_operations);
>
>  	/* driver support Extended MSIX */
> -	if (fusion->adapter_type == INVADER_SERIES)
> +	if (fusion->adapter_type >= INVADER_SERIES)
>  		drv_ops->mfi_capabilities.support_additional_msix = 1;
>  	/* driver supports HA / Remote LUN over Fast Path interface */
>  	drv_ops->mfi_capabilities.support_fp_remote_lun = 1; @@ -1497,7
> +1500,7 @@ static int megasas_create_sg_sense_fusion(struct
> megasas_instance *instance)
>
>  	fusion = instance->ctrl_context;
>
> -	if (fusion->adapter_type == INVADER_SERIES) {
> +	if (fusion->adapter_type >= INVADER_SERIES) {
>  		struct MPI25_IEEE_SGE_CHAIN64 *sgl_ptr_end = sgl_ptr;
>  		sgl_ptr_end += fusion->max_sge_in_main_msg - 1;
>  		sgl_ptr_end->Flags = 0;
> @@ -1514,7 +1517,7 @@ static int megasas_create_sg_sense_fusion(struct
megasas_instance *instance)
>  		sgl_ptr->Length = cpu_to_le32(sg_dma_len(os_sgl));
>  		sgl_ptr->Address = cpu_to_le64(sg_dma_address(os_sgl));
>  		sgl_ptr->Flags = 0;
> -		if (fusion->adapter_type == INVADER_SERIES)
> +		if (fusion->adapter_type >= INVADER_SERIES)
>  			if (i == sge_count - 1)
>  				sgl_ptr->Flags =
IEEE_SGE_FLAGS_END_OF_LIST;
>  		sgl_ptr++;
> @@ -1525,7 +1528,7 @@ static int megasas_create_sg_sense_fusion(struct
megasas_instance *instance)
>  		    (sge_count > fusion->max_sge_in_main_msg)) {
>
>  			struct MPI25_IEEE_SGE_CHAIN64 *sg_chain;
> -			if (fusion->adapter_type == INVADER_SERIES) {
> +			if (fusion->adapter_type >= INVADER_SERIES) {
>  				if ((le16_to_cpu(cmd->io_request->IoFlags)
&
>
MPI25_SAS_DEVICE0_FLAGS_ENABLED_FAST_PATH) !=
>
MPI25_SAS_DEVICE0_FLAGS_ENABLED_FAST_PATH)
> @@ -1541,7 +1544,7 @@ static int megasas_create_sg_sense_fusion(struct
megasas_instance *instance)
>  			sg_chain = sgl_ptr;
>  			/* Prepare chain element */
>  			sg_chain->NextChainOffset = 0;
> -			if (fusion->adapter_type == INVADER_SERIES)
> +			if (fusion->adapter_type >= INVADER_SERIES)
>  				sg_chain->Flags =
IEEE_SGE_FLAGS_CHAIN_ELEMENT;
>  			else
>  				sg_chain->Flags =
> @@ -2292,7 +2295,7 @@ static void megasas_build_ld_nonrw_fusion(struct
megasas_instance *instance,
>  		pRAID_Context->timeout_value =
>  			cpu_to_le16((os_timeout_value > timeout_limit) ?
>  			timeout_limit : os_timeout_value);
> -		if (fusion->adapter_type == INVADER_SERIES)
> +		if (fusion->adapter_type >= INVADER_SERIES)
>  			io_request->IoFlags |=
>
cpu_to_le16(MPI25_SAS_DEVICE0_FLAGS_ENABLED_FAST_PATH);
>
> @@ -3005,7 +3008,7 @@ irqreturn_t megasas_isr_fusion(int irq, void
> *devp)
>
>  	io_req = cmd->io_request;
>
> -	if (fusion->adapter_type == INVADER_SERIES) {
> +	if (fusion->adapter_type >= INVADER_SERIES) {
>  		struct MPI25_IEEE_SGE_CHAIN64 *sgl_ptr_end =
>  			(struct MPI25_IEEE_SGE_CHAIN64 *)&io_req->SGL;
>  		sgl_ptr_end += fusion->max_sge_in_main_msg - 1; diff --git

> a/drivers/scsi/megaraid/megaraid_sas_fusion.h
> b/drivers/scsi/megaraid/megaraid_sas_fusion.h
> index cb42655..c39c4ed 100644
> --- a/drivers/scsi/megaraid/megaraid_sas_fusion.h
> +++ b/drivers/scsi/megaraid/megaraid_sas_fusion.h
> @@ -107,6 +107,7 @@ enum MR_RAID_FLAGS_IO_SUB_TYPE {  enum
> MR_FUSION_ADAPTER_TYPE {
>  	THUNDERBOLT_SERIES = 0,
>  	INVADER_SERIES = 1,
> +	VENTURA_SERIES = 2,
>  };
>
>  /*

  reply	other threads:[~2016-12-14 21:52 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-06 23:00 [PATCH V4 00/11] megaraid_sas: Updates for scsi-next Sasikumar Chandrasekaran
2016-12-06 23:00 ` [PATCH V4 01/11] megaraid_sas: Add new pci device Ids for SAS3.5 Generic Megaraid Controllers Sasikumar Chandrasekaran
2016-12-08 15:17   ` Tomas Henzl
2016-12-06 23:00 ` [PATCH V4 02/11] megaraid_sas: 128 MSIX Support Sasikumar Chandrasekaran
2016-12-08 15:34   ` Tomas Henzl
2016-12-14 21:43     ` Sasikumar PC
2016-12-20  1:50     ` Sasikumar PC
2016-12-20 14:16       ` Tomas Henzl
2016-12-06 23:00 ` [PATCH V4 03/11] megaraid_sas: EEDP Escape Mode Support for SAS3.5 Generic Megaraid Controllers Sasikumar Chandrasekaran
2016-12-08 15:35   ` Tomas Henzl
2016-12-06 23:00 ` [PATCH V4 04/11] megaraid_sas: SAS3.5 Generic Megaraid Controllers Stream Detection and IO Coalescing Sasikumar Chandrasekaran
2016-12-08 16:00   ` Tomas Henzl
2016-12-12 16:38   ` Tomas Henzl
2016-12-14 22:07     ` Sasikumar PC
2016-12-06 23:00 ` [PATCH V4 05/11] megaraid_sas: SAS3.5 Generic Megaraid Controllers Fast Path for RAID 1/10 Writes Sasikumar Chandrasekaran
2016-12-09 10:54   ` Tomas Henzl
2016-12-06 23:00 ` [PATCH V4 06/11] megaraid_sas: Dynamic Raid Map Changes for SAS3.5 Generic Megaraid Controllers Sasikumar Chandrasekaran
2016-12-09 12:55   ` Tomas Henzl
2016-12-14 21:49     ` Sasikumar PC
2016-12-20  1:51     ` Sasikumar PC
2016-12-20 14:20       ` Tomas Henzl
2016-12-20 14:22         ` Sasikumar PC
2016-12-06 23:00 ` [PATCH V4 07/11] megaraid_sas: Add the Support for SAS3.5 Generic Megaraid Controllers Capabilities Sasikumar Chandrasekaran
2016-12-09 13:05   ` Tomas Henzl
2016-12-09 13:13   ` Tomas Henzl
2016-12-14 21:52     ` Sasikumar PC [this message]
2016-12-06 23:00 ` [PATCH V4 08/11] megaraid_sas: Enable or Disable Fast path based on the PCI Threshold Bandwidth Sasikumar Chandrasekaran
2016-12-09 13:58   ` Tomas Henzl
2016-12-14 21:54     ` Sasikumar PC
2016-12-15 15:10       ` Tomas Henzl
2016-12-20  1:51         ` Sasikumar PC
2016-12-20 15:12           ` Tomas Henzl
2016-12-06 23:00 ` [PATCH V4 09/11] megaraid_sas: ldio_outstanding variable is not decremented in completion path Sasikumar Chandrasekaran
2016-12-09 14:01   ` Tomas Henzl
2016-12-06 23:00 ` [PATCH V4 10/11] megaraid_sas: Implement the PD Map support for SAS3.5 Generic Megaraid Controllers Sasikumar Chandrasekaran
2016-12-09 14:07   ` Tomas Henzl
2016-12-06 23:00 ` [PATCH V4 11/11] megaraid_sas: driver version upgrade Sasikumar Chandrasekaran
2016-12-09 14:07   ` Tomas Henzl
2016-12-07  7:31 ` [PATCH V4 00/11] megaraid_sas: Updates for scsi-next Christoph Hellwig
2016-12-11 14:04   ` Sasikumar PC

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=edea89c4186edd1d9a80583d97154c05@mail.gmail.com \
    --to=sasikumar.pc@broadcom.com \
    --cc=christopher.owens@broadcom.com \
    --cc=hch@infradead.org \
    --cc=jejb@kernel.org \
    --cc=kiran-kumar.kasturi@broadcom.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=sathya.prakash@broadcom.com \
    --cc=thenzl@redhat.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.