Lines Matching refs:mrioc

33 static int mpi3mr_post_transport_req(struct mpi3mr_ioc *mrioc, void *request,  in mpi3mr_post_transport_req()  argument
39 mutex_lock(&mrioc->transport_cmds.mutex); in mpi3mr_post_transport_req()
40 if (mrioc->transport_cmds.state & MPI3MR_CMD_PENDING) { in mpi3mr_post_transport_req()
42 ioc_err(mrioc, "sending transport request failed due to command in use\n"); in mpi3mr_post_transport_req()
43 mutex_unlock(&mrioc->transport_cmds.mutex); in mpi3mr_post_transport_req()
46 mrioc->transport_cmds.state = MPI3MR_CMD_PENDING; in mpi3mr_post_transport_req()
47 mrioc->transport_cmds.is_waiting = 1; in mpi3mr_post_transport_req()
48 mrioc->transport_cmds.callback = NULL; in mpi3mr_post_transport_req()
49 mrioc->transport_cmds.ioc_status = 0; in mpi3mr_post_transport_req()
50 mrioc->transport_cmds.ioc_loginfo = 0; in mpi3mr_post_transport_req()
52 init_completion(&mrioc->transport_cmds.done); in mpi3mr_post_transport_req()
53 dprint_cfg_info(mrioc, "posting transport request\n"); in mpi3mr_post_transport_req()
54 if (mrioc->logging_level & MPI3_DEBUG_TRANSPORT_INFO) in mpi3mr_post_transport_req()
56 retval = mpi3mr_admin_request_post(mrioc, request, request_sz, 1); in mpi3mr_post_transport_req()
58 ioc_err(mrioc, "posting transport request failed\n"); in mpi3mr_post_transport_req()
61 wait_for_completion_timeout(&mrioc->transport_cmds.done, in mpi3mr_post_transport_req()
63 if (!(mrioc->transport_cmds.state & MPI3MR_CMD_COMPLETE)) { in mpi3mr_post_transport_req()
64 mpi3mr_check_rh_fault_ioc(mrioc, in mpi3mr_post_transport_req()
66 ioc_err(mrioc, "transport request timed out\n"); in mpi3mr_post_transport_req()
70 *ioc_status = mrioc->transport_cmds.ioc_status & in mpi3mr_post_transport_req()
73 dprint_transport_err(mrioc, in mpi3mr_post_transport_req()
75 *ioc_status, mrioc->transport_cmds.ioc_loginfo); in mpi3mr_post_transport_req()
77 if ((reply) && (mrioc->transport_cmds.state & MPI3MR_CMD_REPLY_VALID)) in mpi3mr_post_transport_req()
78 memcpy((u8 *)reply, mrioc->transport_cmds.reply, reply_sz); in mpi3mr_post_transport_req()
81 mrioc->transport_cmds.state = MPI3MR_CMD_NOTUSED; in mpi3mr_post_transport_req()
82 mutex_unlock(&mrioc->transport_cmds.mutex); in mpi3mr_post_transport_req()
127 static int mpi3mr_report_manufacture(struct mpi3mr_ioc *mrioc, in mpi3mr_report_manufacture() argument
147 if (mrioc->reset_in_progress) { in mpi3mr_report_manufacture()
148 ioc_err(mrioc, "%s: host reset in progress!\n", __func__); in mpi3mr_report_manufacture()
154 data_out = dma_alloc_coherent(&mrioc->pdev->dev, in mpi3mr_report_manufacture()
183 dprint_transport_info(mrioc, in mpi3mr_report_manufacture()
187 rc = mpi3mr_post_transport_req(mrioc, &mpi_request, request_sz, in mpi3mr_report_manufacture()
193 dprint_transport_info(mrioc, in mpi3mr_report_manufacture()
202 dprint_transport_info(mrioc, in mpi3mr_report_manufacture()
231 dma_free_coherent(&mrioc->pdev->dev, data_out_sz + data_in_sz, in mpi3mr_report_manufacture()
250 *mrioc, u16 handle) in __mpi3mr_expander_find_by_handle()
255 list_for_each_entry(sas_expander, &mrioc->sas_expander_list, list) { in __mpi3mr_expander_find_by_handle()
291 static int mpi3mr_get_sas_address(struct mpi3mr_ioc *mrioc, u16 handle, in mpi3mr_get_sas_address() argument
300 if ((mpi3mr_cfg_get_dev_pg0(mrioc, &ioc_status, &dev_pg0, in mpi3mr_get_sas_address()
303 ioc_err(mrioc, "%s: device page0 read failed\n", __func__); in mpi3mr_get_sas_address()
308 …ioc_err(mrioc, "device page read failed for handle(0x%04x), with ioc_status(0x%04x) failure at %s:… in mpi3mr_get_sas_address()
315 *sas_address = mrioc->sas_hba.sas_address; in mpi3mr_get_sas_address()
320 ioc_err(mrioc, "%s: device_form(%d) is not SAS_SATA\n", in mpi3mr_get_sas_address()
338 static struct mpi3mr_tgt_dev *__mpi3mr_get_tgtdev_by_addr(struct mpi3mr_ioc *mrioc, in __mpi3mr_get_tgtdev_by_addr() argument
343 assert_spin_locked(&mrioc->tgtdev_lock); in __mpi3mr_get_tgtdev_by_addr()
345 list_for_each_entry(tgtdev, &mrioc->tgtdev_list, list) in __mpi3mr_get_tgtdev_by_addr()
370 static struct mpi3mr_tgt_dev *mpi3mr_get_tgtdev_by_addr(struct mpi3mr_ioc *mrioc, in mpi3mr_get_tgtdev_by_addr() argument
379 spin_lock_irqsave(&mrioc->tgtdev_lock, flags); in mpi3mr_get_tgtdev_by_addr()
380 tgtdev = __mpi3mr_get_tgtdev_by_addr(mrioc, sas_address, hba_port); in mpi3mr_get_tgtdev_by_addr()
381 spin_unlock_irqrestore(&mrioc->tgtdev_lock, flags); in mpi3mr_get_tgtdev_by_addr()
398 static void mpi3mr_remove_device_by_sas_address(struct mpi3mr_ioc *mrioc, in mpi3mr_remove_device_by_sas_address() argument
408 spin_lock_irqsave(&mrioc->tgtdev_lock, flags); in mpi3mr_remove_device_by_sas_address()
409 tgtdev = __mpi3mr_get_tgtdev_by_addr(mrioc, in mpi3mr_remove_device_by_sas_address()
418 spin_unlock_irqrestore(&mrioc->tgtdev_lock, flags); in mpi3mr_remove_device_by_sas_address()
421 mpi3mr_remove_tgtdev_from_host(mrioc, tgtdev); in mpi3mr_remove_device_by_sas_address()
438 struct mpi3mr_ioc *mrioc, u64 sas_address, struct sas_rphy *rphy) in __mpi3mr_get_tgtdev_by_addr_and_rphy() argument
442 assert_spin_locked(&mrioc->tgtdev_lock); in __mpi3mr_get_tgtdev_by_addr_and_rphy()
444 list_for_each_entry(tgtdev, &mrioc->tgtdev_list, list) in __mpi3mr_get_tgtdev_by_addr_and_rphy()
465 struct mpi3mr_ioc *mrioc, u64 sas_address, in mpi3mr_expander_find_by_sas_address() argument
473 list_for_each_entry(sas_expander, &mrioc->sas_expander_list, list) { in mpi3mr_expander_find_by_sas_address()
502 struct mpi3mr_ioc *mrioc, u64 sas_address, in __mpi3mr_sas_node_find_by_sas_address() argument
506 if (mrioc->sas_hba.sas_address == sas_address) in __mpi3mr_sas_node_find_by_sas_address()
507 return &mrioc->sas_hba; in __mpi3mr_sas_node_find_by_sas_address()
508 return mpi3mr_expander_find_by_sas_address(mrioc, sas_address, in __mpi3mr_sas_node_find_by_sas_address()
519 static int mpi3mr_parent_present(struct mpi3mr_ioc *mrioc, struct sas_phy *phy) in mpi3mr_parent_present() argument
524 spin_lock_irqsave(&mrioc->sas_node_lock, flags); in mpi3mr_parent_present()
525 if (__mpi3mr_sas_node_find_by_sas_address(mrioc, in mpi3mr_parent_present()
528 spin_unlock_irqrestore(&mrioc->sas_node_lock, flags); in mpi3mr_parent_present()
531 spin_unlock_irqrestore(&mrioc->sas_node_lock, flags); in mpi3mr_parent_present()
593 static void mpi3mr_delete_sas_phy(struct mpi3mr_ioc *mrioc, in mpi3mr_delete_sas_phy() argument
620 static void mpi3mr_add_sas_phy(struct mpi3mr_ioc *mrioc, in mpi3mr_add_sas_phy() argument
650 static void mpi3mr_add_phy_to_an_existing_port(struct mpi3mr_ioc *mrioc, in mpi3mr_add_phy_to_an_existing_port() argument
675 mpi3mr_add_sas_phy(mrioc, mr_sas_port, mr_sas_phy); in mpi3mr_add_phy_to_an_existing_port()
687 static void mpi3mr_delete_sas_port(struct mpi3mr_ioc *mrioc, in mpi3mr_delete_sas_port() argument
700 mpi3mr_remove_device_by_sas_address(mrioc, sas_address, in mpi3mr_delete_sas_port()
705 mpi3mr_expander_remove(mrioc, sas_address, hba_port); in mpi3mr_delete_sas_port()
716 static void mpi3mr_del_phy_from_an_existing_port(struct mpi3mr_ioc *mrioc, in mpi3mr_del_phy_from_an_existing_port() argument
732 !mrioc->reset_in_progress) in mpi3mr_del_phy_from_an_existing_port()
733 mpi3mr_delete_sas_port(mrioc, mr_sas_port); in mpi3mr_del_phy_from_an_existing_port()
735 mpi3mr_delete_sas_phy(mrioc, mr_sas_port, in mpi3mr_del_phy_from_an_existing_port()
755 static void mpi3mr_sas_port_sanity_check(struct mpi3mr_ioc *mrioc, in mpi3mr_sas_port_sanity_check() argument
766 mpi3mr_del_phy_from_an_existing_port(mrioc, in mpi3mr_sas_port_sanity_check()
781 static int mpi3mr_set_identify(struct mpi3mr_ioc *mrioc, u16 handle, in mpi3mr_set_identify() argument
790 if (mrioc->reset_in_progress) { in mpi3mr_set_identify()
791 ioc_err(mrioc, "%s: host reset in progress!\n", __func__); in mpi3mr_set_identify()
795 if ((mpi3mr_cfg_get_dev_pg0(mrioc, &ioc_status, &device_pg0, in mpi3mr_set_identify()
797 ioc_err(mrioc, "%s: device page0 read failed\n", __func__); in mpi3mr_set_identify()
802 …ioc_err(mrioc, "device page read failed for handle(0x%04x), with ioc_status(0x%04x) failure at %s:… in mpi3mr_set_identify()
861 static int mpi3mr_add_host_phy(struct mpi3mr_ioc *mrioc, in mpi3mr_add_host_phy() argument
872 ioc_err(mrioc, "failure at %s:%d/%s()!\n", in mpi3mr_add_host_phy()
876 if ((mpi3mr_set_identify(mrioc, mr_sas_phy->handle, in mpi3mr_add_host_phy()
878 ioc_err(mrioc, "failure at %s:%d/%s()!\n", in mpi3mr_add_host_phy()
886 mpi3mr_set_identify(mrioc, mr_sas_phy->attached_handle, in mpi3mr_add_host_phy()
904 ioc_err(mrioc, "failure at %s:%d/%s()!\n", in mpi3mr_add_host_phy()
909 if ((mrioc->logging_level & MPI3_DEBUG_TRANSPORT_INFO)) in mpi3mr_add_host_phy()
931 static int mpi3mr_add_expander_phy(struct mpi3mr_ioc *mrioc, in mpi3mr_add_expander_phy() argument
942 ioc_err(mrioc, "failure at %s:%d/%s()!\n", in mpi3mr_add_expander_phy()
946 if ((mpi3mr_set_identify(mrioc, mr_sas_phy->handle, in mpi3mr_add_expander_phy()
948 ioc_err(mrioc, "failure at %s:%d/%s()!\n", in mpi3mr_add_expander_phy()
957 mpi3mr_set_identify(mrioc, mr_sas_phy->attached_handle, in mpi3mr_add_expander_phy()
975 ioc_err(mrioc, "failure at %s:%d/%s()!\n", in mpi3mr_add_expander_phy()
980 if ((mrioc->logging_level & MPI3_DEBUG_TRANSPORT_INFO)) in mpi3mr_add_expander_phy()
1001 mpi3mr_alloc_hba_port(struct mpi3mr_ioc *mrioc, u16 port_id) in mpi3mr_alloc_hba_port() argument
1010 ioc_info(mrioc, "hba_port entry: %p, port: %d is added to hba_port list\n", in mpi3mr_alloc_hba_port()
1012 list_add_tail(&hba_port->list, &mrioc->hba_port_table_list); in mpi3mr_alloc_hba_port()
1024 struct mpi3mr_hba_port *mpi3mr_get_hba_port_by_id(struct mpi3mr_ioc *mrioc, in mpi3mr_get_hba_port_by_id() argument
1030 &mrioc->hba_port_table_list, list) { in mpi3mr_get_hba_port_by_id()
1052 void mpi3mr_update_links(struct mpi3mr_ioc *mrioc, in mpi3mr_update_links() argument
1060 if (mrioc->reset_in_progress) in mpi3mr_update_links()
1063 spin_lock_irqsave(&mrioc->sas_node_lock, flags); in mpi3mr_update_links()
1064 mr_sas_node = __mpi3mr_sas_node_find_by_sas_address(mrioc, in mpi3mr_update_links()
1067 spin_unlock_irqrestore(&mrioc->sas_node_lock, flags); in mpi3mr_update_links()
1073 spin_unlock_irqrestore(&mrioc->sas_node_lock, flags); in mpi3mr_update_links()
1075 mpi3mr_set_identify(mrioc, handle, in mpi3mr_update_links()
1077 mpi3mr_add_phy_to_an_existing_port(mrioc, mr_sas_node, in mpi3mr_update_links()
1088 if ((mrioc->logging_level & MPI3_DEBUG_TRANSPORT_INFO)) in mpi3mr_update_links()
1109 void mpi3mr_sas_host_refresh(struct mpi3mr_ioc *mrioc) in mpi3mr_sas_host_refresh() argument
1116 dprint_transport_info(mrioc, in mpi3mr_sas_host_refresh()
1118 (unsigned long long)mrioc->sas_hba.sas_address); in mpi3mr_sas_host_refresh()
1121 (mrioc->sas_hba.num_phys * in mpi3mr_sas_host_refresh()
1126 if (mpi3mr_cfg_get_sas_io_unit_pg0(mrioc, sas_io_unit_pg0, sz)) { in mpi3mr_sas_host_refresh()
1127 ioc_err(mrioc, "failure at %s:%d/%s()!\n", in mpi3mr_sas_host_refresh()
1132 mrioc->sas_hba.handle = 0; in mpi3mr_sas_host_refresh()
1133 for (i = 0; i < mrioc->sas_hba.num_phys; i++) { in mpi3mr_sas_host_refresh()
1140 if (!mrioc->sas_hba.handle) in mpi3mr_sas_host_refresh()
1141 mrioc->sas_hba.handle = le16_to_cpu( in mpi3mr_sas_host_refresh()
1144 if (!(mpi3mr_get_hba_port_by_id(mrioc, port_id))) in mpi3mr_sas_host_refresh()
1145 if (!mpi3mr_alloc_hba_port(mrioc, port_id)) in mpi3mr_sas_host_refresh()
1148 mrioc->sas_hba.phy[i].handle = mrioc->sas_hba.handle; in mpi3mr_sas_host_refresh()
1153 mrioc->sas_hba.phy[i].hba_port = in mpi3mr_sas_host_refresh()
1154 mpi3mr_get_hba_port_by_id(mrioc, port_id); in mpi3mr_sas_host_refresh()
1155 mpi3mr_update_links(mrioc, mrioc->sas_hba.sas_address, in mpi3mr_sas_host_refresh()
1157 mrioc->sas_hba.phy[i].hba_port); in mpi3mr_sas_host_refresh()
1174 void mpi3mr_sas_host_add(struct mpi3mr_ioc *mrioc) in mpi3mr_sas_host_add() argument
1190 if (mpi3mr_cfg_get_sas_io_unit_pg0(mrioc, sas_io_unit_pg0, sz)) { in mpi3mr_sas_host_add()
1191 ioc_err(mrioc, "failure at %s:%d/%s()!\n", in mpi3mr_sas_host_add()
1198 mrioc->sas_hba.host_node = 1; in mpi3mr_sas_host_add()
1199 INIT_LIST_HEAD(&mrioc->sas_hba.sas_port_list); in mpi3mr_sas_host_add()
1200 mrioc->sas_hba.parent_dev = &mrioc->shost->shost_gendev; in mpi3mr_sas_host_add()
1201 mrioc->sas_hba.phy = kcalloc(num_phys, in mpi3mr_sas_host_add()
1203 if (!mrioc->sas_hba.phy) in mpi3mr_sas_host_add()
1206 mrioc->sas_hba.num_phys = num_phys; in mpi3mr_sas_host_add()
1214 if (mpi3mr_cfg_get_sas_io_unit_pg0(mrioc, sas_io_unit_pg0, sz)) { in mpi3mr_sas_host_add()
1215 ioc_err(mrioc, "failure at %s:%d/%s()!\n", in mpi3mr_sas_host_add()
1220 mrioc->sas_hba.handle = 0; in mpi3mr_sas_host_add()
1221 for (i = 0; i < mrioc->sas_hba.num_phys; i++) { in mpi3mr_sas_host_add()
1226 if (mpi3mr_cfg_get_sas_phy_pg0(mrioc, &ioc_status, &phy_pg0, in mpi3mr_sas_host_add()
1229 ioc_err(mrioc, "failure at %s:%d/%s()!\n", in mpi3mr_sas_host_add()
1234 ioc_err(mrioc, "failure at %s:%d/%s()!\n", in mpi3mr_sas_host_add()
1239 if (!mrioc->sas_hba.handle) in mpi3mr_sas_host_add()
1240 mrioc->sas_hba.handle = le16_to_cpu( in mpi3mr_sas_host_add()
1244 if (!(mpi3mr_get_hba_port_by_id(mrioc, port_id))) in mpi3mr_sas_host_add()
1245 if (!mpi3mr_alloc_hba_port(mrioc, port_id)) in mpi3mr_sas_host_add()
1248 mrioc->sas_hba.phy[i].handle = mrioc->sas_hba.handle; in mpi3mr_sas_host_add()
1249 mrioc->sas_hba.phy[i].phy_id = i; in mpi3mr_sas_host_add()
1250 mrioc->sas_hba.phy[i].hba_port = in mpi3mr_sas_host_add()
1251 mpi3mr_get_hba_port_by_id(mrioc, port_id); in mpi3mr_sas_host_add()
1252 mpi3mr_add_host_phy(mrioc, &mrioc->sas_hba.phy[i], in mpi3mr_sas_host_add()
1253 phy_pg0, mrioc->sas_hba.parent_dev); in mpi3mr_sas_host_add()
1255 if ((mpi3mr_cfg_get_dev_pg0(mrioc, &ioc_status, &dev_pg0, in mpi3mr_sas_host_add()
1257 mrioc->sas_hba.handle))) { in mpi3mr_sas_host_add()
1258 ioc_err(mrioc, "%s: device page0 read failed\n", __func__); in mpi3mr_sas_host_add()
1262 …ioc_err(mrioc, "device page read failed for handle(0x%04x), with ioc_status(0x%04x) failure at %s:… in mpi3mr_sas_host_add()
1263 mrioc->sas_hba.handle, ioc_status, __FILE__, __LINE__, in mpi3mr_sas_host_add()
1267 mrioc->sas_hba.enclosure_handle = in mpi3mr_sas_host_add()
1270 mrioc->sas_hba.sas_address = in mpi3mr_sas_host_add()
1272 ioc_info(mrioc, in mpi3mr_sas_host_add()
1274 mrioc->sas_hba.handle, in mpi3mr_sas_host_add()
1275 (unsigned long long) mrioc->sas_hba.sas_address, in mpi3mr_sas_host_add()
1276 mrioc->sas_hba.num_phys); in mpi3mr_sas_host_add()
1278 if (mrioc->sas_hba.enclosure_handle) { in mpi3mr_sas_host_add()
1279 if (!(mpi3mr_cfg_get_enclosure_pg0(mrioc, &ioc_status, in mpi3mr_sas_host_add()
1282 mrioc->sas_hba.enclosure_handle)) && in mpi3mr_sas_host_add()
1284 mrioc->sas_hba.enclosure_logical_id = in mpi3mr_sas_host_add()
1306 static struct mpi3mr_sas_port *mpi3mr_sas_port_add(struct mpi3mr_ioc *mrioc, in mpi3mr_sas_port_add() argument
1319 ioc_err(mrioc, "failure at %s:%d/%s()!\n", in mpi3mr_sas_port_add()
1330 spin_lock_irqsave(&mrioc->sas_node_lock, flags); in mpi3mr_sas_port_add()
1331 mr_sas_node = __mpi3mr_sas_node_find_by_sas_address(mrioc, in mpi3mr_sas_port_add()
1333 spin_unlock_irqrestore(&mrioc->sas_node_lock, flags); in mpi3mr_sas_port_add()
1336 ioc_err(mrioc, "%s:could not find parent sas_address(0x%016llx)!\n", in mpi3mr_sas_port_add()
1341 if ((mpi3mr_set_identify(mrioc, handle, in mpi3mr_sas_port_add()
1343 ioc_err(mrioc, "failure at %s:%d/%s()!\n", in mpi3mr_sas_port_add()
1349 ioc_err(mrioc, "failure at %s:%d/%s()!\n", in mpi3mr_sas_port_add()
1355 mpi3mr_sas_port_sanity_check(mrioc, mr_sas_node, in mpi3mr_sas_port_add()
1370 ioc_err(mrioc, "failure at %s:%d/%s()!\n", in mpi3mr_sas_port_add()
1378 tgtdev = mpi3mr_get_tgtdev_by_addr(mrioc, in mpi3mr_sas_port_add()
1383 ioc_err(mrioc, "failure at %s:%d/%s()!\n", in mpi3mr_sas_port_add()
1391 ioc_err(mrioc, "failure at %s:%d/%s()!\n", in mpi3mr_sas_port_add()
1398 ioc_err(mrioc, "failure at %s:%d/%s()!\n", in mpi3mr_sas_port_add()
1405 if ((mrioc->logging_level & MPI3_DEBUG_TRANSPORT_INFO)) in mpi3mr_sas_port_add()
1426 if (mrioc->current_event) in mpi3mr_sas_port_add()
1427 mrioc->current_event->pending_at_sml = 1; in mpi3mr_sas_port_add()
1430 ioc_err(mrioc, "failure at %s:%d/%s()!\n", in mpi3mr_sas_port_add()
1445 spin_lock_irqsave(&mrioc->sas_node_lock, flags); in mpi3mr_sas_port_add()
1447 spin_unlock_irqrestore(&mrioc->sas_node_lock, flags); in mpi3mr_sas_port_add()
1449 if (mrioc->current_event) { in mpi3mr_sas_port_add()
1450 mrioc->current_event->pending_at_sml = 0; in mpi3mr_sas_port_add()
1451 if (mrioc->current_event->discard) in mpi3mr_sas_port_add()
1452 mpi3mr_print_device_event_notice(mrioc, true); in mpi3mr_sas_port_add()
1460 mpi3mr_report_manufacture(mrioc, in mpi3mr_sas_port_add()
1486 static void mpi3mr_sas_port_remove(struct mpi3mr_ioc *mrioc, u64 sas_address, in mpi3mr_sas_port_remove() argument
1500 spin_lock_irqsave(&mrioc->sas_node_lock, flags); in mpi3mr_sas_port_remove()
1501 mr_sas_node = __mpi3mr_sas_node_find_by_sas_address(mrioc, in mpi3mr_sas_port_remove()
1504 spin_unlock_irqrestore(&mrioc->sas_node_lock, flags); in mpi3mr_sas_port_remove()
1520 spin_unlock_irqrestore(&mrioc->sas_node_lock, flags); in mpi3mr_sas_port_remove()
1526 &mrioc->hba_port_table_list, list) { in mpi3mr_sas_port_remove()
1529 ioc_info(mrioc, in mpi3mr_sas_port_remove()
1545 spin_unlock_irqrestore(&mrioc->sas_node_lock, flags); in mpi3mr_sas_port_remove()
1547 if (mrioc->current_event) in mpi3mr_sas_port_remove()
1548 mrioc->current_event->pending_at_sml = 1; in mpi3mr_sas_port_remove()
1552 if ((!mrioc->stop_drv_processing) && in mpi3mr_sas_port_remove()
1553 (mrioc->logging_level & MPI3_DEBUG_TRANSPORT_INFO)) in mpi3mr_sas_port_remove()
1560 if (!mrioc->stop_drv_processing) in mpi3mr_sas_port_remove()
1565 if (!mrioc->stop_drv_processing) in mpi3mr_sas_port_remove()
1567 ioc_info(mrioc, "%s: removed sas_address(0x%016llx)\n", in mpi3mr_sas_port_remove()
1570 if (mrioc->current_event) { in mpi3mr_sas_port_remove()
1571 mrioc->current_event->pending_at_sml = 0; in mpi3mr_sas_port_remove()
1572 if (mrioc->current_event->discard) in mpi3mr_sas_port_remove()
1573 mpi3mr_print_device_event_notice(mrioc, false); in mpi3mr_sas_port_remove()
1610 mpi3mr_update_mr_sas_port(struct mpi3mr_ioc *mrioc, struct host_port *h_port, in mpi3mr_update_mr_sas_port() argument
1641 mr_sas_phy = &mrioc->sas_hba.phy[i]; in mpi3mr_update_mr_sas_port()
1643 mpi3mr_del_phy_from_an_existing_port(mrioc, in mpi3mr_update_mr_sas_port()
1644 &mrioc->sas_hba, mr_sas_phy); in mpi3mr_update_mr_sas_port()
1645 mpi3mr_add_phy_to_an_existing_port(mrioc, in mpi3mr_update_mr_sas_port()
1646 &mrioc->sas_hba, mr_sas_phy, in mpi3mr_update_mr_sas_port()
1653 mr_sas_phy = &mrioc->sas_hba.phy[i]; in mpi3mr_update_mr_sas_port()
1655 mpi3mr_del_phy_from_an_existing_port(mrioc, in mpi3mr_update_mr_sas_port()
1656 &mrioc->sas_hba, mr_sas_phy); in mpi3mr_update_mr_sas_port()
1672 mpi3mr_refresh_sas_ports(struct mpi3mr_ioc *mrioc) in mpi3mr_refresh_sas_ports() argument
1683 (mrioc->sas_hba.num_phys * in mpi3mr_refresh_sas_ports()
1688 if (mpi3mr_cfg_get_sas_io_unit_pg0(mrioc, sas_io_unit_pg0, sz)) { in mpi3mr_refresh_sas_ports()
1689 ioc_err(mrioc, "failure at %s:%d/%s()!\n", in mpi3mr_refresh_sas_ports()
1695 for (i = 0; i < mrioc->sas_hba.num_phys; i++) { in mpi3mr_refresh_sas_ports()
1710 if ((mpi3mr_cfg_get_dev_pg0(mrioc, &ioc_status, &dev_pg0, in mpi3mr_refresh_sas_ports()
1713 dprint_reset(mrioc, in mpi3mr_refresh_sas_ports()
1719 dprint_reset(mrioc, in mpi3mr_refresh_sas_ports()
1740 if (mrioc->logging_level & MPI3_DEBUG_RESET) { in mpi3mr_refresh_sas_ports()
1741 ioc_info(mrioc, "Host port details before reset\n"); in mpi3mr_refresh_sas_ports()
1742 list_for_each_entry(mr_sas_port, &mrioc->sas_hba.sas_port_list, in mpi3mr_refresh_sas_ports()
1744 ioc_info(mrioc, in mpi3mr_refresh_sas_ports()
1751 ioc_info(mrioc, "Host port details after reset\n"); in mpi3mr_refresh_sas_ports()
1753 ioc_info(mrioc, in mpi3mr_refresh_sas_ports()
1761 list_for_each_entry(mr_sas_port, &mrioc->sas_hba.sas_port_list, in mpi3mr_refresh_sas_ports()
1770 list_for_each_entry(mr_sas_port, &mrioc->sas_hba.sas_port_list, in mpi3mr_refresh_sas_ports()
1777 mpi3mr_update_mr_sas_port(mrioc, &h_port[i], mr_sas_port); in mpi3mr_refresh_sas_ports()
1788 list_for_each_entry(mr_sas_port, &mrioc->sas_hba.sas_port_list, in mpi3mr_refresh_sas_ports()
1795 mpi3mr_update_mr_sas_port(mrioc, &h_port[i], mr_sas_port); in mpi3mr_refresh_sas_ports()
1806 list_for_each_entry(mr_sas_port, &mrioc->sas_hba.sas_port_list, in mpi3mr_refresh_sas_ports()
1812 mpi3mr_update_mr_sas_port(mrioc, &h_port[i], mr_sas_port); in mpi3mr_refresh_sas_ports()
1831 mpi3mr_refresh_expanders(struct mpi3mr_ioc *mrioc) in mpi3mr_refresh_expanders() argument
1841 spin_lock_irqsave(&mrioc->sas_node_lock, flags); in mpi3mr_refresh_expanders()
1842 list_for_each_entry(sas_expander, &mrioc->sas_expander_list, list) { in mpi3mr_refresh_expanders()
1845 spin_unlock_irqrestore(&mrioc->sas_node_lock, flags); in mpi3mr_refresh_expanders()
1853 if ((mpi3mr_cfg_get_sas_exp_pg0(mrioc, &ioc_status, &expander_pg0, in mpi3mr_refresh_expanders()
1856 dprint_reset(mrioc, in mpi3mr_refresh_expanders()
1863 dprint_reset(mrioc, in mpi3mr_refresh_expanders()
1871 hba_port = mpi3mr_get_hba_port_by_id(mrioc, expander_pg0.io_unit_port); in mpi3mr_refresh_expanders()
1874 mpi3mr_sas_host_refresh(mrioc); in mpi3mr_refresh_expanders()
1875 mpi3mr_expander_add(mrioc, handle); in mpi3mr_refresh_expanders()
1879 spin_lock_irqsave(&mrioc->sas_node_lock, flags); in mpi3mr_refresh_expanders()
1881 mpi3mr_expander_find_by_sas_address(mrioc, in mpi3mr_refresh_expanders()
1883 spin_unlock_irqrestore(&mrioc->sas_node_lock, flags); in mpi3mr_refresh_expanders()
1886 mpi3mr_sas_host_refresh(mrioc); in mpi3mr_refresh_expanders()
1887 mpi3mr_expander_add(mrioc, handle); in mpi3mr_refresh_expanders()
1906 spin_lock_irqsave(&mrioc->sas_node_lock, flags); in mpi3mr_refresh_expanders()
1908 &mrioc->sas_expander_list, list) { in mpi3mr_refresh_expanders()
1910 spin_unlock_irqrestore(&mrioc->sas_node_lock, flags); in mpi3mr_refresh_expanders()
1911 mpi3mr_expander_node_remove(mrioc, sas_expander); in mpi3mr_refresh_expanders()
1912 spin_lock_irqsave(&mrioc->sas_node_lock, flags); in mpi3mr_refresh_expanders()
1915 spin_unlock_irqrestore(&mrioc->sas_node_lock, flags); in mpi3mr_refresh_expanders()
1928 static void mpi3mr_expander_node_add(struct mpi3mr_ioc *mrioc, in mpi3mr_expander_node_add() argument
1933 spin_lock_irqsave(&mrioc->sas_node_lock, flags); in mpi3mr_expander_node_add()
1934 list_add_tail(&sas_expander->list, &mrioc->sas_expander_list); in mpi3mr_expander_node_add()
1935 spin_unlock_irqrestore(&mrioc->sas_node_lock, flags); in mpi3mr_expander_node_add()
1949 int mpi3mr_expander_add(struct mpi3mr_ioc *mrioc, u16 handle) in mpi3mr_expander_add() argument
1968 if (mrioc->reset_in_progress) in mpi3mr_expander_add()
1971 if ((mpi3mr_cfg_get_sas_exp_pg0(mrioc, &ioc_status, &expander_pg0, in mpi3mr_expander_add()
1973 ioc_err(mrioc, "failure at %s:%d/%s()!\n", in mpi3mr_expander_add()
1979 ioc_err(mrioc, "failure at %s:%d/%s()!\n", in mpi3mr_expander_add()
1985 if (mpi3mr_get_sas_address(mrioc, parent_handle, &sas_address_parent) in mpi3mr_expander_add()
1987 ioc_err(mrioc, "failure at %s:%d/%s()!\n", in mpi3mr_expander_add()
1993 hba_port = mpi3mr_get_hba_port_by_id(mrioc, port_id); in mpi3mr_expander_add()
1995 ioc_err(mrioc, "failure at %s:%d/%s()!\n", in mpi3mr_expander_add()
2000 if (sas_address_parent != mrioc->sas_hba.sas_address) { in mpi3mr_expander_add()
2001 spin_lock_irqsave(&mrioc->sas_node_lock, flags); in mpi3mr_expander_add()
2003 mpi3mr_expander_find_by_sas_address(mrioc, in mpi3mr_expander_add()
2005 spin_unlock_irqrestore(&mrioc->sas_node_lock, flags); in mpi3mr_expander_add()
2007 rc = mpi3mr_expander_add(mrioc, parent_handle); in mpi3mr_expander_add()
2020 if (mpi3mr_cfg_get_sas_exp_pg1(mrioc, in mpi3mr_expander_add()
2025 ioc_err(mrioc, "failure at %s:%d/%s()!\n", in mpi3mr_expander_add()
2031 ioc_err(mrioc, "failure at %s:%d/%s()!\n", in mpi3mr_expander_add()
2043 mpi3mr_update_links(mrioc, sas_address_parent, in mpi3mr_expander_add()
2049 spin_lock_irqsave(&mrioc->sas_node_lock, flags); in mpi3mr_expander_add()
2051 sas_expander = mpi3mr_expander_find_by_sas_address(mrioc, in mpi3mr_expander_add()
2053 spin_unlock_irqrestore(&mrioc->sas_node_lock, flags); in mpi3mr_expander_add()
2069 ioc_info(mrioc, in mpi3mr_expander_add()
2086 mr_sas_port = mpi3mr_sas_port_add(mrioc, handle, sas_address_parent, in mpi3mr_expander_add()
2089 ioc_err(mrioc, "failure at %s:%d/%s()!\n", in mpi3mr_expander_add()
2100 if (mpi3mr_cfg_get_sas_exp_pg1(mrioc, &ioc_status, in mpi3mr_expander_add()
2104 ioc_err(mrioc, "failure at %s:%d/%s()!\n", in mpi3mr_expander_add()
2110 ioc_err(mrioc, "failure at %s:%d/%s()!\n", in mpi3mr_expander_add()
2120 if ((mpi3mr_add_expander_phy(mrioc, &sas_expander->phy[i], in mpi3mr_expander_add()
2122 ioc_err(mrioc, "failure at %s:%d/%s()!\n", in mpi3mr_expander_add()
2131 mpi3mr_enclosure_find_by_handle(mrioc, in mpi3mr_expander_add()
2138 mpi3mr_expander_node_add(mrioc, sas_expander); in mpi3mr_expander_add()
2144 mpi3mr_sas_port_remove(mrioc, in mpi3mr_expander_add()
2164 void mpi3mr_expander_node_remove(struct mpi3mr_ioc *mrioc, in mpi3mr_expander_node_remove() argument
2174 if (mrioc->reset_in_progress) in mpi3mr_expander_node_remove()
2178 mpi3mr_remove_device_by_sas_address(mrioc, in mpi3mr_expander_node_remove()
2185 mpi3mr_expander_remove(mrioc, in mpi3mr_expander_node_remove()
2191 mpi3mr_sas_port_remove(mrioc, sas_expander->sas_address, in mpi3mr_expander_node_remove()
2194 ioc_info(mrioc, "expander_remove: handle(0x%04x), sas_addr(0x%016llx), port:%d\n", in mpi3mr_expander_node_remove()
2198 spin_lock_irqsave(&mrioc->sas_node_lock, flags); in mpi3mr_expander_node_remove()
2200 spin_unlock_irqrestore(&mrioc->sas_node_lock, flags); in mpi3mr_expander_node_remove()
2218 void mpi3mr_expander_remove(struct mpi3mr_ioc *mrioc, u64 sas_address, in mpi3mr_expander_remove() argument
2224 if (mrioc->reset_in_progress) in mpi3mr_expander_remove()
2230 spin_lock_irqsave(&mrioc->sas_node_lock, flags); in mpi3mr_expander_remove()
2231 sas_expander = mpi3mr_expander_find_by_sas_address(mrioc, sas_address, in mpi3mr_expander_remove()
2233 spin_unlock_irqrestore(&mrioc->sas_node_lock, flags); in mpi3mr_expander_remove()
2235 mpi3mr_expander_node_remove(mrioc, sas_expander); in mpi3mr_expander_remove()
2252 static u8 mpi3mr_get_sas_negotiated_logical_linkrate(struct mpi3mr_ioc *mrioc, in mpi3mr_get_sas_negotiated_logical_linkrate() argument
2265 if (mpi3mr_cfg_get_sas_exp_pg1(mrioc, &ioc_status, in mpi3mr_get_sas_negotiated_logical_linkrate()
2269 ioc_err(mrioc, "failure at %s:%d/%s()!\n", in mpi3mr_get_sas_negotiated_logical_linkrate()
2274 ioc_err(mrioc, "failure at %s:%d/%s()!\n", in mpi3mr_get_sas_negotiated_logical_linkrate()
2283 if (mpi3mr_cfg_get_sas_phy_pg0(mrioc, &ioc_status, &phy_pg0, in mpi3mr_get_sas_negotiated_logical_linkrate()
2286 ioc_err(mrioc, "failure at %s:%d/%s()!\n", in mpi3mr_get_sas_negotiated_logical_linkrate()
2291 ioc_err(mrioc, "failure at %s:%d/%s()!\n", in mpi3mr_get_sas_negotiated_logical_linkrate()
2312 int mpi3mr_report_tgtdev_to_sas_transport(struct mpi3mr_ioc *mrioc, in mpi3mr_report_tgtdev_to_sas_transport() argument
2322 !mrioc->sas_transport_enabled) in mpi3mr_report_tgtdev_to_sas_transport()
2326 if (!mrioc->sas_hba.num_phys) in mpi3mr_report_tgtdev_to_sas_transport()
2327 mpi3mr_sas_host_add(mrioc); in mpi3mr_report_tgtdev_to_sas_transport()
2329 mpi3mr_sas_host_refresh(mrioc); in mpi3mr_report_tgtdev_to_sas_transport()
2331 if (mpi3mr_get_sas_address(mrioc, tgtdev->parent_handle, in mpi3mr_report_tgtdev_to_sas_transport()
2333 ioc_err(mrioc, "failure at %s:%d/%s()!\n", in mpi3mr_report_tgtdev_to_sas_transport()
2342 hba_port = mpi3mr_get_hba_port_by_id(mrioc, port_id); in mpi3mr_report_tgtdev_to_sas_transport()
2344 ioc_err(mrioc, "failure at %s:%d/%s()!\n", in mpi3mr_report_tgtdev_to_sas_transport()
2350 link_rate = mpi3mr_get_sas_negotiated_logical_linkrate(mrioc, tgtdev); in mpi3mr_report_tgtdev_to_sas_transport()
2352 mpi3mr_update_links(mrioc, sas_address_parent, tgtdev->dev_handle, in mpi3mr_report_tgtdev_to_sas_transport()
2356 if (!mpi3mr_sas_port_add(mrioc, tgtdev->dev_handle, in mpi3mr_report_tgtdev_to_sas_transport()
2359 } else if ((!tgtdev->starget) && (!mrioc->is_driver_loading)) { in mpi3mr_report_tgtdev_to_sas_transport()
2360 mpi3mr_sas_port_remove(mrioc, sas_address, in mpi3mr_report_tgtdev_to_sas_transport()
2380 void mpi3mr_remove_tgtdev_from_sas_transport(struct mpi3mr_ioc *mrioc, in mpi3mr_remove_tgtdev_from_sas_transport() argument
2387 !mrioc->sas_transport_enabled) in mpi3mr_remove_tgtdev_from_sas_transport()
2393 mpi3mr_sas_port_remove(mrioc, sas_address, sas_address_parent, in mpi3mr_remove_tgtdev_from_sas_transport()
2427 static u8 mpi3mr_get_port_id_by_rphy(struct mpi3mr_ioc *mrioc, struct sas_rphy *rphy) in mpi3mr_get_port_id_by_rphy() argument
2439 spin_lock_irqsave(&mrioc->sas_node_lock, flags); in mpi3mr_get_port_id_by_rphy()
2440 list_for_each_entry(sas_expander, &mrioc->sas_expander_list, in mpi3mr_get_port_id_by_rphy()
2447 spin_unlock_irqrestore(&mrioc->sas_node_lock, flags); in mpi3mr_get_port_id_by_rphy()
2449 spin_lock_irqsave(&mrioc->tgtdev_lock, flags); in mpi3mr_get_port_id_by_rphy()
2451 tgtdev = __mpi3mr_get_tgtdev_by_addr_and_rphy(mrioc, in mpi3mr_get_port_id_by_rphy()
2458 spin_unlock_irqrestore(&mrioc->tgtdev_lock, flags); in mpi3mr_get_port_id_by_rphy()
2513 static int mpi3mr_get_expander_phy_error_log(struct mpi3mr_ioc *mrioc, in mpi3mr_get_expander_phy_error_log() argument
2530 if (mrioc->reset_in_progress) { in mpi3mr_get_expander_phy_error_log()
2531 ioc_err(mrioc, "%s: host reset in progress!\n", __func__); in mpi3mr_get_expander_phy_error_log()
2538 data_out = dma_alloc_coherent(&mrioc->pdev->dev, sz, &data_out_dma, in mpi3mr_get_expander_phy_error_log()
2570 dprint_transport_info(mrioc, in mpi3mr_get_expander_phy_error_log()
2574 if (mpi3mr_post_transport_req(mrioc, &mpi_request, request_sz, in mpi3mr_get_expander_phy_error_log()
2578 dprint_transport_info(mrioc, in mpi3mr_get_expander_phy_error_log()
2583 dprint_transport_info(mrioc, in mpi3mr_get_expander_phy_error_log()
2591 dprint_transport_info(mrioc, in mpi3mr_get_expander_phy_error_log()
2608 dma_free_coherent(&mrioc->pdev->dev, sz, data_out, in mpi3mr_get_expander_phy_error_log()
2625 struct mpi3mr_ioc *mrioc = phy_to_mrioc(phy); in mpi3mr_transport_get_linkerrors() local
2630 rc = mpi3mr_parent_present(mrioc, phy); in mpi3mr_transport_get_linkerrors()
2634 if (phy->identify.sas_address != mrioc->sas_hba.sas_address) in mpi3mr_transport_get_linkerrors()
2635 return mpi3mr_get_expander_phy_error_log(mrioc, phy); in mpi3mr_transport_get_linkerrors()
2639 if ((mpi3mr_cfg_get_sas_phy_pg1(mrioc, &ioc_status, &phy_pg1, in mpi3mr_transport_get_linkerrors()
2642 ioc_err(mrioc, "failure at %s:%d/%s()!\n", in mpi3mr_transport_get_linkerrors()
2648 ioc_err(mrioc, "failure at %s:%d/%s()!\n", in mpi3mr_transport_get_linkerrors()
2676 struct mpi3mr_ioc *mrioc = rphy_to_mrioc(rphy); in mpi3mr_transport_get_enclosure_identifier() local
2681 spin_lock_irqsave(&mrioc->tgtdev_lock, flags); in mpi3mr_transport_get_enclosure_identifier()
2682 tgtdev = __mpi3mr_get_tgtdev_by_addr_and_rphy(mrioc, in mpi3mr_transport_get_enclosure_identifier()
2693 spin_unlock_irqrestore(&mrioc->tgtdev_lock, flags); in mpi3mr_transport_get_enclosure_identifier()
2710 struct mpi3mr_ioc *mrioc = rphy_to_mrioc(rphy); in mpi3mr_transport_get_bay_identifier() local
2715 spin_lock_irqsave(&mrioc->tgtdev_lock, flags); in mpi3mr_transport_get_bay_identifier()
2716 tgtdev = __mpi3mr_get_tgtdev_by_addr_and_rphy(mrioc, in mpi3mr_transport_get_bay_identifier()
2723 spin_unlock_irqrestore(&mrioc->tgtdev_lock, flags); in mpi3mr_transport_get_bay_identifier()
2769 mpi3mr_expander_phy_control(struct mpi3mr_ioc *mrioc, in mpi3mr_expander_phy_control() argument
2789 if (mrioc->reset_in_progress) { in mpi3mr_expander_phy_control()
2790 ioc_err(mrioc, "%s: host reset in progress!\n", __func__); in mpi3mr_expander_phy_control()
2797 data_out = dma_alloc_coherent(&mrioc->pdev->dev, sz, &data_out_dma, in mpi3mr_expander_phy_control()
2835 dprint_transport_info(mrioc, in mpi3mr_expander_phy_control()
2840 if (mpi3mr_post_transport_req(mrioc, &mpi_request, request_sz, in mpi3mr_expander_phy_control()
2844 dprint_transport_info(mrioc, in mpi3mr_expander_phy_control()
2849 dprint_transport_info(mrioc, in mpi3mr_expander_phy_control()
2856 dprint_transport_info(mrioc, in mpi3mr_expander_phy_control()
2863 dma_free_coherent(&mrioc->pdev->dev, sz, data_out, in mpi3mr_expander_phy_control()
2879 struct mpi3mr_ioc *mrioc = phy_to_mrioc(phy); in mpi3mr_transport_phy_reset() local
2887 rc = mpi3mr_parent_present(mrioc, phy); in mpi3mr_transport_phy_reset()
2892 if (phy->identify.sas_address != mrioc->sas_hba.sas_address) in mpi3mr_transport_phy_reset()
2893 return mpi3mr_expander_phy_control(mrioc, phy, in mpi3mr_transport_phy_reset()
2908 dprint_transport_info(mrioc, in mpi3mr_transport_phy_reset()
2913 if (mpi3mr_post_transport_req(mrioc, &mpi_request, request_sz, in mpi3mr_transport_phy_reset()
2919 dprint_transport_info(mrioc, in mpi3mr_transport_phy_reset()
2939 struct mpi3mr_ioc *mrioc = phy_to_mrioc(phy); in mpi3mr_transport_phy_enable() local
2946 rc = mpi3mr_parent_present(mrioc, phy); in mpi3mr_transport_phy_enable()
2951 if (phy->identify.sas_address != mrioc->sas_hba.sas_address) in mpi3mr_transport_phy_enable()
2952 return mpi3mr_expander_phy_control(mrioc, phy, in mpi3mr_transport_phy_enable()
2958 (mrioc->sas_hba.num_phys * in mpi3mr_transport_phy_enable()
2965 if (mpi3mr_cfg_get_sas_io_unit_pg0(mrioc, sas_io_unit_pg0, sz)) { in mpi3mr_transport_phy_enable()
2966 ioc_err(mrioc, "failure at %s:%d/%s()!\n", in mpi3mr_transport_phy_enable()
2973 for (i = 0, discovery_active = 0; i < mrioc->sas_hba.num_phys ; i++) { in mpi3mr_transport_phy_enable()
2976 ioc_err(mrioc, in mpi3mr_transport_phy_enable()
2992 ioc_err(mrioc, "failure at %s:%d/%s()!\n", in mpi3mr_transport_phy_enable()
3000 (mrioc->sas_hba.num_phys * in mpi3mr_transport_phy_enable()
3008 if (mpi3mr_cfg_get_sas_io_unit_pg1(mrioc, sas_io_unit_pg1, sz)) { in mpi3mr_transport_phy_enable()
3009 ioc_err(mrioc, "failure at %s:%d/%s()!\n", in mpi3mr_transport_phy_enable()
3022 mpi3mr_cfg_set_sas_io_unit_pg1(mrioc, sas_io_unit_pg1, sz); in mpi3mr_transport_phy_enable()
3048 struct mpi3mr_ioc *mrioc = phy_to_mrioc(phy); in mpi3mr_transport_phy_speed() local
3054 rc = mpi3mr_parent_present(mrioc, phy); in mpi3mr_transport_phy_speed()
3069 if (phy->identify.sas_address != mrioc->sas_hba.sas_address) { in mpi3mr_transport_phy_speed()
3072 return mpi3mr_expander_phy_control(mrioc, phy, in mpi3mr_transport_phy_speed()
3078 (mrioc->sas_hba.num_phys * in mpi3mr_transport_phy_speed()
3086 if (mpi3mr_cfg_get_sas_io_unit_pg1(mrioc, sas_io_unit_pg1, sz)) { in mpi3mr_transport_phy_speed()
3087 ioc_err(mrioc, "failure at %s:%d/%s()!\n", in mpi3mr_transport_phy_speed()
3096 if (mpi3mr_cfg_set_sas_io_unit_pg1(mrioc, sas_io_unit_pg1, sz)) { in mpi3mr_transport_phy_speed()
3097 ioc_err(mrioc, "failure at %s:%d/%s()!\n", in mpi3mr_transport_phy_speed()
3107 if (!mpi3mr_cfg_get_sas_phy_pg0(mrioc, &ioc_status, &phy_pg0, in mpi3mr_transport_phy_speed()
3194 struct mpi3mr_ioc *mrioc = shost_priv(shost); in mpi3mr_transport_smp_handler() local
3211 if (mrioc->reset_in_progress) { in mpi3mr_transport_smp_handler()
3212 ioc_err(mrioc, "%s: host reset in progress!\n", __func__); in mpi3mr_transport_smp_handler()
3217 rc = mpi3mr_map_smp_buffer(&mrioc->pdev->dev, &job->request_payload, in mpi3mr_transport_smp_handler()
3227 rc = mpi3mr_map_smp_buffer(&mrioc->pdev->dev, &job->reply_payload, in mpi3mr_transport_smp_handler()
3236 mpi_request.io_unit_port = (u8) mpi3mr_get_port_id_by_rphy(mrioc, rphy); in mpi3mr_transport_smp_handler()
3239 cpu_to_le64(mrioc->sas_hba.sas_address)); in mpi3mr_transport_smp_handler()
3246 dprint_transport_info(mrioc, "sending SMP request\n"); in mpi3mr_transport_smp_handler()
3248 rc = mpi3mr_post_transport_req(mrioc, &mpi_request, request_sz, in mpi3mr_transport_smp_handler()
3254 dprint_transport_info(mrioc, in mpi3mr_transport_smp_handler()
3257 dprint_transport_info(mrioc, in mpi3mr_transport_smp_handler()
3272 mpi3mr_unmap_smp_buffer(&mrioc->pdev->dev, &job->reply_payload, in mpi3mr_transport_smp_handler()
3275 mpi3mr_unmap_smp_buffer(&mrioc->pdev->dev, &job->request_payload, in mpi3mr_transport_smp_handler()