OpenCloudOS-Kernel/drivers/scsi/mvsas
John Garry 2acf97f199 scsi: mvsas: Use sas_task_find_rq() for tagging
The request associated with a SCSI command coming from the block layer has
a unique tag, so use that when possible for getting a slot.

Unfortunately we don't support reserved commands in the SCSI midlayer yet.
As such, SMP tasks - as an example - will not have a request associated, so
in the interim continue to manage those tags for that type of sas_task
internally.

We reserve an arbitrary 4 tags for these internal tags. Indeed, we already
decrement MVS_RSVD_SLOTS by 2 for the shost can_queue when flag
MVF_FLAG_SOC is set. This change was made in commit 20b09c2992 ("[SCSI]
mvsas: add support for 94xx; layout change; bug fixes"), but what those 2
slots are used for is not obvious.

Also make the tag management functions static, where possible.

Signed-off-by: John Garry <john.garry@huawei.com>
Link: https://lore.kernel.org/r/1666091763-11023-8-git-send-email-john.garry@huawei.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2022-10-22 03:02:52 +00:00
..
Kconfig treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 457 2019-06-19 17:09:09 +02:00
Makefile treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 167 2019-05-30 11:26:39 -07:00
mv_64xx.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 167 2019-05-30 11:26:39 -07:00
mv_64xx.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 167 2019-05-30 11:26:39 -07:00
mv_94xx.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 167 2019-05-30 11:26:39 -07:00
mv_94xx.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 167 2019-05-30 11:26:39 -07:00
mv_chips.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 167 2019-05-30 11:26:39 -07:00
mv_defs.h scsi: mvsas: Use sas_task_find_rq() for tagging 2022-10-22 03:02:52 +00:00
mv_init.c scsi: mvsas: Use sas_task_find_rq() for tagging 2022-10-22 03:02:52 +00:00
mv_sas.c scsi: mvsas: Use sas_task_find_rq() for tagging 2022-10-22 03:02:52 +00:00
mv_sas.h scsi: mvsas: Use sas_task_find_rq() for tagging 2022-10-22 03:02:52 +00:00