Commit b4241f0f authored by Xiaofei Tan's avatar Xiaofei Tan Committed by Martin K. Petersen

scsi: hisi_sas: add hisi_hba.rst_work init for v3 hw

Add init code of hisi_hba->rst_work for v3 hw. Because v3 hw also need
it to recover controller when some hw errors occurs.
Signed-off-by: default avatarXiaofei Tan <tanxiaofei@huawei.com>
Signed-off-by: default avatarJohn Garry <john.garry@huawei.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent ffc8f149
...@@ -425,4 +425,5 @@ extern void hisi_sas_slot_task_free(struct hisi_hba *hisi_hba, ...@@ -425,4 +425,5 @@ extern void hisi_sas_slot_task_free(struct hisi_hba *hisi_hba,
struct sas_task *task, struct sas_task *task,
struct hisi_sas_slot *slot); struct hisi_sas_slot *slot);
extern void hisi_sas_init_mem(struct hisi_hba *hisi_hba); extern void hisi_sas_init_mem(struct hisi_hba *hisi_hba);
extern void hisi_sas_rst_work_handler(struct work_struct *work);
#endif #endif
...@@ -1785,13 +1785,14 @@ void hisi_sas_free(struct hisi_hba *hisi_hba) ...@@ -1785,13 +1785,14 @@ void hisi_sas_free(struct hisi_hba *hisi_hba)
} }
EXPORT_SYMBOL_GPL(hisi_sas_free); EXPORT_SYMBOL_GPL(hisi_sas_free);
static void hisi_sas_rst_work_handler(struct work_struct *work) void hisi_sas_rst_work_handler(struct work_struct *work)
{ {
struct hisi_hba *hisi_hba = struct hisi_hba *hisi_hba =
container_of(work, struct hisi_hba, rst_work); container_of(work, struct hisi_hba, rst_work);
hisi_sas_controller_reset(hisi_hba); hisi_sas_controller_reset(hisi_hba);
} }
EXPORT_SYMBOL_GPL(hisi_sas_rst_work_handler);
int hisi_sas_get_fw_info(struct hisi_hba *hisi_hba) int hisi_sas_get_fw_info(struct hisi_hba *hisi_hba)
{ {
......
...@@ -1840,6 +1840,7 @@ hisi_sas_shost_alloc_pci(struct pci_dev *pdev) ...@@ -1840,6 +1840,7 @@ hisi_sas_shost_alloc_pci(struct pci_dev *pdev)
} }
hisi_hba = shost_priv(shost); hisi_hba = shost_priv(shost);
INIT_WORK(&hisi_hba->rst_work, hisi_sas_rst_work_handler);
hisi_hba->hw = &hisi_sas_v3_hw; hisi_hba->hw = &hisi_sas_v3_hw;
hisi_hba->pci_dev = pdev; hisi_hba->pci_dev = pdev;
hisi_hba->dev = dev; hisi_hba->dev = dev;
......
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