aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/transport/libusb1_zero_copy.cpp
diff options
context:
space:
mode:
authorBalint Seeber <balint.seeber@ettus.com>2015-07-27 15:16:49 -0700
committerMartin Braun <martin.braun@ettus.com>2015-08-03 10:11:44 -0700
commit4ed2b26d512ed8c8e78fbbfcf25a3560fd8c7102 (patch)
tree940764e665d503f50a293ac8d50ca1fb0b605544 /host/lib/transport/libusb1_zero_copy.cpp
parente1672fa7eedb00a977c39b7e80bb18521493b524 (diff)
downloaduhd-4ed2b26d512ed8c8e78fbbfcf25a3560fd8c7102.tar.gz
uhd-4ed2b26d512ed8c8e78fbbfcf25a3560fd8c7102.tar.bz2
uhd-4ed2b26d512ed8c8e78fbbfcf25a3560fd8c7102.zip
b200: Change init sequence to catch bad USB states
- Fixes USB hang issues on OS X - Uses usb_errors
Diffstat (limited to 'host/lib/transport/libusb1_zero_copy.cpp')
-rw-r--r--host/lib/transport/libusb1_zero_copy.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/host/lib/transport/libusb1_zero_copy.cpp b/host/lib/transport/libusb1_zero_copy.cpp
index 1ac02d16f..465adc95e 100644
--- a/host/lib/transport/libusb1_zero_copy.cpp
+++ b/host/lib/transport/libusb1_zero_copy.cpp
@@ -148,14 +148,14 @@ public:
UHD_INLINE void submit(void)
{
- _lut->length = (_is_recv)? _frame_size : size(); //always set length
+ _lut->length = (_is_recv)? _frame_size : size(); //always set length
#ifdef UHD_TXRX_DEBUG_PRINTS
result.start_time = boost::get_system_time().time_of_day().total_microseconds();
result.buff_num = num();
result.is_recv = _is_recv;
#endif
const int ret = libusb_submit_transfer(_lut);
- if (ret != 0) throw uhd::runtime_error(str(boost::format(
+ if (ret != 0) throw uhd::usb_error(ret, str(boost::format(
"usb %s submit failed: %s") % _name % libusb_error_name(ret)));
}