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

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
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -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
+2 −1
Original line number Original line Diff line number Diff line
@@ -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)
{
{
+1 −0
Original line number Original line Diff line number Diff line
@@ -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;