From: DG <dg...@um...> - 2000-10-17 05:37:48
|
From: pa...@rc... (David Paschal) > Hi, Daniel. Thanks for getting me the debug output. Unfortunately there > was a gap right at the place where it became interesting (where it changes > from event9/get_nibble/event11/event6 to mlcpp_intr). If you happened to > save other debug logs (or if you try this again), could you check to see if > any of the other logs show this transition better? If you see a line such > as "get_nibble(c60b_intr c60b1160", that is a sign of a gap. Unfortunately, all of the log files I've made have this problem, and setting LINEBUF didn't seem to help. > It occurred to me that after we set event 7 or 12 (nAutoFd=0) in get_nibble, > perhaps the peripheral doesn't respond with event 9 (nAck=0) until after we > drop out of the poll loop contained within the PAR_WAIT_SET_CLEAR macro. > I don't know how long it is until mlcpp_intr gets called again to retry the > poll loop, but perhaps the peripheral times out in the meantime and backs > out of event 9, such that we time out for event 9. To test this theory, > please try increasing the value of SHORT_WAIT, which is currently 500 > iterations of the loop in PAR_WAIT_SET_CLEAR. I'm not sure what would be a > better value, but you could experiment with several, such as 5000 or 10000. > If it's too large you may start to notice that your machine gets sluggish > due to spending a lot of time in kernel mode. Very sluggish, but still hangs. And the debug output still gets cut off occasionally. I'm not sure how to fix that. > Another interesting test would be to log the return code of parStatusRead() > right before setting event 7/12, and again after "SET_STATE(l,9,BUSY_TIME);" > but before "PAR_WAIT_SET_CLEAR(l,0,PAR_STATUS_NACK);". Any status line > changes after event 7/12 might further suggest a peripheral-side timeout. Event 7/12 is a parControlSetClear() which never calls parStatusRead(). Do you mean parControlRead() or do you mean check it during event 6 (which comes just before event 7, I presume)? It looks like parStatusRead() gets called in PAR_WAIT_SET_CLEAR. Does the 1284.4 specification outline all these events? It would be very helpful to have a flowchart or state diagram showing how all these events are supposed to occur. -- Daniel ZZZ-dgun-ZZZ-@-ZZZ-umpire.com-ZZZ (Remove the Z-'s to reply) ______________________________________________ FREE Personalized Email at Mail.com Sign up at http://www.mail.com/?sr=signup |