Lines Matching refs:sas_dev
225 struct hisi_sas_device *sas_dev = &hisi_hba->devices[device_id]; in hisi_sas_slot_task_free() local
250 spin_lock_irqsave(&sas_dev->lock, flags); in hisi_sas_slot_task_free()
252 spin_unlock_irqrestore(&sas_dev->lock, flags); in hisi_sas_slot_task_free()
416 struct hisi_sas_device *sas_dev = device->lldd_dev; in hisi_sas_task_prep() local
428 if (DEV_IS_GONE(sas_dev)) { in hisi_sas_task_prep()
429 if (sas_dev) in hisi_sas_task_prep()
431 sas_dev->device_id); in hisi_sas_task_prep()
445 *dq_pointer = dq = sas_dev->dq; in hisi_sas_task_prep()
497 spin_lock_irqsave(&sas_dev->lock, flags); in hisi_sas_task_prep()
498 list_add_tail(&slot->entry, &sas_dev->list); in hisi_sas_task_prep()
499 spin_unlock_irqrestore(&sas_dev->lock, flags); in hisi_sas_task_prep()
504 slot->device_id = sas_dev->device_id; in hisi_sas_task_prep()
655 struct hisi_sas_device *sas_dev = NULL; in hisi_sas_alloc_dev() local
668 sas_dev = &hisi_hba->devices[i]; in hisi_sas_alloc_dev()
669 sas_dev->dev_status = HISI_SAS_DEV_INIT; in hisi_sas_alloc_dev()
670 sas_dev->dev_type = device->dev_type; in hisi_sas_alloc_dev()
671 sas_dev->hisi_hba = hisi_hba; in hisi_sas_alloc_dev()
672 sas_dev->sas_device = device; in hisi_sas_alloc_dev()
673 sas_dev->dq = dq; in hisi_sas_alloc_dev()
674 spin_lock_init(&sas_dev->lock); in hisi_sas_alloc_dev()
683 return sas_dev; in hisi_sas_alloc_dev()
757 struct hisi_sas_device *sas_dev; in hisi_sas_dev_found() local
762 sas_dev = hisi_hba->hw->alloc_dev(device); in hisi_sas_dev_found()
764 sas_dev = hisi_sas_alloc_dev(device); in hisi_sas_dev_found()
765 if (!sas_dev) { in hisi_sas_dev_found()
771 device->lldd_dev = sas_dev; in hisi_sas_dev_found()
772 hisi_hba->hw->setup_itct(hisi_hba, sas_dev); in hisi_sas_dev_found()
797 sas_dev->device_id, sas_dev->dev_type); in hisi_sas_dev_found()
802 sas_dev->dev_status = HISI_SAS_DEV_NORMAL; in hisi_sas_dev_found()
1011 struct hisi_sas_device *sas_dev = device->lldd_dev; in hisi_sas_release_task() local
1013 list_for_each_entry_safe(slot, slot2, &sas_dev->list, entry) in hisi_sas_release_task()
1019 struct hisi_sas_device *sas_dev; in hisi_sas_release_tasks() local
1024 sas_dev = &hisi_hba->devices[i]; in hisi_sas_release_tasks()
1025 device = sas_dev->sas_device; in hisi_sas_release_tasks()
1027 if ((sas_dev->dev_type == SAS_PHY_UNUSED) || in hisi_sas_release_tasks()
1045 struct hisi_sas_device *sas_dev = device->lldd_dev; in hisi_sas_dev_gone() local
1050 sas_dev->device_id, sas_dev->dev_type); in hisi_sas_dev_gone()
1059 hisi_hba->hw->clear_itct(hisi_hba, sas_dev); in hisi_sas_dev_gone()
1064 hisi_hba->hw->free_device(sas_dev); in hisi_sas_dev_gone()
1065 sas_dev->dev_type = SAS_PHY_UNUSED; in hisi_sas_dev_gone()
1066 sas_dev->sas_device = NULL; in hisi_sas_dev_gone()
1178 struct hisi_sas_device *sas_dev = device->lldd_dev; in hisi_sas_exec_internal_tmf_task() local
1179 struct hisi_hba *hisi_hba = sas_dev->hisi_hba; in hisi_sas_exec_internal_tmf_task()
1362 struct hisi_sas_device *sas_dev = &hisi_hba->devices[i]; in hisi_sas_refresh_port_id() local
1363 struct domain_device *device = sas_dev->sas_device; in hisi_sas_refresh_port_id()
1369 if ((sas_dev->dev_type == SAS_PHY_UNUSED) in hisi_sas_refresh_port_id()
1389 hisi_hba->hw->setup_itct(hisi_hba, sas_dev); in hisi_sas_refresh_port_id()
1430 struct hisi_sas_device *sas_dev; in hisi_sas_reset_init_all_devices() local
1435 sas_dev = &hisi_hba->devices[i]; in hisi_sas_reset_init_all_devices()
1436 device = sas_dev->sas_device; in hisi_sas_reset_init_all_devices()
1438 if ((sas_dev->dev_type == SAS_PHY_UNUSED) || !device) in hisi_sas_reset_init_all_devices()
1486 struct hisi_sas_device *sas_dev = &hisi_hba->devices[i]; in hisi_sas_terminate_stp_reject() local
1487 struct domain_device *device = sas_dev->sas_device; in hisi_sas_terminate_stp_reject()
1489 if ((sas_dev->dev_type == SAS_PHY_UNUSED) || !device) in hisi_sas_terminate_stp_reject()
1599 struct hisi_sas_device *sas_dev = device->lldd_dev; in hisi_sas_abort_task() local
1605 if (!sas_dev) in hisi_sas_abort_task()
1738 struct hisi_sas_device *sas_dev = device->lldd_dev; in hisi_sas_debug_I_T_nexus_reset() local
1758 reset_type = (sas_dev->dev_status == HISI_SAS_DEV_INIT || in hisi_sas_debug_I_T_nexus_reset()
1780 } else if (sas_dev->dev_status != HISI_SAS_DEV_INIT) { in hisi_sas_debug_I_T_nexus_reset()
1822 struct hisi_sas_device *sas_dev = device->lldd_dev; in hisi_sas_lu_reset() local
1856 sas_dev->device_id, rc); in hisi_sas_lu_reset()
1873 struct hisi_sas_device *sas_dev = &hisi_hba->devices[i]; in hisi_sas_clear_nexus_ha() local
1874 struct domain_device *device = sas_dev->sas_device; in hisi_sas_clear_nexus_ha()
1876 if ((sas_dev->dev_type == SAS_PHY_UNUSED) || !device || in hisi_sas_clear_nexus_ha()
1883 sas_dev->device_id, rc); in hisi_sas_clear_nexus_ha()
1931 struct hisi_sas_device *sas_dev = device->lldd_dev; in hisi_sas_internal_abort_task_exec() local
1962 spin_lock_irqsave(&sas_dev->lock, flags); in hisi_sas_internal_abort_task_exec()
1963 list_add_tail(&slot->entry, &sas_dev->list); in hisi_sas_internal_abort_task_exec()
1964 spin_unlock_irqrestore(&sas_dev->lock, flags); in hisi_sas_internal_abort_task_exec()
1969 slot->device_id = sas_dev->device_id; in hisi_sas_internal_abort_task_exec()
2021 struct hisi_sas_device *sas_dev = device->lldd_dev; in _hisi_sas_internal_task_abort() local
2045 res = hisi_sas_internal_abort_task_exec(hisi_hba, sas_dev->device_id, in _hisi_sas_internal_task_abort()