Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Dec 2004 20:27:01 GMT
From:      Mike Tancsa <mike@sentex.net>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   misc/74786: Smartlink Modem causes interrupt storm on RELENG_4 and RELENG_5
Message-ID:  <200412062027.iB6KR1jE096684@www.freebsd.org>
Resent-Message-ID: <200412062030.iB6KUOAf001739@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         74786
>Category:       misc
>Synopsis:       Smartlink Modem causes interrupt storm on RELENG_4 and RELENG_5
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Dec 06 20:30:23 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Mike Tancsa
>Release:        RELENG_4 and RELENG_5
>Organization:
Sentex Communications
>Environment:
4.10-STABLE FreeBSD 4.10-STABLE #6: Fri Nov 26
and
FreeBSD releng5-865.sentex.ca 5.3-STABLE FreeBSD 5.3-STABLE #1: Wed Dec  1 
>Description:
I think we have been bouncing around this issue for the past few months both on RELENG_4 and RELENG_5.  In the past it has been somewhat difficult to reproduce, but now we can do it reliably.    I dont think its a hardware issue as I can take the exact same 2 boxes with the exact same IRQ assignments and boot with OpenBSD and not run into an interrupt storm or freeze up the box.  Swap back the RELENG_4 or RELENG_5 HD and again, I can produce an interrupt storm at will.

I can also reproduce it on 2 different chipsets as well (VIA and Intel).  The problem seems to be around how a PUC device (either a PCI modem or a PCI serial card) and the sharing of an interrupt (usually an USB controller).  

On RELENG_4, the box just locks up in a race trying to service an interrupt on IRQ 12 but remains unhandled.

On RELENG_5, I actually catch an interrupt storm. e.g. I attach to sio4 (PUC modem) and 

Interrupt storm detected on "irq12: uhci1"; throttling interrupt source

Looking at vmstat -i does indeed show a the rate getting throttled

releng-5-pioneer# vmstat -i
interrupt                          total       rate
irq0: clk                         596719         99
irq1: atkbd0                           2          0
irq4: sio0                          1079          0
irq6: fdc0                             1          0
irq8: rtc                         763812        127
irq12: uhci1                        5825          0
irq13: npx0                            1          0
irq14: ata0                        38727          6
irq15: vr0 ata1                     1984          0
Total                            1408150        235
releng-5-pioneer# 

where irq12 is the IRQ shared by the modem and the USB port.  However, because all IRQ 12s get throttled, the modem is unusable. e.g. trying to cu -l /dev/cuaa4 and typing atz takes about 5 seconds.

The problem is that the modem is not being seen as a PCI / PUC device and instead is being seen as an ISA SIO device ??  The following RELENG_5 and RELENG_4 patches seem to fix the problem.  I wonder if the other modems listed in sio.c suffer the same fate ? 


# cat /var/run/dmesg.boot
Copyright (c) 1992-2004 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
FreeBSD 4.10-STABLE #6: Fri Nov 26 13:52:22 EST 2004
    mdtancsa@station.sentex.ca:/usr/obj/usr/src/sys/gas
Timecounter "i8254"  frequency 1193182 Hz
Timecounter "TSC"  frequency 2400411816 Hz
CPU: Intel(R) Celeron(R) CPU 2.40GHz (2400.41-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0xf33  Stepping = 3
  Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
real memory  = 267321344 (261056K bytes)
config> q
avail memory = 256221184 (250216K bytes)
Preloaded elf kernel "kernel" at 0xc03d5000.
Preloaded userconfig_script "/boot/kernel.conf" at 0xc03d509c.
Warning: Pentium 4 CPU: PSE disabled
Pentium Pro MTRR support enabled
md0: Malloc disk
Using $PIR table, 8 entries at 0xc00fded0
npx0: <math processor> on motherboard
npx0: INT 16 interface
pcib0: <Host to PCI bridge> on motherboard
pci0: <PCI bus> on pcib0
agp0: <Intel 82865G (865G GMCH) SVGA controller> port 0xd000-0xd007 mem 0xfa400000-0xfa47ffff,0xf0000000-0xf7ffffff at device 2.0 on pci0
agp0: detected 892k stolen memory
agp0: aperture size is 128M
uhci0: <Intel 82801EB (ICH5) USB controller USB-A> port 0xc000-0xc01f irq 15 at device 29.0 on pci0
usb0: <Intel 82801EB (ICH5) USB controller USB-A> on uhci0
usb0: USB revision 1.0
uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
uhci1: <Intel 82801EB (ICH5) USB controller USB-B> port 0xc400-0xc41f irq 5 at device 29.1 on pci0
usb1: <Intel 82801EB (ICH5) USB controller USB-B> on uhci1
usb1: USB revision 1.0
uhub1: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
uhid0: APC Back-UPS ES 500 FW:801.e5.D USB FW:e5, rev 1.10/1.06, addr 2, iclass 3/0
uhci2: <Intel 82801EB (ICH5) USB controller USB-C> port 0xc800-0xc81f irq 10 at device 29.2 on pci0
usb2: <Intel 82801EB (ICH5) USB controller USB-C> on uhci2
usb2: USB revision 1.0
uhub2: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub2: 2 ports with 2 removable, self powered
uhci3: <Intel 82801EB (ICH5) USB controller USB-D> port 0xcc00-0xcc1f irq 15 at device 29.3 on pci0
usb3: <Intel 82801EB (ICH5) USB controller USB-D> on uhci3
usb3: USB revision 1.0
uhub3: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub3: 2 ports with 2 removable, self powered
pcib1: <Intel 82801BA/BAM (ICH2) Hub to PCI bridge> at device 30.0 on pci0
pci1: <PCI bus> on pcib1
rl0: <RealTek 8139 10/100BaseTX> port 0xa000-0xa0ff mem 0xf9000000-0xf90000ff irq 15 at device 4.0 on pci1
rl0: Ethernet address: 00:50:fc:c7:c2:f8
miibus0: <MII bus> on rl0
rlphy0: <RealTek internal media interface> on miibus0
rlphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
puc0: <SmartLink 5634PCV SurfRider> port 0xa400-0xa407 irq 12 at device 5.0 on pci1
sio2: type 16550A
fxp0: <Intel 82801BA (D865) Pro/100 VE Ethernet> port 0xa800-0xa83f mem 0xf9001000-0xf9001fff irq 11 at device 8.0 on pci1
fxp0: Ethernet address 00:01:80:56:75:7a
inphy0: <i82562ET 10/100 media interface> on miibus1
inphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
puc1: <Lava Computers Quattro-PCI serial port> port 0xb000-0xb007,0xac00-0xac07 irq 10 at device 10.0 on pci1
sio3: type 16550A
sio4: type 16550A
puc2: <Lava Computers Quattro-PCI serial port> port 0xb800-0xb807,0xb400-0xb407 irq 10 at device 10.1 on pci1
sio5: type 16550A
sio6: type 16550A
isab0: <PCI to ISA bridge (vendor=8086 device=24d0)> at device 31.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <Intel ICH5 ATA100 controller> port 0xf000-0xf00f,0-0x3,0-0x7,0-0x3,0-0x7 irq 0 at device 31.1 on pci0
ata0: at 0x1f0 irq 14 on atapci0
ata1: at 0x170 irq 15 on atapci0
ichsmb0: <Intel 82801EB (ICH5) SMBus controller> port 0x5000-0x501f irq 12 at device 31.3 on pci0
smbus0: <System Management Bus> on ichsmb0
smb0: <SMBus general purpose I/O> on smbus0
orm0: <Option ROM> at iomem 0xc0000-0xc9fff on isa0
pmtimer0 on isa0
fdc0: <NEC 72065B or clone> at port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on isa0
atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0
sio0: type 16550A
sio1 at port 0x2f8-0x2ff irq 3 on isa0
sio1: type 16550A
ipfw2 initialized, divert enabled, rule-based forwarding enabled, default to accept, logging limited to 100 packets/entry by default
IPsec: Initialized Security Association Processing.
ad0: 38166MB <ST340014A> [77545/16/63] at ata0-master UDMA100
Mounting root from ufs:/dev/ad0s1a

>How-To-Repeat:
boot a box with a smartlink PCI modem and have it share its interrupt with a usb controller. 
>Fix:

# diff -u sys/isa/sio.c.prev sys/isa/sio.c
--- sys/isa/sio.c.prev  Thu Sep  9 20:54:24 2004
+++ sys/isa/sio.c       Thu Sep  9 20:54:38 2004
@@ -602,7 +602,6 @@
        { 0x048011c1, "Lucent kermit based PCI Modem", 0x14 },
        { 0x95211415, "Oxford Semiconductor PCI Dual Port Serial", 0x10 },
        { 0x7101135e, "SeaLevel Ultra 530.PCI Single Port Serial", 0x18 },
-       { 0x0000151f, "SmartLink 5634PCV SurfRider", 0x10 },
        { 0x98459710, "Netmos Nm9845 PCI Bridge with Dual UART", 0x10 },
        { 0x00000000, NULL, 0 }
 };


--- sys/dev/puc/pucdata.c.prev  Thu Sep  9 21:01:30 2004
+++ sys/dev/puc/pucdata.c       Thu Sep  9 21:02:48 2004
@@ -804,6 +804,15 @@
            },
        },
 
+        {   "SmartLink 5634PCV SurfRider",
+            {   0x151f, 0x0000, 0,      0       },
+            {   0xffff, 0xffff, 0,      0       },
+            {
+                { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ },
+            },
+        },
+
+
        /* Actiontec  56K PCI Master */
        {   "Actiontec 56K PCI Master",
            {   0x11c1, 0x0480, 0x0,    0x0     }, 


and for releng5

releng5-865# diff -u sys/dev/puc/pucdata.c.orig sys/dev/puc/pucdata.c
--- sys/dev/puc/pucdata.c.orig  Mon May 17 08:57:30 2004
+++ sys/dev/puc/pucdata.c       Mon Dec  6 15:13:14 2004
@@ -827,6 +827,15 @@
            },
        },
 
+       /* "SmartLink 5634PCV SurfRider */
+       {   "SmartLink 5634PCV SurfRider",
+           {   0x151f, 0x0000, 0,      0       },
+           {   0xffff, 0xffff, 0,      0       },
+           {
+               { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ },
+           },
+       },
+
        /* Actiontec 56K PCI Master */
        {   "Actiontec 56K PCI Master",
            {   0x11c1, 0x0480, 0,      0       },
releng5-865# 

releng5-865# diff -u sys/dev/sio/sio_pci.c.orig sys/dev/sio/sio_pci.c
--- sys/dev/sio/sio_pci.c.orig  Mon Dec  6 15:15:17 2004
+++ sys/dev/sio/sio_pci.c       Mon Dec  6 15:20:22 2004
@@ -76,7 +76,6 @@
        { 0x048011c1, "Lucent kermit based PCI Modem", 0x14 },
        { 0x95211415, "Oxford Semiconductor PCI Dual Port Serial", 0x10 },
        { 0x7101135e, "SeaLevel Ultra 530.PCI Single Port Serial", 0x18 },
-       { 0x0000151f, "SmartLink 5634PCV SurfRider", 0x10 },
        { 0x0103115d, "Xircom Cardbus modem", 0x10 },
        { 0x98459710, "Netmos Nm9845 PCI Bridge with Dual UART", 0x10 },
        { 0x432214e4, "Broadcom 802.11g/GPRS CardBus (Serial)", 0x10 },
releng5-865# 
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200412062027.iB6KR1jE096684>