linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: Sreekanth Reddy <sreekanth.reddy@avagotech.com>, jejb@kernel.org
Cc: martin.petersen@oracle.com, linux-scsi@vger.kernel.org,
	JBottomley@Parallels.com, Sathya.Prakash@avagotech.com,
	kashyap.desai@avagotech.com, linux-kernel@vger.kernel.org,
	hch@infradead.org, chaitra.basappa@avagotech.com,
	suganath-prabu.subramani@avagotech.com
Subject: Re: [PATCH RESEND 09/25] mpt3sas: Don't send PHYDISK_HIDDEN Raid Action request on SAS2 HBA's
Date: Wed, 11 Nov 2015 13:56:50 +0100	[thread overview]
Message-ID: <56433B12.4080405@suse.de> (raw)
In-Reply-To: <1447243241-10912-10-git-send-email-Sreekanth.Reddy@avagotech.com>

On 11/11/2015 01:00 PM, Sreekanth Reddy wrote:
> From: Sreekanth Reddy <sreekanth.reddy@avagotech.com>
> 
> Don't send PHYDISK_HIDDEN Raid Action request for SAS2 HBA's.
> Since these HBA's doesn't support this Raid Action.
> 
> Also enable fast_path only for SAS3 HBA's.
> 
> Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
> ---
>  drivers/scsi/mpt3sas/mpt3sas_scsih.c | 19 +++++++++++++++++--
>  1 file changed, 17 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
> index a638920..80469d0 100644
> --- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c
> +++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
> @@ -1165,8 +1165,10 @@ scsih_target_alloc(struct scsi_target *starget)
>  		if (test_bit(sas_device->handle, ioc->pd_handles))
>  			sas_target_priv_data->flags |=
>  			    MPT_TARGET_FLAGS_RAID_COMPONENT;
> +#ifndef SCSI_MPT2SAS
>  		if (sas_device->fast_path)
>  			sas_target_priv_data->flags |= MPT_TARGET_FASTPATH_IO;
> +#endif
>  	}
>  	spin_unlock_irqrestore(&ioc->sas_device_lock, flags);
>  
> @@ -3719,11 +3721,13 @@ scsih_qcmd(struct Scsi_Host *shost, struct scsi_cmnd *scmd)
>  		ioc->build_zero_len_sge(ioc, &mpi_request->SGL);
>  
>  	if (likely(mpi_request->Function == MPI2_FUNCTION_SCSI_IO_REQUEST)) {
> +#ifndef SCSI_MPT2SAS
>  		if (sas_target_priv_data->flags & MPT_TARGET_FASTPATH_IO) {
>  			mpi_request->IoFlags = cpu_to_le16(scmd->cmd_len |
>  			    MPI25_SCSIIO_IOFLAGS_FAST_PATH);
>  			mpt3sas_base_put_smid_fast_path(ioc, smid, handle);
>  		} else
> +#endif
>  			mpt3sas_base_put_smid_scsi_io(ioc, smid, handle);
>  	} else
>  		mpt3sas_base_put_smid_default(ioc, smid);
> @@ -5031,8 +5035,10 @@ _scsih_add_device(struct MPT3SAS_ADAPTER *ioc, u16 handle, u8 phy_num,
>  	sas_device->device_info = device_info;
>  	sas_device->sas_address = sas_address;
>  	sas_device->phy = sas_device_pg0.PhyNum;
> +#ifndef SCSI_MPT2SAS
>  	sas_device->fast_path = (le16_to_cpu(sas_device_pg0.Flags) &
>  	    MPI25_SAS_DEVICE0_FLAGS_FAST_PATH_CAPABLE) ? 1 : 0;
> +#endif
>  
>  	if (sas_device_pg0.Flags & MPI2_SAS_DEVICE0_FLAGS_ENCL_LEVEL_VALID) {
>  		sas_device->enclosure_level =
> @@ -5731,6 +5737,7 @@ _scsih_sas_discovery_event(struct MPT3SAS_ADAPTER *ioc,
>  	}
>  }
>  
> +#ifndef SCSI_MPT2SAS
>  /**
>   * _scsih_ir_fastpath - turn on fastpath for IR physdisk
>   * @ioc: per adapter object
> @@ -5750,7 +5757,6 @@ _scsih_ir_fastpath(struct MPT3SAS_ADAPTER *ioc, u16 handle, u8 phys_disk_num)
>  	u16 ioc_status;
>  	u32 log_info;
>  
> -
>  	mutex_lock(&ioc->scsih_cmds.mutex);
>  
>  	if (ioc->scsih_cmds.status != MPT3_CMD_NOT_USED) {
> @@ -5825,6 +5831,8 @@ _scsih_ir_fastpath(struct MPT3SAS_ADAPTER *ioc, u16 handle, u8 phys_disk_num)
>  		    FORCE_BIG_HAMMER);
>  	return rc;
>  }
> +/* End of not defined SCSI_MPT2SAS */
> +#endif
>  
>  /**
>   * _scsih_reprobe_lun - reprobing lun
> @@ -6017,8 +6025,10 @@ _scsih_sas_pd_hide(struct MPT3SAS_ADAPTER *ioc,
>  	if (!sas_device)
>  		return;
>  
> +#ifndef SCSI_MPT2SAS
>  	/* hiding raid component */
>  	_scsih_ir_fastpath(ioc, handle, element->PhysDiskNum);
> +#endif
>  	if (starget)
>  		starget_for_each_device(starget, (void *)1, _scsih_reprobe_lun);
>  }
> @@ -6067,7 +6077,9 @@ _scsih_sas_pd_add(struct MPT3SAS_ADAPTER *ioc,
>  	sas_device = _scsih_sas_device_find_by_handle(ioc, handle);
>  	spin_unlock_irqrestore(&ioc->sas_device_lock, flags);
>  	if (sas_device) {
> +#ifndef SCSI_MPT2SAS
>  		_scsih_ir_fastpath(ioc, handle, element->PhysDiskNum);
> +#endif
>  		return;
>  	}
>  
> @@ -6091,7 +6103,9 @@ _scsih_sas_pd_add(struct MPT3SAS_ADAPTER *ioc,
>  		mpt3sas_transport_update_links(ioc, sas_address, handle,
>  		    sas_device_pg0.PhyNum, MPI2_SAS_NEG_LINK_RATE_1_5);
>  
> +#ifndef SCSI_MPT2SAS
>  	_scsih_ir_fastpath(ioc, handle, element->PhysDiskNum);
> +#endif
>  	_scsih_add_device(ioc, handle, 0, 1);
>  }
>  
> @@ -6202,13 +6216,14 @@ _scsih_sas_ir_config_change_event(struct MPT3SAS_ADAPTER *ioc,
>  
>  	element = (Mpi2EventIrConfigElement_t *)&event_data->ConfigElement[0];
>  	if (ioc->shost_recovery) {
> -
> +#ifndef SCSI_MPT2SAS
>  		for (i = 0; i < event_data->NumElements; i++, element++) {
>  			if (element->ReasonCode == MPI2_EVENT_IR_CHANGE_RC_HIDE)
>  				_scsih_ir_fastpath(ioc,
>  					le16_to_cpu(element->PhysDiskDevHandle),
>  					element->PhysDiskNum);
>  		}
> +#endif
>  		return;
>  	}
>  	for (i = 0; i < event_data->NumElements; i++, element++) {
> 
Why didn't you use 'hba_mpi_version_belonged' here?

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		               zSeries & Storage
hare@suse.de			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)

  reply	other threads:[~2015-11-11 12:56 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-11 12:00 [PATCH 00/25] mpt3sas: Mergering mpt2sas & mpt3sas driver code Sreekanth Reddy
2015-11-11 12:00 ` [PATCH RESEND 01/25] mpt2sas: Use mpi headers from mpt3sas Sreekanth Reddy
2015-11-11 12:00 ` [PATCH RESEND 02/25] mpt3sas: Added mpt2sas driver definitions Sreekanth Reddy
2015-11-11 12:00 ` [PATCH RESEND 03/25] mpt3sas: Move Gen3 HBA's device registration with PCI, SML and IOCTL related API's to a separate file Sreekanth Reddy
2015-11-11 12:00 ` [PATCH RESEND 04/25] mpt2sas: Created mpt2sas_module.c file in which Gen2 HBA's are registers with PCI, SML and IOCTLs Sreekanth Reddy
2015-11-11 12:00 ` [PATCH RESEND 06/25] mpt3sas: Define 'hba_mpi_version_belonged' IOC variable Sreekanth Reddy
2015-11-11 12:56   ` Hannes Reinecke
2015-11-11 12:00 ` [PATCH RESEND 07/25] mpt2sas, mpt3sas : Removed SCSI_MPTXSAS_LOGGING entry from Kconfig Sreekanth Reddy
2015-11-11 12:00 ` [PATCH RESEND 08/25] mpt3sas: For an IO, build MPI SGL LIST on GEN2 HBA's and build IEEE SGL LIST on GEN3 HBA's Sreekanth Reddy
2015-11-11 12:00 ` [PATCH RESEND 09/25] mpt3sas: Don't send PHYDISK_HIDDEN Raid Action request on SAS2 HBA's Sreekanth Reddy
2015-11-11 12:56   ` Hannes Reinecke [this message]
2015-11-11 13:05     ` Kashyap Desai
2015-11-11 12:00 ` [PATCH RESEND 10/25] mpt3sas: Manage MSIX vectors according to HBA device type Sreekanth Reddy
2015-11-11 12:00 ` [PATCH RESEND 11/25] mpt3sas: fix for driver fails EEH, recovery from injected pci bus error Sreekanth Reddy
2015-11-11 12:00 ` [PATCH RESEND 12/25] mpt3sas: Ported WarpDrive product SSS6200 support Sreekanth Reddy
2015-11-11 12:00 ` [PATCH RESEND 13/25] mpt3sas: Ported the providing sysfs attribute to report Backup Rail Monitor Status Sreekanth Reddy
2015-11-11 12:00 ` [PATCH RESEND 14/25] mpt3sas: Refcount sas_device objects and fix unsafe list usage Sreekanth Reddy
2015-11-11 12:00 ` [PATCH RESEND 15/25] mpt3sas: Refcount fw_events " Sreekanth Reddy
2015-11-11 12:00 ` [PATCH RESEND 16/25] mpt3sas: Added OEMs Gen2 PnP ID Branding names Sreekanth Reddy
2015-11-11 12:00 ` [PATCH RESEND 17/25] mpt3sas: setpci reset kernel oops fix Sreekanth Reddy
2015-11-11 12:00 ` [PATCH RESEND 18/25] mpt2sas, mpt3sas: Update the driver versions Sreekanth Reddy
2015-11-11 12:00 ` [PATCH 19/25] mpt3sas: Single driver module which supports both SAS 2.0 & SAS 3.0 HBA's Sreekanth Reddy
2015-11-11 12:00 ` [PATCH 20/25] mpt3sas: Moved Warpdriver specific functions to mpt3sas_warpdrive.c Sreekanth Reddy
2015-11-11 12:00 ` [PATCH 21/25] mpt2sas: Removed mpt2sas folder Sreekanth Reddy
2015-11-11 12:00 ` [PATCH 22/25] mpt3sas: Added a module parameter hbas_to_enumerate Sreekanth Reddy
2015-11-11 12:00 ` [PATCH 23/25] mpt2sas: Removed mpt2sas entries from SCSI's Kconfig and Makefile Sreekanth Reddy
2015-11-11 12:00 ` [PATCH 24/25] mpt3sas: Added SCSI_MPT3SAS_MERGED config option Sreekanth Reddy
2015-11-11 12:00 ` [PATCH 25/25] mpt3sas: Bump mpt3sas driver version to 09.102.00.00 Sreekanth Reddy
2015-11-11 13:04 ` [PATCH 00/25] mpt3sas: Mergering mpt2sas & mpt3sas driver code Hannes Reinecke
2015-11-12  1:09 ` Martin K. Petersen
2015-11-12 20:02   ` Yinghai Lu
2015-11-13 20:24     ` Martin K. Petersen

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=56433B12.4080405@suse.de \
    --to=hare@suse.de \
    --cc=JBottomley@Parallels.com \
    --cc=Sathya.Prakash@avagotech.com \
    --cc=chaitra.basappa@avagotech.com \
    --cc=hch@infradead.org \
    --cc=jejb@kernel.org \
    --cc=kashyap.desai@avagotech.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=sreekanth.reddy@avagotech.com \
    --cc=suganath-prabu.subramani@avagotech.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).