Re: [PATCH v2 08/15] megaraid_sas: Use SMID for Task abort case only

2017-07-18 Thread Tomas Henzl
On 5.7.2017 14:00, Shivasharan S wrote:
> Fix - In TM code, smid_task is valid only in case of task aborts.
>
> Signed-off-by: Kashyap Desai 
> Signed-off-by: Shivasharan S 
> Reviewed-by: Hannes Reinecke 
> ---
>  drivers/scsi/megaraid/megaraid_sas_fusion.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c 
> b/drivers/scsi/megaraid/megaraid_sas_fusion.c
> index a308e14..c239762 100644
> --- a/drivers/scsi/megaraid/megaraid_sas_fusion.c
> +++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c
> @@ -3754,7 +3754,7 @@ static int megasas_track_scsiio(struct megasas_instance 
> *instance,
>   struct megasas_cmd_fusion *cmd_fusion;
>   struct megasas_cmd *cmd_mfi;
>   union MEGASAS_REQUEST_DESCRIPTOR_UNION *req_desc;
> - struct fusion_context *fusion;
> + struct fusion_context *fusion = NULL;

This^ change seems to be needless,
but not important.

Reviewed-by: Tomas Henzl 

tomash


>   struct megasas_cmd_fusion *scsi_lookup;
>   int rc;
>   struct MPI2_SCSI_TASK_MANAGE_REPLY *mpi_reply;
> @@ -3781,8 +3781,6 @@ static int megasas_track_scsiio(struct megasas_instance 
> *instance,
>   cmd_fusion->request_desc = req_desc;
>   req_desc->Words = 0;
>  
> - scsi_lookup = fusion->cmd_list[smid_task - 1];
> -
>   mr_request = (struct MR_TASK_MANAGE_REQUEST *) cmd_fusion->io_request;
>   memset(mr_request, 0, sizeof(struct MR_TASK_MANAGE_REQUEST));
>   mpi_request = (struct MPI2_SCSI_TASK_MANAGE_REQUEST *) 
> _request->TmRequest;
> @@ -3829,6 +3827,8 @@ static int megasas_track_scsiio(struct megasas_instance 
> *instance,
>   rc = SUCCESS;
>   switch (type) {
>   case MPI2_SCSITASKMGMT_TASKTYPE_ABORT_TASK:
> + scsi_lookup = fusion->cmd_list[smid_task - 1];
> +
>   if (scsi_lookup->scmd == NULL)
>   break;
>   else {




RE: [PATCH v2 08/15] megaraid_sas: Use SMID for Task abort case only

2017-07-18 Thread Shivasharan Srikanteshwara
> -Original Message-
> From: Shivasharan S [mailto:shivasharan.srikanteshw...@broadcom.com]
> Sent: Wednesday, July 05, 2017 5:30 PM
> To: linux-scsi@vger.kernel.org
> Cc: martin.peter...@oracle.com; the...@redhat.com;
> j...@linux.vnet.ibm.com; kashyap.de...@broadcom.com;
> sumit.sax...@broadcom.com; h...@suse.com; h...@lst.de; Shivasharan S
> Subject: [PATCH v2 08/15] megaraid_sas: Use SMID for Task abort case
only
>
> Fix - In TM code, smid_task is valid only in case of task aborts.
>
> Signed-off-by: Kashyap Desai 
> Signed-off-by: Shivasharan S 
> Reviewed-by: Hannes Reinecke 

Hi Tomas,
Looks like this one patch got missed during your review.
Can you please review if the changes in this patch are fine?

Thanks,
Shivasharan