hisi_sas: Add timer and spinlock init
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:
parent
976867e6ed
commit
fa42d80dc3
@ -97,7 +97,9 @@ struct hisi_hba {
|
|||||||
u8 sas_addr[SAS_ADDR_SIZE];
|
u8 sas_addr[SAS_ADDR_SIZE];
|
||||||
|
|
||||||
int n_phy;
|
int n_phy;
|
||||||
|
spinlock_t lock;
|
||||||
|
|
||||||
|
struct timer_list timer;
|
||||||
struct workqueue_struct *wq;
|
struct workqueue_struct *wq;
|
||||||
|
|
||||||
int slot_index_count;
|
int slot_index_count;
|
||||||
|
@ -81,6 +81,7 @@ 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;
|
||||||
|
|
||||||
|
spin_lock_init(&hisi_hba->lock);
|
||||||
for (i = 0; i < hisi_hba->n_phy; i++) {
|
for (i = 0; i < hisi_hba->n_phy; i++) {
|
||||||
hisi_sas_phy_init(hisi_hba, i);
|
hisi_sas_phy_init(hisi_hba, i);
|
||||||
hisi_hba->port[i].port_attached = 0;
|
hisi_hba->port[i].port_attached = 0;
|
||||||
@ -275,6 +276,8 @@ static struct Scsi_Host *hisi_sas_shost_alloc(struct platform_device *pdev,
|
|||||||
hisi_hba->shost = shost;
|
hisi_hba->shost = shost;
|
||||||
SHOST_TO_SAS_HA(shost) = &hisi_hba->sha;
|
SHOST_TO_SAS_HA(shost) = &hisi_hba->sha;
|
||||||
|
|
||||||
|
init_timer(&hisi_hba->timer);
|
||||||
|
|
||||||
sas_addr_prop = of_find_property(np, "sas-addr", NULL);
|
sas_addr_prop = of_find_property(np, "sas-addr", NULL);
|
||||||
if (!sas_addr_prop || (sas_addr_prop->length != SAS_ADDR_SIZE))
|
if (!sas_addr_prop || (sas_addr_prop->length != SAS_ADDR_SIZE))
|
||||||
goto err_out;
|
goto err_out;
|
||||||
|
Loading…
Reference in New Issue
Block a user