summaryrefslogtreecommitdiff
path: root/drivers/scsi/hisi_sas/hisi_sas.h
diff options
context:
space:
mode:
authorJohn Garry <john.garry@huawei.com>2015-11-18 00:50:31 +0800
committerMartin K. Petersen <martin.petersen@oracle.com>2015-11-25 22:12:52 -0500
commit7eb7869f1307cc86fca9afd1425bba023c35414f (patch)
tree61ac3c3d21495a4154f9b23596943936581f5d7f /drivers/scsi/hisi_sas/hisi_sas.h
parente8899fad9672ca8b414db36e16ce4d21818802dc (diff)
hisi_sas: Add scsi host registration
Add functionality to register device as a scsi host. The SAS domain transport ops are empty at this point. Signed-off-by: John Garry <john.garry@huawei.com> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Hannes Reinecke <hare@suse.de> 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.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/drivers/scsi/hisi_sas/hisi_sas.h b/drivers/scsi/hisi_sas/hisi_sas.h
index a5cec225eb25..6f57fd16e937 100644
--- a/drivers/scsi/hisi_sas/hisi_sas.h
+++ b/drivers/scsi/hisi_sas/hisi_sas.h
@@ -23,4 +23,38 @@
#define DRV_VERSION "v1.0"
+#define HISI_SAS_MAX_PHYS 9
+#define HISI_SAS_MAX_ITCT_ENTRIES 4096
+#define HISI_SAS_MAX_DEVICES HISI_SAS_MAX_ITCT_ENTRIES
+#define HISI_SAS_COMMAND_ENTRIES 8192
+
+struct hisi_sas_phy {
+ struct asd_sas_phy sas_phy;
+};
+
+struct hisi_sas_port {
+ struct asd_sas_port sas_port;
+};
+
+struct hisi_sas_hw {
+};
+
+struct hisi_hba {
+ /* This must be the first element, used by SHOST_TO_SAS_HA */
+ struct sas_ha_struct *p;
+
+ struct platform_device *pdev;
+ u8 sas_addr[SAS_ADDR_SIZE];
+
+ int n_phy;
+
+ /* SCSI/SAS glue */
+ struct sas_ha_struct sha;
+ struct Scsi_Host *shost;
+ struct hisi_sas_phy phy[HISI_SAS_MAX_PHYS];
+ struct hisi_sas_port port[HISI_SAS_MAX_PHYS];
+ const struct hisi_sas_hw *hw; /* Low level hw interface */
+};
+
+#define HISI_SAS_SGE_PAGE_CNT SCSI_MAX_SG_SEGMENTS
#endif