diff mbox

[SRU,Trusty,1/1,SCSI] hpsa: allow SCSI mid layer to handle unit attention

Message ID 2f64315bdd16268e961048118b73c75fe193dcc3.1447358907.git.joseph.salisbury@canonical.com
State New
Headers show

Commit Message

Joseph Salisbury Nov. 12, 2015, 8:14 p.m. UTC
From: Matt Gates <matthew.gates@hp.com>

BugLink: http://bugs.launchpad.net/bugs/1512415

We were clobbering the SCSI status and setting
cmd->result = DID_SOFT_ERROR << 16; to get a retry,
but better to let the mid layer handle the unit
attention.

Signed-off-by: Matt Gates <matthew.gates@hp.com>
Acked-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit 3ce438df106826edde7ad724f3819716a3f0cf56)
Signed-off-by: Joseph Salisbury <joseph.salisbury@canonical.com>
---
 drivers/scsi/hpsa.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Tim Gardner Nov. 12, 2015, 8:40 p.m. UTC | #1
Positive test results, clean cherry pick
Brad Figg Nov. 16, 2015, 1:21 p.m. UTC | #2
On Thu, Nov 12, 2015 at 03:14:20PM -0500, Joseph Salisbury wrote:
> From: Matt Gates <matthew.gates@hp.com>
> 
> BugLink: http://bugs.launchpad.net/bugs/1512415
> 
> We were clobbering the SCSI status and setting
> cmd->result = DID_SOFT_ERROR << 16; to get a retry,
> but better to let the mid layer handle the unit
> attention.
> 
> Signed-off-by: Matt Gates <matthew.gates@hp.com>
> Acked-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
> (cherry picked from commit 3ce438df106826edde7ad724f3819716a3f0cf56)
> Signed-off-by: Joseph Salisbury <joseph.salisbury@canonical.com>
> ---
>  drivers/scsi/hpsa.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
> index d518bba..cfeb5a4 100644
> --- a/drivers/scsi/hpsa.c
> +++ b/drivers/scsi/hpsa.c
> @@ -1260,10 +1260,8 @@ static void complete_scsi_command(struct CommandList *cp)
>  		}
>  
>  		if (ei->ScsiStatus == SAM_STAT_CHECK_CONDITION) {
> -			if (check_for_unit_attention(h, cp)) {
> -				cmd->result = DID_SOFT_ERROR << 16;
> +			if (check_for_unit_attention(h, cp))
>  				break;
> -			}
>  			if (sense_key == ILLEGAL_REQUEST) {
>  				/*
>  				 * SCSI REPORT_LUNS is commonly unsupported on
> -- 
> 1.9.1
> 
> 
> -- 
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team

Positive test results.
Kamal Mostafa Nov. 17, 2015, 9:23 p.m. UTC | #3

diff mbox

Patch

diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index d518bba..cfeb5a4 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -1260,10 +1260,8 @@  static void complete_scsi_command(struct CommandList *cp)
 		}
 
 		if (ei->ScsiStatus == SAM_STAT_CHECK_CONDITION) {
-			if (check_for_unit_attention(h, cp)) {
-				cmd->result = DID_SOFT_ERROR << 16;
+			if (check_for_unit_attention(h, cp))
 				break;
-			}
 			if (sense_key == ILLEGAL_REQUEST) {
 				/*
 				 * SCSI REPORT_LUNS is commonly unsupported on