Lines Matching refs:sas_dev

221 	struct hisi_sas_device *sas_dev = &hisi_hba->devices[device_id];  in hisi_sas_slot_task_free()  local
247 spin_lock(&sas_dev->lock); in hisi_sas_slot_task_free()
249 spin_unlock(&sas_dev->lock); in hisi_sas_slot_task_free()
413 struct hisi_sas_device *sas_dev = device->lldd_dev; in hisi_sas_task_prep() local
426 if (DEV_IS_GONE(sas_dev)) { in hisi_sas_task_prep()
427 if (sas_dev) in hisi_sas_task_prep()
429 sas_dev->device_id); in hisi_sas_task_prep()
500 spin_lock(&sas_dev->lock); in hisi_sas_task_prep()
501 list_add_tail(&slot->entry, &sas_dev->list); in hisi_sas_task_prep()
502 spin_unlock(&sas_dev->lock); in hisi_sas_task_prep()
507 slot->device_id = sas_dev->device_id; in hisi_sas_task_prep()
662 struct hisi_sas_device *sas_dev = NULL; in hisi_sas_alloc_dev() local
674 sas_dev = &hisi_hba->devices[i]; in hisi_sas_alloc_dev()
675 sas_dev->dev_status = HISI_SAS_DEV_INIT; in hisi_sas_alloc_dev()
676 sas_dev->dev_type = device->dev_type; in hisi_sas_alloc_dev()
677 sas_dev->hisi_hba = hisi_hba; in hisi_sas_alloc_dev()
678 sas_dev->sas_device = device; in hisi_sas_alloc_dev()
679 sas_dev->dq = dq; in hisi_sas_alloc_dev()
680 spin_lock_init(&sas_dev->lock); in hisi_sas_alloc_dev()
689 return sas_dev; in hisi_sas_alloc_dev()
763 struct hisi_sas_device *sas_dev; in hisi_sas_dev_found() local
768 sas_dev = hisi_hba->hw->alloc_dev(device); in hisi_sas_dev_found()
770 sas_dev = hisi_sas_alloc_dev(device); in hisi_sas_dev_found()
771 if (!sas_dev) { in hisi_sas_dev_found()
777 device->lldd_dev = sas_dev; in hisi_sas_dev_found()
778 hisi_hba->hw->setup_itct(hisi_hba, sas_dev); in hisi_sas_dev_found()
803 sas_dev->device_id, sas_dev->dev_type); in hisi_sas_dev_found()
808 sas_dev->dev_status = HISI_SAS_DEV_NORMAL; in hisi_sas_dev_found()
1032 struct hisi_sas_device *sas_dev = device->lldd_dev; in hisi_sas_release_task() local
1034 list_for_each_entry_safe(slot, slot2, &sas_dev->list, entry) in hisi_sas_release_task()
1040 struct hisi_sas_device *sas_dev; in hisi_sas_release_tasks() local
1045 sas_dev = &hisi_hba->devices[i]; in hisi_sas_release_tasks()
1046 device = sas_dev->sas_device; in hisi_sas_release_tasks()
1048 if ((sas_dev->dev_type == SAS_PHY_UNUSED) || in hisi_sas_release_tasks()
1066 struct hisi_sas_device *sas_dev = device->lldd_dev; in hisi_sas_dev_gone() local
1072 sas_dev->device_id, sas_dev->dev_type); in hisi_sas_dev_gone()
1081 ret = hisi_hba->hw->clear_itct(hisi_hba, sas_dev); in hisi_sas_dev_gone()
1086 hisi_hba->hw->free_device(sas_dev); in hisi_sas_dev_gone()
1090 sas_dev->dev_type = SAS_PHY_UNUSED; in hisi_sas_dev_gone()
1091 sas_dev->sas_device = NULL; in hisi_sas_dev_gone()
1203 struct hisi_sas_device *sas_dev = device->lldd_dev; in hisi_sas_exec_internal_tmf_task() local
1204 struct hisi_hba *hisi_hba = sas_dev->hisi_hba; in hisi_sas_exec_internal_tmf_task()
1389 struct hisi_sas_device *sas_dev = &hisi_hba->devices[i]; in hisi_sas_refresh_port_id() local
1390 struct domain_device *device = sas_dev->sas_device; in hisi_sas_refresh_port_id()
1396 if ((sas_dev->dev_type == SAS_PHY_UNUSED) in hisi_sas_refresh_port_id()
1416 hisi_hba->hw->setup_itct(hisi_hba, sas_dev); in hisi_sas_refresh_port_id()
1456 struct hisi_sas_device *sas_dev; in hisi_sas_reset_init_all_devices() local
1461 sas_dev = &hisi_hba->devices[i]; in hisi_sas_reset_init_all_devices()
1462 device = sas_dev->sas_device; in hisi_sas_reset_init_all_devices()
1464 if ((sas_dev->dev_type == SAS_PHY_UNUSED) || !device) in hisi_sas_reset_init_all_devices()
1512 struct hisi_sas_device *sas_dev = &hisi_hba->devices[i]; in hisi_sas_terminate_stp_reject() local
1513 struct domain_device *device = sas_dev->sas_device; in hisi_sas_terminate_stp_reject()
1515 if ((sas_dev->dev_type == SAS_PHY_UNUSED) || !device) in hisi_sas_terminate_stp_reject()
1630 struct hisi_sas_device *sas_dev = device->lldd_dev; in hisi_sas_abort_task() local
1636 if (!sas_dev) in hisi_sas_abort_task()
1773 struct hisi_sas_device *sas_dev = device->lldd_dev; in hisi_sas_debug_I_T_nexus_reset() local
1793 reset_type = (sas_dev->dev_status == HISI_SAS_DEV_INIT || in hisi_sas_debug_I_T_nexus_reset()
1816 } else if (sas_dev->dev_status != HISI_SAS_DEV_INIT) { in hisi_sas_debug_I_T_nexus_reset()
1858 struct hisi_sas_device *sas_dev = device->lldd_dev; in hisi_sas_lu_reset() local
1892 sas_dev->device_id, rc); in hisi_sas_lu_reset()
1921 struct hisi_sas_device *sas_dev = &hisi_hba->devices[i]; in hisi_sas_clear_nexus_ha() local
1922 struct domain_device *device = sas_dev->sas_device; in hisi_sas_clear_nexus_ha()
1924 if ((sas_dev->dev_type == SAS_PHY_UNUSED) || !device || in hisi_sas_clear_nexus_ha()
1978 struct hisi_sas_device *sas_dev = device->lldd_dev; in hisi_sas_internal_abort_task_exec() local
2009 spin_lock(&sas_dev->lock); in hisi_sas_internal_abort_task_exec()
2010 list_add_tail(&slot->entry, &sas_dev->list); in hisi_sas_internal_abort_task_exec()
2011 spin_unlock(&sas_dev->lock); in hisi_sas_internal_abort_task_exec()
2016 slot->device_id = sas_dev->device_id; in hisi_sas_internal_abort_task_exec()
2070 struct hisi_sas_device *sas_dev = device->lldd_dev; in _hisi_sas_internal_task_abort() local
2097 res = hisi_sas_internal_abort_task_exec(hisi_hba, sas_dev->device_id, in _hisi_sas_internal_task_abort()