# usb attatched storage stops working after some time [solved]

## Tariella

I'm experiencing a strange problem on my htpc: 

When I attach storage devices using usb (doesn't matter if it is a SD card using a cardreader, harddrive or the built-in cardreader) it works for some time and then just seems to hang. Most of the time I'm using the attached devices to copy large amounts of data (lots of small photo files or a few big video files). 

The copying works flawlessly until at some point after about a minute or so it just hangs and doesn't go on. No error messages at all.

When I remove the usb storage and attach it again it works without problems until I start copying the next bulk of files.

This happens with all usb-attached storage devices and with no relation to the copy method (mv, cp, using gui or commandline), so my guess is that it is a kernel issue.

Since this is not the first kernel version I am using, I believe the error is in my kernel options and not in the version.

Currently I'm using 2.6.28-gentoo-r3. Here is the configLast edited by Tariella on Tue Apr 21, 2009 10:09 am; edited 1 time in total

----------

## pappy_mcfae

Tariella,

Please post the results of lspci -n and cat /proc/cpuinfo as well as your /etc/fstab file, and I'll set you up. It looks like you have certain things set as modules that shouldn't be. In order to make sure I get things right, I need to know what I'm dealing with. Please send that info, and I'll get you going.

Blessed be!

Pappy

----------

## Tariella

Thanks for your help, Pappy!

Here are my lspci -n and cat /proc/cpuinfo.

And here is my /etc/fstab: 

```
# /etc/fstab: static file system information.

#

# noatime turns off atimes for increased performance (atimes normally aren't 

# needed; notail increases performance of ReiserFS (at the expense of storage 

# efficiency).  It's safe to drop the noatime options if you want and to 

# switch between notail / tail freely.

#

# The root filesystem should have a pass number of either 0 or 1.

# All other filesystems should have a pass number of 0 or greater than 1.

#

# See the manpage fstab(5) for more information.

#

# <fs>                  <mountpoint>    <type>          <opts>          <dump/pass>

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.

#/dev/BOOT              /boot           ext2            noauto,noatime  1 2

/dev/sda1               /               ext3            noatime         1 2

/dev/sda2               /mnt/Media      ext3            noatime         0 0     

/dev/sda3               /usr/portage    reiserfs        noatime         0 0 

/dev/sr0                /media/bluray   auto            users,noauto    0 0

```

If you need any more info, please let me know.

Thanks!

----------

## pappy_mcfae

Good work on the kernel setup. For the most part, you were spot on with it. The thing which was causing your problem was the fact that the OHCI USB driver was a module. USB drivers are best compiled into the kernel. Also, since the UHCI was also on, it may have been adding to the misery. Small problem, easily fixed.

Click here for your fixed .config. Compile as is.

For the best results, please do the following:

1) Move your .config file out of your kernel source directory ( /usr/src/linux-2.6.28-gentoo-r3 ).

2) Issue the command make mrproper. This is a destructive step. It returns the source to pristine condition. Unmoved .config files will be deleted!

3) Copy my .config into your source directory.

4) Issue the command make && make modules_install.

5) Install the kernel as you normally would, and reboot.

6) Once it boots, please post /var/log/dmesg so I can see how things loaded.

Blessed be!

Pappy

----------

## Tariella

 *pappy_mcfae wrote:*   

> Good work on the kernel setup. For the most part, you were spot on with it.

 

I was working with one of your seeds for the first kernel config (some versions ago) so the credits go to you.  :Wink: 

I was able to mess it up though.  :Embarassed: 

 *pappy_mcfae wrote:*   

> Small problem, easily fixed. 

 

Only when you know where to look.  :Wink:  It would have taken me ages of trial and error to figure out what was wrong.

Again I learned something new about kernel voodoo.  :Wink: 

I'll post my dmesg as soon as it works.

Thanks a lot, Pappy!Last edited by Tariella on Sun Apr 19, 2009 7:26 pm; edited 1 time in total

----------

## kernelOfTruth

 *pappy_mcfae wrote:*   

> The thing which was causing your problem was the fact that the OHCI USB driver was a module. USB drivers are best compiled into the kernel. Also, since the UHCI was also on, it may have been adding to the misery. Small problem, easily fixed.
> 
> 

 

++

fixed a lot of problems for me   :Idea: 

----------

## pappy_mcfae

"You're welcomes" to all!

Blessed be!

Pappy

----------

## Tariella

Here is the dmesg (point 6 from your how-to).

I had to remove preemtion and add pci_find_* because of the ati-drivers. 

Thanks again!

----------

## pappy_mcfae

You're most welcome.

Blessed be!

Pappy

----------

