LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Problems with getting external USB hard drive working (https://www.linuxquestions.org/questions/linux-hardware-18/problems-with-getting-external-usb-hard-drive-working-354828/)

pwaring 08-19-2005 05:59 AM

Problems with getting external USB hard drive working
 
I've got an external Seagate hard drive (model: ST3200823A-RK) that I'm trying to connect to a Dell Poweredge machine via the USB port (the drive also supports firewire connections, but seeing as the server doesn't have a firewire port it's not an issue) but without much success. If I just plug the hard drive in after boot up with no changes I get the following errors echoed to the console and dmesg:

Code:

usb 1-2: new full speed USB device using ohci_hcd and address 8
usb 1-2: device descriptor read/64, error -110
usb 1-2: device descriptor read/64, error -110
usb 1-2: new full speed USB device using ohci_hcd and address 9
usb 1-2: device descriptor read/64, error -110
usb 1-2: device descriptor read/64, error -110

Googling for this error basically led to two suggestions:

1. Run 'modprobe -r ehci_hcd' (or '-r ehci-hcd', not sure which you're supposed to use as I've seen it referred to by both names in various places)
2. Run 'echo > /sys/module/usbcore/parameters/old_scheme_first'

I tried step 1 first, but it made absolutely no difference - unplugging the hard drive and then plugging it back in gave the same error as before, except the addresses were incremented to 10 and 11 (which is what seems to happen anyway, and I guess is the correct behaviour). When I tried step 2 though, the message changed to:

Code:

usb 1-2: new full speed USB device using ohci_hcd and address 12
usb 1-2: device not accepting address 12, error -110
usb 1-2: new full speed USB device using ohci_hcd and address 13
usb 1-2: device not accepting address 13, error -110

Is this an improvement or not? There's less output but I don't know whether I've made things better or worse by telling the kernel to use the old scheme first. I can't find any other methods to try by searching for this error message or the old ones, so I'm a bit stuck as to what to do next. I don't want to poke this machine too much as it's running some fairly important database applications so I can't really go round rebooting it every 2 minutes.

Any suggestions as to what I can try would be greatly appreciated. This drive definitely works on another machine so I don't think it's a hardware problem.

Some output that may be of use:

Code:

mount
/dev/sda3 on / type ext3 (rw,errors=remount-ro)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/sda1 on /boot type ext2 (rw)
/dev/sda7 on /home type ext3 (rw)
/dev/sda5 on /tmp type ext3 (rw)
/dev/sda6 on /var type ext3 (rw)
/dev/sdb1 on /data type ext3 (rw)

Code:

lsusb -vv
Bus 001 Device 001: ID 0000:0000
Device Descriptor:
  bLength                18
  bDescriptorType        1
  bcdUSB              1.10
  bDeviceClass            9 Hub
  bDeviceSubClass        0 Unused
  bDeviceProtocol        0
  bMaxPacketSize0        8
  idVendor          0x0000
  idProduct          0x0000
  bcdDevice            2.06
  iManufacturer          3 Linux 2.6.11-1-386 ohci_hcd
  iProduct                2 ServerWorks OSB4/CSB5 OHCI USB Controller
  iSerial                1 0000:00:0f.2
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                9
    bDescriptorType        2
    wTotalLength          25
    bNumInterfaces          1
    bConfigurationValue    1
    iConfiguration          0
    bmAttributes        0xc0
      Self Powered
    MaxPower                0mA
    Interface Descriptor:
      bLength                9
      bDescriptorType        4
      bInterfaceNumber        0
      bAlternateSetting      0
      bNumEndpoints          1
      bInterfaceClass        9 Hub
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      0
      iInterface              0
      Endpoint Descriptor:
        bLength                7
        bDescriptorType        5
        bEndpointAddress    0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type              None
          Usage Type              Data
        wMaxPacketSize    0x0002  1x 2 bytes
        bInterval            255
Hub Descriptor:
  bLength              9
  bDescriptorType      41
  nNbrPorts            4
  wHubCharacteristic 0x0012
    No power switching (usb 1.0)
    No overcurrent protection
  bPwrOn2PwrGood        1 * 2 milli seconds
  bHubContrCurrent      0 milli Ampere
  DeviceRemovable    0x08
  PortPwrCtrlMask    0xe8
 Hub Port Status:
  Port 1: 0000.0100 power
  Port 2: 0000.0101 power connect
  Port 3: 0000.0100 power
  Port 4: 0000.0100 power

Code:

uname -a
Linux delldata1 2.6.11-1-386 #1 Mon Jun 20 20:53:17 MDT 2005 i686 GNU/Linux


maroonbaboon 08-19-2005 08:21 AM

There is also an alternative 'uhci_hcd' to ehci_hcd. Try rmmod ehci_hcd and then modprobe the other.

My understanding is that the usb-storage module is also required, so you could try modprobing that also.

Then plug the drive in again and see if it gets picked up.

pwaring 08-19-2005 08:33 AM

I tried 'modprobe -r ehci_hcd' followed by 'modprobe uhci_hcd', no luck at all - gave me the same error message as before. usb_storage shows up in lsmod right from the start so I'm guessing it's built in or loaded at boot as a module (I ran modprobe on it just to make sure, didn't change anything). The only thing which causes the error message to differ is changing the contents of /sys/module/usbcore/parameters/old_scheme_first.

maroonbaboon 08-19-2005 09:00 AM

Make sure that only only one of the ehci/uhci modules is loaded. You might have to rmmod a bunch of things to get rid of the one you don't want because of dependencies.

Sorry, I have no further ideas (except more googling).

Added later: in my kernel config I have the lines:
Code:

CONFIG_USB_ARCH_HAS_OHCI=y
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_LITTLE_ENDIAN=y

I have no idea what this means, but it seem to be relevant to your hardware.

pwaring 08-19-2005 10:26 AM

Well, I tried loading/unloading each module separately, with and without the old_style_first parameter. The output I got was:

With old_style_first = N:
ohci_hcd: read/64 error -110 (basically same as first time I tried)
ehci_hcd: nothing (this module doesn't look like it has anything to do with what I'm trying to achieve)
uhci_hcd: Prints USB Universal Host Controller Interface Driver v2.2 to dmesg but that's it (no output when I plug the USB drive in)

With old_style_first = Y:
ohci:hcd: Back to error -110 device not responding (different from old_style_first = N but not really much help!) - this module throws up information about detecting the USB hub and ports so I think it's the best bet but I tried the other two again just in case
ehci_hcd: nothing (again, don't think it has anything to do with storage)
uhci_hcd: Prints the same message as it did before, doesn't do anything else

So I honestly don't know what's wrong. usb_storage is loaded the whole time, as is usb_core.

pwaring 08-23-2005 08:00 AM

Anyone else got any ideas on how to fix this (or things to at least attempt)?

tp11235 08-25-2005 05:04 AM

scsi drives and usb
 
Hi,

I am wrestling with the same basic problem. My DMESG looks like this:

/dev/hda2 / reiserfs acl,user_xattr 1 1
/dev/hda1 swap swap pri=42 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0
proc /proc proc defaults 0 0
usbfs /proc/bus/usb usbfs noauto,user,rw,exec,sync 0 0
sysfs /sys sysfs noauto 0 0
/dev/dvd /media/dvd subfs fs=cdfss,ro,procuid,nosuid,nodev,exec,iocharset=utf8 0 0
/dev/fd1 /media/floppy subfs fs=floppyfss,procuid,nodev,nosuid,sync 0 0

and these are the lines from my messages log from startup this morning:

Aug 25 10:23:36 neptune kernel: usb 1-2: new full speed USB device using uhci_hcd and address 2 Aug 25 10:23:37 neptune kernel: scsi0 : SCSI emulation for USB Mass Storage devices
Aug 25 10:23:37 neptune kernel: usb-storage: device found at 2
Aug 25 10:23:37 neptune kernel: usb-storage: waiting for device to settle before scanning
Aug 25 10:23:37 neptune /etc/hotplug/usb.agent[8466]: need a device for this command
Aug 25 10:23:42 neptune kernel: Vendor: ST340810 Model: A Rev: 3.97
Aug 25 10:23:42 neptune kernel: Type: Direct-Access ANSI SCSI revision: 00 Aug 25 10:23:42 neptune kernel: usb-storage: device scan complete
Aug 25 10:23:42 neptune /etc/hotplug/scsi_device.agent[8515]: FATAL: Module sd_mod not found. Aug 25 10:23:42 neptunespace /etc/hotplug/scsi_device.agent[8515]: FATAL: Module sg not found.

I have a question that may help you and would certainly save me time by experimenting on your system ;) . I think that my problem is that I have not enabled SCSI because I have no SCSI drives. However, the USB drive is trying to use SCSI emulation so it fails on my system. Most people on the forum talk about their USB drive turning up as /dev/sda1 or whatever. I notice that you have SCSI drives (and lots of them) - but no reference in your FSTAB to /dev/sda2 - just sda1, 3 .. 7.

Have you tried mounting /dev/sda2 to /mnt and seeing if your USB drive is there? What does your message log look like? It would be really helpful to me before I start rebuilding my kernel with SCSI support if I knew it was certainly the solution.

Cheers

Tim.

pwaring 08-25-2005 05:13 AM

Re: scsi drives and usb
 
Quote:

Have you tried mounting /dev/sda2 to /mnt and seeing if your USB drive is there? What does your message log look like? It would be really helpful to me before I start rebuilding my kernel with SCSI support if I knew it was certainly the solution.
I don't see why that would work because /dev/sdaX points to the first SCSI disk, and the USB drive is the third SCSI disk (well, that's how it should be treated even though physically it's not one). Giving it a try throws out:

Code:

/dev/sda2 looks like swapspace - not mounted
mount: you must specify the filesystem type

so I'm guessing 'mount' with no arguments doesn't show swap space by default.

tp11235 08-25-2005 01:07 PM

That certainly explains what happened to /dev/sda2!

I am afraid that my system is working now and I did it the hard way. I rebuilt the kernel from scratch using version 2.6.12.5 , my previous version was 2.6.11.2.

I selected the following options as fully installed in the kernel at boot:

In generic driver options - "Hotplug firmware loading support" - I thought it might help!

In SCSI device support - all of the following

Legacy /proc/scsi support
SCSI disk support
Probe all LUNS on each device - this was mentioned in several posts

In transport attributes

Parallel scsi transport attributes

In USB support

Host side USB filesystem
Device filesystem
EHCI support - I won't need this at the moment because my USB is 1.0, but I may get a new card
OHCI support
UHCI support - I need this for my 1.0 USB hub

I said Yes to all options on USB Mass Storage

Under filesystems

Yes to MSDOS and VFAT support

I had previously reformatted my USB drive as FAT32.

I then compiled and installed the kernel, rebooted and plugged in the USB drive.

This time, instead of the few lines in DMESG, I got 2 pages of positive looking stuff about SCSI.

I then mounted the drive with:

mount -t VFAT /dev/sda1 /mnt

All the files were there and readable. I had to use Konquerer rather than the command line to handle the file name lengths, but not other problems.

I am thinking that you will want to be more careful with the SCSI options given that all your maind rives are SCSI and I suspect you may find the USB drive under a very different /dev/sdX - maybe even /dev/sdb1 ?

Perhaps you could try checking your compilation settings for your existing kernel before upgrading to 2.6.12.5. Also try /dev/sdbX drives?

Cheers and good luck.

Tim.

fdetienn 09-15-2005 04:07 PM

Hi,

I was hitting the exact same problem as described in the original post. My drive is a Maxtor 120GB but that makes no difference. What DOES make a difference with your setup is the type of USB controller. I have an EHCI (USB 2.0) controller while you seem to have an OHCI (USB 1.x) controller.

I played with the /sys options, tried old_scheme_first Y/N and also played with use_both_schemes Y/N. I ended up with different logs across runs with the same parameters. I then activated USB detailed debugs (CONFIG_USB_DEBUG=y) and found out that for some runs, the logs were displaying messages about a 480MBps port while some other runs only mentioned 12MBps.

I am not a USB expert but these are the maximum transfer rates for USB 2.0 and 1.x respectively... I have a USB 2.0 controller and USB 2.0 class hard drive. I'd expect to see that '480MBps' message each time.

During trial and error, one of the runs showed me a proper USB detection of the device, the USB-storage subsystem activating, then exiting and finally USB-core disconnecting the drive (a 'flap'). I started suspecting the cable and replaced it with a shorter one. Why ? intuition and because I had read things about the USB hub of my Thinkpad T42p being sensitive.

I finally found a very short, high quality cable and... bingo! I am now successfully using the drive with old_scheme_first=N, use_both_schemes=Y (seems useless but ok...) and that short cable.

I recommend resetting CONFIG_USB_DEBUG to n as that option generates a _lot_ of debugs.

With a USB 1.x OHCI adapter such as the one you seem to own, you may still be in troubles. I read other stories about 'slow' machines and devices not working well with USB drives. Kind of race conditions from the descriptions (few details available and again, I am not an expert).

I hope this will help you.

regards,

fred

targa 12-08-2005 07:53 AM

I have the same problem with a DVD burner connected to a USB2IDE converter. 2 different PCs, one with 2 different USB ports (1.1 via and 2.0 ALI)
CD-ROM works fine.
I also get this Error -110

What to do ? /T.


All times are GMT -5. The time now is 09:03 AM.