From 9d1423b9506c89a51a10b6119d01ce9a82a13b0c Mon Sep 17 00:00:00 2001 From: eb Date: Wed, 30 Apr 2008 03:52:31 +0000 Subject: Merged features/inband-usb -r6431:8293 into trunk. git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@8295 221aa14e-8319-0410-a670-987f0aec2ac5 --- usrp/host/lib/legacy/fusb_linux.cc | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'usrp/host/lib/legacy') diff --git a/usrp/host/lib/legacy/fusb_linux.cc b/usrp/host/lib/legacy/fusb_linux.cc index 60687a149..6dce8d9e0 100644 --- a/usrp/host/lib/legacy/fusb_linux.cc +++ b/usrp/host/lib/legacy/fusb_linux.cc @@ -386,14 +386,6 @@ fusb_ephandle_linux::stop () { if (!d_started) return true; - - d_devhandle->_cancel_pending_rqsts (this); - d_devhandle->_reap (false); - - - usbdevfs_urb *urb; - while ((urb = completed_list_get ()) != 0) - free_list_add (urb); if (d_write_work_in_progress){ free_list_add (d_write_work_in_progress); @@ -407,11 +399,19 @@ fusb_ephandle_linux::stop () d_read_buffer_end = 0; } - if (d_free_list.size () != (unsigned) d_nblocks) - fprintf (stderr, "d_free_list.size () = %d, d_nblocks = %d\n", - d_free_list.size (), d_nblocks); - - assert (d_free_list.size () == (unsigned) d_nblocks); + d_devhandle->_cancel_pending_rqsts (this); + d_devhandle->_reap (false); + + while (1){ + usbdevfs_urb *urb; + while ((urb = completed_list_get ()) != 0) + free_list_add (urb); + + if (d_free_list.size () == (unsigned) d_nblocks) + break; + + d_devhandle->_reap(true); + } d_started = false; return true; -- cgit