Lines Matching refs:handle

72 static int _scsih_add_device(struct MPT3SAS_ADAPTER *ioc, u16 handle,
74 static int _scsih_pcie_add_device(struct MPT3SAS_ADAPTER *ioc, u16 handle);
78 _scsih_pcie_check_device(struct MPT3SAS_ADAPTER *ioc, u16 handle);
281 u16 handle; member
509 _scsih_get_sas_address(struct MPT3SAS_ADAPTER *ioc, u16 handle, in _scsih_get_sas_address() argument
519 MPI2_SAS_DEVICE_PGAD_FORM_HANDLE, handle))) { in _scsih_get_sas_address()
530 if ((handle <= ioc->sas_hba.num_phys) && in _scsih_get_sas_address()
545 handle, ioc_status, __FILE__, __LINE__, __func__); in _scsih_get_sas_address()
819 __mpt3sas_get_sdev_by_handle(struct MPT3SAS_ADAPTER *ioc, u16 handle) in __mpt3sas_get_sdev_by_handle() argument
826 if (sas_device->handle == handle) in __mpt3sas_get_sdev_by_handle()
830 if (sas_device->handle == handle) in __mpt3sas_get_sdev_by_handle()
850 mpt3sas_get_sdev_by_handle(struct MPT3SAS_ADAPTER *ioc, u16 handle) in mpt3sas_get_sdev_by_handle() argument
856 sas_device = __mpt3sas_get_sdev_by_handle(ioc, handle); in mpt3sas_get_sdev_by_handle()
937 sas_device->handle, (u64)sas_device->sas_address); in _scsih_sas_device_remove()
959 _scsih_device_remove_by_handle(struct MPT3SAS_ADAPTER *ioc, u16 handle) in _scsih_device_remove_by_handle() argument
968 sas_device = __mpt3sas_get_sdev_by_handle(ioc, handle); in _scsih_device_remove_by_handle()
1028 __func__, sas_device->handle, in _scsih_sas_device_add()
1040 clear_bit(sas_device->handle, ioc->pend_os_device_add); in _scsih_sas_device_add()
1044 if (!mpt3sas_transport_port_add(ioc, sas_device->handle, in _scsih_sas_device_add()
1061 clear_bit(sas_device->handle, ioc->pend_os_device_add); in _scsih_sas_device_add()
1080 __func__, sas_device->handle, in _scsih_sas_device_init_add()
1165 __mpt3sas_get_pdev_by_handle(struct MPT3SAS_ADAPTER *ioc, u16 handle) in __mpt3sas_get_pdev_by_handle() argument
1172 if (pcie_device->handle == handle) in __mpt3sas_get_pdev_by_handle()
1176 if (pcie_device->handle == handle) in __mpt3sas_get_pdev_by_handle()
1199 mpt3sas_get_pdev_by_handle(struct MPT3SAS_ADAPTER *ioc, u16 handle) in mpt3sas_get_pdev_by_handle() argument
1205 pcie_device = __mpt3sas_get_pdev_by_handle(ioc, handle); in mpt3sas_get_pdev_by_handle()
1258 pcie_device->handle, (u64)pcie_device->wwid); in _scsih_pcie_device_remove()
1297 _scsih_pcie_device_remove_by_handle(struct MPT3SAS_ADAPTER *ioc, u16 handle) in _scsih_pcie_device_remove_by_handle() argument
1308 pcie_device = __mpt3sas_get_pdev_by_handle(ioc, handle); in _scsih_pcie_device_remove_by_handle()
1349 pcie_device->handle, (u64)pcie_device->wwid)); in _scsih_pcie_device_add()
1369 clear_bit(pcie_device->handle, ioc->pend_os_device_add); in _scsih_pcie_device_add()
1377 clear_bit(pcie_device->handle, ioc->pend_os_device_add); in _scsih_pcie_device_add()
1380 clear_bit(pcie_device->handle, ioc->pend_os_device_add); in _scsih_pcie_device_add()
1400 pcie_device->handle, (u64)pcie_device->wwid)); in _scsih_pcie_device_init_add()
1458 mpt3sas_raid_device_find_by_handle(struct MPT3SAS_ADAPTER *ioc, u16 handle) in mpt3sas_raid_device_find_by_handle() argument
1464 if (raid_device->handle != handle) in mpt3sas_raid_device_find_by_handle()
1516 raid_device->handle, (u64)raid_device->wwid)); in _scsih_raid_device_add()
1551 mpt3sas_scsih_expander_find_by_handle(struct MPT3SAS_ADAPTER *ioc, u16 handle) in mpt3sas_scsih_expander_find_by_handle() argument
1557 if (sas_expander->handle != handle) in mpt3sas_scsih_expander_find_by_handle()
1576 mpt3sas_scsih_enclosure_find_by_handle(struct MPT3SAS_ADAPTER *ioc, u16 handle) in mpt3sas_scsih_enclosure_find_by_handle() argument
1582 if (le16_to_cpu(enclosure_dev->pg0.EnclosureHandle) != handle) in mpt3sas_scsih_enclosure_find_by_handle()
1886 sas_target_priv_data->handle = MPT3SAS_INVALID_DEVICE_HANDLE; in scsih_target_alloc()
1894 sas_target_priv_data->handle = raid_device->handle; in scsih_target_alloc()
1911 sas_target_priv_data->handle = pcie_device->handle; in scsih_target_alloc()
1934 sas_target_priv_data->handle = sas_device->handle; in scsih_target_alloc()
1941 if (test_bit(sas_device->handle, ioc->pd_handles)) in scsih_target_alloc()
2171 u16 handle, struct scsi_device *sdev) in _scsih_display_sata_capabilities() argument
2180 MPI2_SAS_DEVICE_PGAD_FORM_HANDLE, handle))) { in _scsih_display_sata_capabilities()
2254 u16 handle; in scsih_get_resync() local
2257 handle = 0; in scsih_get_resync()
2265 handle = raid_device->handle; in scsih_get_resync()
2270 if (!handle) in scsih_get_resync()
2274 MPI2_RAID_VOLUME_PGAD_FORM_HANDLE, handle, in scsih_get_resync()
2315 u16 handle = 0; in scsih_get_state() local
2321 handle = raid_device->handle; in scsih_get_state()
2328 MPI2_RAID_VOLUME_PGAD_FORM_HANDLE, handle, in scsih_get_state()
2425 if ((mpt3sas_config_get_number_pds(ioc, raid_device->handle, in _scsih_get_volume_capabilities()
2445 MPI2_RAID_VOLUME_PGAD_FORM_HANDLE, raid_device->handle, sz))) { in _scsih_get_volume_capabilities()
2522 u16 handle, volume_handle = 0; in scsih_slave_configure() local
2530 handle = sas_target_priv_data->handle; in scsih_slave_configure()
2536 raid_device = mpt3sas_raid_device_find_by_handle(ioc, handle); in scsih_slave_configure()
2608 r_level, raid_device->handle, in scsih_slave_configure()
2630 if (mpt3sas_config_get_volume_handle(ioc, handle, in scsih_slave_configure()
2663 ds, handle, (unsigned long long)pcie_device->wwid, in scsih_slave_configure()
2718 sas_device_priv_data->sas_target->handle); in scsih_slave_configure()
2734 ds, handle, (unsigned long long)sas_device->sas_address, in scsih_slave_configure()
2743 _scsih_display_sata_capabilities(ioc, handle, sdev); in scsih_slave_configure()
2885 mpt3sas_scsih_set_tm_flag(struct MPT3SAS_ADAPTER *ioc, u16 handle) in mpt3sas_scsih_set_tm_flag() argument
2897 if (sas_device_priv_data->sas_target->handle == handle) { in mpt3sas_scsih_set_tm_flag()
2913 mpt3sas_scsih_clear_tm_flag(struct MPT3SAS_ADAPTER *ioc, u16 handle) in mpt3sas_scsih_clear_tm_flag() argument
2925 if (sas_device_priv_data->sas_target->handle == handle) { in mpt3sas_scsih_clear_tm_flag()
2997 scsih_tm_post_processing(struct MPT3SAS_ADAPTER *ioc, u16 handle, in scsih_tm_post_processing() argument
3009 smid_task, type, handle); in scsih_tm_post_processing()
3045 mpt3sas_scsih_issue_tm(struct MPT3SAS_ADAPTER *ioc, u16 handle, uint channel, in mpt3sas_scsih_issue_tm() argument
3098 handle, type, smid_task, timeout, tr_method)); in mpt3sas_scsih_issue_tm()
3105 mpi_request->DevHandle = cpu_to_le16(handle); in mpt3sas_scsih_issue_tm()
3112 mpt3sas_scsih_set_tm_flag(ioc, handle); in mpt3sas_scsih_issue_tm()
3162 if (le16_to_cpu(request->DevHandle) != handle) in mpt3sas_scsih_issue_tm()
3167 handle, timeout, tr_method, smid_task, msix_task); in mpt3sas_scsih_issue_tm()
3174 rc = scsih_tm_post_processing(ioc, handle, channel, id, lun, in mpt3sas_scsih_issue_tm()
3186 mpt3sas_scsih_clear_tm_flag(ioc, handle); in mpt3sas_scsih_issue_tm()
3191 int mpt3sas_scsih_issue_locked_tm(struct MPT3SAS_ADAPTER *ioc, u16 handle, in mpt3sas_scsih_issue_locked_tm() argument
3198 ret = mpt3sas_scsih_issue_tm(ioc, handle, channel, id, lun, type, in mpt3sas_scsih_issue_locked_tm()
3233 device_str, priv_target->handle, in _scsih_tm_display_info()
3242 pcie_device->handle, in _scsih_tm_display_info()
3274 sas_device->handle, in _scsih_tm_display_info()
3299 u16 handle; in scsih_abort() local
3341 handle = sas_device_priv_data->sas_target->handle; in scsih_abort()
3342 pcie_device = mpt3sas_get_pdev_by_handle(ioc, handle); in scsih_abort()
3346 r = mpt3sas_scsih_issue_locked_tm(ioc, handle, scmd->device->channel, in scsih_abort()
3374 u16 handle; in scsih_dev_reset() local
3398 handle = 0; in scsih_dev_reset()
3404 handle = sas_device->volume_handle; in scsih_dev_reset()
3406 handle = sas_device_priv_data->sas_target->handle; in scsih_dev_reset()
3408 if (!handle) { in scsih_dev_reset()
3414 pcie_device = mpt3sas_get_pdev_by_handle(ioc, handle); in scsih_dev_reset()
3423 r = mpt3sas_scsih_issue_locked_tm(ioc, handle, scmd->device->channel, in scsih_dev_reset()
3455 u16 handle; in scsih_target_reset() local
3478 handle = 0; in scsih_target_reset()
3484 handle = sas_device->volume_handle; in scsih_target_reset()
3486 handle = sas_device_priv_data->sas_target->handle; in scsih_target_reset()
3488 if (!handle) { in scsih_target_reset()
3494 pcie_device = mpt3sas_get_pdev_by_handle(ioc, handle); in scsih_target_reset()
3502 r = mpt3sas_scsih_issue_locked_tm(ioc, handle, scmd->device->channel, in scsih_target_reset()
3773 sas_device_priv_data->sas_target->handle); in _scsih_internal_device_block()
3780 r, sas_device_priv_data->sas_target->handle); in _scsih_internal_device_block()
3798 "handle(0x%04x)\n", sas_device_priv_data->sas_target->handle); in _scsih_internal_device_unblock()
3810 r, sas_device_priv_data->sas_target->handle); in _scsih_internal_device_unblock()
3816 r, sas_device_priv_data->sas_target->handle); in _scsih_internal_device_unblock()
3823 r, sas_device_priv_data->sas_target->handle); in _scsih_internal_device_unblock()
3848 sas_device_priv_data->sas_target->handle)); in _scsih_ublock_io_all_device()
3905 __func__, sas_device_priv_data->sas_target->handle); in _scsih_block_io_all_device()
3920 _scsih_block_io_device(struct MPT3SAS_ADAPTER *ioc, u16 handle) in _scsih_block_io_device() argument
3926 sas_device = mpt3sas_get_sdev_by_handle(ioc, handle); in _scsih_block_io_device()
3932 if (sas_device_priv_data->sas_target->handle != handle) in _scsih_block_io_device()
3941 __func__, sas_device_priv_data->sas_target->handle); in _scsih_block_io_device()
3981 set_bit(sas_device->handle, in _scsih_block_io_to_children_attached_to_ex()
4019 u16 handle; in _scsih_block_io_to_children_attached_directly() local
4023 handle = le16_to_cpu(event_data->PHY[i].AttachedDevHandle); in _scsih_block_io_to_children_attached_directly()
4024 if (!handle) in _scsih_block_io_to_children_attached_directly()
4029 _scsih_block_io_device(ioc, handle); in _scsih_block_io_to_children_attached_directly()
4046 u16 handle; in _scsih_block_io_to_pcie_children_attached_directly() local
4050 handle = in _scsih_block_io_to_pcie_children_attached_directly()
4052 if (!handle) in _scsih_block_io_to_pcie_children_attached_directly()
4057 _scsih_block_io_device(ioc, handle); in _scsih_block_io_to_pcie_children_attached_directly()
4076 _scsih_tm_tr_send(struct MPT3SAS_ADAPTER *ioc, u16 handle) in _scsih_tm_tr_send() argument
4093 __func__, handle)); in _scsih_tm_tr_send()
4100 __func__, handle)); in _scsih_tm_tr_send()
4105 if (test_bit(handle, ioc->pd_handles)) in _scsih_tm_tr_send()
4108 clear_bit(handle, ioc->pend_os_device_add); in _scsih_tm_tr_send()
4111 sas_device = __mpt3sas_get_sdev_by_handle(ioc, handle); in _scsih_tm_tr_send()
4122 pcie_device = __mpt3sas_get_pdev_by_handle(ioc, handle); in _scsih_tm_tr_send()
4141 handle, (u64)sas_address)); in _scsih_tm_tr_send()
4166 sas_target_priv_data->handle = MPT3SAS_INVALID_DEVICE_HANDLE; in _scsih_tm_tr_send()
4175 delayed_tr->handle = handle; in _scsih_tm_tr_send()
4179 handle)); in _scsih_tm_tr_send()
4185 handle, smid, ioc->tm_tr_cb_idx)); in _scsih_tm_tr_send()
4189 mpi_request->DevHandle = cpu_to_le16(handle); in _scsih_tm_tr_send()
4192 set_bit(handle, ioc->device_remove_in_progress); in _scsih_tm_tr_send()
4223 u16 handle; in _scsih_tm_tr_complete() local
4251 handle = le16_to_cpu(mpi_request_tm->DevHandle); in _scsih_tm_tr_complete()
4252 if (handle != le16_to_cpu(mpi_reply->DevHandle)) { in _scsih_tm_tr_complete()
4255 handle, in _scsih_tm_tr_complete()
4263 handle, smid, le16_to_cpu(mpi_reply->IOCStatus), in _scsih_tm_tr_complete()
4273 delayed_sc->handle = le16_to_cpu(mpi_request_tm->DevHandle); in _scsih_tm_tr_complete()
4277 handle)); in _scsih_tm_tr_complete()
4283 handle, smid_sas_ctrl, ioc->tm_sas_control_cb_idx)); in _scsih_tm_tr_complete()
4380 _scsih_tm_tr_volume_send(struct MPT3SAS_ADAPTER *ioc, u16 handle) in _scsih_tm_tr_volume_send() argument
4399 delayed_tr->handle = handle; in _scsih_tm_tr_volume_send()
4403 handle)); in _scsih_tm_tr_volume_send()
4409 handle, smid, ioc->tm_tr_volume_cb_idx)); in _scsih_tm_tr_volume_send()
4413 mpi_request->DevHandle = cpu_to_le16(handle); in _scsih_tm_tr_volume_send()
4433 u16 handle; in _scsih_tm_volume_tr_complete() local
4451 handle = le16_to_cpu(mpi_request_tm->DevHandle); in _scsih_tm_volume_tr_complete()
4452 if (handle != le16_to_cpu(mpi_reply->DevHandle)) { in _scsih_tm_volume_tr_complete()
4455 handle, le16_to_cpu(mpi_reply->DevHandle), in _scsih_tm_volume_tr_complete()
4462 handle, smid, le16_to_cpu(mpi_reply->IOCStatus), in _scsih_tm_volume_tr_complete()
4518 u16 smid, u16 handle) in _scsih_issue_delayed_sas_io_unit_ctrl() argument
4554 handle, smid, ioc->tm_sas_control_cb_idx)); in _scsih_issue_delayed_sas_io_unit_ctrl()
4559 mpi_request->DevHandle = cpu_to_le16(handle); in _scsih_issue_delayed_sas_io_unit_ctrl()
4596 delayed_sc->handle); in mpt3sas_check_for_pending_internal_cmds()
4624 _scsih_tm_tr_volume_send(ioc, delayed_tr->handle); in _scsih_check_for_pending_tm()
4634 _scsih_tm_tr_send(ioc, delayed_tr->handle); in _scsih_check_for_pending_tm()
4664 u16 handle; in _scsih_check_topo_delete_events() local
4667 handle = le16_to_cpu(event_data->PHY[i].AttachedDevHandle); in _scsih_check_topo_delete_events()
4668 if (!handle) in _scsih_check_topo_delete_events()
4673 _scsih_tm_tr_send(ioc, handle); in _scsih_check_topo_delete_events()
4690 handle = find_first_bit(ioc->blocking_handles, in _scsih_check_topo_delete_events()
4692 if (handle < ioc->facts.MaxDevHandle) in _scsih_check_topo_delete_events()
4693 _scsih_block_io_device(ioc, handle); in _scsih_check_topo_delete_events()
4694 } while (test_and_clear_bit(handle, ioc->blocking_handles)); in _scsih_check_topo_delete_events()
4743 u16 handle, switch_handle; in _scsih_check_pcie_topo_remove_events() local
4746 handle = in _scsih_check_pcie_topo_remove_events()
4748 if (!handle) in _scsih_check_pcie_topo_remove_events()
4752 _scsih_tm_tr_send(ioc, handle); in _scsih_check_pcie_topo_remove_events()
4804 _scsih_set_volume_delete_flag(struct MPT3SAS_ADAPTER *ioc, u16 handle) in _scsih_set_volume_delete_flag() argument
4811 raid_device = mpt3sas_raid_device_find_by_handle(ioc, handle); in _scsih_set_volume_delete_flag()
4819 handle, (u64)raid_device->wwid)); in _scsih_set_volume_delete_flag()
4835 _scsih_set_volume_handle_for_tr(u16 handle, u16 *a, u16 *b) in _scsih_set_volume_handle_for_tr() argument
4837 if (!handle || handle == *a || handle == *b) in _scsih_set_volume_handle_for_tr()
4840 *a = handle; in _scsih_set_volume_handle_for_tr()
4842 *b = handle; in _scsih_set_volume_handle_for_tr()
4863 u16 handle, volume_handle, a, b; in _scsih_check_ir_config_unhide_events() local
4910 handle = le16_to_cpu(element->PhysDiskDevHandle); in _scsih_check_ir_config_unhide_events()
4912 clear_bit(handle, ioc->pd_handles); in _scsih_check_ir_config_unhide_events()
4914 _scsih_tm_tr_send(ioc, handle); in _scsih_check_ir_config_unhide_events()
4919 delayed_tr->handle = handle; in _scsih_check_ir_config_unhide_events()
4923 handle)); in _scsih_check_ir_config_unhide_events()
4925 _scsih_tm_tr_send(ioc, handle); in _scsih_check_ir_config_unhide_events()
5136 u16 handle; in scsih_qcmd() local
5157 handle = sas_target_priv_data->handle; in scsih_qcmd()
5162 if (handle == MPT3SAS_INVALID_DEVICE_HANDLE || sas_device_priv_data->block) { in scsih_qcmd()
5171 if (handle == MPT3SAS_INVALID_DEVICE_HANDLE) { in scsih_qcmd()
5243 mpi_request->DevHandle = cpu_to_le16(handle); in scsih_qcmd()
5275 ioc->put_smid_fast_path(ioc, smid, handle); in scsih_qcmd()
5527 _scsih_turn_on_pfa_led(struct MPT3SAS_ADAPTER *ioc, u16 handle) in _scsih_turn_on_pfa_led() argument
5533 sas_device = mpt3sas_get_sdev_by_handle(ioc, handle); in _scsih_turn_on_pfa_led()
5542 mpi_request.DevHandle = cpu_to_le16(handle); in _scsih_turn_on_pfa_led()
5607 _scsih_send_event_to_turn_on_pfa_led(struct MPT3SAS_ADAPTER *ioc, u16 handle) in _scsih_send_event_to_turn_on_pfa_led() argument
5615 fw_event->device_handle = handle; in _scsih_send_event_to_turn_on_pfa_led()
5628 _scsih_smart_predicted_fault(struct MPT3SAS_ADAPTER *ioc, u16 handle) in _scsih_smart_predicted_fault() argument
5640 sas_device = __mpt3sas_get_sdev_by_handle(ioc, handle); in _scsih_smart_predicted_fault()
5656 _scsih_send_event_to_turn_on_pfa_led(ioc, handle); in _scsih_smart_predicted_fault()
5678 event_data->DevHandle = cpu_to_le16(handle); in _scsih_smart_predicted_fault()
5754 cpu_to_le16(sas_device_priv_data->sas_target->handle); in _scsih_io_done()
5756 sas_device_priv_data->sas_target->handle); in _scsih_io_done()
6600 ioc->sas_hba.handle = le16_to_cpu( in _scsih_sas_host_refresh()
6665 ioc->sas_hba.phy[i].handle = ioc->sas_hba.handle; in _scsih_sas_host_refresh()
6807 ioc->sas_hba.handle = le16_to_cpu(sas_iounit_pg0-> in _scsih_sas_host_add()
6839 ioc->sas_hba.phy[i].handle = ioc->sas_hba.handle; in _scsih_sas_host_add()
6847 MPI2_SAS_DEVICE_PGAD_FORM_HANDLE, ioc->sas_hba.handle))) { in _scsih_sas_host_add()
6856 ioc->sas_hba.handle, in _scsih_sas_host_add()
6883 _scsih_expander_add(struct MPT3SAS_ADAPTER *ioc, u16 handle) in _scsih_expander_add() argument
6900 if (!handle) in _scsih_expander_add()
6907 MPI2_SAS_EXPAND_PGAD_FORM_HNDL, handle))) { in _scsih_expander_add()
6961 sas_expander->handle = handle; in _scsih_expander_add()
6974 handle, parent_handle, in _scsih_expander_add()
6991 mpt3sas_port = mpt3sas_transport_port_add(ioc, handle, in _scsih_expander_add()
7004 &expander_pg1, i, handle))) { in _scsih_expander_add()
7010 sas_expander->phy[i].handle = handle; in _scsih_expander_add()
7124 u16 handle, u8 access_status) in _scsih_check_access_status() argument
7172 desc, (u64)sas_address, handle); in _scsih_check_access_status()
7186 u64 parent_sas_address, u16 handle, u8 phy_number, u8 link_rate) in _scsih_check_device() argument
7201 MPI2_SAS_DEVICE_PGAD_FORM_HANDLE, handle))) in _scsih_check_device()
7230 if (unlikely(sas_device->handle != handle)) { in _scsih_check_device()
7235 sas_device->handle, handle); in _scsih_check_device()
7236 sas_target_priv_data->handle = handle; in _scsih_check_device()
7237 sas_device->handle = handle; in _scsih_check_device()
7271 handle); in _scsih_check_device()
7276 if (_scsih_check_access_status(ioc, sas_address, handle, in _scsih_check_device()
7305 _scsih_add_device(struct MPT3SAS_ADAPTER *ioc, u16 handle, u8 phy_num, in _scsih_add_device() argument
7318 MPI2_SAS_DEVICE_PGAD_FORM_HANDLE, handle))) { in _scsih_add_device()
7336 set_bit(handle, ioc->pend_os_device_add); in _scsih_add_device()
7343 handle); in _scsih_add_device()
7348 if (_scsih_check_access_status(ioc, sas_address, handle, in _scsih_add_device()
7356 clear_bit(handle, ioc->pend_os_device_add); in _scsih_add_device()
7379 sas_device->handle = handle; in _scsih_add_device()
7431 handle, sas_device->sas_address, sas_device->port_type); in _scsih_add_device()
7463 sas_device->handle, (u64)sas_device->sas_address)); in _scsih_remove_device()
7473 sas_target_priv_data->handle = in _scsih_remove_device()
7484 sas_device->handle, (u64)sas_device->sas_address); in _scsih_remove_device()
7491 sas_device->handle, (u64)sas_device->sas_address)); in _scsih_remove_device()
7507 u16 handle; in _scsih_sas_topology_change_event_debug() local
7538 handle = le16_to_cpu(event_data->PHY[i].AttachedDevHandle); in _scsih_sas_topology_change_event_debug()
7539 if (!handle) in _scsih_sas_topology_change_event_debug()
7568 handle, status_str, link_rate, prev_link_rate); in _scsih_sas_topology_change_event_debug()
7585 u16 parent_handle, handle; in _scsih_sas_topology_change_event() local
7655 handle = le16_to_cpu(event_data->PHY[i].AttachedDevHandle); in _scsih_sas_topology_change_event()
7656 if (!handle) in _scsih_sas_topology_change_event()
7670 handle, phy_number, link_rate, port); in _scsih_sas_topology_change_event()
7675 _scsih_check_device(ioc, sas_address, handle, in _scsih_sas_topology_change_event()
7678 if (!test_bit(handle, ioc->pend_os_device_add)) in _scsih_sas_topology_change_event()
7689 handle, phy_number, link_rate, port); in _scsih_sas_topology_change_event()
7691 _scsih_add_device(ioc, handle, phy_number, 0); in _scsih_sas_topology_change_event()
7696 _scsih_device_remove_by_handle(ioc, handle); in _scsih_sas_topology_change_event()
7825 target_priv_data->handle); in _scsih_sas_device_status_change_event()
7846 u16 handle, u8 access_status) in _scsih_check_pcie_access_status() argument
7864 desc, (u64)wwid, handle); in _scsih_check_pcie_access_status()
7911 access_status, (u64)wwid, handle); in _scsih_check_pcie_access_status()
7919 desc, (u64)wwid, handle); in _scsih_check_pcie_access_status()
7938 pcie_device->handle, (u64)pcie_device->wwid)); in _scsih_pcie_device_remove_from_sml()
7956 sas_target_priv_data->handle = MPT3SAS_INVALID_DEVICE_HANDLE; in _scsih_pcie_device_remove_from_sml()
7960 pcie_device->handle, (u64)pcie_device->wwid); in _scsih_pcie_device_remove_from_sml()
7976 pcie_device->handle, (u64)pcie_device->wwid)); in _scsih_pcie_device_remove_from_sml()
8000 _scsih_pcie_check_device(struct MPT3SAS_ADAPTER *ioc, u16 handle) in _scsih_pcie_check_device() argument
8013 &pcie_device_pg0, MPI26_PCIE_DEVICE_PGAD_FORM_HANDLE, handle))) in _scsih_pcie_check_device()
8034 if (unlikely(pcie_device->handle != handle)) { in _scsih_pcie_check_device()
8040 pcie_device->handle, handle); in _scsih_pcie_check_device()
8041 sas_target_priv_data->handle = handle; in _scsih_pcie_check_device()
8042 pcie_device->handle = handle; in _scsih_pcie_check_device()
8060 handle); in _scsih_pcie_check_device()
8067 if (_scsih_check_pcie_access_status(ioc, wwid, handle, in _scsih_pcie_check_device()
8092 _scsih_pcie_add_device(struct MPT3SAS_ADAPTER *ioc, u16 handle) in _scsih_pcie_add_device() argument
8103 &pcie_device_pg0, MPI26_PCIE_DEVICE_PGAD_FORM_HANDLE, handle))) { in _scsih_pcie_add_device()
8116 set_bit(handle, ioc->pend_os_device_add); in _scsih_pcie_add_device()
8123 handle); in _scsih_pcie_add_device()
8128 if (_scsih_check_pcie_access_status(ioc, wwid, handle, in _scsih_pcie_add_device()
8138 clear_bit(handle, ioc->pend_os_device_add); in _scsih_pcie_add_device()
8151 handle)) { in _scsih_pcie_add_device()
8178 pcie_device->handle = handle; in _scsih_pcie_add_device()
8254 u16 handle; in _scsih_pcie_topology_change_event_debug() local
8285 handle = in _scsih_pcie_topology_change_event_debug()
8287 if (!handle) in _scsih_pcie_topology_change_event_debug()
8317 handle, status_str, link_rate, prev_link_rate); in _scsih_pcie_topology_change_event_debug()
8334 u16 handle; in _scsih_pcie_topology_change_event() local
8365 handle = in _scsih_pcie_topology_change_event()
8367 if (!handle) in _scsih_pcie_topology_change_event()
8384 _scsih_pcie_check_device(ioc, handle); in _scsih_pcie_topology_change_event()
8393 pcie_device = __mpt3sas_get_pdev_by_handle(ioc, handle); in _scsih_pcie_topology_change_event()
8401 if (!test_bit(handle, ioc->pend_os_device_add)) in _scsih_pcie_topology_change_event()
8406 handle)); in _scsih_pcie_topology_change_event()
8417 rc = _scsih_pcie_add_device(ioc, handle); in _scsih_pcie_topology_change_event()
8429 _scsih_pcie_device_remove_by_handle(ioc, handle); in _scsih_pcie_topology_change_event()
8661 u16 smid, handle; in _scsih_sas_broadcast_primitive_event() local
8721 handle = sas_device_priv_data->sas_target->handle; in _scsih_sas_broadcast_primitive_event()
8729 r = mpt3sas_scsih_issue_tm(ioc, handle, 0, 0, lun, in _scsih_sas_broadcast_primitive_event()
8770 r = mpt3sas_scsih_issue_tm(ioc, handle, sdev->channel, sdev->id, in _scsih_sas_broadcast_primitive_event()
8914 _scsih_ir_fastpath(struct MPT3SAS_ADAPTER *ioc, u16 handle, u8 phys_disk_num) in _scsih_ir_fastpath() argument
8954 handle, phys_disk_num)); in _scsih_ir_fastpath()
9024 u16 handle = le16_to_cpu(element->VolDevHandle); in _scsih_sas_volume_add() local
9027 mpt3sas_config_get_volume_wwid(ioc, handle, &wwid); in _scsih_sas_volume_add()
9050 raid_device->handle = handle; in _scsih_sas_volume_add()
9072 _scsih_sas_volume_delete(struct MPT3SAS_ADAPTER *ioc, u16 handle) in _scsih_sas_volume_delete() argument
9080 raid_device = mpt3sas_raid_device_find_by_handle(ioc, handle); in _scsih_sas_volume_delete()
9088 raid_device->handle, (u64)raid_device->wwid); in _scsih_sas_volume_delete()
9111 u16 handle = le16_to_cpu(element->PhysDiskDevHandle); in _scsih_sas_pd_expose() local
9114 sas_device = __mpt3sas_get_sdev_by_handle(ioc, handle); in _scsih_sas_pd_expose()
9118 clear_bit(handle, ioc->pd_handles); in _scsih_sas_pd_expose()
9151 u16 handle = le16_to_cpu(element->PhysDiskDevHandle); in _scsih_sas_pd_hide() local
9155 mpt3sas_config_get_volume_handle(ioc, handle, &volume_handle); in _scsih_sas_pd_hide()
9161 sas_device = __mpt3sas_get_sdev_by_handle(ioc, handle); in _scsih_sas_pd_hide()
9163 set_bit(handle, ioc->pd_handles); in _scsih_sas_pd_hide()
9178 _scsih_ir_fastpath(ioc, handle, element->PhysDiskNum); in _scsih_sas_pd_hide()
9196 u16 handle = le16_to_cpu(element->PhysDiskDevHandle); in _scsih_sas_pd_delete() local
9198 _scsih_device_remove_by_handle(ioc, handle); in _scsih_sas_pd_delete()
9212 u16 handle = le16_to_cpu(element->PhysDiskDevHandle); in _scsih_sas_pd_add() local
9219 set_bit(handle, ioc->pd_handles); in _scsih_sas_pd_add()
9221 sas_device = mpt3sas_get_sdev_by_handle(ioc, handle); in _scsih_sas_pd_add()
9223 _scsih_ir_fastpath(ioc, handle, element->PhysDiskNum); in _scsih_sas_pd_add()
9229 MPI2_SAS_DEVICE_PGAD_FORM_HANDLE, handle))) { in _scsih_sas_pd_add()
9245 mpt3sas_transport_update_links(ioc, sas_address, handle, in _scsih_sas_pd_add()
9250 _scsih_ir_fastpath(ioc, handle, element->PhysDiskNum); in _scsih_sas_pd_add()
9251 _scsih_add_device(ioc, handle, 0, 1); in _scsih_sas_pd_add()
9415 u16 handle; in _scsih_sas_ir_volume_event() local
9427 handle = le16_to_cpu(event_data->VolDevHandle); in _scsih_sas_ir_volume_event()
9432 __func__, handle, in _scsih_sas_ir_volume_event()
9438 _scsih_sas_volume_delete(ioc, handle); in _scsih_sas_ir_volume_event()
9446 raid_device = mpt3sas_raid_device_find_by_handle(ioc, handle); in _scsih_sas_ir_volume_event()
9452 mpt3sas_config_get_volume_wwid(ioc, handle, &wwid); in _scsih_sas_ir_volume_event()
9468 raid_device->handle = handle; in _scsih_sas_ir_volume_event()
9493 u16 handle, parent_handle; in _scsih_sas_ir_physical_disk_event() local
9509 handle = le16_to_cpu(event_data->PhysDiskDevHandle); in _scsih_sas_ir_physical_disk_event()
9515 __func__, handle, in _scsih_sas_ir_physical_disk_event()
9527 set_bit(handle, ioc->pd_handles); in _scsih_sas_ir_physical_disk_event()
9529 sas_device = mpt3sas_get_sdev_by_handle(ioc, handle); in _scsih_sas_ir_physical_disk_event()
9537 handle))) { in _scsih_sas_ir_physical_disk_event()
9553 mpt3sas_transport_update_links(ioc, sas_address, handle, in _scsih_sas_ir_physical_disk_event()
9558 _scsih_add_device(ioc, handle, 0, 1); in _scsih_sas_ir_physical_disk_event()
9624 u16 handle; in _scsih_sas_ir_operation_status_event() local
9635 handle = le16_to_cpu(event_data->VolDevHandle); in _scsih_sas_ir_operation_status_event()
9636 raid_device = mpt3sas_raid_device_find_by_handle(ioc, handle); in _scsih_sas_ir_operation_status_event()
9784 if (sas_device->handle == le16_to_cpu( in _scsih_mark_responding_sas_device()
9788 sas_device->handle); in _scsih_mark_responding_sas_device()
9789 sas_device->handle = le16_to_cpu( in _scsih_mark_responding_sas_device()
9792 sas_target_priv_data->handle = in _scsih_mark_responding_sas_device()
9856 u16 handle; in _scsih_search_responding_sas_devices() local
9864 handle = 0xFFFF; in _scsih_search_responding_sas_devices()
9867 handle))) { in _scsih_search_responding_sas_devices()
9872 handle = le16_to_cpu(sas_device_pg0.DevHandle); in _scsih_search_responding_sas_devices()
9918 pcie_device->handle, in _scsih_mark_responding_pcie_device()
9941 if (pcie_device->handle == le16_to_cpu( in _scsih_mark_responding_pcie_device()
9945 pcie_device->handle); in _scsih_mark_responding_pcie_device()
9946 pcie_device->handle = le16_to_cpu( in _scsih_mark_responding_pcie_device()
9949 sas_target_priv_data->handle = in _scsih_mark_responding_pcie_device()
9972 u16 handle; in _scsih_search_responding_pcie_devices() local
9980 handle = 0xFFFF; in _scsih_search_responding_pcie_devices()
9983 handle))) { in _scsih_search_responding_pcie_devices()
9992 handle = le16_to_cpu(pcie_device_pg0.DevHandle); in _scsih_search_responding_pcie_devices()
10013 u16 handle) in _scsih_mark_responding_raid_device() argument
10032 "handle(0x%04x), wwid(0x%016llx)\n", handle, in _scsih_mark_responding_raid_device()
10042 if (raid_device->handle == handle) { in _scsih_mark_responding_raid_device()
10048 raid_device->handle); in _scsih_mark_responding_raid_device()
10049 raid_device->handle = handle; in _scsih_mark_responding_raid_device()
10051 sas_target_priv_data->handle = handle; in _scsih_mark_responding_raid_device()
10074 u16 handle; in _scsih_search_responding_raid_devices() local
10085 handle = 0xFFFF; in _scsih_search_responding_raid_devices()
10087 &volume_pg1, MPI2_RAID_VOLUME_PGAD_FORM_GET_NEXT_HANDLE, handle))) { in _scsih_search_responding_raid_devices()
10092 handle = le16_to_cpu(volume_pg1.DevHandle); in _scsih_search_responding_raid_devices()
10095 &volume_pg0, MPI2_RAID_VOLUME_PGAD_FORM_HANDLE, handle, in _scsih_search_responding_raid_devices()
10103 le64_to_cpu(volume_pg1.WWID), handle); in _scsih_search_responding_raid_devices()
10118 handle = le16_to_cpu(pd_pg0.DevHandle); in _scsih_search_responding_raid_devices()
10119 set_bit(handle, ioc->pd_handles); in _scsih_search_responding_raid_devices()
10142 u16 handle = le16_to_cpu(expander_pg0->DevHandle); in _scsih_mark_responding_expander() local
10168 if (sas_expander->handle == handle) in _scsih_mark_responding_expander()
10173 sas_expander->handle, handle); in _scsih_mark_responding_expander()
10174 sas_expander->handle = handle; in _scsih_mark_responding_expander()
10176 sas_expander->phy[i].handle = handle; in _scsih_mark_responding_expander()
10197 u16 handle; in _scsih_search_responding_expanders() local
10205 handle = 0xFFFF; in _scsih_search_responding_expanders()
10207 MPI2_SAS_EXPAND_PGAD_FORM_GET_NEXT_HNDL, handle))) { in _scsih_search_responding_expanders()
10214 handle = le16_to_cpu(expander_pg0.DevHandle); in _scsih_search_responding_expanders()
10219 handle, (unsigned long long)sas_address, in _scsih_search_responding_expanders()
10317 raid_device->handle); in _scsih_remove_unresponding_devices()
10348 struct _sas_node *sas_expander, u16 handle) in _scsih_refresh_expander_links() argument
10356 &expander_pg1, i, handle))) { in _scsih_refresh_expander_links()
10386 u16 handle, parent_handle; in _scsih_scan_for_devices_after_reset() local
10412 handle = 0xFFFF; in _scsih_scan_for_devices_after_reset()
10414 MPI2_SAS_EXPAND_PGAD_FORM_GET_NEXT_HNDL, handle))) { in _scsih_scan_for_devices_after_reset()
10422 handle = le16_to_cpu(expander_pg0.DevHandle); in _scsih_scan_for_devices_after_reset()
10431 handle); in _scsih_scan_for_devices_after_reset()
10434 handle, in _scsih_scan_for_devices_after_reset()
10436 _scsih_expander_add(ioc, handle); in _scsih_scan_for_devices_after_reset()
10438 handle, in _scsih_scan_for_devices_after_reset()
10463 handle = le16_to_cpu(pd_pg0.DevHandle); in _scsih_scan_for_devices_after_reset()
10464 sas_device = mpt3sas_get_sdev_by_handle(ioc, handle); in _scsih_scan_for_devices_after_reset()
10471 handle) != 0) in _scsih_scan_for_devices_after_reset()
10484 handle, in _scsih_scan_for_devices_after_reset()
10488 handle, sas_device_pg0.PhyNum, in _scsih_scan_for_devices_after_reset()
10491 set_bit(handle, ioc->pd_handles); in _scsih_scan_for_devices_after_reset()
10497 while (_scsih_add_device(ioc, handle, retry_count++, in _scsih_scan_for_devices_after_reset()
10502 handle, in _scsih_scan_for_devices_after_reset()
10512 handle = 0xFFFF; in _scsih_scan_for_devices_after_reset()
10514 volume_pg1, MPI2_RAID_VOLUME_PGAD_FORM_GET_NEXT_HANDLE, handle))) { in _scsih_scan_for_devices_after_reset()
10522 handle = le16_to_cpu(volume_pg1->DevHandle); in _scsih_scan_for_devices_after_reset()
10530 volume_pg0, MPI2_RAID_VOLUME_PGAD_FORM_HANDLE, handle, in _scsih_scan_for_devices_after_reset()
10561 handle = 0xFFFF; in _scsih_scan_for_devices_after_reset()
10564 handle))) { in _scsih_scan_for_devices_after_reset()
10572 handle = le16_to_cpu(sas_device_pg0.DevHandle); in _scsih_scan_for_devices_after_reset()
10587 handle, in _scsih_scan_for_devices_after_reset()
10589 mpt3sas_transport_update_links(ioc, sas_address, handle, in _scsih_scan_for_devices_after_reset()
10597 while (_scsih_add_device(ioc, handle, retry_count++, in _scsih_scan_for_devices_after_reset()
10602 handle, in _scsih_scan_for_devices_after_reset()
10610 handle = 0xFFFF; in _scsih_scan_for_devices_after_reset()
10613 handle))) { in _scsih_scan_for_devices_after_reset()
10621 handle = le16_to_cpu(pcie_device_pg0.DevHandle); in _scsih_scan_for_devices_after_reset()
10633 _scsih_pcie_add_device(ioc, handle); in _scsih_scan_for_devices_after_reset()
10636 handle, (u64)le64_to_cpu(pcie_device_pg0.WWID)); in _scsih_scan_for_devices_after_reset()
11078 sas_expander->handle, (unsigned long long) in _scsih_expander_node_remove()
11312 raid_device->handle, (u64)raid_device->wwid); in scsih_remove()
11426 u16 handle; in _scsih_probe_boot_devices() local
11492 handle = sas_device->handle; in _scsih_probe_boot_devices()
11505 if (!mpt3sas_transport_port_add(ioc, handle, in _scsih_probe_boot_devices()
11599 if (!mpt3sas_transport_port_add(ioc, sas_device->handle, in _scsih_probe_sas()