On Mon, Jul 15, 2013 at 2:35 PM, Thomas Tsou ttsou@vt.edu wrote:
On Sun, Jul 14, 2013 at 10:01 PM, Alexander Chemeris alexander.chemeris@gmail.com wrote:
I've made some progress in making osmo-trx able to power off/on without restart. At this moment it's almost there - the only big remaining issue I see is some bug with UHD device start/stop. It seems we do not re-initialize it properly and assert (num_rd == OUTCHUNK) fails. I hope you could fix that.
This is a very positive patch set. As you very well know, the power on/off handling was in a ugly state. One of the remaining issue with UHD start/stop is that the device clock is reset to zero at restart, but not all of the timestamp counters are reset in radioInterface. The radioInterface is not stopped at all until deallocation since 'POWEROFF' is an empty command.
I made an attempt to implement it in the 806a64b1 patch. If you check out this commit, you should get the assert during TURN ON/OFF/ON sequence. To start/stop transceiver I use scripts attached to this e-mail.
I've only looked at the outer thread interface changes, but the ability to tear down individual threads (instead of uncontrolled stack unwinding) makes the remaining issues much more straightforward. There's a fair amount of old code that was probably never written with restart in mind, but I don't see any issues with cleaning that up.
For the old code we could use "compatibility" mode where we don't shutdown or exit on shutdown.
-- Regards, Alexander Chemeris. CEO, Fairwaves LLC / ООО УмРадио http://fairwaves.ru