# USB Mass Storage Problems

## uncle_snack

I'm having problems with my new USB hard drive.  I'm running kernel 2.6.7, and I believe I have all the required modules installed. My hard drive doesn't appear to be detected, though. I've read some howtos on the subject, and they have given me the following hints:

1) look in /var/log/messages for signs of detection or something. It says this:

Jul 20 21:12:52 gentoo Assuming someone else called the IRQ

Jul 20 21:13:02 gentoo Assuming someone else called the IRQ

Jul 20 21:13:23 gentoo Assuming someone else called the IRQ

Jul 20 21:14:24 gentoo Assuming someone else called the IRQ

Jul 20 21:14:34 gentoo Assuming someone else called the IRQ

Jul 20 21:16:27 gentoo Assuming someone else called the IRQ

Jul 20 21:16:58 gentoo Assuming someone else called the IRQ

Jul 20 21:17:08 gentoo Assuming someone else called the IRQ

2) check in /dev for sda?. there are no sda's in /dev/. however, there is an empty scsi directory, and an empty usb directory. hmmm.

Just for the record, I have a usb mouse which is working fine. 

I also read something on these forums about IRQs. I ran lspci -v and got the following ouput

0000:00:00.0 Host bridge: ALi Corporation M1644/M1644T Northbridge+Trident (rev 01)

        Flags: bus master, medium devsel, latency 0

        Memory at f0000000 (32-bit, prefetchable)

        Capabilities: [b0] AGP version 2.0

        Capabilities: [a4] Power Management version 1

0000:00:01.0 PCI bridge: ALi Corporation PCI to AGP Controller (prog-if 00 [Normal decode])

        Flags: bus master, slow devsel, latency 0

        Bus: primary=00, secondary=01, subordinate=01, sec-latency=0

        Memory behind bridge: f7f00000-fdffffff

0000:00:02.0 USB Controller: ALi Corporation USB 1.1 Controller (rev 03) (prog-if 10 [OHCI])

        Subsystem: Toshiba America Info Systems: Unknown device 0004

        Flags: bus master, medium devsel, latency 64, IRQ 11

        Memory at f7eff000 (32-bit, non-prefetchable)

        Capabilities: [60] Power Management version 2

0000:00:04.0 IDE interface: ALi Corporation M5229 IDE (rev c3) (prog-if f0)

        Subsystem: Toshiba America Info Systems: Unknown device 0004

        Flags: bus master, medium devsel, latency 64

        I/O ports at eff0 [size=16]

        Capabilities: [60] Power Management version 2

0000:00:06.0 Multimedia audio controller: ALi Corporation M5451 PCI AC-Link Controller Audio Device (rev 01)

        Subsystem: Toshiba America Info Systems: Unknown device 0001

        Flags: bus master, medium devsel, latency 64, IRQ 11

        I/O ports at 1000

        Memory at 10000000 (32-bit, non-prefetchable) [size=4K]

        Capabilities: [dc] Power Management version 2

0000:00:07.0 ISA bridge: ALi Corporation M1533 PCI to ISA Bridge [Aladdin IV]

        Subsystem: Toshiba America Info Systems: Unknown device 0004

        Flags: bus master, medium devsel, latency 0

        Capabilities: [a0] Power Management version 1

0000:00:08.0 Bridge: ALi Corporation M7101 Power Management Controller [PMU]

        Subsystem: Toshiba America Info Systems: Unknown device 0001

        Flags: medium devsel

0000:00:0a.0 Ethernet controller: Intel Corp. 82557/8/9 [Ethernet Pro 100] (rev 0d)

        Subsystem: Toshiba America Info Systems 8255x-based Ethernet Adapter (10/100)

        Flags: bus master, medium devsel, latency 64, IRQ 11

        Memory at f7efe000 (32-bit, non-prefetchable)

        I/O ports at ef40 [size=64]

        Memory at f7ec0000 (32-bit, non-prefetchable) [size=128K]

        Capabilities: [dc] Power Management version 2

0000:00:11.0 CardBus bridge: Toshiba America Info Systems ToPIC95 PCI to Cardbus Bridge with ZV Support (rev 32)

        Subsystem: Toshiba America Info Systems: Unknown device 0001

        Flags: bus master, slow devsel, latency 168, IRQ 11

        Memory at 10001000 (32-bit, non-prefetchable)

        Bus: primary=00, secondary=02, subordinate=05, sec-latency=0

        Memory window 0: 10400000-107ff000 (prefetchable)

        Memory window 1: 10800000-10bff000

        I/O window 0: 00004000-000040ff

        I/O window 1: 00004400-000044ff

        16-bit legacy interface ports at 0001

0000:00:11.1 CardBus bridge: Toshiba America Info Systems ToPIC95 PCI to Cardbus Bridge with ZV Support (rev 32)

        Subsystem: Toshiba America Info Systems: Unknown device 0001

        Flags: bus master, slow devsel, latency 168, IRQ 11

        Memory at 10002000 (32-bit, non-prefetchable)

        Bus: primary=00, secondary=06, subordinate=09, sec-latency=0

        Memory window 0: 10c00000-10fff000 (prefetchable)

        Memory window 1: 11000000-113ff000

        I/O window 0: 00004800-000048ff

        I/O window 1: 00004c00-00004cff

        16-bit legacy interface ports at 0001

0000:01:00.0 VGA compatible controller: Trident Microsystems CyberBlade XPAi1 (rev 82) (prog-if 00 [VGA])

        Subsystem: Toshiba America Info Systems: Unknown device 0001

        Flags: bus master, 66Mhz, medium devsel, latency 8, IRQ 11

        Memory at fc000000 (32-bit, non-prefetchable)

        Memory at fbc00000 (32-bit, non-prefetchable) [size=4M]

        Memory at f8000000 (32-bit, non-prefetchable) [size=32M]

        Memory at f7ff8000 (32-bit, non-prefetchable) [size=32K]

        Capabilities: [80] AGP version 2.0

        Capabilities: [90] Power Management version 2

0000:06:00.0 Network controller: Intersil Corporation Intersil ISL3890 [Prism GT/Prism Duette] (rev 01)

        Subsystem: Netgear: Unknown device 4800

        Flags: bus master, medium devsel, latency 80, IRQ 11

        Memory at 11000000 (32-bit, non-prefetchable)

        Capabilities: [dc] Power Management version 1

I also checked /proc/interrupts, which gave me:

           CPU0

  0:    1819933          XT-PIC  timer

  1:       3146          XT-PIC  i8042

  2:          0          XT-PIC  cascade

 11:      81857          XT-PIC  yenta, yenta, ALI 5451, eth1

 12:      67696          XT-PIC  i8042

 14:      14467          XT-PIC  ide0

 15:         29          XT-PIC  ide1

NMI:          0

ERR:          0

So it appears that almost everything is using IRQ 11, and perhaps that's why my USB hard drive isn't working (but how could everything else be working smoothly?).  I'm wondering if this is indeed the problem, or if it could be something else. And if it is the IRQs, how do I go about correcting that problem? thanks a lot for any insights you can give me.

----------

## sulu

ALI-Chipset:

I think you have to use OHCI and not UHCI as USB-Driver in yout kernel-options.

The USB-Susbsystem should show up in /var/log/messages after booting the system. What dou you find there ?

Please show us your USB-Kernel-Configuration

----------

## lbrtuk

Running dmesg is going to give you the information you want.

----------

## uncle_snack

Here's my dmesg output. 

Linux version 2.6.7-gentoo-r3 (root@gentoo) (gcc version 3.3.3 20040412 (Gentoo Linux 3.3.3-r6, ssp-3.3.2-2, pie-8.7.6)) #4 Tue Jul 20 20:44:22 UTC 2004

BIOS-provided physical RAM map:

 BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)

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

 BIOS-e820: 00000000000e0000 - 00000000000eee00 (reserved)

 BIOS-e820: 00000000000eee00 - 00000000000ef000 (ACPI NVS)

 BIOS-e820: 00000000000ef000 - 0000000000100000 (reserved)

 BIOS-e820: 0000000000100000 - 000000000eff0000 (usable)

 BIOS-e820: 000000000eff0000 - 000000000f000000 (ACPI data)

 BIOS-e820: 000000000f000000 - 0000000010000000 (reserved)

 BIOS-e820: 00000000fff80000 - 0000000100000000 (reserved)

239MB LOWMEM available.

On node 0 totalpages: 61424

  DMA zone: 4096 pages, LIFO batch:1

  Normal zone: 57328 pages, LIFO batch:13

  HighMem zone: 0 pages, LIFO batch:1

DMI 2.3 present.

ACPI: RSDP (v000 TOSHIB                                    ) @ 0x000f0090

ACPI: RSDT (v001 TOSHIB 750      0x00970814 TASM 0x04010000) @ 0x0eff0000

ACPI: FADT (v002 TOSHIB 750      0x00970814 TASM 0x04010000) @ 0x0eff0054

ACPI: BOOT (v001 TOSHIB 750      0x00970814 TASM 0x04010000) @ 0x0eff002c

ACPI: DSDT (v001 TOSHIB 1800     0x20010911 MSFT 0x01000007) @ 0x00000000

Built 1 zonelists

Kernel command line: root=/dev/hda2

Initializing CPU#0

PID hash table entries: 1024 (order 10: 8192 bytes)

Detected 995.929 MHz processor.

Using tsc for high-res timesource

Console: colour VGA+ 80x25

Memory: 240192k/245696k available (1766k kernel code, 4784k reserved, 756k data, 128k init, 0k highmem)

Checking if this processor honours the WP bit even in supervisor mode... Ok.

Calibrating delay loop... 1957.88 BogoMIPS

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

Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)

Mount-cache hash table entries: 512 (order: 0, 4096 bytes)

CPU:     After generic identify, caps: 0383f9ff 00000000 00000000 00000000

CPU:     After vendor identify, caps: 0383f9ff 00000000 00000000 00000000

CPU: L1 I cache: 16K, L1 D cache: 16K

CPU: L2 cache: 128K

CPU:     After all inits, caps: 0383f9ff 00000000 00000000 00000040

Intel machine check architecture supported.

Intel machine check reporting enabled on CPU#0.

CPU: Intel Celeron (Coppermine) stepping 0a

Enabling fast FPU save and restore... done.

Enabling unmasked SIMD FPU exception support... done.

Checking 'hlt' instruction... OK.

NET: Registered protocol family 16

PCI: PCI BIOS revision 2.10 entry at 0xfe34a, last bus=5

PCI: Using configuration type 1

mtrr: v2.0 (20020519)

Linux Plug and Play Support v0.97 (c) Adam Belay

Toshiba System Managment Mode driver v1.11 26/9/2001

SCSI subsystem initialized

Linux Kernel Card Services

  options:  [pci] [cardbus] [pm]

usbcore: registered new driver hub

PCI: Probing PCI hardware

PCI: Probing PCI hardware (bus 00)

PCI: Using ALI IRQ Router

PCI: Using IRQ router ALI [10b9/1533] at 0000:00:07.0

PCI: IRQ 0 for device 0000:00:06.0 doesn't match PIRQ mask - try pci=usepirqmask

PCI: Found IRQ 11 for device 0000:00:06.0

PCI: IRQ 0 for device 0000:00:11.0 doesn't match PIRQ mask - try pci=usepirqmask

PCI: Found IRQ 11 for device 0000:00:11.0

PCI: IRQ 0 for device 0000:00:11.1 doesn't match PIRQ mask - try pci=usepirqmask

PCI: Found IRQ 11 for device 0000:00:11.1

Simple Boot Flag at 0x7c set to 0x1

devfs: 2004-01-31 Richard Gooch (rgooch@atnf.csiro.au)

devfs: boot_options: 0x1

Initializing Cryptographic API

Activating ISA DMA hang workarounds.

pci_hotplug: PCI Hot Plug PCI Core version: 0.5

isapnp: Scanning for PnP cards...

isapnp: No Plug & Play device found

mice: PS/2 mouse device common for all mice

serio: i8042 AUX port at 0x60,0x64 irq 12

input: PS/2 Generic Mouse on isa0060/serio1

serio: i8042 KBD port at 0x60,0x64 irq 1

input: AT Translated Set 2 keyboard on isa0060/serio0

Linux agpgart interface v0.100 (c) Dave Jones

agpgart: Detected ALi M1644 chipset

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

agpgart: AGP aperture is 64M @ 0xf0000000

Using anticipatory io scheduler

Floppy drive(s): fd0 is 1.44M

FDC 0 is a post-1991 82077

eepro100.c:v1.09j-t 9/29/99 Donald Becker http://www.scyld.com/network/eepro100.html

eepro100.c: $Revision: 1.36 $ 2000/11/17 Modified by Andrey V. Savochkin <saw@saw.sw.com.sg> and others

PCI: Found IRQ 11 for device 0000:00:0a.0

eth0: OEM i82557/i82558 10/100 Ethernet, 00:00:39:5A:F2:CE, IRQ 11.

  Board assembly 000000-000, Physical connectors present: RJ45

  Primary interface chip i82555 PHY #1.

  General self-test: passed.

  Serial sub-system self-test: passed.

  Internal registers self-test: passed.

  ROM checksum self-test: passed (0xb874c1d3).

Loaded prism54 driver, version 1.1

Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2

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

ALI15X3: IDE controller at PCI slot 0000:00:04.0

ALI15X3: chipset revision 195

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

    ide0: BM-DMA at 0xeff0-0xeff7, BIOS settings: hda:DMA, hdb:pio

    ide1: BM-DMA at 0xeff8-0xefff, BIOS settings: hdc:DMA, hdd:pio

hda: IC25N020ATDA04-0, ATA DISK drive

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

hdc: DV-28E-B, ATAPI CD/DVD-ROM drive

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

hda: max request size: 128KiB

hda: 39070080 sectors (20003 MB) w/1806KiB Cache, CHS=38760/16/63, UDMA(33)

 /dev/ide/host0/bus0/target0/lun0: p1 p2 p3 p4 < p5 p6 p7 p8 >

hdc: ATAPI 24X DVD-ROM drive, 256kB Cache, UDMA(33)

Uniform CD-ROM driver Revision: 3.20

PCI: Found IRQ 11 for device 0000:00:11.0

Yenta: CardBus bridge found at 0000:00:11.0 [1179:0001]

Yenta: ISA IRQ mask 0x06b8, PCI irq 11

Socket status: 30000007

PCI: Found IRQ 11 for device 0000:00:11.1

Yenta: CardBus bridge found at 0000:00:11.1 [1179:0001]

Yenta: ISA IRQ mask 0x06b8, PCI irq 11

Socket status: 30000020

Initializing USB Mass Storage driver...

usbcore: registered new driver usb-storage

USB Mass Storage support registered.

Advanced Linux Sound Architecture Driver Version 1.0.4 (Mon May 17 14:31:44 2004 UTC).

ALSA device list:

  No soundcards found.

NET: Registered protocol family 2

IP: routing cache hash table of 2048 buckets, 16Kbytes

TCP: Hash tables configured (established 16384 bind 32768)

NET: Registered protocol family 1

NET: Registered protocol family 17

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: 128k freed

PCI: Enabling device 0000:06:00.0 (0000 -> 0002)

eth1: prism54 driver detected card model: Netgear WG511

Adding 497972k swap on /dev/hda6.  Priority:-1 extents:1

EXT3 FS on hda2, internal journal

loop: loaded (max 8 devices)

kjournald starting.  Commit interval 5 seconds

EXT3 FS on hda3, internal journal

EXT3-fs: mounted filesystem with ordered data mode.

kjournald starting.  Commit interval 5 seconds

EXT3-fs warning: maximal mount count reached, running e2fsck is recommended

EXT3 FS on hda5, internal journal

EXT3-fs: mounted filesystem with ordered data mode.

kjournald starting.  Commit interval 5 seconds

EXT3 FS on hda7, internal journal

EXT3-fs: mounted filesystem with ordered data mode.

kjournald starting.  Commit interval 5 seconds

EXT3 FS on hda8, internal journal

EXT3-fs: mounted filesystem with ordered data mode.

PCI: Enabling device 0000:00:06.0 (0000 -> 0003)

PCI: Found IRQ 11 for device 0000:00:06.0

cs: IO port probe 0x0c00-0x0cff: clean.

cs: IO port probe 0x0800-0x08ff: clean.

cs: IO port probe 0x0100-0x04ff: excluding 0x200-0x207 0x220-0x22f 0x330-0x337 0x378-0x37f 0x388-0x38f 0x3f8-0x3ff 0x408-0x40f 0x480-0x48f 0x4d0-0x4d7

cs: IO port probe 0x0a00-0x0aff: clean.

atkbd.c: Spurious ACK on isa0060/serio0. Some program, like XFree86, might be trying access hardware directly.

atkbd.c: Spurious ACK on isa0060/serio0. Some program, like XFree86, might be trying access hardware directly.

Assuming someone else called the IRQ

Assuming someone else called the IRQ

Assuming someone else called the IRQ

eth1: hot unplug detected

eth1: removing device

Assuming someone else called the IRQ

PCI: Enabling device 0000:06:00.0 (0000 -> 0002)

eth1: prism54 driver detected card model: Netgear WG511

eth1: prism54_set_txpower() auto power will be implemented later.

eth1: islpci_open()

eth1: resetting device...

eth1: uploading firmware...

eth1: firmware uploaded done, now triggering reset...

eth1: islpci_close ()

eth1: islpci_open()

eth1: resetting device...

eth1: uploading firmware...

eth1: firmware uploaded done, now triggering reset...

Assuming someone else called the IRQ

Assuming someone else called the IRQ

Assuming someone else called the IRQ

Assuming someone else called the IRQ

Assuming someone else called the IRQ

Assuming someone else called the IRQ

Assuming someone else called the IRQ

Assuming someone else called the IRQ

Assuming someone else called the IRQ

Assuming someone else called the IRQ

Assuming someone else called the IRQ

Assuming someone else called the IRQ

Assuming someone else called the IRQ

Assuming someone else called the IRQ

Assuming someone else called the IRQ

Assuming someone else called the IRQ

Assuming someone else called the IRQ

Assuming someone else called the IRQ

Assuming someone else called the IRQ

Assuming someone else called the IRQ

Assuming someone else called the IRQ

Assuming someone else called the IRQ

Assuming someone else called the IRQ

Assuming someone else called the IRQ

Assuming someone else called the IRQ

Assuming someone else called the IRQ

Assuming someone else called the IRQ

Assuming someone else called the IRQ

Assuming someone else called the IRQ

Assuming someone else called the IRQ

Assuming someone else called the IRQ

Assuming someone else called the IRQ

Assuming someone else called the IRQ

Assuming someone else called the IRQ

Assuming someone else called the IRQ

Assuming someone else called the IRQ

----------

## uncle_snack

I rebuilt my kernel with OHCI, and it broke my usb mouse. So I took it back out. In the config, there are modules for EHCI, OHCI, and UHCI. currently none are selected. I found these messages in /var/log/messages:

Initializing USB Mass Storage driver...

usb.c: registered new driver usb-storage

USB Mass Storage support registered.

----------

## sulu

Hmmmm...

I have enabled Debugging in usb-storage so my output in the logs is a bit cluttered.

Anyway, i am using aprox. the same kernel (2.6.7-gentoo-r6) so it should work.

lspci shows the following USB-controller:

USB Controller: ALi Corporation USB 1.1 Controller (rev 03)

Do you have the same USB-controller ?

I emerged udev and removed devfs in the kernel config.

I also emerged hotplug.

lsusb (do you have that ?) shows

Bus 001 Device 005: ID 045e:0053 Microsoft Corp. 

Bus 001 Device 004: ID 0d7d:1620 Apacer 

Bus 001 Device 003: ID 05e3:0702 Genesys Logic, Inc. 

Bus 001 Device 002: ID 0409:0059 NEC Corp. 

Bus 001 Device 001: ID 0000:0000  

So you see its working here.

Do emerge lsusb if you havent allready (emerge sys-apps/usbutils)

Especially lsusb -v provides a lot of information about your USB-Subsystem.

Anything else 

 :Rolling Eyes: 

Maybe my kernel-config tells you something

#

# USB support

#

CONFIG_USB=y

CONFIG_USB_DEBUG=y

#

# Miscellaneous USB options

#

CONFIG_USB_DEVICEFS=y

# CONFIG_USB_BANDWIDTH is not set

# CONFIG_USB_DYNAMIC_MINORS is not set

#

# USB Host Controller Drivers

#

CONFIG_USB_EHCI_HCD=y

# CONFIG_USB_EHCI_SPLIT_ISO is not set

# CONFIG_USB_EHCI_ROOT_HUB_TT is not set

CONFIG_USB_OHCI_HCD=y

# CONFIG_USB_UHCI_HCD is not set

#

# USB Device Class drivers

#

# CONFIG_USB_AUDIO is not set

# CONFIG_USB_BLUETOOTH_TTY is not set

# CONFIG_USB_MIDI is not set

# CONFIG_USB_ACM is not set

CONFIG_USB_PRINTER=y

CONFIG_USB_STORAGE=y

CONFIG_USB_STORAGE_DEBUG=y

# CONFIG_USB_STORAGE_DATAFAB is not set

# CONFIG_USB_STORAGE_FREECOM is not set

# CONFIG_USB_STORAGE_ISD200 is not set

# CONFIG_USB_STORAGE_DPCM is not set

# CONFIG_USB_STORAGE_HP8200e is not set

# CONFIG_USB_STORAGE_SDDR09 is not set

# CONFIG_USB_STORAGE_SDDR55 is not set

# CONFIG_USB_STORAGE_JUMPSHOT is not set

#

# USB Human Interface Devices (HID)

#

CONFIG_USB_HID=y

CONFIG_USB_HIDINPUT=y

# CONFIG_HID_FF is not set

# CONFIG_USB_HIDDEV is not set

# CONFIG_USB_AIPTEK is not set

# CONFIG_USB_WACOM is not set

# CONFIG_USB_KBTAB is not set

# CONFIG_USB_POWERMATE is not set

# CONFIG_USB_MTOUCH is not set

CONFIG_USB_EGALAX=m

# CONFIG_USB_XPAD is not set

# CONFIG_USB_ATI_REMOTE is not set

----------

## uncle_snack

I have lsusb, but when I run it I get the following error:

cannot open /proc/bus/usb, No such file or directory (2)

----------

## sulu

Then no USB-System is available on your System.

Is the USB-mouse working?

What happens if you modprobe usb-ohci manually ?

----------

## uncle_snack

Alright! It turns out that when I use ohci-hcd, my usb hard drive works correctly! However, my usb mouse stops working. Any ideas?

----------

## sulu

Hmmmm...

Cant you have a nice little problem easy to solve in order to lift my ego ?

You dont, Ok, back to business.   :Cool: 

Your mouse dissapears after you modprobed ohci-hcd i guess.

Did you try to unplug/plug the mouse after loading ohci-hcd  ?

Do a lsusb -v before and after loading ohci-hcd to check whether the mouse has dissapeared suddenly. Maybe the mapping of the devices does not work properly. 

Keep me informed, eventually well fix it.

----------

## uncle_snack

unplugging and replugging the mouse did not help. when I ran lsusb -v, I got the same error I mentioned above:

cannot open /proc/bus/usb, No such file or directory (2)

thanks a lot for your help

----------

## sulu

The USB subsystem can be a bitch sometimes. At my box i had to plug out the memory stick ohterwis my USB-Disc was not detected, no  way.  So sou see i have sometimes problems by myself.

But what can we do.

Did your setup worked once (e. g. Kernel 2.4)?

Could you give me the brand-names of the USB-devices you want to use.

Maybe a search at  http://www.mail-archive.com/linux-usb-devel%40lists.sourceforge.net/

gives you som clue about what to do.

I think the mapping off your USB-Devices does not work.

You could enable debugging in your kernel setup.

CONFIG_USB_DEBUG=y

Another one:

Can you reload  usbmouse Kernel_module ?

Edit:

This could be the solution:

```

CONFIG_USB_HIDDEV=y  

```

----------

