# Problem with connecting external USB HDD



## Kaminar (Sep 2, 2011)

Hi,

I bought external HDD ADATA CH11 1TB USB 3.0. After connection to USB2.0 or USB3.0 on desktop PC with FreeBSD 8.1R I got error messages:


```
kernel: usb_alloc_device: set address 2 failed (USB_ERR_STALLED, ignored)
kernel: usb_alloc_device: getting device descriptor at addr 2 failed, USB_ERR_STALLED
kernel: usbd_req_re_enumerate: addr=2, set address failed! (USB_ERR_STALLED, ignored)
kernel: usbd_req_re_enumerate: getting device descriptor at addr 2 failed, USB_ERR_STALLED
kernel: usbd_req_re_enumerate: addr=2, set address failed! (USB_ERR_STALLED, ignored)
kernel: usbd_req_re_enumerate: getting device descriptor at addr 2 failed, USB_ERR_STALLED
kernel: ugen4.2: <(null)> at usbus4 (disconnected)
kernel: uhub_reattach_port: could not allocate new device
```

In this thread http://forums.freebsd.org/showthread.php?t=25386 I found somebody solved similar problem by connecting disk within USB hub. I try three hubs.


*With the first USB hub I got:*


```
kernel: ugen4.2: <ALCOR> at usbus4
kernel: uhub9: <ALCOR Generic USB Hub, class 9/0, rev 1.10/3.12, addr 2> on usbus4
kernel: uhub9: 4 ports with 4 removable, self powered
root: Unknown USB device: vendor 0x125f product 0xa11a bus uhub9
kernel: ugen4.3: <ADATA> at usbus4
kernel: umass0: <ADATA CH11, class 0/0, rev 2.10/1.00, addr 3> on usbus4
kernel: umass0:  SCSI over Bulk-Only; quirks = 0x0000
kernel: umass0:14:0:-1: Attached to scbus14
```

No success. No device appeared. After disconnecting disk I got:


```
kernel: ugen4.3: <ADATA> at usbus4 (disconnected)
kernel: umass0: at uhub9, port 4, addr 3 (disconnected)
kernel: (probe0:umass-sim0:0:0:0): AutoSense failed
kernel: ugen4.2: <ALCOR> at usbus4 (disconnected)
kernel: uhub9: at uhub4, port 2, addr 2 (disconnected)
```


*With the second USB hub I got:*


```
kernel: ugen8.2: <vendor 0x05e3> at usbus8
kernel: uhub9: <vendor 0x05e3 USB2.0 Hub, class 9/0, rev 2.00/7.02, addr 2> on usbus8
kernel: uhub9: 4 ports with 4 removable, self powered
root: Unknown USB device: vendor 0x125f product 0xa11a bus uhub9
kernel: ugen8.3: <ADATA> at usbus8
kernel: umass0: <ADATA CH11, class 0/0, rev 2.10/1.00, addr 3> on usbus8
kernel: umass0:  SCSI over Bulk-Only; quirks = 0x0000
kernel: umass0:14:0:-1: Attached to scbus14

kernel: (probe0:umass-sim0:0:0:0): AutoSense failed
kernel: ugen8.3: <ADATA> at usbus8 (disconnected)
kernel: umass0: at uhub9, port 3, addr 3 (disconnected)
kernel: ugen8.2: <vendor 0x05e3> at usbus8 (disconnected)
kernel: uhub9: at uhub8, port 2, addr 2 (disconnected)
```

No success. No device appeared.


*With the third USB hub I got:*


```
kernel: ugen8.2: <vendor 0x05e3> at usbus8
kernel: uhub9: <vendor 0x05e3 USB2.0 Hub, class 9/0, rev 2.00/7.02, addr 2> on usbus8
kernel: uhub9: 4 ports with 4 removable, self powered
root: Unknown USB device: vendor 0x125f product 0xa11a bus uhub9
kernel: ugen8.3: <ADATA> at usbus8
kernel: umass0: <ADATA CH11, class 0/0, rev 2.10/1.00, addr 3> on usbus8
kernel: umass0:  SCSI over Bulk-Only; quirks = 0x0000
kernel: umass0:14:0:-1: Attached to scbus14
kernel: da0 at umass-sim0 bus 0 scbus14 target 0 lun 0
kernel: da0: <ADATA CH11 GL00> Fixed Direct Access SCSI-5 device 
kernel: da0: 40.000MB/s transfers
kernel: da0: 953869MB (1953525168 512 byte sectors: 255H 63S/T 121601C)
kernel: ugen8.3: <ADATA> at usbus8 (disconnected)
kernel: umass0: at uhub9, port 3, addr 3 (disconnected)
kernel: (da0:umass-sim0:0:0:0): lost device
kernel: (da0:umass-sim0:0:0:0): removing device entry
kernel: ugen8.2: <vendor 0x05e3> at usbus8 (disconnected)
kernel: uhub9: at uhub8, port 2, addr 2 (disconnected)
```

With the third USB hub it seems HDD is working. The disk was preformated to FAT32. I tried to copy one small file and delete it. It works.

But why doesn't it work if HDD is connected directly to PC or within 1st or 2nd USB hub? The third USB hub is not mine and I am afraid it is not on market yet. Due to I need other solution to use my external HDD.


----------



## wblock@ (Sep 3, 2011)

Do any of these hubs have their own power supply?


----------



## Kaminar (Sep 3, 2011)

No. USB hubs have not power supply. The HDD is 2.5inch size without cable power supply too. It was reason why I bought 2.5inch external HDD in order not to provide external power supply to HDD.

In my first post I forgot that it looks like the first USB hub (ALCOR) seems not to properly powering HDD. The HDD probably was not spinning and there was only hearing quiet ticking from HDD.


----------



## wblock@ (Sep 3, 2011)

The next step to try would be either upgrade to at least 8.2-RELEASE or try a powered hub.


----------



## Kaminar (Sep 3, 2011)

wblock said:
			
		

> The next step to try would be either upgrade to at least 8.2-RELEASE or try a powered hub.



Yes. I want to wait for 8.3R, where it should be USB3.0 support. I think the 8.3R will be out soon.

I tried it on Linux box too (on Ubuntu 10.04 which is on different computer than my FreeBSD is installed). HDD directly plugged to computer was automatically mounted and it seems to work. But in messages appeared some error:


```
usb 1-7: new high speed USB device using ehci_hcd and address 4
usb 1-7: configuration #1 chosen from 1 choice
Initializing USB Mass Storage driver...
scsi4 : SCSI emulation for USB Mass Storage devices
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usb-storage: device found at 4
usb-storage: waiting for device to settle before scanning
usb-storage: device scan complete
scsi 4:0:0:0: Direct-Access     ADATA    CH11             GL00 PQ: 0 ANSI: 5
sd 4:0:0:0: Attached scsi generic sg3 type 0
sd 4:0:0:0: [sdc] 1953525168 512-byte logical blocks: (1.00 TB/931 GiB)
sd 4:0:0:0: [sdc] Write Protect is off
sd 4:0:0:0: [sdc] Mode Sense: 23 00 00 00
sd 4:0:0:0: [sdc] Assuming drive cache: write through
sd 4:0:0:0: [sdc] Assuming drive cache: write through
 sdc: sdc1
sd 4:0:0:0: [sdc] Assuming drive cache: write through
sd 4:0:0:0: [sdc] Attached SCSI disk
sd 4:0:0:0: [sdc] [color="Red"][B]Sense Key : Recovered Error[/B][/color] [current] [descriptor]
Descriptor sense data with sense descriptors (in hex):
        72 01 04 1d 00 00 00 0e 09 0c 00 00 00 00 00 00 
        00 4f 00 c2 00 50 
sd 4:0:0:0: [sdc] ASC=0x4 ASCQ=0x1d
```

On the Internet this Linux bug is mentioned, but I didn't find any solution.


----------



## wblock@ (Sep 3, 2011)

This would be good to ask on the freebsd-usb mailing list.  HPS just posted a patch there recently which might make a difference, and there have been some others that are part of 8-STABLE.

It's going to be a while before 8.3 comes out.  In the meantime, 8-STABLE is easy enough to try, and 9.0 will be out soonish.


----------



## jb_fvwm2 (Sep 3, 2011)

Without a power supply for the external hd, AFAIK the possibility of it not being mountable after a disconnect or kernel panic is much greater (depending upon also the FS probably.) (I'd recommend gjournal, but before that, would advise a powered hub...) I cannot count the number of filesystems I've had disappear on usb without precautions. (Older versions of the usb drivers... )


----------



## Kaminar (Sep 4, 2011)

I tried my external HDD under FreeBSD 9.0-BETA1 (livecd). After I connected HDD to USB2.0 port, same problem appeared as in my first post in this thread. After connecting HDD to USB3.0 I got this messages:


```
ugen4.2: <ADATA> at usbus4
umass0: <ADATA CH11, class 0/0, rev 3.00/1.00, addr 1> on usbus4
umass0:  SCSI over Bulk-Only; quirks = 0x0000
umass0:15:0:-1: Attached to scbus15
[B](probe0:umass-sim0:0:0:0): REPORT LUNS. CDB: a0 0 0 0 0 0 0 0 0 10 0 0
(probe0:umass-sim0:0:0:0): CAM status: SCSI Status Error
(probe0:umass-sim0:0:0:0): SCSI status: Check Condition
(probe0:umass-sim0:0:0:0): SCSI sense: ILLEGAL REQUEST asc:20,0 (Invalid command operation code)[/B]
da0 at umass-sim0 bus 0 scbus15 target 0 lun 0
da0: <ADATA CH11 GL00> Fixed Direct Access SCSI-5 device 
da0: 400.000MB/s transfers
da0: 953869MB (1953525168 512 byte sectors: 255H 63S/T 121601C)
```

It seems that HDD would probably work. I tried to mount it and write one file. But I don't know what the error is (see red highlighted text above). The information on the Internet is messy for me.

After unplugging HDD I got:


```
ugen4.2: <ADATA> at usbus4 (disconnected)
umass0: at uhub4, port 1, addr 1 (disconnected)
(da0:umass-sim0:0:0:0): lost device - 0 outstanding
(da0:umass-sim0:0:0:0): removing device entry
```


----------



## wblock@ (Sep 4, 2011)

That's promising.  The error might not be serious.  Again, I suggest posting to the freebsd-usb mailing list.


----------



## Kaminar (Sep 5, 2011)

I did send post to freebsd-usb mailing list. So, we will see.


----------

