From 58f4af976d64765c2402e1ce00ee78f4aae51881 Mon Sep 17 00:00:00 2001 From: Balint Seeber Date: Tue, 19 Nov 2013 18:41:27 -0800 Subject: b200: check return value from control write of FPGA bitstream for short transfer --- host/lib/usrp/b200/b200_iface.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'host/lib/usrp') diff --git a/host/lib/usrp/b200/b200_iface.cpp b/host/lib/usrp/b200/b200_iface.cpp index 959f77077..a8e96f4ac 100644 --- a/host/lib/usrp/b200/b200_iface.cpp +++ b/host/lib/usrp/b200/b200_iface.cpp @@ -569,6 +569,8 @@ public: int nwritten = fx3_control_write(B200_VREQ_FPGA_DATA, 0, 0, out_buff, transfer_count, 5000); if (nwritten <= 0) throw uhd::io_error("load_fpga: cannot write bitstream to FX3."); + else if (nwritten != transfer_count) + throw uhd::io_error("load_fpga: short write while transferring bitstream to FX3."); if (load_img_msg) { -- cgit v1.2.3