[PATCH 2/6] scsi: hisi_sas: Pass scsi_cmnd pointer to hisi_sas_hw.slot_index_alloc
From: John Garry
Date: Thu Oct 24 2019 - 10:25:14 EST
In future we will want to pass both the domain_device and scsi_cmnd
pointers to hisi_sas_hw.slot_index_alloc.
Signed-off-by: John Garry <john.garry@xxxxxxxxxx>
---
drivers/scsi/hisi_sas/hisi_sas.h | 3 ++-
drivers/scsi/hisi_sas/hisi_sas_main.c | 4 ++--
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 3 ++-
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/scsi/hisi_sas/hisi_sas.h b/drivers/scsi/hisi_sas/hisi_sas.h
index fbfaa92765cf..4eb8f1c53f78 100644
--- a/drivers/scsi/hisi_sas/hisi_sas.h
+++ b/drivers/scsi/hisi_sas/hisi_sas.h
@@ -278,7 +278,8 @@ struct hisi_sas_hw {
void (*setup_itct)(struct hisi_hba *hisi_hba,
struct hisi_sas_device *device);
int (*slot_index_alloc)(struct hisi_hba *hisi_hba,
- struct domain_device *device);
+ struct domain_device *device,
+ struct scsi_cmnd *scmd);
void (*slot_index_free)(struct hisi_hba *hisi_hba, int slot_idx);
int (*bitmaps_alloc)(struct hisi_hba *hisi_hba);
struct hisi_sas_device *(*alloc_dev)(struct domain_device *device);
diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c
index f4937da9baf8..53802c1cc1d0 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_main.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_main.c
@@ -438,7 +438,7 @@ static int hisi_sas_task_prep(struct sas_task *task,
}
if (hisi_hba->hw->slot_index_alloc)
- rc = hisi_hba->hw->slot_index_alloc(hisi_hba, device);
+ rc = hisi_hba->hw->slot_index_alloc(hisi_hba, device, NULL);
else {
struct scsi_cmnd *scsi_cmnd = NULL;
@@ -1929,7 +1929,7 @@ hisi_sas_internal_abort_task_exec(struct hisi_hba *hisi_hba, int device_id,
/* simply get a slot and send abort command */
if (hisi_hba->hw->slot_index_alloc)
- rc = hisi_hba->hw->slot_index_alloc(hisi_hba, device);
+ rc = hisi_hba->hw->slot_index_alloc(hisi_hba, device, NULL);
else
rc = hisi_sas_slot_index_alloc(hisi_hba, NULL);
if (rc < 0)
diff --git a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
index 683e1b99c9ae..b98ae960964b 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
@@ -791,7 +791,8 @@ static int bitmaps_alloc_v2_hw(struct hisi_hba *hisi_hba)
static int
slot_index_alloc_quirk_v2_hw(struct hisi_hba *hisi_hba,
- struct domain_device *device)
+ struct domain_device *device,
+ struct scsi_cmnd *scmd)
{
struct sbitmap *slot_index_tags;
int sata_dev = dev_is_sata(device);
--
2.17.1