[PATCH] scsi: ibmvfc: Stop using scsi_cmnd.tag

Subsystems: ibm power virtual fc device drivers, linux for powerpc (32-bit and 64-bit), scsi subsystem, the rest

STALE1815d LANDED

Landed in mainline as 6a036ce0e25c on 2021-08-18.

3 messages, 3 authors, 2021-08-24 · open the first message on its own page

[PATCH] scsi: ibmvfc: Stop using scsi_cmnd.tag

From: John Garry <hidden>
Date: 2021-08-17 13:48:32

Use scsi_cmd_to_rq(scsi_cmnd)->tag in preference to scsi_cmnd.tag.

Signed-off-by: John Garry <redacted>
---
This patch was missed in a series to remove scsi_cmnd.tag, which caused
a build error on Martin's SCSI staging tree:
https://lore.kernel.org/linux-scsi/yq14kbppa42.fsf@ca-mkp.ca.oracle.com/T/#mb47909f38f35837686734369600051b278d124af

I note that scsi_cmnd.tag is/was an unsigned char, and I could not find
anywhere in the driver which limits scsi_host.can_queue to 255, so using
scsi_cmnd.tag looks odd to me.
diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c
index 7fa5e64e38c3..ba7150cb226a 100644
--- a/drivers/scsi/ibmvscsi/ibmvfc.c
+++ b/drivers/scsi/ibmvscsi/ibmvfc.c
@@ -1956,7 +1956,7 @@ static int ibmvfc_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *cmnd)
 	memcpy(iu->cdb, cmnd->cmnd, cmnd->cmd_len);
 
 	if (cmnd->flags & SCMD_TAGGED) {
-		vfc_cmd->task_tag = cpu_to_be64(cmnd->tag);
+		vfc_cmd->task_tag = cpu_to_be64(scsi_cmd_to_rq(cmnd)->tag);
 		iu->pri_task_attr = IBMVFC_SIMPLE_TASK;
 	}
 
-- 
2.17.1

Re: [PATCH] scsi: ibmvfc: Stop using scsi_cmnd.tag

From: Bart Van Assche <bvanassche@acm.org>
Date: 2021-08-18 03:04:39

On 8/17/21 6:43 AM, John Garry wrote:
Use scsi_cmd_to_rq(scsi_cmnd)->tag in preference to scsi_cmnd.tag.
Reviewed-by: Bart Van Assche <bvanassche@acm.org>

Re: [PATCH] scsi: ibmvfc: Stop using scsi_cmnd.tag

From: "Martin K. Petersen" <martin.petersen@oracle.com>
Date: 2021-08-24 04:04:21

On Tue, 17 Aug 2021 21:43:37 +0800, John Garry wrote:
Use scsi_cmd_to_rq(scsi_cmnd)->tag in preference to scsi_cmnd.tag.


Applied to 5.15/scsi-queue, thanks!

[1/1] scsi: ibmvfc: Stop using scsi_cmnd.tag
      https://git.kernel.org/mkp/scsi/c/6a036ce0e25c

-- 
Martin K. Petersen	Oracle Linux Engineering
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help