**** BEGIN LOGGING AT Thu Jan 09 02:59:58 2014 Jan 09 09:15:17 lumag_: I'm totally confused...the logs seems showing that cmdset_0001 code does write (both word and buffered) on an erase suspended block Jan 09 09:15:48 strangely, with the word-write program the fs is not corrupted on umount... Jan 09 09:16:08 anyway, smthg is bad....read/program can only be done in blocks "other than that which is suspended" Jan 09 09:51:01 ant_work, gm Jan 09 09:51:35 hello Jan 09 09:51:36 Now I can play your game and say: 'Oh, you know about the thing more that I can understand ATM' :) Jan 09 09:51:40 morning ant_work, lumag_ Jan 09 09:51:45 hello bluelightning Jan 09 09:51:52 lumag_: against my will :/ Jan 09 09:53:03 what I don't wont to learn (right now) is about mutex/lock/unlock/schedule Jan 09 09:53:25 but the code is very similar in word and buffer write functions Jan 09 09:53:53 still, the problem appears with 2 concurrent threads Jan 09 09:54:15 bluelightning: gm Jan 09 09:55:12 bluelightning: I've asked apelete to watch for linux-yocto_3.13 to merge the qi kernel (he says there are >30 patches right now) Jan 09 09:55:14 Well. mutexes and spinlocks are ease - no counters, nothing fancy. Just either go all the way till unlock, or wait till the road is free. Jan 09 09:56:04 ant_work, The major difference is that mutexes are like an motel - if the road is busy you sleep there. Spinlocks are like traffic jam. You just sit there, check your watches and damn everybody around ;) Jan 09 09:56:06 ant_work: ok, cool Jan 09 09:56:51 lumag_: I see, how does that play with timeouts? Jan 09 09:56:55 The major thing about schedule is that you must not schedule_*() while holding spinlock. Jan 09 09:57:24 First it is not permitted, second it can (or even 100% cases will) become a nearly 0 delay instead of what you asked for. Jan 09 09:57:31 hm... Jan 09 09:57:44 CONFIG_ATOMIC_SLEEP (or something like that) can help to check if you have such condition. Jan 09 09:58:22 And btw: on uniprocessor machines w/o preempt spinlocks are essentially void (optimized out). Jan 09 09:59:02 spinlock_irq/_irqsave will just disable IRQs and that's all. Jan 09 09:59:20 it appears to me that the ubi thread in bg comes abruptly on the scene and puts the other thread to sleep Jan 09 09:59:37 that other thread suspends/resume like a crazy... Jan 09 10:07:40 lumag_: I've put on github the patches I've used for debug-log and asked linusw for logs Jan 09 10:08:34 it's hard to believe vanilla kernel boots MTD on h3600, collie and hx4700 need patches Jan 09 10:08:45 still, he has no CF/SD Jan 09 10:29:25 lumag_: looking again at the block address, it could be maybe a bug about the block size x2 Jan 09 10:30:53 19 32K-WORD 098000H - 09FFFFH Jan 09 10:31:23 20 32K-WORD 0A0000H - 0A7FFFF Jan 09 10:31:25 etc Jan 09 10:31:43 I see Jan 09 10:31:45 PID 289 Entering inval_cache_and_wait: chip->state=7 cmd_adr=0x009e1840 Jan 09 10:31:54 PID 286 Entering chip_ready: mode=0 adr=0x00aa0000 Jan 09 10:32:25 so PID 289 is in block 19 Jan 09 10:32:46 and PID 286 in block 21 Jan 09 10:33:06 all fine up to here Jan 09 10:33:54 but then I see Jan 09 10:33:55 PID 289 Entering inval_cache_and_wait: chip->state=8 cmd_adr=0x009c18c0 Jan 09 10:34:01 PID 286 Entering chip_ready: mode=7 adr=0x00aa0040 Jan 09 10:38:53 no, that's ok Jan 09 11:15:09 maybe I see it... Jan 09 11:15:36 we have to program a single word (a 0) Jan 09 11:15:47 seems buffer write has wrong nr. of bytes Jan 09 11:16:06 inline_map_write e800e8 ofs aa0000 Jan 09 11:16:14 inline_map_write 0 ofs aa0000 Jan 09 11:16:14 inline_map_write 0 ofs aa0000 Jan 09 11:16:24 inline_map_write d000d0 ofs aa0000 Jan 09 11:17:19 the same word is written like that Jan 09 11:17:20 inline_map_write 400040 ofs c60000 Jan 09 11:17:21 inline_map_write 0 ofs c60000 Jan 09 11:23:02 nope Jan 09 11:23:04 That Jan 09 11:23:04 is, when the number of [N] is 1 word, write (00H); if [N] Jan 09 11:23:04 is 16 words, write (0FH). Jan 09 11:23:09 :/ **** ENDING LOGGING AT Fri Jan 10 02:59:59 2014