Bug 4355

Summary: isa pnp modem is ignored by serial driver in 2.6.9. Worked fine with 2.4.24.
Product: Drivers Reporter: Dmitry Vavilov (vavilov)
Component: SerialAssignee: Adam Belay (ambx1)
Status: RESOLVED CODE_FIX    
Severity: normal CC: aline_aaline, bjorn.helgaas, bunk, perex, protasnb, rmk
Priority: P2    
Hardware: i386   
OS: Linux   
Kernel Version: 2.6.9 Subsystem:
Regression: Yes Bisected commit-id:

Description Dmitry Vavilov 2005-03-17 05:56:02 UTC
Distribution: debian woody 

Hardware Environment: Gigabyte-6VXE7+ MB, P3 533MHz, Matrox Millenium 8Mb G200
AGP Video Card, DAVICOM PnP ISA 33.6K Modem.

Software Environment:

Problem Description:
I have an internal ISA PnP modem which worked fine with older 2.4.24 kernel.
I'm not sure what is an exact model. This is what different modules report:
Mar 17 16:14:29 dima kernel: isapnp: Scanning for PnP cards...
Mar 17 16:14:29 dima kernel: isapnp: Card 'OPL3-SA3 Sound Board'
Mar 17 16:14:29 dima kernel: isapnp: Card 'V1433VQH-U 336 PNP MODEM'
Mar 17 16:14:29 dima kernel: isapnp: 2 Plug & Play cards detected total

cat /sys/bus/pnp/devices/00\:02.00/id
DAV0336

cat /sys/devices/pnp0/00\:02/card_id
AKY1003

cat /sys/devices/pnp0/00\:02/name   
V1433VQH-U 336 PNP MODEM


ati3 - DAVICOM DATA/FAX MODEM, DATE:97/09/22
ati4 - DAVICOM V.34+/FAX/VOICE/SPEAKERPHONE MODEM, Ver:1.09I

New kernel (2.6.9), i.e. its serial driver as far as I unerstand,
refuse to identify it as a serial device. Except reported by isapnp
(above) it never shows up in futher reports in syslog
and  it's not pnp configured.

After searching the internet I found the following advice which
worked. I added the DAV0336 id. to the the stucture describing the
known modems in drivers/serial/8250_pnp.c ( pnp_dev_table[] )
    ... /* V1433VQH-U 336 PNP Modem */
        {       "DAV0336",              0       }, ...
and recompile the kernel.

In 8250_pnp.c I saw a comment saying the heuristic aproach is tried
looking for "modem", "MODEM", etc. strings in a card ids. WHY DOSN'T
IT WORK WITH MY MODEM ? Apparently, as reported by isapnp, it has MODEM
substring in some of its ids. Is it a bug ? Could you please add my
modem to 8250_pnp.c if this is a correct solution ?

Thank you,
Dmitry.
Comment 1 Adrian Bunk 2006-08-01 15:07:56 UTC
Is this issue still present in kernel 2.6.17?
Comment 2 Dmitry Vavilov 2006-08-13 03:32:46 UTC
Yes, it is!

Meanwhile I switched to Sarge.
After compiling and installing kernel-2.6.17.7 I can see that the problem is
still there and can be described with the same words.
Comment 3 Natalie Protasevich 2007-09-22 22:58:27 UTC
Let's update status again - still there in 2.6.23+? 
Thanks.
Comment 4 Dmitry Vavilov 2007-10-16 09:22:13 UTC
I can not tell. I don't have an access to the computer which showed this problem anymore.
Comment 5 Natalie Protasevich 2007-11-05 21:28:44 UTC
This is unfortunate. We can probably close this bug, better after Bjorn glance at it.
Comment 6 Bjorn Helgaas 2007-11-06 09:45:03 UTC
The heuristic that looks for "modem", "MODEM", etc. is in serial_pnp_guess_board(), but we only use that if serial_pnp_probe() is called.  serial_pnp_probe() is only called for PNP IDs in the pnp_dev_table[].

The patch below should fix it (bugzilla has a bug that won't let me attach it properly, so it's probably whitespace-damaged).  If somebody can test it, I'll send it upstream.

serial: add PNP ID for Davicom ISA 33.6K modem

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>

Index: w/drivers/serial/8250_pnp.c
===================================================================
--- w.orig/drivers/serial/8250_pnp.c    2007-11-06 10:27:52.000000000 -0700
+++ w/drivers/serial/8250_pnp.c 2007-11-06 10:30:16.000000000 -0700
@@ -69,6 +69,8 @@
        {       "CTL3001",              0       },
        /* Creative Labs Modem Blaster 28.8 DSVD PnP Voice */
        {       "CTL3011",              0       },
+       /* Davicom ISA 33.6K Modem */
+       {       "DAV0336",              0       },
        /* Creative */
        /* Creative Modem Blaster Flash56 DI5601-1 */
        {       "DMB1032",              0       },
Comment 7 Dmitry Vavilov 2007-11-07 11:48:17 UTC
I can not test it. But this is exactly what worked for me before (see my original message) and it looks harmless anyway. I would suggest to proceed with incorporating this change... Anyway I agree the case can be closed.
Comment 8 Bjorn Helgaas 2007-11-15 12:54:11 UTC
This git commit should resolve the problem:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=dbd0cf48842700c3a694dcd32b29e63e27f37acc

This will appear in 2.6.24.  Please reopen this defect if the problem still occurs in 2.6.24.

I would change this to "RESOLVED", but I'm not sufficiently empowered.
Comment 9 Natalie Protasevich 2007-11-17 22:50:03 UTC
Thanks, Bjorn.
Comment 10 Aline Freitas 2007-12-10 06:53:57 UTC
This is exacly what I was looking for.

I've just patched the kernel 2.6.23.9 with the instructions above. My modem is working really fine now.

isapnp: Scanning for PnP cards...
isapnp: Card 'V1433VQH-U 336 PNP MODEM'
isapnp: 1 Plug & Play card detected total
pnp: Device 01:01.00 activated.

01:01.00 DAV0336 (unknown)
    state = active
        io 0x3e8-0x3ef
        irq 5