[K42-discussion] Problem with thinwire3

Michal Ostrowski mostrows at watson.ibm.com
Thu Oct 6 07:17:00 EST 2005


Problem fixed and committed (will be pushed by cron later).

Index: thinwire/thinwire-src/thinwire3.c
===================================================================
RCS file: /u/kitchawa/cvsroot/thinwire-src/thinwire3.c,v
retrieving revision 1.9
diff -u -r1.9 thinwire3.c
--- thinwire/thinwire-src/thinwire3.c	14 Jul 2005 19:49:34 -0000	1.9
+++ thinwire/thinwire-src/thinwire3.c	14 Jul 2005 21:23:44 -0000
@@ -311,13 +311,16 @@
 serial_read(struct iochan* ic, char *buf, int len, int block)
 {
     int cnt;
-    bitSet(ic->fd, TIOCM_RTS);
+    if (hw_flowcontrol)
+	bitSet(ic->fd, TIOCM_RTS);
 
     cnt = read(ic->fd, buf, len);
     if (cnt < len) {
 	ic->status  &= ~POLLIN;
     }
-    bitClear(ic->fd, TIOCM_RTS);
+
+    if (hw_flowcontrol)
+	bitClear(ic->fd, TIOCM_RTS);
     return cnt;
 }
 




On Wed, 05 Oct 2005 14:25:08 -0400
Kevin Cormier <kfc at cs.toronto.edu> wrote:

> I checked out several revisions of thinwire3.c and tried them out to see 
> which version my Xserve was having trouble booting with.  It turns out 
> that all of them before revision 1.8 worked fine.  Here is the cvs log 
> for that revision:
> 
> revision 1.8
> date: 2005/07/14 00:53:37;  author: mostrows;  state: Exp;  lines: +12 -7
> Fix setting of flow control bits.
> 
> The exact problem seems to be a change to the serial_read function.  The 
> body of the function was changed to be enclosed by the statements:
> 
> bitSet(ic->fd, TIOCM_RTS);
> bitClear(ic->fd, TIOCM_RTS);
> 
> Commenting these lines out in the latest version worked, but of course 
> they must be there for a reason.  I'm not sure exactly what they do.
> 
> Is there any configuration having to do with flow control that I might 
> not have set up properly?  Here's how I got the latest revision working:
> 
> Index: tools/build/shared/thinwire/thinwire-src/thinwire3.c
> ===================================================================
> RCS file: /u/kitchawa/cvsroot/thinwire-src/thinwire3.c,v
> retrieving revision 1.9
> diff -r1.9 thinwire3.c
> 314c314
> <     bitSet(ic->fd, TIOCM_RTS);
> ---
>  >     //bitSet(ic->fd, TIOCM_RTS);
> 320c320
> <     bitClear(ic->fd, TIOCM_RTS);
> ---
>  >     //bitClear(ic->fd, TIOCM_RTS);
> 
> 
> Kevin Cormier wrote:
> 
> > Hi everyone,
> >
> > I'm a student in the CS department at U of T, and for quite awhile I'd 
> > been trying to boot K42 for the first time on an Xserve, but I was 
> > running into problems with thinwire3.
> >
> > The problem was solved by using an older copy of thinwire3 
> > (timestamped April 12th) that the ECE department here uses, so I think 
> > there may be a problem with newer versions, at least for Apple G5 
> > Xserves.
> >
> > I'm going to try to pinpoint which revision of 
> > tools/build/shared/thinwire/thinwire-src/thinwire3.c causes the 
> > problems, and I'll follow up when I'm able to.  I think a likely 
> > candidate is the latest revision (1.9), but again I'll have to try it 
> > out to be sure.  The comment reads "Reordering of some of the speed 
> > re-negotiation code.  Make sure things are done in the right 
> > sequence.  Add a signal handler on SIGINT to clean-up -- eventually we 
> > may want to hook some other stuff off this."  Most of the other 
> > changes seem minor.
> >
> > -Kevin
> >
> >
> > _______________________________________________
> > K42-discussion mailing list
> > K42-discussion at ozlabs.org
> > https://ozlabs.org/mailman/listinfo/k42-discussion
> 
> 
> _______________________________________________
> K42-discussion mailing list
> K42-discussion at ozlabs.org
> https://ozlabs.org/mailman/listinfo/k42-discussion


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://ozlabs.org/pipermail/k42-discussion/attachments/20051005/213c38b6/attachment.pgp 


More information about the K42-discussion mailing list