# USB hard disk drive I/O failure

## Sparrowmelody

Greetings everyone  :Smile: 

I have asked for this a few times in the IRC channel, but haven't found a proper solution yet...so I am resorting to a post here, maybe someone knows how to help me with this.

I have a USB 2.0 HDD. I normally use it to be able to transfer data from my work to home or the opposite. When the drive is connected at work, I use it to do several tasks, and works fine.

However, at home, in my linux system, the drive disconnects suddenly under certain workloads (copying a big file) and at times while playing a video. To ensure this wasn't hardware-based, I tried a windows install to check, it worked flawlessly after a 12-hour (scripted) test copying a 1gb file back and forth. 

So, I assume this is a configuration error or a kernel error of sorts.

Right now I am using the 2.6.15 kernel, with ehci_uhd enabled, scsi generic support etc etc etc (everything works normally, including a small thumbdrive and a mp3 player, a PSX/PS2 pad adaptor and a genius tablet). udev is the

last masked one (with a tree updated on day 15). The system is flawless in most aspects as far as I can tell.

The drive is 80gb in size, with 3 VFAT partitions (of the maximum possible size from windows XP format) (was done like this instead of a better one for portability reasons: I am forced to work in a windows XP environment at work, and I am not too aware of the status of NTFS drivers in linux so far, so I opted for the easiest solution).

Here's the output of dmesg after a disconnection (took a few days ago before updating to 2.6.15, but it's mostly the same).

```

t FPU save and restore... done.

Enabling unmasked SIMD FPU exception support... done.

Checking 'hlt' instruction... OK.

ENABLING IO-APIC IRQs

..TIMER: vector=0x31 pin1=2 pin2=0

NET: Registered protocol family 16

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

PCI: Using configuration type 1

SCSI subsystem initialized

usbcore: registered new driver usbfs

usbcore: registered new driver hub

PCI: Probing PCI hardware

PCI: Probing PCI hardware (bus 00)

Boot video device is 0000:01:00.0

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

PCI->APIC IRQ transform: 0000:00:0b.0[A] -> IRQ 19

PCI->APIC IRQ transform: 0000:00:0b.1[A] -> IRQ 19

PCI->APIC IRQ transform: 0000:00:10.0[A] -> IRQ 21

PCI->APIC IRQ transform: 0000:00:10.1[A] -> IRQ 21

PCI->APIC IRQ transform: 0000:00:10.2[B] -> IRQ 21

PCI->APIC IRQ transform: 0000:00:10.3[B] -> IRQ 21

PCI->APIC IRQ transform: 0000:00:10.4[C] -> IRQ 21

PCI->APIC IRQ transform: 0000:00:11.5[C] -> IRQ 22

PCI->APIC IRQ transform: 0000:00:12.0[A] -> IRQ 23

PCI->APIC IRQ transform: 0000:01:00.0[A] -> IRQ 16

PCI: Bridge: 0000:00:01.0

  IO window: disabled.

  MEM window: e0000000-e1ffffff

  PREFETCH window: d8000000-dfffffff

PCI: Setting latency timer of device 0000:00:01.0 to 64

apm: BIOS version 1.2 Flags 0x07 (Driver version 1.16ac)

PCI: Bypassing VIA 8237 APIC De-Assert Message

lp: driver loaded but no devices found

Real Time Clock Driver v1.12

Linux agpgart interface v0.101 (c) Dave Jones

agpgart: Detected VIA KT400/KT400A/KT600 chipset

agpgart: AGP aperture is 128M @ 0xd0000000

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

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

Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled

ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A

ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A

parport0: PC-style at 0x378 [PCSPP,TRISTATE]

lp0: using parport0 (polling).

io scheduler noop registered

io scheduler cfq registered

Floppy drive(s): fd0 is 1.44M

FDC 0 is a post-1991 82077

loop: loaded (max 8 devices)

pktcdvd: v0.2.0a 2004-07-14 Jens Axboe (axboe@suse.de) and petero2@telia.com

PPP generic driver version 2.4.2

PPP Deflate Compression module registered

PPP BSD Compression module registered

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

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

VP_IDE: IDE controller at PCI slot 0000:00:0f.0

PCI: Via IRQ fixup for 0000:00:0f.0, from 255 to 0

VP_IDE: chipset revision 6

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

VP_IDE: VIA vt8237 (rev 00) IDE UDMA133 controller on pci0000:00:0f.0

    ide0: BM-DMA at 0xd000-0xd007, BIOS settings: hda:DMA, hdb:DMA

    ide1: BM-DMA at 0xd008-0xd00f, BIOS settings: hdc:pio, hdd:DMA

Probing IDE interface ide0...

hda: ST380011A, ATA DISK drive

hdb: HL-DT-ST CD-ROM GCR-8522B, ATAPI CD/DVD-ROM drive

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

Probing IDE interface ide1...

hdd: HL-DT-ST DVDRAM GSA-4082B, ATAPI CD/DVD-ROM drive

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

hda: max request size: 1024KiB

hda: Host Protected Area detected.

   current capacity is 156299375 sectors (80025 MB)

   native  capacity is 156301488 sectors (80026 MB)

hda: Host Protected Area disabled.

hda: 156301488 sectors (80026 MB) w/2048KiB Cache, CHS=16383/255/63, UDMA(100)

hda: cache flushes supported

 hda: hda1 hda2 hda3

hdb: ATAPI 52X CD-ROM drive, 128kB Cache, DMA

Uniform CD-ROM driver Revision: 3.20

hdd: ATAPI 63X DVD-ROM DVD-R-RAM CD-R/RW drive, 2048kB Cache, UDMA(33)

usbmon: debugfs is not available

ehci_hcd 0000:00:10.4: EHCI Host Controller

ehci_hcd 0000:00:10.4: new USB bus registered, assigned bus number 1

ehci_hcd 0000:00:10.4: irq 21, io mem 0xe2002000

ehci_hcd 0000:00:10.4: USB 2.0 initialized, EHCI 1.00, driver 10 Dec 2004

hub 1-0:1.0: USB hub found

hub 1-0:1.0: 8 ports detected

USB Universal Host Controller Interface driver v2.3

PCI: Via IRQ fixup for 0000:00:10.0, from 11 to 5

uhci_hcd 0000:00:10.0: UHCI Host Controller

uhci_hcd 0000:00:10.0: new USB bus registered, assigned bus number 2

uhci_hcd 0000:00:10.0: irq 21, io base 0x0000d400

hub 2-0:1.0: USB hub found

hub 2-0:1.0: 2 ports detected

PCI: Via IRQ fixup for 0000:00:10.1, from 11 to 5

uhci_hcd 0000:00:10.1: UHCI Host Controller

uhci_hcd 0000:00:10.1: new USB bus registered, assigned bus number 3

uhci_hcd 0000:00:10.1: irq 21, io base 0x0000d800

hub 3-0:1.0: USB hub found

hub 3-0:1.0: 2 ports detected

PCI: Via IRQ fixup for 0000:00:10.2, from 11 to 5

uhci_hcd 0000:00:10.2: UHCI Host Controller

uhci_hcd 0000:00:10.2: new USB bus registered, assigned bus number 4

uhci_hcd 0000:00:10.2: irq 21, io base 0x0000dc00

hub 4-0:1.0: USB hub found

hub 4-0:1.0: 2 ports detected

PCI: Via IRQ fixup for 0000:00:10.3, from 11 to 5

uhci_hcd 0000:00:10.3: UHCI Host Controller

uhci_hcd 0000:00:10.3: new USB bus registered, assigned bus number 5

uhci_hcd 0000:00:10.3: irq 21, io base 0x0000e000

hub 5-0:1.0: USB hub found

hub 5-0:1.0: 2 ports detected

Initializing USB Mass Storage driver...

usb 2-2: new low speed USB device using uhci_hcd and address 2

usbcore: registered new driver usb-storage

USB Mass Storage support registered.

usbcore: registered new driver hiddev

input,hiddev96: USB HID v1.00 Mouse [UC-LOGIC Tablet WP4030U] on usb-0000:00:10.0-2

usbcore: registered new driver usbhid

drivers/usb/input/hid-core.c: v2.6:USB HID core driver

mice: PS/2 mouse device common for all mice

input: PC Speaker

NET: Registered protocol family 2

input: AT Translated Set 2 keyboard on isa0060/serio0

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

TCP established hash table entries: 131072 (order: 7, 524288 bytes)

TCP bind hash table entries: 65536 (order: 6, 262144 bytes)

TCP: Hash tables configured (established 131072 bind 65536)

TCP reno registered

TCP bic registered

NET: Registered protocol family 1

NET: Registered protocol family 10

IPv6 over IPv4 tunneling driver

NET: Registered protocol family 17

Using IPI Shortcut mode

EXT3-fs: INFO: recovery required on readonly filesystem.

EXT3-fs: write access will be enabled during recovery.

input: ImPS/2 Generic Wheel Mouse on isa0060/serio1

EXT3-fs: hda2: orphan cleanup on readonly fs

ext3_orphan_cleanup: deleting unreferenced inode 4347368

EXT3-fs: hda2: 1 orphan inode deleted

EXT3-fs: recovery complete.

kjournald starting.  Commit interval 5 seconds

EXT3-fs: mounted filesystem with ordered data mode.

VFS: Mounted root (ext3 filesystem) readonly.

Freeing unused kernel memory: 160k freed

Adding 289160k swap on /dev/hda3.  Priority:-1 extents:1 across:289160k

EXT3 FS on hda2, internal journal

nvidia: module license 'NVIDIA' taints kernel.

NVRM: loading NVIDIA Linux x86 NVIDIA Kernel Module  1.0-6629  Wed Nov  3 13:12:51 PST 2004

Linux video capture interface: v1.00

bttv: driver version 0.9.16 loaded

bttv: using 8 buffers with 2080k (520 pages) each for capture

bttv: Bt8xx card found (0).

bttv0: Bt878 (rev 17) at 0000:00:0b.0, irq: 19, latency: 32, mmio: 0xe2000000

bttv0: detected: Hauppauge WinTV [card=10], PCI subsystem ID is 0070:13eb

bttv0: using: Hauppauge (bt878) [card=10,autodetected]

bttv0: gpio: en=00000000, out=00000000 in=00ffffdb [init]

bttv0: Hauppauge/Voodoo msp34xx: reset line init [5]

tveeprom 0-0050: Hauppauge model 44804, rev D148, serial# 7123125

tveeprom 0-0050: tuner model is LG TP18PSB11D (idx 48, type 29)

tveeprom 0-0050: TV standards PAL(B/G) (eeprom 0x04)

tveeprom 0-0050: audio processor is None (idx 0)

tveeprom 0-0050: has no radio

bttv0: using tuner=29

bttv0: i2c: checking for MSP34xx @ 0x80... not found

bttv0: i2c: checking for TDA9875 @ 0xb0... not found

bttv0: i2c: checking for TDA7432 @ 0x8a... not found

bttv0: i2c: checking for TDA9887 @ 0x86... not found

tuner 0-0061: chip found @ 0xc2 (bt878 #0 [sw])

tuner 0-0061: type set to 29 (LG PAL_BG (TPI8PSB11D))

bttv0: registered device video0

bttv0: registered device vbi0

bttv0: PLL: 28636363 => 35468950 .. ok

PCI: Via IRQ fixup for 0000:00:11.5, from 5 to 6

PCI: Setting latency timer of device 0000:00:11.5 to 64

via-rhine.c:v1.10-LK1.2.0-2.6 June-10-2004 Written by Donald Becker

PCI: Via IRQ fixup for 0000:00:12.0, from 11 to 7

eth0: VIA Rhine II at 0x1e800, 00:0f:ea:14:eb:65, IRQ 23.

eth0: MII PHY found at address 1, status 0x7849 advertising 05e1 Link 0000.

usb 1-5: new high speed USB device using ehci_hcd and address 3

scsi0 : SCSI emulation for USB Mass Storage devices

usb-storage: device found at 3

usb-storage: waiting for device to settle before scanning

  Vendor: HDS72808  Model: 0PLAT20           Rev: PF2O

  Type:   Direct-Access                      ANSI SCSI revision: 00

SCSI device sda: 160836480 512-byte hdwr sectors (82348 MB)

sda: assuming drive cache: write through

SCSI device sda: 160836480 512-byte hdwr sectors (82348 MB)

sda: assuming drive cache: write through

 sda: sda1 sda2 sda3

Attached scsi disk sda at scsi0, channel 0, id 0, lun 0

Attached scsi generic sg0 at scsi0, channel 0, id 0, lun 0,  type 0

usb-storage: device scan complete

agpgart: Found an AGP 3.5 compliant device at 0000:00:00.0.

agpgart: X tried to set rate=x12. Setting to AGP3 x8 mode.

agpgart: Putting AGP V3 device at 0000:00:00.0 into 8x mode

agpgart: Putting AGP V3 device at 0000:01:00.0 into 8x mode

agpgart: Found an AGP 3.5 compliant device at 0000:00:00.0.

agpgart: X tried to set rate=x12. Setting to AGP3 x8 mode.

agpgart: Putting AGP V3 device at 0000:00:00.0 into 8x mode

agpgart: Putting AGP V3 device at 0000:01:00.0 into 8x mode

usb 1-5: reset high speed USB device using ehci_hcd and address 3

usb 1-5: device descriptor read/64, error -71

usb 1-5: device descriptor read/64, error -71

usb 1-5: reset high speed USB device using ehci_hcd and address 3

usb 1-5: device descriptor read/64, error -71

usb 1-5: device descriptor read/64, error -71

usb 1-5: reset high speed USB device using ehci_hcd and address 3

usb 1-5: device not accepting address 3, error -71

usb 1-5: reset high speed USB device using ehci_hcd and address 3

usb 1-5: device not accepting address 3, error -71

usb 1-5: USB disconnect, address 3

scsi0 (0:0): rejecting I/O to device being removed

Buffer I/O error on device sda1, logical block 45655192

Buffer I/O error on device sda1, logical block 45655193

Buffer I/O error on device sda1, logical block 45655194

Buffer I/O error on device sda1, logical block 45655195

Buffer I/O error on device sda1, logical block 45655196

Buffer I/O error on device sda1, logical block 45655197

Buffer I/O error on device sda1, logical block 45655198

Buffer I/O error on device sda1, logical block 45655199

Buffer I/O error on device sda1, logical block 45655200

Buffer I/O error on device sda1, logical block 45655201

scsi0 (0:0): rejecting I/O to device being removed

sd 0:0:0:0: SCSI error: return code = 0x10000

end_request: I/O error, dev sda, sector 45655127

scsi0 (0:0): rejecting I/O to device being removed

scsi0 (0:0): rejecting I/O to device being removed

scsi0 (0:0): rejecting I/O to device being removed

usb 1-5: new high speed USB device using ehci_hcd and address 4

usb 1-5: device descriptor read/64, error -71

usb 1-5: device descriptor read/64, error -71

usb 1-5: new high speed USB device using ehci_hcd and address 5

usb 1-5: device descriptor read/64, error -71

usb 1-5: device descriptor read/64, error -71

usb 1-5: new high speed USB device using ehci_hcd and address 6

usb 1-5: device not accepting address 6, error -71

usb 1-5: new high speed USB device using ehci_hcd and address 7

usb 1-5: device not accepting address 7, error -71

scsi0 (0:0): rejecting I/O to dead device

scsi0 (0:0): rejecting I/O to dead device

FAT: Directory bread(block 32016) failed

scsi0 (0:0): rejecting I/O to dead device

FAT: Directory bread(block 32017) failed

scsi0 (0:0): rejecting I/O to dead device

FAT: Directory bread(block 32018) failed

scsi0 (0:0): rejecting I/O to dead device

FAT: Directory bread(block 32019) failed

scsi0 (0:0): rejecting I/O to dead device

FAT: Directory bread(block 32020) failed

scsi0 (0:0): rejecting I/O to dead device

FAT: Directory bread(block 32021) failed

scsi0 (0:0): rejecting I/O to dead device

FAT: Directory bread(block 32022) failed

scsi0 (0:0): rejecting I/O to dead device

FAT: Directory bread(block 32023) failed

scsi0 (0:0): rejecting I/O to dead device

FAT: Directory bread(block 32024) failed

scsi0 (0:0): rejecting I/O to dead device

FAT: Directory bread(block 32025) failed

scsi0 (0:0): rejecting I/O to dead device

FAT: Directory bread(block 32026) failed

scsi0 (0:0): rejecting I/O to dead device

FAT: Directory bread(block 32027) failed

scsi0 (0:0): rejecting I/O to dead device

FAT: Directory bread(block 32028) failed

scsi0 (0:0): rejecting I/O to dead device

FAT: Directory bread(block 32029) failed

scsi0 (0:0): rejecting I/O to dead device

FAT: Directory bread(block 32030) failed

scsi0 (0:0): rejecting I/O to dead device

FAT: Directory bread(block 32031) failed

scsi0 (0:0): rejecting I/O to dead device

FAT: Directory bread(block 32032) failed

scsi0 (0:0): rejecting I/O to dead device

FAT: Directory bread(block 32033) failed

scsi0 (0:0): rejecting I/O to dead device

FAT: Directory bread(block 32034) failed

scsi0 (0:0): rejecting I/O to dead device

FAT: Directory bread(block 32035) failed

scsi0 (0:0): rejecting I/O to dead device

FAT: Directory bread(block 32036) failed

scsi0 (0:0): rejecting I/O to dead device

FAT: Directory bread(block 32037) failed

scsi0 (0:0): rejecting I/O to dead device

FAT: Directory bread(block 32038) failed

scsi0 (0:0): rejecting I/O to dead device

FAT: Directory bread(block 32039) failed

scsi0 (0:0): rejecting I/O to dead device

FAT: Directory bread(block 32040) failed

scsi0 (0:0): rejecting I/O to dead device

FAT: Directory bread(block 32041) failed

scsi0 (0:0): rejecting I/O to dead device

FAT: Directory bread(block 32042) failed

scsi0 (0:0): rejecting I/O to dead device

FAT: Directory bread(block 32043) failed

scsi0 (0:0): rejecting I/O to dead device

FAT: Directory bread(block 32044) failed

scsi0 (0:0): rejecting I/O to dead device

FAT: Directory bread(block 32045) failed

scsi0 (0:0): rejecting I/O to dead device

FAT: Directory bread(block 32046) failed

scsi0 (0:0): rejecting I/O to dead device

FAT: Directory bread(block 32047) failed

usb 1-5: new high speed USB device using ehci_hcd and address 8

usb 1-5: device descriptor read/64, error -71

usb 1-5: device descriptor read/64, error -71

usb 1-5: new high speed USB device using ehci_hcd and address 9

usb 1-5: device descriptor read/64, error -71

usb 1-5: device descriptor read/64, error -71

usb 1-5: new high speed USB device using ehci_hcd and address 10

usb 1-5: device not accepting address 10, error -71

usb 1-5: new high speed USB device using ehci_hcd and address 11

usb 1-5: device not accepting address 11, error -71

usb 1-5: new high speed USB device using ehci_hcd and address 12

scsi1 : SCSI emulation for USB Mass Storage devices

usb-storage: device found at 12

usb-storage: waiting for device to settle before scanning

  Vendor: HDS72808  Model: 0PLAT20           Rev: PF2O

  Type:   Direct-Access                      ANSI SCSI revision: 00

SCSI device sdb: 160836480 512-byte hdwr sectors (82348 MB)

sdb: assuming drive cache: write through

SCSI device sdb: 160836480 512-byte hdwr sectors (82348 MB)

sdb: assuming drive cache: write through

 sdb: sdb1 sdb2 sdb3

Attached scsi disk sdb at scsi1, channel 0, id 0, lun 0

Attached scsi generic sg0 at scsi1, channel 0, id 0, lun 0,  type 0

usb-storage: device scan complete

```

Truly, I beg you, any help would be really, really appreciated. I need to have this stable soon, for work issues, and I am truly lost in hardware terms or kernel internals (for my very own shame and fault). If there's any information you need, ask for it. 

Thanks in advance.

EDIT: A small note. Seems like the device doesn't disconnect if I use low-speed USB instead of the high-speed EHCI. But I cannot afford the speed loss...

----------

## hermanng

I'm afraid, I'm not much of specialist here. I use my externel HDD (USB 2) for over a year now without problems.

The only thing special about it - as far as I can see - is a good, heavily shielded cable. Are you sure, that you don't use a USB 1.1 cable with your HDD ? There is no difference in the connectors, AFAIK, both types of cable use the same.

Just a thought

----------

## Sparrowmelody

I am using the cable shipped with the device...

----------

## hermanng

One last idea - just by chance, I inspected the bios on one of my other machines today and saw one really interesting entry. The USB 2 port could be configured with 2 different speeds, the one, with the name high speed was advertised with 12 Mbps, the other (forgot the name) was the "real" one with 480 Mbps. Possibly worth a look ?

Good luck.

----------

## Sparrowmelody

I'll check it out as soon as I return home. Thanks for the suggestion!

----------

