# USB not working

## dragonx

I currently have USB support compiled into the kernel.  I have usb 2.0 in my system.  I have also tried it compiled it as a module.  On boot-up it seems that my system sees the usb port here is the code from my dmesg after boot up:

```
hub.c: new USB device 00:10.0-2, assigned address 2

usb.c: USB device 2 (vend/prod 0x66b/0x2212) is not claimed by any active driver.

Adding Swap: 1004052k swap-space (priority -1)

EXT3 FS 2.4-0.9.19, 19 August 2002 on ide0(3,3), internal journal

via-rhine.c:v1.10-LK1.1.14  May-3-2002  Written by Donald Becker

  http://www.scyld.com/network/via-rhine.html

PCI: Found IRQ 11 for device 00:12.0

PCI: Sharing IRQ 11 with 00:10.0

eth0: VIA VT6102 Rhine-II at 0xc800, 00:50:2c:05:6a:26, IRQ 11.

eth0: MII PHY found at address 1, status 0x782d advertising 01e1 Link 0021.
```

Now when I plug in a device it seems to see it but the uhci and ehci modules don't want to load so I can use the device.  Here is what I get when I try to load the module.  I try to load the usb-uhci.  This is the module I need for my motherboard.

```
#insmod usb-uhci

Using /lib/modules/2.4.20-gentoo-r2/kernel/drivers/usb/usb-uhci.o

/lib/modules/2.4.20-gentoo-r2/kernel/drivers/usb/usb-uhci.o: init_module: No such device

Hint: insmod errors can be caused by incorrect module parameters, including invalid IO or IRQ parameters.

      You may find more information in syslog or the output from dmesg

localhost root #

```

here is my dmesg after this attempt:

```

hub.c: new USB device 00:10.0-2, assigned address 2

usb.c: USB device 2 (vend/prod 0x66b/0x2212) is not claimed by any active driver.

Adding Swap: 1004052k swap-space (priority -1)

EXT3 FS 2.4-0.9.19, 19 August 2002 on ide0(3,3), internal journal

via-rhine.c:v1.10-LK1.1.14  May-3-2002  Written by Donald Becker

  http://www.scyld.com/network/via-rhine.html

PCI: Found IRQ 11 for device 00:12.0

PCI: Sharing IRQ 11 with 00:10.0

eth0: VIA VT6102 Rhine-II at 0xc800, 00:50:2c:05:6a:26, IRQ 11.

eth0: MII PHY found at address 1, status 0x782d advertising 01e1 Link 0021.

usb-uhci.c: $Revision: 1.275 $ time 00:12:47 Apr 26 2003

usb-uhci.c: High bandwidth mode enabled

usb-uhci.c: v1.275:USB Universal Host Controller Interface driver

```

Any idea whats wrong?  All the other distros that I use do this automatically.  is there an rc-update that I can do to bring up usb on boot-up if I can get it working....  I have usb 2.0 support.  which modules do I load up for that?  Any ideas?

----------

## PowerFactor

For usb 2.0 support you need the ehci-hcd module.  If you have that one i believe you won't need the usb-uhci module. With nothing plugged into the usb ports try

```
modprobe -r usb-uhci

modprobe -r ehci-hcd

modprobe ehci-hcd
```

If that last one goes without errors then try and see if your usb evices work.  If so then put ehci-hcd in your /etc/modules.autoload.

----------

## dragonx

I tried your sugesstion.  Here is what happened.  No luck yet:

```

localhost root # modprobe -r usb-uhci

localhost root # modprobe -r ehci-hcd

localhost root # modprobe ehci-hcd

/lib/modules/2.4.20-gentoo-r2/kernel/drivers/usb/hcd/ehci-hcd.o: init_module: No such device

Hint: insmod errors can be caused by incorrect module parameters, including invalid IO or IRQ parameters.

      You may find more information in syslog or the output from dmesg

/lib/modules/2.4.20-gentoo-r2/kernel/drivers/usb/hcd/ehci-hcd.o: insmod /lib/modules/2.4.20-gentoo-r2/kernel/drivers/usb/hcd/ehci-hcd.o failed

/lib/modules/2.4.20-gentoo-r2/kernel/drivers/usb/hcd/ehci-hcd.o: insmod ehci-hcd failed

localhost root #

```

here is my dmesg after your suggestion.  Any more help would greatly be appreciated:

```

Mounted devfs on /dev

Freeing unused kernel memory: 136k freed

Adding Swap: 1004052k swap-space (priority -1)

EXT3 FS 2.4-0.9.19, 19 August 2002 on ide0(3,3), internal journal

via-rhine.c:v1.10-LK1.1.14  May-3-2002  Written by Donald Becker

  http://www.scyld.com/network/via-rhine.html

PCI: Found IRQ 11 for device 00:12.0

PCI: Sharing IRQ 11 with 00:10.0

eth0: VIA VT6102 Rhine-II at 0xc800, 00:50:2c:05:6a:26, IRQ 11.

eth0: MII PHY found at address 1, status 0x782d advertising 01e1 Link 0021.

usb.c: unable to get major 180 for usb devices

usb.c: registered new driver usbdevfs

usb.c: registered new driver hub

spurious 8259A interrupt: IRQ7.

```

Thanks

----------

## PowerFactor

Well from that I would assume that your mb doesn't actually have usb2.0 support, or maybe it's disabled in the bios.  Are you sure usb-uhci is the correct module for your mb? Have you tried uhci or usb-ohci?  When you boot from the livecd which one does it load?

----------

## dragonx

My MB does support USB 2.0 as it is a SOYO Kt-400 board.  I have tried UHCI which gives me the following error.

```

localhost root # modprobe uhci

Segmentation fault

localhost root # lsmod

Module                  Size  Used by    Not tainted

uhci                   23568   1  (initializing)

usbcore                56000   1  [uhci]

via-rhine              12272   1

mii                     2144   0  [via-rhine]

localhost root # dmesg

Linux version 2.4.20-gentoo-r2 (root@cdimage) (gcc version 3.2.2) #1 SMP Wed Apr 23 22:28:09 UTC 2003

BIOS-provided physical RAM map:

 BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)

 BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)

 BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)

 BIOS-e820: 0000000000100000 - 000000001fff0000 (usable)

 BIOS-e820: 000000001fff0000 - 000000001fff3000 (ACPI NVS)

 BIOS-e820: 000000001fff3000 - 0000000020000000 (ACPI data)

 BIOS-e820: 00000000fec00000 - 00000000fec01000 (reserved)

 BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)

 BIOS-e820: 00000000ffff0000 - 0000000100000000 (reserved)

511MB LOWMEM available.

found SMP MP-table at 000f5bb0

hm, page 000f5000 reserved twice.

hm, page 000f6000 reserved twice.

hm, page 000f1000 reserved twice.

hm, page 000f2000 reserved twice.

On node 0 totalpages: 131056

zone(0): 4096 pages.

zone(1): 126960 pages.

zone(2): 0 pages.

Intel MultiProcessor Specification v1.1

    Virtual Wire compatibility mode.

OEM ID: OEM00000 Product ID: PROD00000000 APIC at: 0xFEE00000

Processor #0 Pentium(tm) Pro APIC version 17

I/O APIC #2 Version 17 at 0xFEC00000.

Processors: 1

Kernel command line: root=/dev/hda3 hdc=ide-scsi noapic

ide_setup: hdc=ide-scsi

Initializing CPU#0

Detected 1666.767 MHz processor.

Console: colour VGA+ 80x25

Calibrating delay loop... 3322.67 BogoMIPS

Memory: 515168k/524224k available (1708k kernel code, 8668k reserved, 701k data, 136k init, 0k highmem)

Dentry cache hash table entries: 65536 (order: 7, 524288 bytes)

Inode cache hash table entries: 32768 (order: 6, 262144 bytes)

Mount-cache hash table entries: 8192 (order: 4, 65536 bytes)

Buffer-cache hash table entries: 32768 (order: 5, 131072 bytes)

Page-cache hash table entries: 131072 (order: 7, 524288 bytes)

CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (64 bytes/line)

CPU: L2 Cache: 256K (64 bytes/line)

Intel machine check architecture supported.

Intel machine check reporting enabled on CPU#0.

CPU:     After generic, caps: 0383fbff c1c3fbff 00000000 00000000

CPU:             Common caps: 0383fbff c1c3fbff 00000000 00000000

Enabling fast FPU save and restore... done.

Enabling unmasked SIMD FPU exception support... done.

Checking 'hlt' instruction... OK.

POSIX conformance testing by UNIFIX

CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (64 bytes/line)

CPU: L2 Cache: 256K (64 bytes/line)

Intel machine check reporting enabled on CPU#0.

CPU:     After generic, caps: 0383fbff c1c3fbff 00000000 00000000

CPU:             Common caps: 0383fbff c1c3fbff 00000000 00000000

CPU0: AMD Athlon(tm) XP 2000+ stepping 01

per-CPU timeslice cutoff: 731.44 usecs.

enabled ExtINT on CPU#0

ESR value before enabling vector: 00000000

ESR value after enabling vector: 00000000

Error: only one processor found.

Using local APIC timer interrupts.

calibrating APIC timer ...

..... CPU clock speed is 1666.7999 MHz.

..... host bus clock speed is 266.6880 MHz.

cpu: 0, clocks: 2666880, slice: 1333440

CPU0<T0:2666880,T1:1333440,D:0,S:1333440,C:2666880>

Waiting on wait_init_idle (map = 0x0)

All processors have done init_idle

PCI: PCI BIOS revision 2.10 entry at 0xfb4d0, last bus=1

PCI: Using configuration type 1

PCI: Probing PCI hardware

PCI: Probing PCI hardware (bus 00)

PCI: Using IRQ router VIA [1106/3177] at 00:11.0

isapnp: Scanning for PnP cards...

isapnp: No Plug & Play device found

Linux NET4.0 for Linux 2.4

Based upon Swansea University Computer Society NET3.039

Initializing RT netlink socket

Starting kswapd

Journalled Block Device driver loaded

devfs: v1.12c (20020818) Richard Gooch (rgooch@atnf.csiro.au)

devfs: boot_options: 0x1

Installing knfsd (copyright (C) 1996 okir@monad.swb.de).

radeonfb: ref_clk=2700, ref_div=60, xclk=18300 from BIOS

Console: switching to colour frame buffer device 80x30

radeonfb: ATI Radeon QD  DDR SGRAM 64 MB

radeonfb: CRT port CRT monitor connected

pty: 256 Unix98 ptys configured

Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI ISAPNP enabled

ttyS00 at 0x03f8 (irq = 4) is a 16550A

ttyS01 at 0x02f8 (irq = 3) is a 16550A

Uniform Multi-Platform E-IDE driver Revision: 6.31

ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx

HPT372: IDE controller on PCI bus 00 dev 78

HPT372: detected chipset, but driver not compiled in!

PCI: Found IRQ 10 for device 00:0f.0

PCI: Sharing IRQ 10 with 00:10.2

HPT372: chipset revision 5

HPT372: not 100% native mode: will probe irqs later

    ide2: BM-DMA at 0xb400-0xb407, BIOS settings: hde:pio, hdf:pio

    ide3: BM-DMA at 0xb408-0xb40f, BIOS settings: hdg:pio, hdh:pio

VP_IDE: IDE controller on PCI bus 00 dev 89

VP_IDE: detected chipset, but driver not compiled in!

PCI: No IRQ known for interrupt pin A of device 00:11.1. Please try using pci=biosirq.

VP_IDE: chipset revision 6

VP_IDE: not 100% native mode: will probe irqs later

    ide0: BM-DMA at 0xc400-0xc407, BIOS settings: hda:DMA, hdb:pio

    ide1: BM-DMA at 0xc408-0xc40f, BIOS settings: hdc:DMA, hdd:pio

hda: WDC WD200BB-00AUA1, ATA DISK drive

hdc: TDK CDRW241040B, ATAPI CD/DVD-ROM drive

ide0 at 0x1f0-0x1f7,0x3f6 on irq 14

ide1 at 0x170-0x177,0x376 on irq 15

hda: 39102336 sectors (20020 MB) w/2048KiB Cache, CHS=2434/255/63

Partition check:

 /dev/ide/host0/bus0/target0/lun0:<7>ldm_validate_partition_table(): Found an MS-DOS partition table, not a dynamic disk.

 p1 p2 p3

Floppy drive(s): fd0 is 1.44M

FDC 0 is a post-1991 82077

RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize

Linux agpgart interface v0.99 (c) Jeff Hartmann

agpgart: Maximum main memory to use for agp memory: 439M

agpgart: Detected Via Apollo Pro KT400 chipset

agpgart: AGP aperture is 64M @ 0xe8000000

[drm] Initialized tdfx 1.0.0 20010216 on minor 0

[drm] AGP 0.99 on VIA Apollo KT400 @ 0xe8000000 64MB

[drm] Initialized radeon 1.1.1 20010405 on minor 1

[drm] AGP 0.99 on VIA Apollo KT400 @ 0xe8000000 64MB

[drm] Initialized i810 1.2.0 20010920 on minor 2

SCSI subsystem driver Revision: 1.00

scsi0 : SCSI host adapter emulation for IDE ATAPI devices

  Vendor: TDK       Model: CDRW241040B       Rev: 57S2

  Type:   CD-ROM                             ANSI SCSI revision: 02

Attached scsi CD-ROM sr0 at scsi0, channel 0, id 0, lun 0

sr0: scsi3-mmc drive: 198x/40x writer cd/rw xa/form2 cdda tray

sr0: mmc-3 profile capable, current profile: 2h

Uniform CD-ROM driver Revision: 3.12

es1371: version v0.30 time 22:30:32 Apr 23 2003

Linux Kernel Card Services 3.1.22

  options:  [pci] [cardbus] [pm]

usb.c: registered new driver hub

PCI: Found IRQ 5 for device 00:10.3

PCI: Sharing IRQ 5 with 00:0e.0

hcd.c: ehci-hcd @ 00:10.3, VIA Technologies, Inc. USB 2.0

hcd.c: irq 5, pci mem e4820000

usb.c: new USB bus registered, assigned bus number 1

hcd/ehci-hcd.c: USB 2.0 support enabled, EHCI rev 1. 0

hub.c: USB hub found

hub.c: 6 ports detected

uhci.c: USB Universal Host Controller Interface driver v1.1

PCI: Found IRQ 11 for device 00:10.0

PCI: Sharing IRQ 11 with 00:12.0

uhci.c: USB UHCI at I/O 0xb800, IRQ 11

usb.c: new USB bus registered, assigned bus number 2

hub.c: USB hub found

hub.c: 2 ports detected

PCI: Found IRQ 11 for device 00:10.1

uhci.c: USB UHCI at I/O 0xbc00, IRQ 11

usb.c: new USB bus registered, assigned bus number 3

hub.c: USB hub found

hub.c: 2 ports detected

PCI: Found IRQ 10 for device 00:10.2

PCI: Sharing IRQ 10 with 00:0f.0

uhci.c: USB UHCI at I/O 0xc000, IRQ 10

usb.c: new USB bus registered, assigned bus number 4

hub.c: USB hub found

hub.c: 2 ports detected

Initializing USB Mass Storage driver...

usb.c: registered new driver usb-storage

USB Mass Storage support registered.

pci_hotplug: PCI Hot Plug PCI Core version: 0.5

NET4: Linux TCP/IP 1.0 for NET4.0

IP Protocols: ICMP, UDP, TCP, IGMP

IP: routing cache hash table of 4096 buckets, 32Kbytes

TCP: Hash tables configured (established 32768 bind 32768)

NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.

ds: no socket drivers loaded!

kjournald starting.  Commit interval 5 seconds

EXT3-fs: mounted filesystem with ordered data mode.

VFS: Mounted root (ext3 filesystem) readonly.

Mounted devfs on /dev

Freeing unused kernel memory: 136k freed

spurious 8259A interrupt: IRQ7.

Adding Swap: 1004052k swap-space (priority -1)

EXT3 FS 2.4-0.9.19, 19 August 2002 on ide0(3,3), internal journal

via-rhine.c:v1.10-LK1.1.14  May-3-2002  Written by Donald Becker

  http://www.scyld.com/network/via-rhine.html

PCI: Found IRQ 11 for device 00:12.0

PCI: Sharing IRQ 11 with 00:10.0

eth0: VIA VT6102 Rhine-II at 0xc800, 00:50:2c:05:6a:26, IRQ 11.

eth0: MII PHY found at address 1, status 0x782d advertising 01e1 Link 0021.

usb.c: unable to get major 180 for usb devices

usb.c: registered new driver usbdevfs

usb.c: registered new driver hub

uhci.c: USB Universal Host Controller Interface driver v1.1

kernel BUG at slab.c:816!

invalid operand: 0000

CPU:    0

EIP:    0010:[<c012e9e8>]    Not tainted

EFLAGS: 00010246

eax: 00000000   ebx: dfd7bdd8   ecx: dfd7bf38   edx: c15a96a4

esi: c15a969e   edi: e4a77b5d   ebp: 0000003c   esp: d8473ef0

ds: 0018   es: 0018   ss: 0018

Process modprobe (pid: 5397, stackpage=d8473000)

Stack: 00000000 00000038 fffffff4 00000001 00000001 ffffffea e4a7748a e4a77b4f

       0000003c 00000040 00000000 00000000 00000000 e4a73000 c011985e e4a78a98

       0808a4d8 000059d0 00000060 00000060 00000004 d8929740 d842f000 d8430000

Call Trace:    [<e4a7748a>] [<e4a77b4f>] [<c011985e>] [<e4a78a98>] [<e4a73060>]

  [<c0108a17>]

Code: 0f 0b 30 03 c2 cf 2b c0 8b 12 8b 02 0f 0d 00 81 fa ac 82 31

localhost root#
```

when I boot from the live cd it loads: usb-uhci & ehci-hcd I believe.

----------

## dragonx

I stand coreccted the live CD loads uhci and ehci-hcd.  On redhat it loads usb-uhci. But above is the problem I have with UHCI.  It segfaults any ideas?

----------

## PowerFactor

Odd, looks like a bug. I've never had any usb problems with gentoo-sources or vanilla-sources. But I haven't tried any of the others.

----------

## dragonx

I'm using gentoo sources.  I know it's not hardware problem because other distros work just fine with my usb ports.

Any other suggestions?

----------

## PowerFactor

Well, looking at your dmesg again I see something strange.  It looks as if you have usbcore ehci-hcd and uhci compiled in your kernel as well as compiled as modules. Something isn't right about that.  Did you have /boot mounted when you cped the bzImage? Anyway the drivers compiled in the kernel seem to be initializing fine according to the messages.  You just can't insert a module for a device which has already been clamed by a built-in driver.

----------

## dragonx

Thanks for all the help!  You were right.  I forgot that I have in my fstab not to mount the boot partition.  I recompiled the modules and mounted /boot and it works perfect!!!  One thing I love about Gentoo is all the help people give one another!

----------

