From 4ed2b26d512ed8c8e78fbbfcf25a3560fd8c7102 Mon Sep 17 00:00:00 2001 From: Balint Seeber Date: Mon, 27 Jul 2015 15:16:49 -0700 Subject: b200: Change init sequence to catch bad USB states - Fixes USB hang issues on OS X - Uses usb_errors --- host/lib/transport/libusb1_zero_copy.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'host/lib/transport/libusb1_zero_copy.cpp') 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))); } -- cgit v1.2.3