Lines Matching refs:sas_dev
773 struct hisi_sas_device *sas_dev = device->lldd_dev; in slot_index_alloc_quirk_v2_hw() local
774 int sata_idx = sas_dev->sata_idx; in slot_index_alloc_quirk_v2_hw()
842 struct hisi_sas_device *sas_dev = NULL; in alloc_dev_quirk_v2_hw() local
863 sas_dev = &hisi_hba->devices[i]; in alloc_dev_quirk_v2_hw()
864 sas_dev->dev_status = HISI_SAS_DEV_INIT; in alloc_dev_quirk_v2_hw()
865 sas_dev->dev_type = device->dev_type; in alloc_dev_quirk_v2_hw()
866 sas_dev->hisi_hba = hisi_hba; in alloc_dev_quirk_v2_hw()
867 sas_dev->sas_device = device; in alloc_dev_quirk_v2_hw()
868 sas_dev->sata_idx = sata_idx; in alloc_dev_quirk_v2_hw()
869 sas_dev->dq = dq; in alloc_dev_quirk_v2_hw()
870 spin_lock_init(&sas_dev->lock); in alloc_dev_quirk_v2_hw()
879 return sas_dev; in alloc_dev_quirk_v2_hw()
922 struct hisi_sas_device *sas_dev) in setup_itct_v2_hw() argument
924 struct domain_device *device = sas_dev->sas_device; in setup_itct_v2_hw()
926 u64 qw0, device_id = sas_dev->device_id; in setup_itct_v2_hw()
937 switch (sas_dev->dev_type) { in setup_itct_v2_hw()
952 sas_dev->dev_type); in setup_itct_v2_hw()
976 struct hisi_sas_device *sas_dev) in clear_itct_v2_hw() argument
979 u64 dev_id = sas_dev->device_id; in clear_itct_v2_hw()
985 sas_dev->completion = &completion; in clear_itct_v2_hw()
996 if (!wait_for_completion_timeout(sas_dev->completion, in clear_itct_v2_hw()
1007 static void free_device_v2_hw(struct hisi_sas_device *sas_dev) in free_device_v2_hw() argument
1009 struct hisi_hba *hisi_hba = sas_dev->hisi_hba; in free_device_v2_hw()
1012 if (dev_is_sata(sas_dev->sas_device)) in free_device_v2_hw()
1013 clear_bit(sas_dev->sata_idx, hisi_hba->sata_dev_bitmap); in free_device_v2_hw()
1704 struct hisi_sas_device *sas_dev = device->lldd_dev; in prep_smp_v2_hw() local
1720 hdr->dw1 = cpu_to_le32((sas_dev->device_id << CMD_HDR_DEV_ID_OFF) | in prep_smp_v2_hw()
1741 struct hisi_sas_device *sas_dev = device->lldd_dev; in prep_ssp_v2_hw() local
1777 dw1 |= sas_dev->device_id << CMD_HDR_DEV_ID_OFF; in prep_ssp_v2_hw()
2330 struct hisi_sas_device *sas_dev; in slot_complete_v2_hw() local
2349 sas_dev = device->lldd_dev; in slot_complete_v2_hw()
2358 if (unlikely(!sas_dev)) { in slot_complete_v2_hw()
2405 slot->idx, task, sas_dev->device_id, in slot_complete_v2_hw()
2498 struct hisi_sas_device *sas_dev = device->lldd_dev; in prep_ata_v2_hw() local
2544 dw1 |= sas_dev->device_id << CMD_HDR_DEV_ID_OFF; in prep_ata_v2_hw()
2622 struct hisi_sas_device *sas_dev = dev->lldd_dev; in prep_abort_v2_hw() local
2637 hdr->dw1 = cpu_to_le32(sas_dev->device_id << CMD_HDR_DEV_ID_OFF); in prep_abort_v2_hw()
3098 struct hisi_sas_device *sas_dev = &hisi_hba->devices[dev_id]; in fatal_axi_int_v2_hw() local
3102 complete(sas_dev->completion); in fatal_axi_int_v2_hw()