Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Jul 2002 23:45:43 -0400
From:      "Matthew Emmerton" <matt@gsicomp.on.ca>
To:        <freebsd-gnats-submit@FreeBSD.org>
Cc:        <yid@softhome.net>
Subject:   kern/41227: Serial port IRQs cannot be shared when they should be
Message-ID:  <001b01c22c7b$4397da20$1200a8c0@gsicomp.on.ca>

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

>Number:         41227
>Category:       kern
>Synopsis:       Serial port IRQs cannot be shared when they should be
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Aug 01 02:50:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Matt Emmerton
>Release:        FreeBSD 4.6-STABLE i386
>Organization:
GSI Computer Services
>Environment:
>Description:

Copyright (c) 1992-2002 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.6-STABLE #0: Sat Jul 13 23:22:54 EDT 2002
    yid@:/usr/obj/usr/src/sys/PLANB
Timecounter "i8254"  frequency 1193182 Hz
CPU: Pentium 4 (1693.73-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0xf0a  Stepping = 10

Features=0x3febfbff<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,<b28>,ACC>
real memory  = 536854528 (524272K bytes)
avail memory = 518610944 (506456K bytes)
Preloaded elf kernel "kernel" at 0xc03af000.
md0: Malloc disk
Using $PIR table, 8 entries at 0xc00f15d0
npx0: <math processor> on motherboard
npx0: INT 16 interface
pcib0: <Intel 82845 Host to PCI bridge> on motherboard
pci0: <PCI bus> on pcib0
pcib1: <Intel 82845 PCI-PCI (AGP) bridge> at device 1.0 on pci0
pci1: <PCI bus> on pcib1
pci1: <NVidia Riva Ultra Vanta TNT2 graphics accelerator> at 0.0 irq 11
pcib2: <Intel 82801BA/BAM (ICH2) Hub to PCI bridge> at device 30.0 on pci0
pci2: <PCI bus> on pcib2
sio0: <3COM PCI FaxModem> port 0xd800-0xd807 irq 9 at device 10.0 on pci2
sio0: moving to sio4
sio4: type 16550A
pci2: <unknown card> (vendor=0x104c, dev=0x8020) at 11.0 irq 9
isab0: <Intel 82801BA/BAM (ICH2) PCI to LPC bridge> at device 31.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <Intel ICH2 ATA100 controller> port 0xb800-0xb80f at device 31.1 on
pci0
ata0: at 0x1f0 irq 14 on atapci0
ata1: at 0x170 irq 15 on atapci0
uhci0: <Intel 82801BA/BAM (ICH2) USB controller USB-A> port 0xb400-0xb41f
irq 5 at device 31.2 on pci0
usb0: <Intel 82801BA/BAM (ICH2) 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
ums0: HP HP USB WHEEL MOUSE, rev 1.00/0.00, addr 2, iclass 3/1
ums0: 3 buttons and Z dir.
uhub1: HP Multimedia Keyboard Hub, class 9/0, rev 1.10/0.03, addr 3
uhub1: 3 ports with 2 removable, bus powered
ukbd0: HP Multimedia Keyboard Hub, rev 1.10/0.03, addr 4, iclass 3/1
kbd0 at ukbd0
uhid0: HP Multimedia Keyboard Hub, rev 1.10/0.03, addr 4, iclass 3/0
uhci1: <Intel 82801BA/BAM (ICH2) USB controller USB-B> port 0xb000-0xb01f
irq 9 at device 31.4 on pci0
uhci1: Could not allocate irq
device_probe_and_attach: uhci1 attach returned 6
pcm0: <Intel 82801BA (ICH2)> port 0xa400-0xa43f,0xa800-0xa8ff irq 12 at
device 31.5 on pci0
orm0: <Option ROM> at iomem 0xc0000-0xcafff on isa0
fdc0: <NEC 72065B or clone> at port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on isa0
fdc0: FIFO enabled, 8 bytes threshold
fd0: <1440-KB 3.5" drive> on fdc0 drive 0
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
ppc0: <Parallel port> at port 0x378-0x37f irq 7 on isa0
ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode
ppc0: FIFO with 16/16/8 bytes threshold
plip0: <PLIP network interface> on ppbus0
lpt0: <Printer> on ppbus0
lpt0: Interrupt-driven port
ppi0: <Parallel I/O> on ppbus0
IP packet filtering initialized, divert enabled, rule-based forwarding
enabled, default to deny, logging limited to 100 packets/entry by default
ad0: 78147MB <ST380020A> [158775/16/63] at ata0-master UDMA100
acd0: CD-RW <Hewlett-Packard CD-Writer cd16f> at ata1-master UDMA33
acd1: DVD-ROM <PIONEER DVD-ROM DVD-116 ATAPI Model 0121> at ata1-slave
UDMA33

This machine uses a 3Com PCI modem (sio0 -> sio4) which is fixed on IRQ 9.
However, the uhci1 device also uses IRQ 9 and fails to initialize because it
the IRQ is already in use and is not shareable.

>How-To-Repeat:

Find the same hardware, boot.

>Fix:

The problem turns out to be that the sio driver doesn't allocate IRQ
resources as RF_SHAREABLE.  This causes the IRQ 9 resource to be unavailable
and prevents the initialization of the uhci1 device.

THIS PATCH IS AGAINST 4.3-STABLE sources; I don't have 4.6-STABLE sources on
my machine but it's a pretty obvious fix.

--- sys/isa/sio.c.orig  Mon Jul 15 23:24:21 2002
+++ sys/isa/sio.c       Mon Jul 15 23:24:34 2002
@@ -1335,7 +1335,7 @@

        rid = 0;
        com->irqres = bus_alloc_resource(dev, SYS_RES_IRQ, &rid, 0ul, ~0ul,
1,
-           RF_ACTIVE);
+           RF_SHAREABLE | RF_ACTIVE);
        if (com->irqres) {
                ret = BUS_SETUP_INTR(device_get_parent(dev), dev,
com->irqres,
                                     INTR_TYPE_TTY | INTR_TYPE_FAST,

The user made this change to his kernel and rebuilt; his USB hub was
correctly initialized and the devices on the hub were found and initialized
without problems.

>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?001b01c22c7b$4397da20$1200a8c0>