diff options
author | Brent Stapleton <brent.stapleton@ettus.com> | 2018-01-29 15:16:58 -0800 |
---|---|---|
committer | Ashish Chaudhari <ashish.chaudhari@ettus.com> | 2018-01-29 15:42:13 -0800 |
commit | dca3914516e8cb2aee4dd5173bb806afce09f59b (patch) | |
tree | 151082804a6d7331d39da0810bf81c2c08ac22fd /host/lib | |
parent | cf1bf696649c958c53d7f4cf0a280242c254e4be (diff) | |
download | uhd-dca3914516e8cb2aee4dd5173bb806afce09f59b.tar.gz uhd-dca3914516e8cb2aee4dd5173bb806afce09f59b.tar.bz2 uhd-dca3914516e8cb2aee4dd5173bb806afce09f59b.zip |
mpmd: image loader: increased timeout
-Increased timeout from 10s to 20s. This time is also per component file
being updated. For example, when updating the FPGA with new .bit and
.dts files, the timeout will be 40s.
-Also added log message to let user know their device is updating, not
frozen.
Diffstat (limited to 'host/lib')
-rw-r--r-- | host/lib/usrp/mpmd/mpmd_image_loader.cpp | 1 | ||||
-rw-r--r-- | host/lib/usrp/mpmd/mpmd_impl.cpp | 5 |
2 files changed, 4 insertions, 2 deletions
diff --git a/host/lib/usrp/mpmd/mpmd_image_loader.cpp b/host/lib/usrp/mpmd/mpmd_image_loader.cpp index c25d9b8ce..40536d147 100644 --- a/host/lib/usrp/mpmd/mpmd_image_loader.cpp +++ b/host/lib/usrp/mpmd/mpmd_image_loader.cpp @@ -119,6 +119,7 @@ static bool mpmd_image_loader(const image_loader::image_loader_args_t &image_loa } // Call RPC to update the component + UHD_LOG_INFO("MPMD IMAGE LOADER", "Starting update. This may take a while."); tree->access<uhd::usrp::component_files_t>("/mboards/0/components/fpga").set(all_component_files); UHD_LOG_INFO("MPMD IMAGE LOADER", "Update component function succeeded."); diff --git a/host/lib/usrp/mpmd/mpmd_impl.cpp b/host/lib/usrp/mpmd/mpmd_impl.cpp index f06f7b2a4..ae0e31f62 100644 --- a/host/lib/usrp/mpmd/mpmd_impl.cpp +++ b/host/lib/usrp/mpmd/mpmd_impl.cpp @@ -44,7 +44,7 @@ namespace { //! MPM Compatibility number const std::vector<size_t> MPM_COMPAT_NUM = {1, 1}; //! Timeout value for the update_component RPC call (ms) - const size_t MPMD_UPDATE_COMPONENT_TIMEOUT = 10000; + const size_t MPMD_UPDATE_COMPONENT_TIMEOUT = 20000; /************************************************************************* * Helper functions @@ -77,7 +77,8 @@ namespace { } // Now call update component - mb->rpc->set_timeout(MPMD_UPDATE_COMPONENT_TIMEOUT); + const size_t update_component_timeout = MPMD_UPDATE_COMPONENT_TIMEOUT * comps.size(); + mb->rpc->set_timeout(update_component_timeout); mb->rpc->notify_with_token("update_component", all_metadata, all_data); mb->set_timeout_default(); |