From owner-svn-src-all@freebsd.org Fri Nov 23 19:45:12 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CBBF8114FDED; Fri, 23 Nov 2018 19:45:12 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5C9B272343; Fri, 23 Nov 2018 19:45:12 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3D9932326E; Fri, 23 Nov 2018 19:45:12 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wANJjCPR028559; Fri, 23 Nov 2018 19:45:12 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wANJjCnh028558; Fri, 23 Nov 2018 19:45:12 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201811231945.wANJjCnh028558@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Fri, 23 Nov 2018 19:45:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r340847 - head/sys/arm/allwinner X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/sys/arm/allwinner X-SVN-Commit-Revision: 340847 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5C9B272343 X-Spamd-Result: default: False [1.48 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_LONG(0.40)[0.400,0]; NEURAL_SPAM_MEDIUM(0.71)[0.712,0]; NEURAL_SPAM_SHORT(0.37)[0.368,0] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Nov 2018 19:45:13 -0000 Author: manu Date: Fri Nov 23 19:45:11 2018 New Revision: 340847 URL: https://svnweb.freebsd.org/changeset/base/340847 Log: a10_ehci: Always set the phy to host mode MFC after: 1 month Modified: head/sys/arm/allwinner/a10_ehci.c Modified: head/sys/arm/allwinner/a10_ehci.c ============================================================================== --- head/sys/arm/allwinner/a10_ehci.c Fri Nov 23 19:44:26 2018 (r340846) +++ head/sys/arm/allwinner/a10_ehci.c Fri Nov 23 19:45:11 2018 (r340847) @@ -63,7 +63,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #define EHCI_HC_DEVSTR "Allwinner Integrated USB 2.0 controller" @@ -242,6 +242,11 @@ a10_ehci_attach(device_t self) /* Enable USB PHY */ if (phy_get_by_ofw_name(self, 0, "usb", &aw_sc->phy) == 0) { + err = phy_usb_set_mode(aw_sc->phy, PHY_USB_MODE_HOST); + if (err != 0) { + device_printf(self, "Could not set phy to host mode\n"); + goto error; + } err = phy_enable(aw_sc->phy); if (err != 0) { device_printf(self, "Could not enable phy\n");