PROBLEM: kernel 2.4.0-test11-ac1 hang with usb-uhci and emu10k1

2000-11-23 Thread Michael Elkins

[1.] One line summary of the problem:

kernel 2.4.0-test11-ac1 hang with usb-uhci and emu10k1

[2.] Full description of the problem/report:

If I load the emu10k1.o module prior to loading the usb-uhci.o module, the
system will completely hang with no oops.  3-finger-salute has no effect,
had to soft-reset the system.

To figure out which modules were the problem, I booted into single-user mode.
First, emu10k1.o is loaded.  The usbcore.o module loads with no problems.  But
I get a complete hang every time when usb-uhci.o is loaded.

If I load the usb-uhci.o module before emu10k1.o, there is no problem.

[3.] Keywords (i.e., modules, networking, kernel): kernel usb sound emu10k1
[4.] Kernel version (from /proc/version):

Linux version 2.4.0-test11-ac1 (root@we-24-130-82-118) (gcc driver version 2.95.3 
19991030 (prerelease) executing gcc version egcs-2.91.66) #1 Wed Nov 22 17:38:15 PST 
2000

[5.] Output of Oops.. message (if applicable) with symbolic information 
 resolved (see Documentation/oops-tracing.txt)

No oops, complete system hang.

[6.] A small shell script or example program which triggers the
 problem (if possible)

Boot into single user mode, then:
modprobe emu10k1
modprobe usb-uhci

[7.] Environment

Hardware: Dell Dimension XPS T700r
Distribution: Linux Mandrake 7.2

[7.1.] Software (add the output of the ver_linux script here)

Linux ns.linux.bogus 2.4.0-test11-ac1 #1 Wed Nov 22 17:38:15 PST 2000 i686 unknown
Kernel modules 2.3.21
Gnu C  2.95.3
Gnu Make   3.79.1
Binutils   2.10.0.24
Linux C Library2.1.3
Dynamic linker ldd (GNU libc) 2.1.3
Procps 2.0.7
Mount  2.10o
Net-tools  1.57
Console-tools  0.2.3
Sh-utils   2.0
Modules Loaded ne 8390 3c59x emu10k1 soundcore dc2xx usb-uhci usbcore st 
ide-scsi scsi_mod

[7.2.] Processor information (from /proc/cpuinfo):

processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model   : 8
model name  : Pentium III (Coppermine)
stepping: 3
cpu MHz : 698.000399
cache size  : 256 KB
fdiv_bug: no
hlt_bug : no
f00f_bug: no
coma_bug: no
fpu : yes
fpu_exception   : yes
cpuid level : 2
wp  : yes
features: fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pat pse36 
mmx fxsr sse
bogomips: 1392.64

[7.3.] Module information (from /proc/modules):

ne  7024   1 (autoclean)
83906240   0 (autoclean) [ne]
3c59x  22864   1 (autoclean)
emu10k144992   0
soundcore   3888   4 [emu10k1]
dc2xx   3056   0 (unused)
usb-uhci   22160   0 (unused)
usbcore47328   1 [dc2xx usb-uhci]
st 26816   0 (unused)
ide-scsi7920   0
scsi_mod   86608   2 [st ide-scsi]

[7.4.] Loaded driver and hardware information (/proc/ioports, /proc/iomem)

(linux)% cat /proc/ioports 
-001f : dma1
0020-003f : pic1
0040-005f : timer
0060-006f : keyboard
0080-008f : dma page reg
00a0-00bf : pic2
00c0-00df : dma2
00f0-00ff : fpu
0170-0177 : ide1
0320-033f : eth1
0376-0376 : ide1
03c0-03df : vga+
03f8-03ff : serial(auto)
0cf8-0cff : PCI conf1
1000-107f : 3Com Corporation 3c900B-TPC [Etherlink XL TPC]
  1000-107f : eth0
1080-10bf : Promise Technology, Inc. 20262
10c0-10df : Intel Corporation 82371AB PIIX4 USB
  10c0-10df : usb-uhci
10e0-10ff : Creative Labs SB Live! EMU1
  10e0-10ff : EMU10K1
1400-140f : Intel Corporation 82371AB PIIX4 IDE
1410-1413 : Promise Technology, Inc. 20262
1414-1417 : Promise Technology, Inc. 20262
  1416-1416 : ide2
1418-141f : Promise Technology, Inc. 20262
1420-1427 : Promise Technology, Inc. 20262
  1420-1427 : ide2
1428-142f : Creative Labs SB Live!
7000-701f : Intel Corporation 82371AB PIIX4 ACPI
8000-803f : Intel Corporation 82371AB PIIX4 ACPI

(linux)% cat /proc/iomem 
-0009e7ff : System RAM
0009e800-0009 : reserved
000a-000b : Video RAM area
000c-000c7fff : Video ROM
000c9000-000ca7ff : Extension ROM
000e-000e : Extension ROM
000f-000f : System ROM
0010-040fd7ff : System RAM
  0010-001ef2d7 : Kernel code
  001ef2d8-00200d47 : Kernel data
040fd800-040ff7ff : ACPI Tables
040ff800-040ffbff : ACPI Non-volatile Storage
040ffc00-0fff : System RAM
f400-f401 : Promise Technology, Inc. 20262
f402-f402007f : 3Com Corporation 3c900B-TPC [Etherlink XL TPC]
f500-f5ff : PCI Bus #01
  f500-f5ff : nVidia Corporation Vanta [NV6]
f800-fbff : Intel Corporation 440BX/ZX - 82443BX/ZX Host bridge
fc00-fdff : PCI Bus #01
  fc00-fdff : nVidia Corporation Vanta [NV6]
fff8- : reserved

[7.5.] PCI information ('lspci -vvv' as root)
00:00.0 Host bridge: Intel Corporation 440BX/ZX - 82443BX/ZX Host bridge (rev 03)
Con

Re: PROBLEM: kernel 2.4.0-test11-ac1 hang with usb-uhci and emu10k1

2000-11-23 Thread Michael Elkins

On Thu, Nov 23, 2000 at 05:49:52PM +0100, Georg Acher wrote:
> On Thu, Nov 23, 2000 at 04:35:33PM +, Rui Sousa wrote:
> > On Thu, 23 Nov 2000, Michael Elkins wrote:
> > 
> > Usb controller is sharing a interrupt with the emu10k1.
> > For what I know the emu10k1 driver doesn't have any problem
> > sharing irq's, so I would blame the usb driver...
> 
> usb-uhci doesn't also have any problem with sharing irqs:
> 
> > cat /proc/interrupts
>  10:5597981  XT-PIC  aic7xxx, eth0, usb-uhci
> 
> Hm, no one left to blame...
> I would debug it as follows:
> Place various printks in the initialization code (reset_hc(), start_hc() and
> alloc_uhci) and find out after which printk it hangs. Then it would be
> possible to investigate this further...

It hangs in start_uhci():

/* disable legacy emulation */
pci_write_config_word (dev, USBLEGSUP, USBLEGSUP_DEFAULT);

The loop that the call is in gets iterated 5 times.  For i < 4, the
if (!(dev->resource[i].flags & 1))
is TRUE, but on i==4, it drops into the bottom of the loop to execute
check_region() and then pci_write_config_word(), where it hangs.

This only seems to be a problem for initialization.  If  I load the
usb-uhci.o module before the emu10k1.o module, everything works perfectly
(no lockups).

me
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: [PATCH] Re: PROBLEM: kernel 2.4.0-test11-ac1 hang with usb-uhci and emu10k1

2000-11-23 Thread Michael Elkins

On Thu, Nov 23, 2000 at 06:06:31PM -0500, Jeff Garzik wrote:
> Michael Elkins wrote:
> > 
> > On Thu, Nov 23, 2000 at 05:49:52PM +0100, Georg Acher wrote:
> > It hangs in start_uhci():
> > 
> > /* disable legacy emulation */
> > pci_write_config_word (dev, USBLEGSUP, USBLEGSUP_DEFAULT);
> > 
> > The loop that the call is in gets iterated 5 times.  For i < 4, the
> > if (!(dev->resource[i].flags & 1))
> > is TRUE, but on i==4, it drops into the bottom of the loop to execute
> > check_region() and then pci_write_config_word(), where it hangs.
> 
> It may not make a difference, but that check is flat out wrong.

The loop still exhibits the same behavior.

/usr/include/linux/ioport.h:#define IORESOURCE_IO   0x0100 /* Resource 
type */

Definitely a different value, however.

> Apply this patch...  (untested, you may need to include ioport.h)

fyi, ioport.h isn't required.

On Thu, Nov 23, 2000 at 03:53:27PM -0800, Linus Torvalds wrote:
> Try changing the thing around a bit: make the above place say
> 
>   /* disable legacy emulation */
>   pci_write_config_word (dev, USBLEGSUP, 0);
> 
> and then AFTER we have successfully done a request_irq() call, we 
> can enable PCI interrupts with
> 
>   /* Enable PIRQ */
>   pci_write_config_word (dev, USBLEGSUP, USBLEGSUP_DEFAULT);
> 
> Does that make it happier?

Yep! That seems to have fixed it.  Added the pci_write_config_word() after
the request_irq() in alloc_uhci().

me
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/