Lines Matching refs:transport_cmds
298 if (ioc->transport_cmds.status == MPT3_CMD_NOT_USED) in mpt3sas_transport_done()
300 if (ioc->transport_cmds.smid != smid) in mpt3sas_transport_done()
302 ioc->transport_cmds.status |= MPT3_CMD_COMPLETE; in mpt3sas_transport_done()
304 memcpy(ioc->transport_cmds.reply, mpi_reply, in mpt3sas_transport_done()
306 ioc->transport_cmds.status |= MPT3_CMD_REPLY_VALID; in mpt3sas_transport_done()
308 ioc->transport_cmds.status &= ~MPT3_CMD_PENDING; in mpt3sas_transport_done()
309 complete(&ioc->transport_cmds.done); in mpt3sas_transport_done()
375 mutex_lock(&ioc->transport_cmds.mutex); in _transport_expander_report_manufacture()
377 if (ioc->transport_cmds.status != MPT3_CMD_NOT_USED) { in _transport_expander_report_manufacture()
382 ioc->transport_cmds.status = MPT3_CMD_PENDING; in _transport_expander_report_manufacture()
397 ioc->transport_cmds.smid = smid; in _transport_expander_report_manufacture()
432 init_completion(&ioc->transport_cmds.done); in _transport_expander_report_manufacture()
434 wait_for_completion_timeout(&ioc->transport_cmds.done, 10*HZ); in _transport_expander_report_manufacture()
436 if (!(ioc->transport_cmds.status & MPT3_CMD_COMPLETE)) { in _transport_expander_report_manufacture()
440 if (!(ioc->transport_cmds.status & MPT3_CMD_RESET)) in _transport_expander_report_manufacture()
447 if (ioc->transport_cmds.status & MPT3_CMD_REPLY_VALID) { in _transport_expander_report_manufacture()
450 mpi_reply = ioc->transport_cmds.reply; in _transport_expander_report_manufacture()
485 ioc->transport_cmds.status = MPT3_CMD_NOT_USED; in _transport_expander_report_manufacture()
490 mutex_unlock(&ioc->transport_cmds.mutex); in _transport_expander_report_manufacture()
1278 mutex_lock(&ioc->transport_cmds.mutex); in _transport_get_expander_phy_error_log()
1280 if (ioc->transport_cmds.status != MPT3_CMD_NOT_USED) { in _transport_get_expander_phy_error_log()
1285 ioc->transport_cmds.status = MPT3_CMD_PENDING; in _transport_get_expander_phy_error_log()
1299 ioc->transport_cmds.smid = smid; in _transport_get_expander_phy_error_log()
1341 init_completion(&ioc->transport_cmds.done); in _transport_get_expander_phy_error_log()
1343 wait_for_completion_timeout(&ioc->transport_cmds.done, 10*HZ); in _transport_get_expander_phy_error_log()
1345 if (!(ioc->transport_cmds.status & MPT3_CMD_COMPLETE)) { in _transport_get_expander_phy_error_log()
1349 if (!(ioc->transport_cmds.status & MPT3_CMD_RESET)) in _transport_get_expander_phy_error_log()
1356 if (ioc->transport_cmds.status & MPT3_CMD_REPLY_VALID) { in _transport_get_expander_phy_error_log()
1358 mpi_reply = ioc->transport_cmds.reply; in _transport_get_expander_phy_error_log()
1392 ioc->transport_cmds.status = MPT3_CMD_NOT_USED; in _transport_get_expander_phy_error_log()
1396 mutex_unlock(&ioc->transport_cmds.mutex); in _transport_get_expander_phy_error_log()
1569 mutex_lock(&ioc->transport_cmds.mutex); in _transport_expander_phy_control()
1571 if (ioc->transport_cmds.status != MPT3_CMD_NOT_USED) { in _transport_expander_phy_control()
1576 ioc->transport_cmds.status = MPT3_CMD_PENDING; in _transport_expander_phy_control()
1590 ioc->transport_cmds.smid = smid; in _transport_expander_phy_control()
1637 init_completion(&ioc->transport_cmds.done); in _transport_expander_phy_control()
1639 wait_for_completion_timeout(&ioc->transport_cmds.done, 10*HZ); in _transport_expander_phy_control()
1641 if (!(ioc->transport_cmds.status & MPT3_CMD_COMPLETE)) { in _transport_expander_phy_control()
1645 if (!(ioc->transport_cmds.status & MPT3_CMD_RESET)) in _transport_expander_phy_control()
1652 if (ioc->transport_cmds.status & MPT3_CMD_REPLY_VALID) { in _transport_expander_phy_control()
1654 mpi_reply = ioc->transport_cmds.reply; in _transport_expander_phy_control()
1680 ioc->transport_cmds.status = MPT3_CMD_NOT_USED; in _transport_expander_phy_control()
1685 mutex_unlock(&ioc->transport_cmds.mutex); in _transport_expander_phy_control()
2066 rc = mutex_lock_interruptible(&ioc->transport_cmds.mutex); in _transport_smp_handler()
2070 if (ioc->transport_cmds.status != MPT3_CMD_NOT_USED) { in _transport_smp_handler()
2076 ioc->transport_cmds.status = MPT3_CMD_PENDING; in _transport_smp_handler()
2106 ioc->transport_cmds.smid = smid; in _transport_smp_handler()
2123 init_completion(&ioc->transport_cmds.done); in _transport_smp_handler()
2125 wait_for_completion_timeout(&ioc->transport_cmds.done, 10*HZ); in _transport_smp_handler()
2127 if (!(ioc->transport_cmds.status & MPT3_CMD_COMPLETE)) { in _transport_smp_handler()
2131 if (!(ioc->transport_cmds.status & MPT3_CMD_RESET)) { in _transport_smp_handler()
2140 if (!(ioc->transport_cmds.status & MPT3_CMD_REPLY_VALID)) { in _transport_smp_handler()
2147 mpi_reply = ioc->transport_cmds.reply; in _transport_smp_handler()
2172 ioc->transport_cmds.status = MPT3_CMD_NOT_USED; in _transport_smp_handler()
2173 mutex_unlock(&ioc->transport_cmds.mutex); in _transport_smp_handler()