Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Nov 2020 13:35:46 +0100
From:      Christoph Harder <shadowomf@arcor.de>
To:        freebsd-questions <freebsd-questions@freebsd.org>
Subject:   usb harddisk not working
Message-ID:  <b677a42e-a351-7fd5-24e8-770b251d6ba5@arcor.de>

next in thread | raw e-mail | index | archive | help
Hello everybody,

I'm/we're running FreeBSD 12.1-RELEASE-p10 GENERIC amd64 on an PC Engines APU.4D4 Board with a Transcend MSA230S SSD as main hard drive which is detected as ada0.
I would like to attach a hdd case that contains a Western Digital 14TB hard disk (already partitioned and formatted with a single ufs partition).
However the disk is not always detected, sometimes connecting it to another usb port (2 ports are available) works but not always.
Especially after a reboot the drive is not detected properly (I'm not 100% certain, but I believe it never was detected correctly after a reboot). When the disk is detected it is listed as da0.
The hdd case does seem to contain a JMicron usb controller, it's a icybox case with space for two 3.5" disks, but currently only contains the one WD hdd.

I've enabled automount like described in section 17.4.2. Automounting Removable Media of the handbook.
The same settings work flawlessly on other devices (same board, same os version) with external seagate hdds (though they are ready made solutions, not hdd cases that are made to be filled with drives by the user).

/etc/devd.conf
# automount
notify 100 {
        match "system"          "GEOM";
        match "subsystem"       "DEV";
        action "/usr/sbin/automount -c";
};

/etc/rc.conf
# automount
autofs_enable="YES"

dmesg
uhub0: 4 ports with 4 removable, self powered
uhub1: 2 ports with 2 removable, self powered
lo0: link state changed to UP
ugen1.2: <vendor 0x0438 product 0x7900> at usbus1
uhub2 on uhub1
uhub2: <vendor 0x0438 product 0x7900, class 9/0, rev 2.00/0.18, addr 2> on usbus1
ugen0.2: <JMicron JMS56x Series> at usbus0
umass0 on uhub0
umass0: <MSC Bulk-Only Transfer> on usbus0
umass0:  SCSI over Bulk-Only; quirks = 0x8100
umass0:2:0: Attached to scbus2
uhub2: 4 ports with 4 removable, self powered
igb0: link state changed to UP
intsmb0: <AMD FCH SMBus Controller> at device 20.0 on pci0
smbus0: <System Management Bus> on intsmb0
Security policy loaded: MAC/ntpd (mac_ntpd)
(probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 00 00 00 24 00
(probe0:umass-sim0:0:0:0): CAM status: CCB request completed with an error
(probe0:umass-sim0:0:0:0): Retrying command, 3 more tries remain
(probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 00 00 00 24 00
(probe0:umass-sim0:0:0:0): CAM status: CCB request completed with an error
(probe0:umass-sim0:0:0:0): Retrying command, 2 more tries remain
(probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 00 00 00 24 00
(probe0:umass-sim0:0:0:0): CAM status: CCB request completed with an error
(probe0:umass-sim0:0:0:0): Retrying command, 1 more tries remain
(probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 00 00 00 24 00
(probe0:umass-sim0:0:0:0): CAM status: CCB request completed with an error
(probe0:umass-sim0:0:0:0): Retrying command, 0 more tries remain
(probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 00 00 00 24 00
(probe0:umass-sim0:0:0:0): CAM status: CCB request completed with an error
(probe0:umass-sim0:0:0:0): Error 5, Retries exhausted
(probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 00 00 00 24 00
(probe0:umass-sim0:0:0:0): CAM status: CCB request completed with an error
(probe0:umass-sim0:0:0:0): Retrying command, 3 more tries remain

camcontrol devlist
<TS64GMSA230S 02J0S86A>            at scbus0 target 0 lun 0 (ada0,pass0)

usbconfig
ugen0.1: <0x1022 XHCI root HUB> at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=SAVE (0mA)
ugen1.1: <AMD EHCI root HUB> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen1.2: <vendor 0x0438 product 0x7900> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (100mA)
ugen0.2: <JMicron JMS56x Series> at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=ON (2mA)

/dev
shows ada0 but not da0. It also shows the following usb devices
lrwxr-xr-x  1 root  wheel        9 Nov 21 13:10 ugen0.1@ -> usb/0.1.0
lrwxr-xr-x  1 root  wheel        9 Nov 21 13:10 ugen0.2@ -> usb/0.2.0
lrwxr-xr-x  1 root  wheel        9 Nov 21 13:10 ugen1.1@ -> usb/1.1.0
lrwxr-xr-x  1 root  wheel        9 Nov 21 13:10 ugen1.2@ -> usb/1.2.0
crw-r--r--  1 root  operator  0x45 Nov 21 13:10 usbctl

I hope you can give me some hints and tips on how to get this disk working properly.

By the way, do you have any information about settings that reduce the power consumption of external disk drives?
We expect the disks to be mostly idle, but at the moment the power consumption looks pretty high (higher than the APU board itself), even when it is not currently accessed.
Especially information about usb power saving states and power consumption in combination with automount would be appreciated.

Thank you in advance.
-Christop Harder



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?b677a42e-a351-7fd5-24e8-770b251d6ba5>