Skip to contentSkip to conversation

pcmcia/nsp_cs: Use SAM_STAT_CHECK_CONDITION

PATCH In review Hannes Reinecke 2 participants 2 messages May 27, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pcmcia/nsp_cs: Use SAM_STAT_CHECK_CONDITION

The nsp_cs driver stores the SAM status values in SCp.Status, so we need to use the non-shifted version SAM_STAT_CHECK_CONDITION.

---
 drivers/scsi/pcmcia/nsp_cs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/pcmcia/nsp_cs.c +1 -1
index ac89002646a3..7c0f931e55e8 100644
@@ -221,7 +221,7 @@ static int nsp_queuecommand_lck(struct scsi_cmnd *SCpnt,
 
 	data->CurrentSC		= SCpnt;
 
-	SCpnt->SCp.Status	= CHECK_CONDITION;
+	SCpnt->SCp.Status	= SAM_STAT_CHECK_CONDITION;
 	SCpnt->SCp.Message	= 0;
 	SCpnt->SCp.have_data_in = IO_UNKNOWN;
 	SCpnt->SCp.sent_command = 0;
Signature · 1 line
2.29.2
#1 lore raw
Quoted 13 lines · Hannes Reinecke

The nsp_cs driver stores the SAM status values in SCp.Status, so we need to use the non-shifted version SAM_STAT_CHECK_CONDITION.

---
 drivers/scsi/pcmcia/nsp_cs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/pcmcia/nsp_cs.c +0 -0
index ac89002646a3..7c0f931e55e8 100644

drivers/scsi/pcmcia/nsp_cs.c static int nsp_queuecommand_lck(struct scsi_cmnd *SCpnt, · line 227

Quoted 8 lines
drivers/scsi/pcmcia/nsp_cs.c +1 -1
@@ -221,7 +221,7 @@ static int nsp_queuecommand_lck(struct scsi_cmnd *SCpnt,
 
 	data->CurrentSC		= SCpnt;
 
-	SCpnt->SCp.Status	= CHECK_CONDITION;
+	SCpnt->SCp.Status	= SAM_STAT_CHECK_CONDITION;
 	SCpnt->SCp.Message	= 0;
 	SCpnt->SCp.have_data_in = IO_UNKNOWN;
 	SCpnt->SCp.sent_command = 0;

Since this patch is a bug fix, does this patch need a Cc: stable tag? I'm not sure how to add a Fixes: tag since this bug predates Linux kernel v2.6.12.

Thanks,

Bart.