summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/hisi_sas/hisi_sas.h
diff options
context:
space:
mode:
authorJohn Garry <john.garry@huawei.com>2019-08-05 21:47:58 +0800
committerMartin K. Petersen <martin.petersen@oracle.com>2019-08-07 22:13:14 -0400
commit93352abc81a90314bf032038200ce96989a32c62 (patch)
treea80c910918374f0fa09fd41b9c05f8cf7edff34d /drivers/scsi/hisi_sas/hisi_sas.h
parent69a76d08f2e41fa7f27bd6c4c0dce92cce01744a (diff)
downloadlinux-93352abc81a90314bf032038200ce96989a32c62.tar.bz2
scsi: hisi_sas: Make max IPTT count equal for all hw revisions
There is a small optimisation to be had by making the max IPTT the same for all hw revisions, that being we can drop the check for read and write pointer being the same in the get free slot function. Change v1 hw to have max IPTT of 4096 - same as v2 and v3 hw - and drop hisi_sas_hw.max_command_entries. 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.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/scsi/hisi_sas/hisi_sas.h b/drivers/scsi/hisi_sas/hisi_sas.h
index 42a02cc47a60..1fa3e53e857d 100644
--- a/drivers/scsi/hisi_sas/hisi_sas.h
+++ b/drivers/scsi/hisi_sas/hisi_sas.h
@@ -31,7 +31,10 @@
#define HISI_SAS_MAX_DEVICES HISI_SAS_MAX_ITCT_ENTRIES
#define HISI_SAS_RESET_BIT 0
#define HISI_SAS_REJECT_CMD_BIT 1
-#define HISI_SAS_RESERVED_IPTT_CNT 96
+#define HISI_SAS_MAX_COMMANDS (HISI_SAS_QUEUE_SLOTS)
+#define HISI_SAS_RESERVED_IPTT 96
+#define HISI_SAS_UNRESERVED_IPTT \
+ (HISI_SAS_MAX_COMMANDS - HISI_SAS_RESERVED_IPTT)
#define HISI_SAS_STATUS_BUF_SZ (sizeof(struct hisi_sas_status_buffer))
#define HISI_SAS_COMMAND_TABLE_SZ (sizeof(union hisi_sas_command_table))
@@ -292,7 +295,6 @@ struct hisi_sas_hw {
int delay_ms, int timeout_ms);
void (*snapshot_prepare)(struct hisi_hba *hisi_hba);
void (*snapshot_restore)(struct hisi_hba *hisi_hba);
- int max_command_entries;
int complete_hdr_size;
struct scsi_host_template *sht;