Hello,
On 23/03/15(Mon) 14:55, Hendrik Meyburgh wrote:
>
> The 5.7 snapshot for 18th of March is not picking up any of my external HDD
> on USB, it does not show in dmesg.
>
> Below is some information about the hardware.
>
> I have played around with the settings in the bios, as per some previous
> suggestions about disabling USB 3 and XHCI, but I only have enable/disable
> usb options.
>
> How can I debug this issue further. The system was installed via the same
> usb ports and it was working in 5.6.
>
> Here is the dmesg:
> [...]
> Hub Descriptor:
> bLength 17
> bDescriptorType 42
> nNbrPorts 8
> wHubCharacteristic 0x0000
> Ganged power switching
> Ganged overcurrent protection
> TT think time 8 FS bits
> bPwrOn2PwrGood 10 * 2 milli seconds
> bHubContrCurrent 0 milli Ampere
> DeviceRemovable 0x00 0x00
> PortPwrCtrlMask 0x00 0x00
> Hub Port Status:
> Port 1: 0000.0900 Unknown Speed Recovery
> Port 2: 0001.0900 C_CONNECT Unknown Speed Recovery
^^^^^^^^^
So apparently your device is correctly detected as connected. Sadly the
uhub(4) logic is a bit tricky and it's hard to tell where the problem
comes from.
Does unplugging/plugging your HDD makes OpenBSD recognize it?
The patch below should help. Could you build a kernel with it and
UHUB_DEBUG defined, boot it then unplug/plug your disk and send me
the dmesg?
Thanks,
Martin
Index: uhub.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/uhub.c,v
retrieving revision 1.83
diff -u -p -r1.83 uhub.c
--- uhub.c 12 Feb 2015 05:07:52 -0000 1.83
+++ uhub.c 23 Mar 2015 13:37:38 -0000
@@ -47,6 +47,8 @@
#define UHUB_INTR_INTERVAL 255 /* ms */
+#define UHUB_DEBUG
+
#ifdef UHUB_DEBUG
#define DPRINTF(x...) do { printf(x); } while (0)
#else
@@ -377,8 +379,13 @@ uhub_explore(struct usbd_device *dev)
change = UGETW(up->status.wPortChange);
reconnect = up->reattach;
up->reattach = 0;
- DPRINTF("%s: port %d status=0x%04x change=0x%04x\n",
- sc->sc_dev.dv_xname, port, status, change);
+
+#ifdef UHUB_DEBUG
+ if (up->device != NULL || (status & UPS_CURRENT_CONNECT_STATUS))
+ printf("%s: port %d status=0x%04x change=0x%04x\n",
+ sc->sc_dev.dv_xname, port, status, change);
+#endif
+
if (change & UPS_C_PORT_ENABLED) {
usbd_clear_port_feature(dev, port, UHF_C_PORT_ENABLE);
if (change & UPS_C_CONNECT_STATUS) {
@@ -402,6 +409,10 @@ uhub_explore(struct usbd_device *dev)
sc->sc_dev.dv_xname, port);
}
}
+
+ if (up->device == NULL && (status & UPS_CURRENT_CONNECT_STATUS))
+ change |= UPS_C_CONNECT_STATUS;
+
if (!reconnect && !(change & UPS_C_CONNECT_STATUS)) {
/* No status change, just do recursive explore. */
if (up->device != NULL && up->device->hub != NULL)