Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

scsi: ufs: core: Make the reserved slot a reserved request

Instead of letting the SCSI core allocate hba->nutrs - 1 commands, let
the SCSI core allocate hba->nutrs commands, set the number of reserved
tags to 1 and use the reserved tag for device management commands. This
patch changes the 'reserved slot' from hba->nutrs - 1 into 0 because the
block layer reserves the smallest tags for reserved commands.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://patch.msgid.link/20251031204029.2883185-22-bvanassche@acm.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Bart Van Assche and committed by
Martin K. Petersen
1d0af94f d3fd0fd7

+2 -2
+2 -2
drivers/ufs/core/ufshcd.c
··· 2476 2476 hba->nutrs = (hba->capabilities & MASK_TRANSFER_REQUESTS_SLOTS_SDB) + 1; 2477 2477 hba->nutmrs = 2478 2478 ((hba->capabilities & MASK_TASK_MANAGEMENT_REQUEST_SLOTS) >> 16) + 1; 2479 - hba->reserved_slot = hba->nutrs - 1; 2479 + hba->reserved_slot = 0; 2480 2480 2481 2481 hba->nortt = FIELD_GET(MASK_NUMBER_OUTSTANDING_RTT, hba->capabilities) + 1; 2482 2482 ··· 8945 8945 goto err; 8946 8946 8947 8947 hba->host->can_queue = hba->nutrs - UFSHCD_NUM_RESERVED; 8948 - hba->reserved_slot = hba->nutrs - UFSHCD_NUM_RESERVED; 8949 8948 8950 8949 return 0; 8951 8950 err: ··· 9183 9184 .proc_name = UFSHCD, 9184 9185 .map_queues = ufshcd_map_queues, 9185 9186 .queuecommand = ufshcd_queuecommand, 9187 + .nr_reserved_cmds = UFSHCD_NUM_RESERVED, 9186 9188 .mq_poll = ufshcd_poll, 9187 9189 .sdev_init = ufshcd_sdev_init, 9188 9190 .sdev_configure = ufshcd_sdev_configure,