From owner-freebsd-usb@freebsd.org Tue Jan 5 07:07:00 2016 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DC73EA6217B for ; Tue, 5 Jan 2016 07:07:00 +0000 (UTC) (envelope-from sebastian.huber@embedded-brains.de) Received: from mail.embedded-brains.de (mail.embedded-brains.de [82.135.62.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 90CDD1A3A for ; Tue, 5 Jan 2016 07:07:00 +0000 (UTC) (envelope-from sebastian.huber@embedded-brains.de) Received: from localhost (localhost.localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id 88E972A0936 for ; Tue, 5 Jan 2016 08:00:33 +0100 (CET) Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id oCXzMCNjmQfN for ; Tue, 5 Jan 2016 08:00:33 +0100 (CET) Received: from localhost (localhost.localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id 1B55F2A096D for ; Tue, 5 Jan 2016 08:00:33 +0100 (CET) X-Virus-Scanned: amavisd-new at zimbra.eb.localhost Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 2XHMV7OaECsc for ; Tue, 5 Jan 2016 08:00:33 +0100 (CET) Received: from [192.168.96.129] (unknown [192.168.96.129]) by mail.embedded-brains.de (Postfix) with ESMTPSA id 027E32A0936 for ; Tue, 5 Jan 2016 08:00:32 +0100 (CET) To: freebsd-usb@freebsd.org From: Sebastian Huber Subject: dwc_otg: Problem with directly connected full/low speed devices Message-ID: <568B69FE.5030307@embedded-brains.de> Date: Tue, 5 Jan 2016 08:00:14 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2016 07:07:01 -0000 Hello, I use an Altera Cyclone V development kit which the dwc_otg driver from=20 FreeBSD. The device enumeration of full/low speed devices directly=20 connected to the root hub fails since split transactions are used. If I=20 connect them via a hub it works fine. I used the following hack to get=20 them working with a direct connection: diff --git a/sys/dev/usb/controller/dwc_otg.c=20 b/sys/dev/usb/controller/dwc_otg.c index 2110b94..37cca8e 100644 --- a/sys/dev/usb/controller/dwc_otg.c +++ b/sys/dev/usb/controller/dwc_otg.c @@ -3340,7 +3340,7 @@ dwc_otg_setup_standard_chain(struct usb_xfer *xfer) case USB_SPEED_FULL: case USB_SPEED_LOW: /* check if root HUB port is running High Speed = */ - if (xfer->xroot->udev->parent_hs_hub !=3D NULL) { + if (xfer->xroot->udev->parent_hs_hub !=3D NULL &&= 0) { hcsplt =3D HCSPLT_SPLTENA | (xfer->xroot->udev->hs_port_no << HCSPLT_PRTADDR_SHIFT) | I am not sure how to fix this properly. Is this a specific problem with=20 the Altera Cyclone V board or is this problem also present on other=20 boards e.g. RPI2? --=20 Sebastian Huber, embedded brains GmbH Address : Dornierstr. 4, D-82178 Puchheim, Germany Phone : +49 89 189 47 41-16 Fax : +49 89 189 47 41-09 E-Mail : sebastian.huber@embedded-brains.de PGP : Public key available on request. Diese Nachricht ist keine gesch=C3=A4ftliche Mitteilung im Sinne des EHUG= .