aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/hisi_sas/hisi_sas.h
diff options
context:
space:
mode:
authorJohn Garry <john.garry@huawei.com>2016-09-06 23:36:12 +0800
committerMartin K. Petersen <martin.petersen@oracle.com>2016-09-14 12:54:17 -0400
commit4fde02ad66dc9ceb0b55daca21ef33b43df30ded (patch)
tree4c707c92f64c6c18bfaa4dd62c6e24f70fc0abbd /drivers/scsi/hisi_sas/hisi_sas.h
parentscsi: hisi_sas: save completion queue read pointer (diff)
downloadlinux-dev-4fde02ad66dc9ceb0b55daca21ef33b43df30ded.tar.xz
linux-dev-4fde02ad66dc9ceb0b55daca21ef33b43df30ded.zip
scsi: hisi_sas: save delivery queue write pointer
Optimise by saving an avoidable read in the get_free_slot function. The delivery queue write pointer will only be updated by software, so don't bother re-reading what was already written in the previous call to start_delivery function. Signed-off-by: John Garry <john.garry@huawei.com> Reviewed-by: Hannes Reinecke <hare@suse.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.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/scsi/hisi_sas/hisi_sas.h b/drivers/scsi/hisi_sas/hisi_sas.h
index 9410335caf41..72c98522bd26 100644
--- a/drivers/scsi/hisi_sas/hisi_sas.h
+++ b/drivers/scsi/hisi_sas/hisi_sas.h
@@ -98,6 +98,12 @@ struct hisi_sas_cq {
int id;
};
+struct hisi_sas_dq {
+ struct hisi_hba *hisi_hba;
+ int wr_point;
+ int id;
+};
+
struct hisi_sas_device {
enum sas_device_type dev_type;
struct hisi_hba *hisi_hba;
@@ -194,6 +200,7 @@ struct hisi_hba {
struct Scsi_Host *shost;
struct hisi_sas_cq cq[HISI_SAS_MAX_QUEUES];
+ struct hisi_sas_dq dq[HISI_SAS_MAX_QUEUES];
struct hisi_sas_phy phy[HISI_SAS_MAX_PHYS];
struct hisi_sas_port port[HISI_SAS_MAX_PHYS];