Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 72373 - [2.4] Modem connects at 9600 after kernel update
Summary: [2.4] Modem connects at 9600 after kernel update
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL:
Whiteboard:
Keywords:
: 76605 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-11-24 10:46 UTC by Mark Devereaux
Modified: 2005-02-09 07:44 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Devereaux 2004-11-24 10:46:45 UTC
After upgrading from kernel 2.4.26-gentoo-r9 the modem will only connect to the internet at 9600 baud.
First noticed when 2.4.26-gentoo-r10 came out. neither of the later updates (r11 or r12) seems to have resolved the issue.

Several things were updated on my system on the same day so it took a while to discover that the modem will connect at > 40000 baud with 2.4.26-gentoo-r9. I am currently using this older kernel.

Modem is a 'U.S. Robotics 56K Voice EXT' on ttyS1.
I am using KPPP on KDE 3.3.1 but get the same problem with wvdial 1.53.


Reproducible: Always
Steps to Reproduce:
1. Boot system with kernel > 2.4.26-gentoo-r9
2. log in and run wvdial to connect to internet


Actual Results:  
connect information indicates connected at 9600.  Access to internet is very 
very slow.  'emerge sync' took around 2.5 hours to complete before I tried 
downgrading to kernel 2.4.26-gentoo-r9  

Expected Results:  
Connect to internet at usual speed which is normally above 44000 baud
Comment 1 Daniel Black (RETIRED) gentoo-dev 2004-11-25 00:54:44 UTC
did downgrading the kernel help?
Comment 2 Alin Năstac (RETIRED) gentoo-dev 2004-11-25 01:34:52 UTC
not clear what that has to do with kernel!
speed is negotiated between modems, not between computer and modem.

what speed does the modem reports when you open dial-up connection in minicom, using ATD... command? settings for minicom are:
 - 115200 bauds
 - 8N1
 - hardware flow control
Comment 3 Mark Devereaux 2004-11-25 03:14:04 UTC
I did not think that this could be kernel related either
but after some research, I found that the only thing that
I need do change to get this problem is to boot the machine
with a kernel later than 2.4.26-gentoo-r9

OK, I installed minicom and with kernel 2.4.26-gentoo-r9
and the settings suggested for minicom, I got the following
connect details:

    CONNECT 44000/ARQ/V90/LAPM/V42BIS

Rebooted machine with kernel 2.4.26-gentoo-r12 and 
made sure minicom settings were as suggested again.
This gives the following connect details:

    CONNECT 9600/ARQ/V34/LAPM/V42BIS

Rebooted back to kernel 2.4.26-gentoo-r9 and received
the following connect details:

    CONNECT 44000/ARQ/V90/LAPM/V42BIS
    
So, the only difference between each connect was the 
version of the kernel running.

As for the difference between the compilation, I
used the same kernel configuration file for both
kernels.  I checked for anything new after loading
up my default 2.4.26 configuration and did not find
anything that I believed needed to be changed.

Was there some change to the serial port code in the 
kernel between release 9 and 10?
Comment 4 Alin Năstac (RETIRED) gentoo-dev 2004-11-26 15:59:15 UTC
Strange. If it is for real then it could only mean one thing: the real speed of serial connection between modem and computer is 9600, no matter what you set in minicom and modem use this speed as its limit form modem-to-modem speed. 

For testing this, please connect with minicom and set modem to report serial connection speed. It must be an AT command described in modem's manual. 
If it reports 115200... well, I don't have a rational explanation for this case.
Comment 5 Mark Devereaux 2004-11-27 17:01:36 UTC
OK, I tested as suggested and here are my findings.

Using kernel 2.4.26-gentoo-r9

Switch on modem.

Run minicom

Get current status from modem using ati 4 which gives:

U.S. Robotics 56K Voice EXT Settings...

   B0  E1  F1  L1  M1  Q0  V1  X4  Y0
   SPEED=38400  PARITY=N  WORDLEN=8
   DIAL=TONE    OFF LINE

   &A3  &B1  &C1  &D2  &H1  &I0  &K1
   &M4  &N0  &R2  &S0  &T5  &U0  &Y1

   S00=000  S01=000  S02=043  S03=013  S04=010  S05=008  S06=004
   S07=045  S08=002  S09=006  S10=014  S11=070  S12=050  S13=000
   S15=000  S16=000  S18=000  S19=000  S21=010  S22=017  S23=019
   S25=005  S27=001  S28=008  S29=020  S30=000  S31=128  S32=002
   S33=000  S34=000  S35=000  S36=014  S38=000  S39=011  S40=000
   S41=004  S42=000

   LAST DIALLED #:

OK

The speed agrees with the status bar in minicom which shows
38400 8N1.

Use 'CTRL-A Z P' to get to minicom comm parameters and set them
to 115200 8N1

  From this point on I only show the top few lines of the status
  as the other fields did not change when the speed was changed.

Get current status from modem using ati 4 which gives:

U.S. Robotics 56K Voice EXT Settings...

   B0  E1  F1  L1  M1  Q0  V1  X4  Y0
   SPEED=115200  PARITY=N  WORDLEN=8
...

   
The speed has increased to 115200 as per settings in minicom and
it agrees with the minicom status line.
   
Switched off modem and rebooted PC into kernel 2.4.26-gentoo-r12.

Switch on modem.

Run minicom

Get current status from modem using ati 4 which gives:

U.S. Robotics 56K Voice EXT Settings...

   B0  E1  F1  L1  M1  Q0  V1  X4  Y0
   SPEED=9600  PARITY=N  WORDLEN=8
...


Speed from modem is reported as 9600 but status line at base of
minicom shows 38400 8N1.  (How am I getting data back from the 
modem if the speeds are different?)

Use 'CTRL-A Z P' to get to minicom comm parameters and set them
to 115200 8N1

Get current status from modem using ati 4 which gives:

U.S. Robotics 56K Voice EXT Settings...

   B0  E1  F1  L1  M1  Q0  V1  X4  Y0
   SPEED=9600  PARITY=N  WORDLEN=8
...


minicom now indicates speed as 115200 8N1 while modem still shows
9600.

I tried setting minicom to 9600, did ati 4 and, as expected, got
the 9600 speed from the modem.  I then switched minicom back up
to 115200.  The modem still reported 9600.

Just out of interest, I set minicom to 300 8N1 and the modem still
reported 9600.

It looks like your suspicions were correct.  The comm speed is 
staying at 9600 regardless of the setting in minicom (and, 
presumably, any other software that is using the modem). But why?

Switched back to kernel 2.4.26-gentoo-r9 and all is fine again.

I do not have 2.4.26-gentoo-r10 on my PC but I believe that the
change occurred in that release as that is when I first noticed
this problem.
Comment 6 Stefan Schweizer (RETIRED) gentoo-dev 2004-11-28 00:33:02 UTC
Why do you not use a 2.6 kernel?
 2.6 is faster, better, nicer and overall will give you more speed
 for example I noticed that on my p166/32MB ram the nfs speed got up from 1 to 4.5Mb/sec

It will also probably solve your issue ;)

Did you try with 2.4.28? (better take 2.6 if you intend it)

Please switch to 2.6, that makes it really easier to track such problems:
http://www.gentoo.org/doc/en/kernel-upgrade.xml
Comment 7 Stefan Schweizer (RETIRED) gentoo-dev 2004-11-28 00:44:22 UTC
I think that patch in -r10 is causing it:

try:
cd /usr/portage/distfiles
wget http://dev.gentoo.org/~plasmaroo/patches/kernel/misc/security/gentoo-sources-2.4.22-CAN-2004-0814.patch
cd /usr/src/linux
patch -p1 -R < /usr/portage/distfiles/gentoo-sources-2.4.22-CAN-2004-0814.patch
Comment 8 Alin Năstac (RETIRED) gentoo-dev 2004-11-28 00:51:26 UTC
Changed owner of this bug to kernel.
Comment 9 Mark Devereaux 2004-11-28 09:40:13 UTC
I am not using a 2.6 kernel because I thought that I would
stick with what the Gentoo kernel team concider to be stable.
I believe that the 2.6 series is still installed using
emerge gentoo-dev which suggets to me that it is still
regarded as a development kernel.

I am looking to set up a file and terminal server using an
old p200/256MB ram.  I may try out the 2.6 kernel on that
while there is still nothing of consequence on it.


I built 2.4.26-gentoo-r13 to try it out and it still had the
problem.  I ran the command suggested against 2.4.26-gentoo-r13
to remove the contents of the patch performed by
gentoo-sources-2.4.22-CAN-2004-0814.patch, and rebuilt the kernel.

It now works fine.  The message from the modem after connect reads 
   
   CONNECT 44000/ARQ/V90/LAPM/V42BIS

It looks like you found the patch that added the 'fixed speed'
feature to the kernel serial port driver :-).


Just out of interest, is a variation of this patch not also run
against the 2.6 series?  I would hate to install 2.6 on my
proposed file and terminal server only to find that the 
terminals will only run at 9600.

Thanks for the pointers.

Mark
Comment 10 Stefan Schweizer (RETIRED) gentoo-dev 2004-11-28 09:43:38 UTC
I cannot really check that, but you really should install a 2.6.9 kernel, also to be able to report the problem, if it is still in there.
Comment 11 Mark Devereaux 2004-11-29 03:12:18 UTC
I have downloaded and installed 2.6.9-gentoo-r6.  The serial port seems to be working fine and the modem reported connect as:

   CONNECT 44000/ARQ/V90/LAPM/V42BIS


I will try a vanilla 2.4.28 install and report back...
Comment 12 Mark Devereaux 2004-11-29 11:31:47 UTC
The vanilla 2.4.28 kernel worked fine also.
Comment 13 Daniel Drake (RETIRED) gentoo-dev 2004-12-07 05:14:40 UTC
If its working fine on recent kernels then we are all happy :)
Comment 14 Mark Devereaux 2004-12-09 11:18:43 UTC
I have been playing with the 2.6.9 kernel since the Gentoo weekly news mentioned that it was now considered stable enough.  It does seem to be working much better for me than the last 2.6 kernel I tried, and I think that I will stick with it.

I am not sure how this will affect this bug report though, as the bug is still there in the 2.4 series.

I will just say however, that whatever was done to cause the problem, please do not do it to the the 2.6 series :-).

Mark
Comment 15 Stefan Schweizer (RETIRED) gentoo-dev 2005-01-04 03:09:36 UTC
*** Bug 76605 has been marked as a duplicate of this bug. ***
Comment 16 Stefan Schweizer (RETIRED) gentoo-dev 2005-01-04 03:15:33 UTC
I consider this bug as not fixed, after all still all of our 2.4 gentoo-sources are broken, so this bug will be in a default gentoo install with these kernels.

The patch that is causing it:
http://dev.gentoo.org/~plasmaroo/patches/kernel/misc/security/gentoo-sources-2.4.22-CAN-2004-0814.patch
I dont know what it is for, but maybe we can remove it.
Maybe someone knowing more could comment?
Comment 17 Tim Yamin (RETIRED) gentoo-dev 2005-01-04 04:21:18 UTC
Mind trying gentoo-sources-2.4.28...?
Comment 18 Daniel Drake (RETIRED) gentoo-dev 2005-02-09 07:44:12 UTC
Please reopen when you reply to comment #17