diff options
author | Balint Seeber <balint@ettus.com> | 2013-11-19 18:38:15 -0800 |
---|---|---|
committer | Balint Seeber <balint@ettus.com> | 2013-11-19 18:38:15 -0800 |
commit | f568b1984f77a525260b6a5157ce3a8f1ab56307 (patch) | |
tree | 674846eeac5ca4dd742d71c9978df29f21d0e18b | |
parent | aaef714ac5db24090da8e6d5f338ebc23827e07f (diff) | |
download | uhd-f568b1984f77a525260b6a5157ce3a8f1ab56307.tar.gz uhd-f568b1984f77a525260b6a5157ce3a8f1ab56307.tar.bz2 uhd-f568b1984f77a525260b6a5157ce3a8f1ab56307.zip |
b200: extra check on loopback request to determine VREQ transfer size
-rw-r--r-- | host/lib/usrp/b200/b200_iface.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/host/lib/usrp/b200/b200_iface.cpp b/host/lib/usrp/b200/b200_iface.cpp index 1182ac78f..959f77077 100644 --- a/host/lib/usrp/b200/b200_iface.cpp +++ b/host/lib/usrp/b200/b200_iface.cpp @@ -506,6 +506,8 @@ public: // Request loopback read, which will indicate the firmware's current control request buffer size int nread = fx3_control_read(B200_VREQ_LOOP, 0, 0, out_buff, sizeof(out_buff), 1000); + if (nread <= 0) + throw uhd::io_error("load_fpga: unable to complete firmware loopback request."); transfer_size = std::min(transfer_size, nread); // Select the smaller value size_t file_size = 0; |