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
This commit is contained in:
Emmanuel Vadot 2018-11-26 14:27:13 +00:00
parent cac83db9b7
commit 198e1deb5f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=340971

View File

@ -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: