summaryrefslogtreecommitdiff
path: root/drivers/scsi/hisi_sas/hisi_sas.h
diff options
context:
space:
mode:
authorXiaofei Tan <tanxiaofei@huawei.com>2018-05-21 18:09:21 +0800
committerMartin K. Petersen <martin.petersen@oracle.com>2018-05-28 22:40:32 -0400
commit78bd2b4f6e7c0522cc8bc8ad651f20813ae06f6c (patch)
treec8918e2aae3253e46c8dc1426c4f4d94ed0fe180 /drivers/scsi/hisi_sas/hisi_sas.h
parenta865ae14ff62797f14b760b2063b90c81d27d178 (diff)
downloadlinux-next-78bd2b4f6e7c0522cc8bc8ad651f20813ae06f6c.tar.gz
scsi: hisi_sas: Include TMF elements in struct hisi_sas_slot
In future scenarios we will want to use the TMF struct for more task types than SSP. As such, we can add struct hisi_sas_tmf_task directly into struct hisi_sas_slot, and this will mean we can remove the TMF parameters from the task prep functions. Signed-off-by: Xiaofei Tan <tanxiaofei@huawei.com> Signed-off-by: John Garry <john.garry@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/hisi_sas/hisi_sas.h')
-rw-r--r--drivers/scsi/hisi_sas/hisi_sas.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/scsi/hisi_sas/hisi_sas.h b/drivers/scsi/hisi_sas/hisi_sas.h
index 8ce6abb48867..60bd652534fe 100644
--- a/drivers/scsi/hisi_sas/hisi_sas.h
+++ b/drivers/scsi/hisi_sas/hisi_sas.h
@@ -179,6 +179,11 @@ struct hisi_sas_device {
u8 dev_status;
};
+struct hisi_sas_tmf_task {
+ u8 tmf;
+ u16 tag_of_task_to_be_managed;
+};
+
struct hisi_sas_slot {
struct list_head entry;
struct list_head delivery;
@@ -199,11 +204,7 @@ struct hisi_sas_slot {
struct work_struct abort_slot;
struct timer_list internal_abort_timer;
bool is_internal;
-};
-
-struct hisi_sas_tmf_task {
- u8 tmf;
- u16 tag_of_task_to_be_managed;
+ struct hisi_sas_tmf_task *tmf;
};
struct hisi_sas_hw {
@@ -217,8 +218,7 @@ struct hisi_sas_hw {
int (*get_free_slot)(struct hisi_hba *hisi_hba, struct hisi_sas_dq *dq);
void (*start_delivery)(struct hisi_sas_dq *dq);
void (*prep_ssp)(struct hisi_hba *hisi_hba,
- struct hisi_sas_slot *slot, int is_tmf,
- struct hisi_sas_tmf_task *tmf);
+ struct hisi_sas_slot *slot);
void (*prep_smp)(struct hisi_hba *hisi_hba,
struct hisi_sas_slot *slot);
void (*prep_stp)(struct hisi_hba *hisi_hba,