hisi_sas: Add phy SAS ADDR initialization
The SAS address for the HBA comes from the device tree. 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>
This commit is contained in:
committed by
Martin K. Petersen
parent
9101a0792d
commit
5d74242e37
@@ -39,6 +39,7 @@
|
|||||||
|
|
||||||
struct hisi_sas_phy {
|
struct hisi_sas_phy {
|
||||||
struct asd_sas_phy sas_phy;
|
struct asd_sas_phy sas_phy;
|
||||||
|
u64 dev_sas_addr;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct hisi_sas_port {
|
struct hisi_sas_port {
|
||||||
|
|||||||
@@ -281,6 +281,16 @@ err_out:
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void hisi_sas_init_add(struct hisi_hba *hisi_hba)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; i < hisi_hba->n_phy; i++)
|
||||||
|
memcpy(&hisi_hba->phy[i].dev_sas_addr,
|
||||||
|
hisi_hba->sas_addr,
|
||||||
|
SAS_ADDR_SIZE);
|
||||||
|
}
|
||||||
|
|
||||||
int hisi_sas_probe(struct platform_device *pdev,
|
int hisi_sas_probe(struct platform_device *pdev,
|
||||||
const struct hisi_sas_hw *hw)
|
const struct hisi_sas_hw *hw)
|
||||||
{
|
{
|
||||||
@@ -334,6 +344,8 @@ int hisi_sas_probe(struct platform_device *pdev,
|
|||||||
sha->sas_port[i] = &hisi_hba->port[i].sas_port;
|
sha->sas_port[i] = &hisi_hba->port[i].sas_port;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
hisi_sas_init_add(hisi_hba);
|
||||||
|
|
||||||
rc = scsi_add_host(shost, &pdev->dev);
|
rc = scsi_add_host(shost, &pdev->dev);
|
||||||
if (rc)
|
if (rc)
|
||||||
goto err_out_ha;
|
goto err_out_ha;
|
||||||
|
|||||||
Reference in New Issue
Block a user