Lines Matching refs:transport_cmds

236 	if (ioc->transport_cmds.status == MPT3_CMD_NOT_USED)  in mpt3sas_transport_done()
238 if (ioc->transport_cmds.smid != smid) in mpt3sas_transport_done()
240 ioc->transport_cmds.status |= MPT3_CMD_COMPLETE; in mpt3sas_transport_done()
242 memcpy(ioc->transport_cmds.reply, mpi_reply, in mpt3sas_transport_done()
244 ioc->transport_cmds.status |= MPT3_CMD_REPLY_VALID; in mpt3sas_transport_done()
246 ioc->transport_cmds.status &= ~MPT3_CMD_PENDING; in mpt3sas_transport_done()
247 complete(&ioc->transport_cmds.done); in mpt3sas_transport_done()
312 mutex_lock(&ioc->transport_cmds.mutex); in _transport_expander_report_manufacture()
314 if (ioc->transport_cmds.status != MPT3_CMD_NOT_USED) { in _transport_expander_report_manufacture()
319 ioc->transport_cmds.status = MPT3_CMD_PENDING; in _transport_expander_report_manufacture()
334 ioc->transport_cmds.smid = smid; in _transport_expander_report_manufacture()
369 init_completion(&ioc->transport_cmds.done); in _transport_expander_report_manufacture()
371 wait_for_completion_timeout(&ioc->transport_cmds.done, 10*HZ); in _transport_expander_report_manufacture()
373 if (!(ioc->transport_cmds.status & MPT3_CMD_COMPLETE)) { in _transport_expander_report_manufacture()
377 if (!(ioc->transport_cmds.status & MPT3_CMD_RESET)) in _transport_expander_report_manufacture()
384 if (ioc->transport_cmds.status & MPT3_CMD_REPLY_VALID) { in _transport_expander_report_manufacture()
387 mpi_reply = ioc->transport_cmds.reply; in _transport_expander_report_manufacture()
422 ioc->transport_cmds.status = MPT3_CMD_NOT_USED; in _transport_expander_report_manufacture()
427 mutex_unlock(&ioc->transport_cmds.mutex); in _transport_expander_report_manufacture()
1078 mutex_lock(&ioc->transport_cmds.mutex); in _transport_get_expander_phy_error_log()
1080 if (ioc->transport_cmds.status != MPT3_CMD_NOT_USED) { in _transport_get_expander_phy_error_log()
1085 ioc->transport_cmds.status = MPT3_CMD_PENDING; in _transport_get_expander_phy_error_log()
1099 ioc->transport_cmds.smid = smid; in _transport_get_expander_phy_error_log()
1141 init_completion(&ioc->transport_cmds.done); in _transport_get_expander_phy_error_log()
1143 wait_for_completion_timeout(&ioc->transport_cmds.done, 10*HZ); in _transport_get_expander_phy_error_log()
1145 if (!(ioc->transport_cmds.status & MPT3_CMD_COMPLETE)) { in _transport_get_expander_phy_error_log()
1149 if (!(ioc->transport_cmds.status & MPT3_CMD_RESET)) in _transport_get_expander_phy_error_log()
1156 if (ioc->transport_cmds.status & MPT3_CMD_REPLY_VALID) { in _transport_get_expander_phy_error_log()
1158 mpi_reply = ioc->transport_cmds.reply; in _transport_get_expander_phy_error_log()
1192 ioc->transport_cmds.status = MPT3_CMD_NOT_USED; in _transport_get_expander_phy_error_log()
1196 mutex_unlock(&ioc->transport_cmds.mutex); in _transport_get_expander_phy_error_log()
1368 mutex_lock(&ioc->transport_cmds.mutex); in _transport_expander_phy_control()
1370 if (ioc->transport_cmds.status != MPT3_CMD_NOT_USED) { in _transport_expander_phy_control()
1375 ioc->transport_cmds.status = MPT3_CMD_PENDING; in _transport_expander_phy_control()
1389 ioc->transport_cmds.smid = smid; in _transport_expander_phy_control()
1436 init_completion(&ioc->transport_cmds.done); in _transport_expander_phy_control()
1438 wait_for_completion_timeout(&ioc->transport_cmds.done, 10*HZ); in _transport_expander_phy_control()
1440 if (!(ioc->transport_cmds.status & MPT3_CMD_COMPLETE)) { in _transport_expander_phy_control()
1444 if (!(ioc->transport_cmds.status & MPT3_CMD_RESET)) in _transport_expander_phy_control()
1451 if (ioc->transport_cmds.status & MPT3_CMD_REPLY_VALID) { in _transport_expander_phy_control()
1453 mpi_reply = ioc->transport_cmds.reply; in _transport_expander_phy_control()
1479 ioc->transport_cmds.status = MPT3_CMD_NOT_USED; in _transport_expander_phy_control()
1484 mutex_unlock(&ioc->transport_cmds.mutex); in _transport_expander_phy_control()
1856 rc = mutex_lock_interruptible(&ioc->transport_cmds.mutex); in _transport_smp_handler()
1860 if (ioc->transport_cmds.status != MPT3_CMD_NOT_USED) { in _transport_smp_handler()
1866 ioc->transport_cmds.status = MPT3_CMD_PENDING; in _transport_smp_handler()
1896 ioc->transport_cmds.smid = smid; in _transport_smp_handler()
1913 init_completion(&ioc->transport_cmds.done); in _transport_smp_handler()
1915 wait_for_completion_timeout(&ioc->transport_cmds.done, 10*HZ); in _transport_smp_handler()
1917 if (!(ioc->transport_cmds.status & MPT3_CMD_COMPLETE)) { in _transport_smp_handler()
1921 if (!(ioc->transport_cmds.status & MPT3_CMD_RESET)) { in _transport_smp_handler()
1930 if (!(ioc->transport_cmds.status & MPT3_CMD_REPLY_VALID)) { in _transport_smp_handler()
1937 mpi_reply = ioc->transport_cmds.reply; in _transport_smp_handler()
1962 ioc->transport_cmds.status = MPT3_CMD_NOT_USED; in _transport_smp_handler()
1963 mutex_unlock(&ioc->transport_cmds.mutex); in _transport_smp_handler()