On Sun, 17 Nov 2002, Simon Dean wrote:
> Every now and again, my whole pppd setup goes out the window. I can do a
> pppd call adslscript but it wont connect. Diald doesn't even seem to
> work to bring up a regular modem connection. Rebooting the computer
> however does the trick! Today it just stopped working while it was
> connected,. Even though the computer had an IP address, I could not ping
> anything.
>
> Any ideas what the problem might have been?
>
> I've tried looking through my /var/log/messages but nothing stands out...
>
At a guess
[root@heisenberg root]# cat /proc/pci
PCI devices found:
Bus 0, device 0, function 0:
Host bridge: Intel Corp. 430HX - 82439HX TXC [Triton II] (rev 3).
Master Capable. Latency=32.
<snip>
Bus 0, device 7, function 2:
USB Controller: Intel Corp. 82371SB PIIX3 USB [Natoma/Triton II] (rev 1).
IRQ 11.
Master Capable. Latency=48.
I/O at 0x1200 [0x121f].
<snip>
The Triton II "bug"
You can try the following which "works for me (tm)"
[tim@pauli /home/tim/cvs/speedtouch]$ cat patch.bug
diff -u -r1.24 pppoa3.c
--- src/pppoa3.c 18 May 2002 19:54:46 -0000 1.24
+++ src/pppoa3.c 23 May 2002 18:37:29 -0000
@@ -849,6 +849,7 @@
/* Reads 64*53 bytes from usb */
do {
+ usleep(900);
n = pusb_endpoint_read(ep_data, lbuf, sizeof(lbuf), 0);
} while (n < 0 && (errno == EINTR || errno == ETIMEDOUT));
@@ -888,6 +889,7 @@
/* Writes the result buffer */
if(ppp_write(STDOUT_FILENO, ppp_write_buf, n +
HDLC_HEADER_SIZE) > 0)
report(2, REPORT_DEBUG|REPORT_DATE, "Extracted
PPP packet sent to ppp(d)\n\n");
+ usleep(100);
}
but it halves the maximum download rate (approximately)
I believe that this is a hardware issue. It appears that one (or more)
interrupts are getting lost from the usb hardware - the kernel is
blocking waiting for input from the usb but the interrupt controller
won't signal any more interrupts until the lost one is acknowledged
(This is based on a fairly cursory reading of the kernel usb code
so could well be completely wrong)
You don't need to reboot to get things back under control:
See the function "do_reload_mcode" in the script below for the
way I "reset" the modem.
Regards,
Tim.
p.s. I have found that long sequences of 0xff hang the connection "reliably".
Just an ftp is enough to cause the problem
#!/bin/bash
#############################################################
#
# downup.sh
#
# Copyright (c) 2002 Tim Woodall ([EMAIL PROTECTED])
#
# This program is licenced under the GNU licence.
# See LICENCE for more details
#
# $Id: downup.sh,v 1.3 2002/10/09 22:12:46 tim Exp $
#
#############################################################
PING_TIMEOUT=20
PPPD_TIMEOUT=240
MCODE_TIMEOUT=240
LOCK_FILE=/root/firewall/lock
MCODE_LOADED=/root/firewall/mcode_loaded
kill_pppd()
{
echo kill_pppd at `/bin/date`
/usr/bin/killall pppd >/dev/null 2>&1
sleep 10
. /etc/sysconfig/firewall
while [ "$NET_IF" != "" ]; do
echo killall pppd at `/bin/date`
/usr/bin/killall pppd >/dev/null 2>&1
sleep 10
. /etc/sysconfig/firewall
done
/usr/bin/killall -9 pppoa3 >/dev/null 2>&1
sleep 10
rm -f /var/run/pppoa3-modem1.pid
echo finished kill_pppd with NET_IF = $NET_IF at `/bin/date`
}
start_pppd()
{
echo start_pppd at `/bin/date`
/usr/sbin/pppd call adsl
STOPTIME=$[$PPPD_TIMEOUT+`/bin/date +%s`]
. /etc/sysconfig/firewall
while [ "$NET_IF" = "" -a `/bin/date +%s` -lt $STOPTIME ]; do
sleep 1
. /etc/sysconfig/firewall
done
echo finished start_pppd with NET_IF = $NET_IF at `/bin/date`
}
#Dont call this directly - use reload_mcode
do_reload_mcode()
{
/usr/bin/killall modem_run >/dev/null 2>&1
/sbin/rmmod usb-uhci
sleep 5
rm -f $MCODE_LOADED
/sbin/modprobe usb-uhci
sleep 5
/usr/local/bin/modem_run -v 2 -f /usr/local/bin/mgmt.o -m
touch $MCODE_LOADED
}
load_mcode()
{
echo load_mcode at `/bin/date`
while [ ! -e $MCODE_LOADED ]; do
echo $MCODE_LOADED not found - reloading microcode at `/bin/date`
do_reload_mcode &
sleep 10
STOPTIME=$[$MCODE_TIMEOUT+`/bin/date +%s`]
while [ ! -e $MCODE_LOADED -a `/bin/date +%s` -lt $STOPTIME ]; do
sleep 10
done
done
echo finished load_mcode at `/bin/date`
}
reload_mcode()
{
echo reload_mcode at `/bin/date`
rm -f $MCODE_LOADED
load_mcode
echo finished reload_mcode at `/bin/date`
}
if [ -f ${LOCK_FILE} ]; then
echo Another downup.sh running at `/bin/date`
exit 0
fi
# Get config.
if [ ! -f /etc/sysconfig/firewall ]; then
echo
echo "ERROR IN CONFIGURATION: Can't find /etc/sysconfig/firewall"
exit 0
fi
touch ${LOCK_FILE}
while true; do
. /etc/sysconfig/firewall
if [ "$PTP_IP" != "" ]; then
STOPTIME=$[$PING_TIMEOUT+`/bin/date +%s`]
while [ `/bin/date +%s` -lt $STOPTIME ]; do
. /etc/sysconfig/firewall
if ( /bin/ping -c 1 $PTP_IP >/dev/null 2>&1 ); then
rm -f ${LOCK_FILE}
echo Connection OK at `/bin/date`
exit 0
else
/etc/init.d/firewall
sleep 1
fi
done
fi
echo restarting at `/bin/date`
kill_pppd
load_mcode
start_pppd
. /etc/sysconfig/firewall
while [ "$NET_IF" = "" ]; do
echo "Timed out after $PPPD_TIMEOUT seconds"
kill_pppd
reload_mcode
start_pppd
. /etc/sysconfig/firewall
done
/etc/init.d/firewall
done
exit 0
--
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t,"
and there was light.
http://tjw.hn.org/ http://www.locofungus.btinternet.co.uk/
Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se d�sinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe