RE: [PATCH 4/5] mpt2sas: Return the correct sense key for DIF errors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



James,

This patch seem to be fine. Please consider this patch as Acked-by: "Sreekanth Reddy" <Sreekanth.reddy@xxxxxxx>

Regards,
Sreekanth.

> -----Original Message-----
> From: linux-scsi-owner@xxxxxxxxxxxxxxx [mailto:linux-scsi-
> owner@xxxxxxxxxxxxxxx] On Behalf Of Martin K. Petersen
> Sent: Wednesday, August 29, 2012 12:00 AM
> To: linux-scsi@xxxxxxxxxxxxxxx
> Cc: James.Bottomley@xxxxxxxxxxxxxxxxxxxxx; Martin K. Petersen;
> Nandigama, Nagalakshmi; Moore, Eric
> Subject: [PATCH 4/5] mpt2sas: Return the correct sense key for DIF
> errors
> 
> From: "Martin K. Petersen" <martin.petersen@xxxxxxxxxx>
> 
> Only a target device should return ABORTED COMMAND when a PI error is
> discovered. The HBA should always set the sense key to ILLEGAL REQUEST.
> 
> Signed-off-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx>
> Cc: Nagalakshmi.Nandigama@xxxxxxx
> Cc: Eric.Moore@xxxxxxx
> ---
>  drivers/scsi/mpt2sas/mpt2sas_scsih.c |   14 ++------------
>  1 files changed, 2 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c
> b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
> index 7d774c5..bfda0ec 100644
> --- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c
> +++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
> @@ -3772,8 +3772,6 @@ static void
>  _scsih_eedp_error_handling(struct scsi_cmnd *scmd, u16 ioc_status)
>  {
>  	u8 ascq;
> -	u8 sk;
> -	u8 host_byte;
> 
>  	switch (ioc_status) {
>  	case MPI2_IOCSTATUS_EEDP_GUARD_ERROR:
> @@ -3790,16 +3788,8 @@ _scsih_eedp_error_handling(struct scsi_cmnd
> *scmd, u16 ioc_status)
>  		break;
>  	}
> 
> -	if (scmd->sc_data_direction == DMA_TO_DEVICE) {
> -		sk = ILLEGAL_REQUEST;
> -		host_byte = DID_ABORT;
> -	} else {
> -		sk = ABORTED_COMMAND;
> -		host_byte = DID_OK;
> -	}
> -
> -	scsi_build_sense_buffer(0, scmd->sense_buffer, sk, 0x10, ascq);
> -	scmd->result = DRIVER_SENSE << 24 | (host_byte << 16) |
> +	scsi_build_sense_buffer(0, scmd->sense_buffer, ILLEGAL_REQUEST,
> 0x10, ascq);
> +	scmd->result = DRIVER_SENSE << 24 | (DID_ABORT << 16) |
>  	    SAM_STAT_CHECK_CONDITION;
>  }
> 
> --
> 1.7.7.6
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi"
> in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux