Commit af740dbe authored by John Garry's avatar John Garry Committed by Martin K. Petersen

hisi_sas: Add hisi sas device type

Include initialisation.
Signed-off-by: default avatarJohn Garry <john.garry@huawei.com>
Reviewed-by: default avatarArnd Bergmann <arnd@arndb.de>
Reviewed-by: default avatarHannes Reinecke <hare@suse.de>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 7e9080e1
...@@ -37,6 +37,11 @@ ...@@ -37,6 +37,11 @@
#define HISI_SAS_NAME_LEN 32 #define HISI_SAS_NAME_LEN 32
enum dev_status {
HISI_SAS_DEV_NORMAL,
HISI_SAS_DEV_EH,
};
struct hisi_sas_phy { struct hisi_sas_phy {
struct asd_sas_phy sas_phy; struct asd_sas_phy sas_phy;
u64 dev_sas_addr; u64 dev_sas_addr;
...@@ -51,6 +56,12 @@ struct hisi_sas_cq { ...@@ -51,6 +56,12 @@ struct hisi_sas_cq {
int id; int id;
}; };
struct hisi_sas_device {
enum sas_device_type dev_type;
u64 device_id;
u8 dev_status;
};
struct hisi_sas_slot { struct hisi_sas_slot {
}; };
...@@ -89,6 +100,7 @@ struct hisi_hba { ...@@ -89,6 +100,7 @@ struct hisi_hba {
char *int_names; char *int_names;
struct dma_pool *sge_page_pool; struct dma_pool *sge_page_pool;
struct hisi_sas_device devices[HISI_SAS_MAX_DEVICES];
struct dma_pool *command_table_pool; struct dma_pool *command_table_pool;
struct dma_pool *status_buffer_pool; struct dma_pool *status_buffer_pool;
struct hisi_sas_cmd_hdr *cmd_hdr[HISI_SAS_MAX_QUEUES]; struct hisi_sas_cmd_hdr *cmd_hdr[HISI_SAS_MAX_QUEUES];
......
...@@ -57,6 +57,12 @@ static int hisi_sas_alloc(struct hisi_hba *hisi_hba, struct Scsi_Host *shost) ...@@ -57,6 +57,12 @@ static int hisi_sas_alloc(struct hisi_hba *hisi_hba, struct Scsi_Host *shost)
struct platform_device *pdev = hisi_hba->pdev; struct platform_device *pdev = hisi_hba->pdev;
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
for (i = 0; i < HISI_SAS_MAX_DEVICES; i++) {
hisi_hba->devices[i].dev_type = SAS_PHY_UNUSED;
hisi_hba->devices[i].device_id = i;
hisi_hba->devices[i].dev_status = HISI_SAS_DEV_NORMAL;
}
for (i = 0; i < hisi_hba->queue_count; i++) { for (i = 0; i < hisi_hba->queue_count; i++) {
struct hisi_sas_cq *cq = &hisi_hba->cq[i]; struct hisi_sas_cq *cq = &hisi_hba->cq[i];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment