From f568b1984f77a525260b6a5157ce3a8f1ab56307 Mon Sep 17 00:00:00 2001 From: Balint Seeber Date: Tue, 19 Nov 2013 18:38:15 -0800 Subject: b200: extra check on loopback request to determine VREQ transfer size --- host/lib/usrp/b200/b200_iface.cpp | 2 ++ 1 file changed, 2 insertions(+) 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; -- cgit v1.2.3