From owner-freebsd-bugs@FreeBSD.ORG Wed Dec 8 15:40:32 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5685816A4CE for ; Wed, 8 Dec 2004 15:40:32 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1022D43D1F for ; Wed, 8 Dec 2004 15:40:32 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id iB8FeVwm063760 for ; Wed, 8 Dec 2004 15:40:32 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id iB8FeVR5063759; Wed, 8 Dec 2004 15:40:31 GMT (envelope-from gnats) Date: Wed, 8 Dec 2004 15:40:31 GMT Message-Id: <200412081540.iB8FeVR5063759@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Mike Tancsa Subject: Re: misc/74786: Smartlink Modem causes interrupt storm on RELENG_4 and RELENG_5 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Mike Tancsa List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Dec 2004 15:40:32 -0000 The following reply was made to PR kern/74786; it has been noted by GNATS. From: Mike Tancsa To: Bruce Evans Cc: freebsd-gnats-submit@freebsd.org, freebsd-bugs@freebsd.org Subject: Re: misc/74786: Smartlink Modem causes interrupt storm on RELENG_4 and RELENG_5 Date: Wed, 08 Dec 2004 10:35:17 -0500 At 02:22 AM 08/12/2004, Bruce Evans wrote: >Try this fix. For the uhci-sio conflict, it should avoid problem (1) Hi, The dmesg still complains about the "cant reuse leaf" as well as the other PUC card now complains as well about "unable to activate interrupt in fast mode - using normal mode" releng5-865% 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 5.3-STABLE #1: Wed Dec 8 10:05:17 EST 2004 mdtancsa@releng5-865.sentex.ca:/usr/obj/usr/src/sys/test Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: Intel(R) Celeron(R) CPU 2.40GHz (2400.41-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0xf29 Stepping = 9 Features=0xbfebfbff real memory = 267190272 (254 MB) avail memory = 251912192 (240 MB) npx0: [FAST] npx0: on motherboard npx0: INT 16 interface acpi0: on motherboard acpi0: Power Button (fixed) Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x4008-0x400b on acpi0 cpu0: on acpi0 acpi_tz0: on acpi0 acpi_button0: on acpi0 pcib0: port 0xcf8-0xcff on acpi0 pci0: on pcib0 agp0: port 0xd000-0xd007 mem 0xfa000000-0xfa07ffff,0xf0000000-0xf7ffffff at device 2.0 on pci0 agp0: detected 892k stolen memory agp0: aperture size is 128M uhci0: port 0xc000-0xc01f irq 12 at device 29.0 on pci0 uhci0: [GIANT-LOCKED] usb0: 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 uhid0: APC Back-UPS ES 725 FW:802.n2.D USB FW:n2, rev 1.10/1.06, addr 2, iclass 3/0 uhci1: port 0xc400-0xc41f irq 5 at device 29.1 on pci0 uhci1: [GIANT-LOCKED] usb1: 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 uhci2: port 0xc800-0xc81f irq 10 at device 29.2 on pci0 uhci2: [GIANT-LOCKED] usb2: 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: port 0xcc00-0xcc1f irq 12 at device 29.3 on pci0 uhci3: [GIANT-LOCKED] usb3: 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: at device 30.0 on pci0 pci1: on pcib1 sio0: port 0xa000-0xa007 irq 12 at device 4.0 on pci1 sio0: moving to sio4 sio4: type 16550A sio4: unable to activate interrupt in fast mode - using normal mode rl0: port 0xa400-0xa4ff mem 0xf9000000-0xf90000ff irq 15 at device 5.0 on pci1 miibus0: on rl0 rlphy0: on miibus0 rlphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto rl0: Ethernet address: 00:50:fc:24:2b:4d fxp0: port 0xa800-0xa83f mem 0xf9001000-0xf9001fff irq 11 at device 8.0 on pci1 miibus1: on fxp0 inphy0: on miibus1 inphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto fxp0: Ethernet address: 00:01:80:54:b7:09 puc0: port 0xb000-0xb007,0xac00-0xac07 irq 10 at device 10.0 on pci1 sio5: on puc0 sio5: type 16550A sio5: unable to activate interrupt in fast mode - using normal mode sio6: on puc0 sio6: type 16550A sio6: unable to activate interrupt in fast mode - using normal mode puc1: port 0xb800-0xb807,0xb400-0xb407 irq 10 at device 10.1 on pci1 sio7: on puc1 sio7: type 16550A sio7: unable to activate interrupt in fast mode - using normal mode sio8: on puc1 sio8: type 16550A sio8: unable to activate interrupt in fast mode - using normal mode isab0: at device 31.0 on pci0 isa0: on isab0 atapci0: port 0xf000-0xf00f,0x376,0x170-0x177,0x3f6,0x1f0-0x1f7 at device 31.1 on pci0 ata0: channel #0 on atapci0 ata1: channel #1 on atapci0 pci0: at device 31.3 (no driver attached) can't re-use a leaf (%desc)! can't re-use a leaf (%driver)! can't re-use a leaf (%location)! can't re-use a leaf (%pnpinfo)! can't re-use a leaf (%parent)! sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0 sio0: type 16550A, console sio1: <16550A-compatible COM port> port 0x2f8-0x2ff irq 3 on acpi0 sio1: type 16550A atkbdc0: port 0x64,0x60 irq 1 on acpi0 atkbd0: irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] orm0: at iomem 0xc0000-0xc9fff on isa0 ppc0: parallel port not found. sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x100> vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 Timecounter "TSC" frequency 2400411284 Hz quality 800 Timecounters tick every 10.000 msec Fast IPsec: Initialized Security Association Processing. ad0: 38166MB [77545/16/63] at ata0-master UDMA100 Mounting root from ufs:/dev/ad0s1a releng5-865% But it seems to work in that I dont get an interrupt storm when attaching to the modem. releng5-865# vmstat -i interrupt total rate irq0: clk 18220 99 irq4: sio0 170 0 irq8: rtc 23322 127 irq10: uhci2 puc0+ 6 0 irq11: fxp0 892 4 irq12: uhci0 uhci3+ 122 0 irq13: npx0 1 0 irq14: ata0 1110 6 Total 43843 239 releng5-865# >(please try it with the RF_SHAREABLE flag removed so that if this is >indeed the primary problem then the new diagnostic will verify it). releng5-865# 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 5.3-STABLE #2: Wed Dec 8 10:20:43 EST 2004 mdtancsa@releng5-865.sentex.ca:/usr/obj/usr/src/sys/test Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: Intel(R) Celeron(R) CPU 2.40GHz (2400.41-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0xf29 Stepping = 9 Features=0xbfebfbff real memory = 267190272 (254 MB) avail memory = 251912192 (240 MB) npx0: [FAST] npx0: on motherboard npx0: INT 16 interface acpi0: on motherboard acpi0: Power Button (fixed) Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x4008-0x400b on acpi0 cpu0: on acpi0 acpi_tz0: on acpi0 acpi_button0: on acpi0 pcib0: port 0xcf8-0xcff on acpi0 pci0: on pcib0 agp0: port 0xd000-0xd007 mem 0xfa000000-0xfa07ffff,0xf0000000-0xf7ffffff at device 2.0 on pci0 agp0: detected 892k stolen memory agp0: aperture size is 128M uhci0: port 0xc000-0xc01f irq 12 at device 29.0 on pci0 uhci0: [GIANT-LOCKED] usb0: 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 uhid0: APC Back-UPS ES 725 FW:802.n2.D USB FW:n2, rev 1.10/1.06, addr 2, iclass 3/0 uhci1: port 0xc400-0xc41f irq 5 at device 29.1 on pci0 uhci1: [GIANT-LOCKED] usb1: 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 uhci2: port 0xc800-0xc81f irq 10 at device 29.2 on pci0 uhci2: [GIANT-LOCKED] usb2: 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: port 0xcc00-0xcc1f irq 12 at device 29.3 on pci0 uhci3: [GIANT-LOCKED] usb3: 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: at device 30.0 on pci0 pci1: on pcib1 sio0: port 0xa000-0xa007 irq 12 at device 4.0 on pci1 sio0: moving to sio4 sio4: type 16550A sio4: interrupt resource allocation failed sio4: falling back to polled mode sio4: polled mode rl0: port 0xa400-0xa4ff mem 0xf9000000-0xf90000ff irq 15 at device 5.0 on pci1 miibus0: on rl0 rlphy0: on miibus0 rlphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto rl0: Ethernet address: 00:50:fc:24:2b:4d fxp0: port 0xa800-0xa83f mem 0xf9001000-0xf9001fff irq 11 at device 8.0 on pci1 miibus1: on fxp0 inphy0: on miibus1 inphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto fxp0: Ethernet address: 00:01:80:54:b7:09 puc0: port 0xb000-0xb007,0xac00-0xac07 irq 10 at device 10.0 on pci1 sio5: on puc0 sio5: type 16550A sio5: unable to activate interrupt in fast mode - using normal mode sio6: on puc0 sio6: type 16550A sio6: unable to activate interrupt in fast mode - using normal mode puc1: port 0xb800-0xb807,0xb400-0xb407 irq 10 at device 10.1 on pci1 sio7: on puc1 sio7: type 16550A sio7: unable to activate interrupt in fast mode - using normal mode sio8: on puc1 sio8: type 16550A sio8: unable to activate interrupt in fast mode - using normal mode isab0: at device 31.0 on pci0 isa0: on isab0 atapci0: port 0xf000-0xf00f,0x376,0x170-0x177,0x3f6,0x1f0-0x1f7 at device 31.1 on pci0 ata0: channel #0 on atapci0 ata1: channel #1 on atapci0 pci0: at device 31.3 (no driver attached) can't re-use a leaf (%desc)! can't re-use a leaf (%driver)! can't re-use a leaf (%location)! can't re-use a leaf (%pnpinfo)! can't re-use a leaf (%parent)! sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0 sio0: type 16550A, console sio1: <16550A-compatible COM port> port 0x2f8-0x2ff irq 3 on acpi0 sio1: type 16550A atkbdc0: port 0x64,0x60 irq 1 on acpi0 atkbd0: irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] orm0: at iomem 0xc0000-0xc9fff on isa0 ppc0: parallel port not found. sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x100> vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 Timecounter "TSC" frequency 2400411356 Hz quality 800 Timecounters tick every 10.000 msec Fast IPsec: Initialized Security Association Processing. ad0: 38166MB [77545/16/63] at ata0-master UDMA100 Mounting root from ufs:/dev/ad0s1a releng5-865# releng5-865# vmstat -i interrupt total rate irq0: clk 39748 99 irq4: sio0 170 0 irq8: rtc 50879 127 irq10: uhci2 puc0+ 6 0 irq11: fxp0 482 1 irq12: uhci0 uhci3 86 0 irq13: npx0 1 0 irq14: ata0 1115 2 Total 92487 231 releng5-865# implies its not sharing the interrupt but it goes into polled mode. >This should move the conflict later, to one between usb's use of >normal interrupt mode and sio's request for fast interrupt mode. >There were already sufficient diagnostics for this. The patch adds >some more. Since usb got the interrupt first, sio will fall back >to normal mode. If sio goes first then the attach of usb would >probably fail. The patch doesn't change these bevhaviours. The >patch adds another fallback to polled mode if setup of normal mode >mode fails and fixes some related resource leaks. It also increases >the polling frequency if possible. Polled mode mostly works at >115200 bps provided the UART is buffered and HZ >= 1000. With >unbuffered UARTs and HZ = 100, only 4800 bos mostly works. I am using RELENG_5, so I am not sure if the HZ default has changed yet. Not sure how much of this applies to RELENG_4 either where the problem is particularly acute. > return (0); >@@ -2647,5 +2664,5 @@ > /* > * Set our timeout period to 1 second if no polled devices are open. >- * Otherwise set it to max(1/200, 1/hz). >+ * Otherwise, set it to max(1/1000, 1/hz). > * Enable timeouts iff some device is open. > */ >@@ -2659,5 +2676,5 @@ BTW, The comment part of the patch does not apply cleanly releng5-865# cat sio.c.rej *************** *** 2645,2649 **** /* * Set our timeout period to 1 second if no polled devices are open. - * Otherwise set it to max(1/200, 1/hz). * Enable timeouts iff some device is open. */ --- 2662,2666 ---- /* * Set our timeout period to 1 second if no polled devices are open. + * Otherwise, set it to max(1/1000, 1/hz). * Enable timeouts iff some device is open. */ releng5-865#