Author: manu Date: Mon Nov 26 14:27:13 2018 New Revision: 340971 URL: https://svnweb.freebsd.org/changeset/base/340971
Log: aw_usbphy: Do not error if it's not phy 0 Only phy0 can switch between host/otg, do not error if we request host mode on phy != 0. MFC after: 1 month X-MFC with: r340846 Modified: head/sys/arm/allwinner/aw_usbphy.c Modified: head/sys/arm/allwinner/aw_usbphy.c ============================================================================== --- head/sys/arm/allwinner/aw_usbphy.c Mon Nov 26 14:01:05 2018 (r340970) +++ head/sys/arm/allwinner/aw_usbphy.c Mon Nov 26 14:27:13 2018 (r340971) @@ -389,8 +389,11 @@ awusbphy_set_mode(struct phynode *phynode, int mode) phy = phynode_get_id(phynode); sc = device_get_softc(dev); - if (phy != 0) - return (EINVAL); + if (phy != 0) { + if (mode != PHY_USB_MODE_HOST) + return (EINVAL); + return (0); + } switch (mode) { case PHY_USB_MODE_HOST: _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"