Subject: Serial driver/ppp problem
To: None <tech-kern@NetBSD.ORG>
From: Bill Studenmund <wrstuden@loki.Stanford.EDU>
List: tech-kern
Date: 02/18/1996 21:56:54
Hello!

I'm working on porting the new M.I. z8530 driver to the mac68k port.
It's ALMOST working. I can talk to the modem fine, and I can talk to
my printer w/o difficulty. Flow control is working. It's just ppp
won't come up.

I've put lots of debugging printf's in and determined that the
problem is that right as ppp is coming up, after it has transmitted
the request for configuration but before it gets an answer, pppd
decides that the modem has hung up, which it hasn't.

I'm puzzled as the kernel I made a short while before I started the
new zs driver work worked fine with the same pppd. I haven't sup'd
in a while (since early January), and everything seemed stable. The only
changes were adding the new driver code, and beating on the auto
config and on the driver tables so that the right code gets called.

I've compared the new and the old code, and they LOOK the same (modulo
M.I. reshuffling). The right line discipline is getting set, ioctl's
in ppptioctl (in net/ppp_tty.c) get called. It seems to work but doesn't.

A close inspection revealed that the request gets sent, and then the
system waits for a timeout, then reads from the tty-based
file descriptor. If the length read is zero (as it is in my case) the
code assumes the wait timed out, so the modem's dead. So it drops
the connection.

I've tracked the problem (I think) to this wait being performed by
a select() call. Though I don't see how the new code would have
changed that. ??

I know there have been bugs in the recent ppp code, but I've not been
tracking code changes, so I should be immune from them. And the same
code worked before! Ditto for recent time-related changes.

So I'm wondering if there is a ppp expert who can suggest items
to confirm in the code's behavior. ??

Thanks!

Bill