* [PATCH] mpt3sas: Fix use sas_is_tlr_enabled API before enabling MPI2_SCSIIO_CONTROL_TLR_ON flag
@ 2015-11-12 18:10 Sreekanth Reddy
2015-11-13 7:24 ` Hannes Reinecke
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Sreekanth Reddy @ 2015-11-12 18:10 UTC (permalink / raw)
To: jejb
Cc: martin.petersen, linux-scsi, JBottomley, Sathya.Prakash,
kashyap.desai, linux-kernel, hch, chaitra.basappa,
suganath-prabu.subramani, Sreekanth Reddy
Before enabling MPI2_SCSIIO_CONTROL_TLR_ON flag in MPI SCSI IO
request message, check whether TLR is enabled on the drive using
'sas_is_tlr_enabled' API.
Actually in the driver code, driver is using below API's
1. sas_enable_tlr() - to enable the TLR
2. sas_disable_tlr() - to disable the TLR
3. sas_is_tlr_enabled() - to check whether TLR is enabled or not.
but in scsih_qcmd() we have missed to use sas_is_tlr_enabled() API,
instead we checking for TLR bit from flag field of driver's
'struct MPT3SAS_DEVIC' structure. which is corrected with this patch.
Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
---
drivers/scsi/mpt3sas/mpt3sas_scsih.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
index d95206b..9ab77b0 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
@@ -3905,8 +3905,7 @@ scsih_qcmd(struct Scsi_Host *shost, struct scsi_cmnd *scmd)
* We do not expose raid functionality to upper layer for warpdrive.
*/
if (!ioc->is_warpdrive && !scsih_is_raid(&scmd->device->sdev_gendev)
- && (sas_device_priv_data->flags & MPT_DEVICE_TLR_ON) &&
- scmd->cmd_len != 32)
+ && sas_is_tlr_enabled(scmd->device) && scmd->cmd_len != 32)
mpi_control |= MPI2_SCSIIO_CONTROL_TLR_ON;
smid = mpt3sas_base_get_smid_scsiio(ioc, ioc->scsi_io_cb_idx, scmd);
--
2.0.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] mpt3sas: Fix use sas_is_tlr_enabled API before enabling MPI2_SCSIIO_CONTROL_TLR_ON flag
2015-11-12 18:10 [PATCH] mpt3sas: Fix use sas_is_tlr_enabled API before enabling MPI2_SCSIIO_CONTROL_TLR_ON flag Sreekanth Reddy
@ 2015-11-13 7:24 ` Hannes Reinecke
2015-11-13 15:05 ` Tomas Henzl
2015-11-13 20:46 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Hannes Reinecke @ 2015-11-13 7:24 UTC (permalink / raw)
To: Sreekanth Reddy, jejb
Cc: martin.petersen, linux-scsi, JBottomley, Sathya.Prakash,
kashyap.desai, linux-kernel, hch, chaitra.basappa,
suganath-prabu.subramani
On 11/12/2015 07:10 PM, Sreekanth Reddy wrote:
> Before enabling MPI2_SCSIIO_CONTROL_TLR_ON flag in MPI SCSI IO
> request message, check whether TLR is enabled on the drive using
> 'sas_is_tlr_enabled' API.
>
> Actually in the driver code, driver is using below API's
>
> 1. sas_enable_tlr() - to enable the TLR
> 2. sas_disable_tlr() - to disable the TLR
> 3. sas_is_tlr_enabled() - to check whether TLR is enabled or not.
>
> but in scsih_qcmd() we have missed to use sas_is_tlr_enabled() API,
> instead we checking for TLR bit from flag field of driver's
> 'struct MPT3SAS_DEVIC' structure. which is corrected with this patch.
>
> Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
> ---
> drivers/scsi/mpt3sas/mpt3sas_scsih.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
> index d95206b..9ab77b0 100644
> --- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c
> +++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
> @@ -3905,8 +3905,7 @@ scsih_qcmd(struct Scsi_Host *shost, struct scsi_cmnd *scmd)
> * We do not expose raid functionality to upper layer for warpdrive.
> */
> if (!ioc->is_warpdrive && !scsih_is_raid(&scmd->device->sdev_gendev)
> - && (sas_device_priv_data->flags & MPT_DEVICE_TLR_ON) &&
> - scmd->cmd_len != 32)
> + && sas_is_tlr_enabled(scmd->device) && scmd->cmd_len != 32)
> mpi_control |= MPI2_SCSIIO_CONTROL_TLR_ON;
>
> smid = mpt3sas_base_get_smid_scsiio(ioc, ioc->scsi_io_cb_idx, scmd);
>
Reviewed-by: Hannes Reinecke <hare@suse.de>
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)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mpt3sas: Fix use sas_is_tlr_enabled API before enabling MPI2_SCSIIO_CONTROL_TLR_ON flag
2015-11-12 18:10 [PATCH] mpt3sas: Fix use sas_is_tlr_enabled API before enabling MPI2_SCSIIO_CONTROL_TLR_ON flag Sreekanth Reddy
2015-11-13 7:24 ` Hannes Reinecke
@ 2015-11-13 15:05 ` Tomas Henzl
2015-11-13 20:46 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Tomas Henzl @ 2015-11-13 15:05 UTC (permalink / raw)
To: Sreekanth Reddy, jejb
Cc: martin.petersen, linux-scsi, JBottomley, Sathya.Prakash,
kashyap.desai, linux-kernel, hch, chaitra.basappa,
suganath-prabu.subramani
On 12.11.2015 19:10, Sreekanth Reddy wrote:
> Before enabling MPI2_SCSIIO_CONTROL_TLR_ON flag in MPI SCSI IO
> request message, check whether TLR is enabled on the drive using
> 'sas_is_tlr_enabled' API.
>
> Actually in the driver code, driver is using below API's
>
> 1. sas_enable_tlr() - to enable the TLR
> 2. sas_disable_tlr() - to disable the TLR
> 3. sas_is_tlr_enabled() - to check whether TLR is enabled or not.
>
> but in scsih_qcmd() we have missed to use sas_is_tlr_enabled() API,
> instead we checking for TLR bit from flag field of driver's
> 'struct MPT3SAS_DEVIC' structure. which is corrected with this patch.
>
> Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mpt3sas: Fix use sas_is_tlr_enabled API before enabling MPI2_SCSIIO_CONTROL_TLR_ON flag
2015-11-12 18:10 [PATCH] mpt3sas: Fix use sas_is_tlr_enabled API before enabling MPI2_SCSIIO_CONTROL_TLR_ON flag Sreekanth Reddy
2015-11-13 7:24 ` Hannes Reinecke
2015-11-13 15:05 ` Tomas Henzl
@ 2015-11-13 20:46 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2015-11-13 20:46 UTC (permalink / raw)
To: Sreekanth Reddy
Cc: jejb, martin.petersen, linux-scsi, JBottomley, Sathya.Prakash,
kashyap.desai, linux-kernel, hch, chaitra.basappa,
suganath-prabu.subramani
>>>>> "Sreekanth" == Sreekanth Reddy <sreekanth.reddy@avagotech.com> writes:
Sreekanth> Before enabling MPI2_SCSIIO_CONTROL_TLR_ON flag in MPI SCSI
Sreekanth> IO request message, check whether TLR is enabled on the drive
Sreekanth> using 'sas_is_tlr_enabled' API.
Applied.
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-11-13 20:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-12 18:10 [PATCH] mpt3sas: Fix use sas_is_tlr_enabled API before enabling MPI2_SCSIIO_CONTROL_TLR_ON flag Sreekanth Reddy
2015-11-13 7:24 ` Hannes Reinecke
2015-11-13 15:05 ` Tomas Henzl
2015-11-13 20:46 ` Martin K. Petersen
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.