From: PASCHAL,DAVID (HP-Roseville,ex1) <dav...@hp...> - 2000-10-19 22:11:46
|
dgun wrote: > What do you make of this? > > We have data, so we go to negotiation which finishes in event > 6. This will > take us into get_nibble. > > Oct 19 08:42:07 localhost kernel: mlc: mlcpp0: Got MLC data packet > Oct 19 08:42:07 localhost kernel: s_idle(c60b1180): Reverse > data available. > Oct 19 08:42:07 localhost kernel: do_neg(c60b1180,mode=0x00): > in_1284=1, > neg_mode=0x10. > Oct 19 08:42:07 localhost kernel: mlc_recvmsg: c24dcc4c > Oct 19 08:42:07 localhost kernel: c60b1180: event=23. > Oct 19 08:42:07 localhost kernel: c60b1180: event=27. > Oct 19 08:42:07 localhost kernel: c60b1180: event=0. > Oct 19 08:42:07 localhost kernel: c60b1180: event=2. > Oct 19 08:42:07 localhost kernel: c60b1180: event=6. > Oct 19 08:42:07 localhost kernel: c/s #1 = 0F/6F. > Oct 19 08:42:07 localhost kernel: c60b1180: event=9. > Oct 19 08:42:07 localhost kernel: c/s #2 = 0D/6F. > Oct 19 08:42:08 localhost last message repeated 2031 times > > Everything looks fine up to event 9 (I don't know what the > control/status > codes mean), but suddenly the debug message immediately after > event 9 gets > repeated over and over, meaning we are stuck in event 9 until > the timeout > occurs. Hi, Daniel. This trace was very helpful; I think I see the problem now. It looks like the peripheral is still (incorrectly) asserting nFault=0 (indicating reverse data is available) when we return to ECP mode after reading a packet in nibble mode. That causes us to go back to nibble mode and try to read more data, which times out. The attached patch fixes it so we look at nFault after we negotiate into nibble mode and before we try to read data, and if the peripheral is no longer asserting nFault=0, we don't try to read any data and instead return to ECP mode. If you set the debug flag to 1, it printks "no data available!" when this happens. Please try this patch out (against the original ieee12844pp.c from version 0.6) and let me know if it fixes the problem (and if you see the "no data available!" message anywhere). I would also invite others to try it out too, particularly those who are seeing similar problems with ieee12844pp hangs (during scanning or otherwise), but at the very least to make sure it doesn't break anything. > (All the macros make it hard to read the code. It > took me a while > to figure out that SET_STATE was inserting a "case:" > statement into the > code!) Sorry about the confusion the macros caused. On the other hand, they made it much easier to develop the code. David |