Announcement

Collapse
No announcement yet.

[Resolved]Ehci_hcd not picking up identical models of USB disks simultaniously.

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [Resolved]Ehci_hcd not picking up identical models of USB disks simultaniously.

    My server is an 8.04 system which started it's sordid life as a 7.04 install from the base installer images.

    The setup is rather customized at this point but here are the basics:


    /dev/sda (generally) Internal Raid-5 Storage array: 3ware raid controller (mounted by uuid)
    /dev/sdb (generally) Internal boot volume: SATA 80gb HDD (mounted by uuid)
    /dev/sdc (generally) External semi-perminent USB storage: LaCie 1tb USB2 drive (mounted by uuid)
    /dev/sdd (generally) External swapped-weekly USB storage: LaCie 1tb USB drive (same model) (mounted by device ID = /dev/sdd)

    This system has a samba share setup pointing to an autofs mount point to mount the first 1tb drive (by uuid) whenever another server across the network accesses the samba share, and will disconnect / unmount the first disk after 60-120 seconds of the last file being closed by the client machines accessing the samba share. This works flawlessly so long as the second drive is not attached to the system. (I'm fond of this setup.) This is to make emergency grab-n-run possible in case of fire or such.

    The second drive is configured to auto-mount by device name (/dev/sdd1) since there is a pool of these 1tb drives which will be rotated in and out. This device is the drive by which the first external USB drive is supposed to be copied for off-site storage on a weekly basis. (removed frequently, never the same UUID except when recycling the pool after some weeks).

    Upon attaching the second drive to the system the ehci-hcd driver appears to freak out and "lose" one of the drives (sometimes both become unusable). I'm stumped as to whether this is because both the semi-permanent drive and the swapped drives are the exact same model (and lot) or not.

    I have tried both drives individually (one at a time). Works fine.
    I have tried both drives plugged into my laptop at the same time (started as 8.04 natively). Works fine.
    I have tried two USB drives of different capacity (both LaCie units) at the same time. - Not working.
    I have tried both drives plugged in, but in different areas (1 by keyboard connector, 1 on USB ports off of a different connector set in the expansion bays). Same issue.
    I have tried both drives plugged into the same root hub on the back of the chassis. Same issue.
    I have tried swapping cables around and out for different ones. Same problem.

    Unloading the EHCI driver causes both drives to become visible and usable however, their bus numbers differ.

    Basic Stats:
    Code:
    lspci | grep -i usb
    00:1d.0 USB Controller: Intel Corporation 6300ESB USB Universal Host Controller (rev 02)
    00:1d.1 USB Controller: Intel Corporation 6300ESB USB Universal Host Controller (rev 02)
    00:1d.7 USB Controller: Intel Corporation 6300ESB USB2 Enhanced Host Controller (rev 02)
    With both drives attached and EHCI loaded:
    Code:
    lsusb
    Bus 001 Device 002: ID 059f:1012 LaCie, Ltd <-- There are 2 of these attached. Second is missing.
    Bus 001 Device 001: ID 0000:0000 <-- (EHCI hub USB 2.0)
    Bus 003 Device 001: ID 0000:0000 <-- (UHCI hub USB1.1)
    Bus 002 Device 001: ID 0000:0000 <-- (UHCI hub USB1.1)
    After unloading EHCI (modprobe -r ehci_hcd):
    Code:
    lsusb | more
    Bus 003 Device 003: ID 059f:1012 LaCie, Ltd (<-- drive 1)
    Bus 003 Device 001: ID 0000:0000 (UHCI hub USB1.1)
    Bus 002 Device 003: ID 059f:1012 LaCie, Ltd (<-- drive 2)
    Bus 002 Device 001: ID 0000:0000 (UHCI hub USB1.1)
    Code:
    dmesg
    [ 6732.801074] ehci_hcd 0000:00:1d.7: remove, state 1
    [ 6732.801088] usb usb1: USB disconnect, address 1
    [ 6732.801092] usb 1-1: USB disconnect, address 2
    [ 6732.806215] ehci_hcd 0000:00:1d.7: USB bus 1 deregistered
    [ 6732.806388] ACPI: PCI interrupt for device 0000:00:1d.7 disabled
    [ 6733.039146] usb 3-2: new full speed USB device using uhci_hcd and address 3
    [ 6733.202200] usb 3-2: configuration #1 chosen from 1 choice
    [ 6733.208484] scsi11 : SCSI emulation for USB Mass Storage devices
    [ 6733.209557] usb-storage: device found at 3
    [ 6733.209564] usb-storage: waiting for device to settle before scanning
    [ 6733.445823] usb 2-1: new full speed USB device using uhci_hcd and address 3
    [ 6733.608889] usb 2-1: configuration #1 chosen from 1 choice
    [ 6733.614644] scsi12 : SCSI emulation for USB Mass Storage devices
    [ 6733.615368] usb-storage: device found at 3
    [ 6733.615376] usb-storage: waiting for device to settle before scanning
    [ 6738.191804] usb-storage: device scan complete
    [ 6738.194788] scsi 11:0:0:0: Direct-Access  External AL2_LBD pydY_0_F   PQ: 0 ANSI: 2
    [ 6738.199758] sd 11:0:0:0: [sdc] 1953546336 512-byte hardware sectors (1000216 MB)
    [ 6738.202743] sd 11:0:0:0: [sdc] Write Protect is off
    [ 6738.202748] sd 11:0:0:0: [sdc] Mode Sense: 1a 0c 00 00
    [ 6738.202750] sd 11:0:0:0: [sdc] Assuming drive cache: write through
    [ 6738.207737] sd 11:0:0:0: [sdc] 1953546336 512-byte hardware sectors (1000216 MB)
    [ 6738.210717] sd 11:0:0:0: [sdc] Write Protect is off
    [ 6738.210723] sd 11:0:0:0: [sdc] Mode Sense: 1a 0c 00 00
    [ 6738.210725] sd 11:0:0:0: [sdc] Assuming drive cache: write through
    [ 6738.210731] sdc: sdc1
    [ 6738.233763] sd 11:0:0:0: [sdc] Attached SCSI disk
    [ 6738.233833] sd 11:0:0:0: Attached scsi generic sg4 type 0
    [ 6738.599498] usb-storage: device scan complete
    [ 6738.602478] scsi 12:0:0:0: Direct-Access  External AL2_LBDci1Fm_0_F   PQ: 0 ANSI: 2
    [ 6738.607451] sd 12:0:0:0: [sdd] 1953546336 512-byte hardware sectors (1000216 MB)
    [ 6738.610501] sd 12:0:0:0: [sdd] Write Protect is off
    [ 6738.610506] sd 12:0:0:0: [sdd] Mode Sense: 1a 0c 00 00
    [ 6738.610508] sd 12:0:0:0: [sdd] Assuming drive cache: write through
    [ 6738.615430] sd 12:0:0:0: [sdd] 1953546336 512-byte hardware sectors (1000216 MB)
    [ 6738.618406] sd 12:0:0:0: [sdd] Write Protect is off
    [ 6738.618412] sd 12:0:0:0: [sdd] Mode Sense: 1a 0c 00 00
    [ 6738.618414] sd 12:0:0:0: [sdd] Assuming drive cache: write through
    [ 6738.618420] sdd: sdd1
    [ 6738.624504] sd 12:0:0:0: [sdd] Attached SCSI disk
    [ 6738.624574] sd 12:0:0:0: Attached scsi generic sg5 type 0
    Once EHCI is unloaded both disks are perfectly accessible to the OS as sdc and sdd respectively.

    Re-enabling EHCI goes like so:

    Code:
    lsusb
    Bus 001 Device 002: ID 059f:1012 LaCie, Ltd <-- back to one drive)
    Bus 001 Device 001: ID 0000:0000
    Bus 003 Device 001: ID 0000:0000
    Bus 002 Device 001: ID 0000:0000
    Code:
    dmesg
    [ 7221.113415] ACPI: PCI Interrupt 0000:00:1d.7[D] -> GSI 23 (level, low) -> IRQ 20
    [ 7221.113438] PCI: Setting latency timer of device 0000:00:1d.7 to 64
    [ 7221.113444] ehci_hcd 0000:00:1d.7: EHCI Host Controller
    [ 7221.113491] ehci_hcd 0000:00:1d.7: new USB bus registered, assigned bus number 1
    [ 7221.117394] ehci_hcd 0000:00:1d.7: debug port 1
    [ 7221.117406] PCI: cache line size of 128 is not supported by device 0000:00:1d.7
    [ 7221.117421] ehci_hcd 0000:00:1d.7: irq 20, io mem 0xdd000400
    [ 7221.131518] ehci_hcd 0000:00:1d.7: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
    [ 7221.131689] usb usb1: configuration #1 chosen from 1 choice
    [ 7221.131729] hub 1-0:1.0: USB hub found
    [ 7221.131739] hub 1-0:1.0: 4 ports detected
    [ 7221.474410] usb 1-1: new high speed USB device using ehci_hcd and address 2
    [ 7221.607020] usb 1-1: configuration #1 chosen from 1 choice
    [ 7221.612833] scsi13 : SCSI emulation for USB Mass Storage devices
    [ 7221.613781] usb-storage: device found at 2
    [ 7221.613787] usb-storage: waiting for device to settle before scanning
    [ 7221.849188] usb 1-4: new high speed USB device using ehci_hcd and address 3
    [ 7221.960826] usb 1-4: device descriptor read/64, error -71
    [ 7222.176124] usb 1-4: device descriptor read/64, error -71
    [ 7222.391425] usb 1-4: new high speed USB device using ehci_hcd and address 4
    [ 7222.503053] usb 1-4: device descriptor read/64, error -71
    [ 7222.718360] usb 1-4: device descriptor read/64, error -71
    [ 7222.933660] usb 1-4: new high speed USB device using ehci_hcd and address 5
    [ 7223.340335] usb 1-4: device not accepting address 5, error -71
    [ 7223.451972] usb 1-4: new high speed USB device using ehci_hcd and address 6
    [ 7223.858642] usb 1-4: device not accepting address 6, error -71
    [ 7223.858691] usb 3-2: USB disconnect, address 3
    [ 7223.986244] usb 2-1: USB disconnect, address 3
    [ 7226.593876] usb-storage: device scan complete
    [ 7226.594369] scsi 13:0:0:0: Direct-Access  External AL2_LBDci1Fm_0_F   PQ: 0 ANSI: 2
    [ 7226.595980] sd 13:0:0:0: [sdc] 1953546336 512-byte hardware sectors (1000216 MB)
    [ 7226.596474] sd 13:0:0:0: [sdc] Write Protect is off
    [ 7226.596480] sd 13:0:0:0: [sdc] Mode Sense: 1a 0c 00 00
    [ 7226.596483] sd 13:0:0:0: [sdc] Assuming drive cache: write through
    [ 7226.597600] sd 13:0:0:0: [sdc] 1953546336 512-byte hardware sectors (1000216 MB)
    [ 7226.598093] sd 13:0:0:0: [sdc] Write Protect is off
    [ 7226.598099] sd 13:0:0:0: [sdc] Mode Sense: 1a 0c 00 00
    [ 7226.598101] sd 13:0:0:0: [sdc] Assuming drive cache: write through
    [ 7226.598106] sdc: sdc1
    [ 7226.598826] sd 13:0:0:0: [sdc] Attached SCSI disk
    [ 7226.598898] sd 13:0:0:0: Attached scsi generic sg4 type 0
    It looks like it is attempting to detect the second disk and assign an address. However the lines for:
    Code:
     usb 1-4: device not accepting address 6, error -71
    and the like seem to go on for some time.

    Unloading all drivers for USB support and only loading the ehci_hcd driver (not the UHCI) provides the exact same setup (others had suggested that load-order for the hardware drivers may be to blame).

    Also, I have attempted to turn off port standby using the information found here:

    Any help or direction on how to get this working would be appreciated.

    Thanks,
    Robert





    #2
    Re: Ehci_hcd not picking up identical models of USB disks simultaniously.

    This issue has been resolved (somewhat).
    We ended up having a cable incapable of negotiating high-speed transfers attached to one of the drives. This cable worked well enough for driver detection when attached to the laptop, but apparently not well enough when attached to the server.

    Replacing that cable (which ironically was a thicker and better shielded cable than the cable which came with the drive) fixed the hardware detection issue.

    Does anyone know of a way to make sure that drives are assigned consistent devices across reboots? (by drive serial number or some sort of ID)?

    I want that first USB drive to always get /dev/sdc (or for the system to reserve /dev/sdc if it is not attached or powered on). This way if both USB devices are attached during bootup I don't have them accidentally swap which device is assigned to /dev/sdc and /dev/sdd.

    Essentially, I want /dev/sda, /dev/sdb, and /dev/sdc to be assigned to specific devices and not in detection order even if I am mounting them by uuid anyways since I need the pool of drives to be assigned /dev/sdd every time they are attached (for scripting purposes).

    Thanks,
    Robert

    Comment

    Working...
    X